# The Stable theorem atlas

This is the complete interactive reading surface for the Stable native Peano
arithmetic library. It is generated from the same checked snapshot used by the
current library tests and catalog—not copied by hand. The released training
corpus remains explicitly frozen at its earlier 247-theorem checkpoint. Search
by mathematical idea, filter by
domain, focus a theorem to move backward to prerequisites or forward to its
clients, and expand any card to read the exact first-order statement and the
complete authored tactic recipe.

```{admonition} What “actual proof” means here
:class: tip
Every checked card embeds its full authored tactic body plus the explicit
`use` imports that reconstruct its dependencies. Replay produces one closed
self-contained certificate, which the independent kernel checks from the
empty context. The much larger certificate tree is identified by its hash and
metrics rather than pasted as tens of thousands of constructor nodes.
```

```{admonition} Stable is not the same as hosted deployment
:class: note
These 432 theorems are the canonical Stable repository edition.
Whether a hosted Peano Lab has deployed this exact commit is a separate
operational state and does not downgrade the library to Alpha. See
{doc}`Alpha and Stable library editions <library-editions>`.
```

<div class="pa-atlas-hero" role="note">
  <div><strong>432</strong><span>checked native theorems</span></div>
  <div><strong>1,982,360</strong><span>structural proof occurrences</span></div>
  <div><strong>57,692</strong><span>self-contained Cuts</span></div>
  <div><strong>1</strong><span>explicit language boundary</span></div>
</div>

Snapshot root: <code>4d02dc439d53533e8992a471b26ee34059fb6001f822041e42c56b2cc0a7a079</code>
Generated card digest: <code>1036b44c204887ae37c4e5d4fd78954078b357847c13c98e0582f13a7d94cf99</code>

<noscript>
  <p class="pa-noscript">The theorem cards remain readable without JavaScript. Search, filtering, copy buttons, and the focused dependency navigator require JavaScript.</p>
</noscript>

```{raw} html
<div class="pa-atlas" data-pa-atlas data-snapshot="4d02dc439d53533e8992a471b26ee34059fb6001f822041e42c56b2cc0a7a079">
  <section class="pa-atlas-controls" aria-label="Theorem atlas controls">
    <label>Search all names, statements, summaries, and prerequisites
      <input type="search" data-pa-search placeholder="Try: Euclid, remainder, beta, cancellation…" autocomplete="off">
    </label>
    <label>Domain
      <select data-pa-domain>
        <option value="all">All domains (432)</option>
        <option value="equality">Equality (10)</option>
<option value="addition">Addition (12)</option>
<option value="multiplication">Multiplication (19)</option>
<option value="order">Order (29)</option>
<option value="divisibility">Divisibility (20)</option>
<option value="congruence">Congruence &amp; CRT (58)</option>
<option value="division">Division (13)</option>
<option value="gcd_coprime">GCD, Bézout &amp; coprimality (45)</option>
<option value="primes">Primes (13)</option>
<option value="factorization">β sequences, products &amp; FTA (76)</option>
<option value="quadratic_residues">Quadratic reciprocity campaign (137)</option>
      </select>
    </label>
    <label>Status
      <select data-pa-status>
        <option value="all">Checked + boundary</option>
        <option value="checked">Checked only (432)</option>
        <option value="blocked_by_language">Language boundary (1)</option>
      </select>
    </label>
    <button type="button" data-pa-clear>Clear filters</button>
    <output data-pa-count aria-live="polite">433 entries</output>
  </section>

  <section class="pa-focus-panel" aria-labelledby="pa-focus-title">
    <div class="pa-focus-heading">
      <div><span class="pa-eyebrow">Back-and-forth navigator</span><h2 id="pa-focus-title">Focus one theorem</h2></div>
      <label>Selected theorem
        <select data-pa-focus>
          <option value="zero_add">zero_add — Zero is a left identity for addition</option>
<option value="add_succ_left">add_succ_left — Successor moves through addition on the left</option>
<option value="add_comm">add_comm — Addition is commutative</option>
<option value="add_assoc">add_assoc — Addition is associative</option>
<option value="mul_zero_left">mul_zero_left — Zero is a left annihilator for multiplication</option>
<option value="mul_succ_left">mul_succ_left — Successor moves through multiplication on the left</option>
<option value="mul_comm">mul_comm — Multiplication is commutative</option>
<option value="mul_add">mul_add — Multiplication distributes over right addition</option>
<option value="mul_assoc">mul_assoc — Multiplication is associative</option>
<option value="one_mul">one_mul — One is a left identity for multiplication</option>
<option value="mul_one">mul_one — One is a right identity for multiplication</option>
<option value="add_mul">add_mul — Left addition distributes through multiplication</option>
<option value="succ_ne_zero">succ_ne_zero — A successor is not zero</option>
<option value="succ_injective">succ_injective — Successor is injective</option>
<option value="le_refl">le_refl — Order is reflexive</option>
<option value="le_trans">le_trans — Order is transitive</option>
<option value="no_succ_add_fixed">no_succ_add_fixed — Adding a positive successor has no fixed point</option>
<option value="drop_add_prefix_from_fixed">drop_add_prefix_from_fixed — Drop an additive prefix from a fixed-point equation</option>
<option value="antisymm_from_witnesses">antisymm_from_witnesses — Opposing additive witnesses force equality</option>
<option value="le_antisymm">le_antisymm — Order is antisymmetric</option>
<option value="le_total">le_total — Natural-number order is total</option>
<option value="add_eq_zero_right">add_eq_zero_right — A zero sum has a zero right summand</option>
<option value="mul_eq_zero">mul_eq_zero — A zero product has a zero factor</option>
<option value="eq_symm">eq_symm — Equality is symmetric</option>
<option value="eq_trans">eq_trans — Equality is transitive</option>
<option value="succ_congr">succ_congr — Successor preserves equality</option>
<option value="zero_or_succ">zero_or_succ — Every natural is zero or a successor</option>
<option value="nonzero_is_succ">nonzero_is_succ — Every nonzero natural has a predecessor</option>
<option value="add_congr">add_congr — Addition preserves equality in both arguments</option>
<option value="mul_congr">mul_congr — Multiplication preserves equality in both arguments</option>
<option value="add_right_cancel">add_right_cancel — Addition cancels on the right</option>
<option value="add_left_cancel">add_left_cancel — Addition cancels on the left</option>
<option value="zero_le">zero_le — Zero is below every natural number</option>
<option value="le_succ_self">le_succ_self — Every natural is below its successor</option>
<option value="le_zero">le_zero — Only zero lies below zero</option>
<option value="one_le_of_ne_zero">one_le_of_ne_zero — Every nonzero natural is at least one</option>
<option value="ne_zero_of_one_le">ne_zero_of_one_le — A natural at least one is nonzero</option>
<option value="le_add_left">le_add_left — A number is below a left-added summand</option>
<option value="le_add_right">le_add_right — A number is below itself plus a right summand</option>
<option value="add_le_add_right">add_le_add_right — Adding the same right summand preserves order</option>
<option value="add_le_add_left">add_le_add_left — Adding the same left summand preserves order</option>
<option value="succ_le_succ">succ_le_succ — Successor preserves order</option>
<option value="le_of_succ_le_succ">le_of_succ_le_succ — Successor reflects order</option>
<option value="le_succ">le_succ — Order is preserved by raising the upper bound</option>
<option value="lt_to_le">lt_to_le — Strict order entails weak order</option>
<option value="add_le_cancel_right">add_le_cancel_right — Cancel a common right summand from order</option>
<option value="lt_irrefl_expanded">lt_irrefl_expanded — Strict order is irreflexive</option>
<option value="le_eq_or_lt">le_eq_or_lt — A weak inequality is equality or strict inequality</option>
<option value="lt_of_lt_of_le">lt_of_lt_of_le — Strict order followed by weak order</option>
<option value="lt_of_le_of_lt">lt_of_le_of_lt — Weak order followed by strict order</option>
<option value="lt_trans">lt_trans — Strict order is transitive</option>
<option value="le_or_lt">le_or_lt — Weak-or-reverse-strict comparison</option>
<option value="lt_trichotomy">lt_trichotomy — Natural strict-order trichotomy</option>
<option value="lt_not_le">lt_not_le — Strict order excludes reverse weak order</option>
<option value="le_not_lt">le_not_lt — Weak order excludes reverse strict order</option>
<option value="lt_not_eq_add_middle">lt_not_eq_add_middle — A strict bound cannot occur inside an additive decomposition of the lower term</option>
<option value="mul_le_mul_left">mul_le_mul_left — Left multiplication preserves order</option>
<option value="mul_le_mul_right">mul_le_mul_right — Right multiplication preserves order</option>
<option value="mul_lt_mul_succ_left_nonzero">mul_lt_mul_succ_left_nonzero — A nonzero left factor strictly separates successor products</option>
<option value="division_remainder_succ">division_remainder_succ — Division with remainder for successor divisors</option>
<option value="division_remainder_exists">division_remainder_exists — Division with remainder for every nonzero divisor</option>
<option value="remainder_bound_step">remainder_bound_step — Advance a strict remainder bound by one step</option>
<option value="division_block_upper">division_block_upper — A bounded remainder lies below the next divisor block</option>
<option value="positive_quotient_gap_impossible">positive_quotient_gap_impossible — A positive quotient gap contradicts bounded remainders</option>
<option value="remainder_unique_same_quotient">remainder_unique_same_quotient — Remainders are unique at a fixed quotient</option>
<option value="division_remainder_unique">division_remainder_unique — Quotient and remainder are unique</option>
<option value="zero_remainder_implies_multiple">zero_remainder_implies_multiple — Zero remainder implies divisibility</option>
<option value="multiple_has_zero_remainder">multiple_has_zero_remainder — A multiple has a bounded zero remainder</option>
<option value="add_eq_zero_left">add_eq_zero_left — A zero sum has a zero left summand</option>
<option value="add_eq_zero_components">add_eq_zero_components — Both summands of a zero sum are zero</option>
<option value="mul_eq_one_components">mul_eq_one_components — Both factors of a product equal to one are one</option>
<option value="mul_ne_zero">mul_ne_zero — A product of nonzero naturals is nonzero</option>
<option value="mul_left_cancel_nonzero">mul_left_cancel_nonzero — A nonzero factor cancels on the left</option>
<option value="mul_right_cancel_nonzero">mul_right_cancel_nonzero — A nonzero factor cancels on the right</option>
<option value="two_large_factors_impossible">two_large_factors_impossible — Two is not a product of two successors of successors</option>
<option value="prime_two">prime_two — Two is prime</option>
<option value="multiple_zero">multiple_zero — Every natural number divides zero</option>
<option value="one_multiple">one_multiple — One divides every natural number</option>
<option value="multiple_refl">multiple_refl — Divisibility is reflexive</option>
<option value="multiple_add">multiple_add — A common divisor divides a sum</option>
<option value="multiple_mul_right">multiple_mul_right — A divisor remains a divisor after right multiplication</option>
<option value="multiple_mul_left">multiple_mul_left — A divisor remains a divisor after left multiplication</option>
<option value="multiple_trans">multiple_trans — Divisibility is transitive</option>
<option value="divisor_le_nonzero">divisor_le_nonzero — A divisor of a nonzero natural is bounded</option>
<option value="divisor_one">divisor_one — Every divisor of one is one</option>
<option value="multiple_antisymm">multiple_antisymm — Divisibility is antisymmetric</option>
<option value="factor_difference">factor_difference — A common-factor difference retains the factor</option>
<option value="divides_remainder">divides_remainder — A common divisor divides a Euclidean remainder</option>
<option value="divides_linear_step">divides_linear_step — A common divisor divides a Euclidean linear step</option>
<option value="not_multiple_pointwise">not_multiple_pointwise — A nonmultiple differs from every candidate multiple</option>
<option value="not_multiple_from_pointwise">not_multiple_from_pointwise — Pointwise inequality excludes every multiple witness</option>
<option value="is_gcd_zero_right">is_gcd_zero_right — Every natural is the gcd of itself and zero</option>
<option value="is_gcd_symm">is_gcd_symm — The relational gcd specification is symmetric</option>
<option value="is_gcd_dvd_left">is_gcd_dvd_left — A relational gcd divides the left input</option>
<option value="is_gcd_dvd_right">is_gcd_dvd_right — A relational gcd divides the right input</option>
<option value="is_gcd_greatest">is_gcd_greatest — Every common divisor divides a relational gcd</option>
<option value="is_gcd_of_dvd">is_gcd_of_dvd — A divisor is the gcd of itself and its multiple</option>
<option value="is_gcd_unique">is_gcd_unique — The relational greatest common divisor is unique</option>
<option value="is_gcd_euclid_forward">is_gcd_euclid_forward — Euclidean gcd invariance in the forward direction</option>
<option value="is_gcd_euclid_backward">is_gcd_euclid_backward — Euclidean gcd invariance in the backward direction</option>
<option value="gcd_exists_up_to">gcd_exists_up_to — A greatest common divisor exists below a fixed bound</option>
<option value="gcd_exists_relational">gcd_exists_relational — A greatest common divisor exists</option>
<option value="coprime_symm">coprime_symm — Coprimality is symmetric</option>
<option value="coprime_one_right">coprime_one_right — Every natural number is coprime to one</option>
<option value="coprime_one_left">coprime_one_left — One is coprime to every natural number</option>
<option value="coprime_to_is_gcd_one">coprime_to_is_gcd_one — Coprimality constructs a relational gcd equal to one</option>
<option value="is_gcd_one_to_coprime">is_gcd_one_to_coprime — A relational gcd equal to one implies coprimality</option>
<option value="add_permute_outer">add_permute_outer — The outer terms of two additive pairs may be permuted</option>
<option value="balanced_bezout_euclid_step">balanced_bezout_euclid_step — Balanced Bézout coefficients cross one Euclidean step</option>
<option value="gcd_balanced_bezout_exists_up_to">gcd_balanced_bezout_exists_up_to — A gcd with balanced Bézout witnesses exists below a bound</option>
<option value="gcd_balanced_bezout_exists">gcd_balanced_bezout_exists — A gcd has balanced natural Bézout coefficients</option>
<option value="balanced_combination_scale_right">balanced_combination_scale_right — A balanced combination may be scaled on the right</option>
<option value="common_divisor_divides_balanced_result">common_divisor_divides_balanced_result — A common divisor divides a balanced-combination result</option>
<option value="coprime_balanced_bezout">coprime_balanced_bezout — Coprime inputs have a balanced Bézout identity</option>
<option value="gauss_coprime_cancel">gauss_coprime_cancel — Gauss cancellation for coprime factors</option>
<option value="eq_decidable">eq_decidable — Equality of naturals is decidable</option>
<option value="multiple_decidable_nonzero">multiple_decidable_nonzero — Divisibility by a nonzero natural is decidable</option>
<option value="multiple_decidable">multiple_decidable — Divisibility of naturals is decidable</option>
<option value="factor_property_succ">factor_property_succ — A bounded factor property extends across one boundary</option>
<option value="factor_search_up_to">factor_search_up_to — Bounded nontrivial factor search</option>
<option value="prime_or_composite">prime_or_composite — Every nontrivial natural is prime or composite</option>
<option value="prime_nonzero">prime_nonzero — Every prime natural is nonzero</option>
<option value="prime_decidable">prime_decidable — Primality of naturals is decidable</option>
<option value="factor_nonzero_left">factor_nonzero_left — A left factor of a nonzero product is nonzero</option>
<option value="proper_factor_lt">proper_factor_lt — A proper factor is strictly smaller than its product</option>
<option value="prime_divisor_exists_up_to">prime_divisor_exists_up_to — Bounded prime-divisor existence</option>
<option value="prime_divisor_exists">prime_divisor_exists — Every nontrivial natural has a prime divisor</option>
<option value="prime_divisor_eq_one_or_self">prime_divisor_eq_one_or_self — Every divisor of a prime is one or the prime</option>
<option value="euclid_prime_dvd_product">euclid_prime_dvd_product — Euclid&#x27;s lemma</option>
<option value="mod_eq_refl">mod_eq_refl — Balanced natural congruence is reflexive</option>
<option value="mod_eq_symm">mod_eq_symm — Balanced natural congruence is symmetric</option>
<option value="mod_eq_trans">mod_eq_trans — Balanced natural congruence is transitive</option>
<option value="mod_eq_add">mod_eq_add — Balanced congruence respects addition</option>
<option value="mod_eq_mul_right">mod_eq_mul_right — Balanced congruence is stable under right multiplication</option>
<option value="mod_eq_mul_left">mod_eq_mul_left — Balanced congruence is stable under left multiplication</option>
<option value="mod_eq_mul">mod_eq_mul — Balanced congruence respects multiplication</option>
<option value="remainder_decomposition_to_mod_eq">remainder_decomposition_to_mod_eq — A quotient-remainder decomposition gives congruence</option>
<option value="mod_eq_bounded_unique">mod_eq_bounded_unique — Bounded congruent representatives are equal</option>
<option value="mod_eq_to_remainder_decomposition">mod_eq_to_remainder_decomposition — A bounded congruent representative is a directed remainder</option>
<option value="beta_modulus_nonzero">beta_modulus_nonzero — Every Gödel-beta modulus is nonzero</option>
<option value="beta_at_self_of_bound">beta_at_self_of_bound — A bounded value is its own Gödel-beta residue</option>
<option value="beta_at_exists">beta_at_exists — Every Gödel-beta position has a decoded value</option>
<option value="beta_at_unique">beta_at_unique — A Gödel-beta decoded value is unique</option>
<option value="beta_at_exists_unique">beta_at_exists_unique — Every Gödel-beta position has exactly one decoded value</option>
<option value="beta_at_to_mod_eq">beta_at_to_mod_eq — A Gödel-beta value is congruent to its code</option>
<option value="beta_at_of_mod_eq_bound">beta_at_of_mod_eq_bound — A bounded congruent value is a Gödel-beta value</option>
<option value="dvd_to_mod_zero">dvd_to_mod_zero — A multiple is congruent to zero</option>
<option value="add_residue">add_residue — Absorb a known residue decomposition into a multiple</option>
<option value="add_residue_lift">add_residue_lift — Lift an additive residue decomposition</option>
<option value="square_decomp">square_decomp — Expand the square of a quotient-residue decomposition</option>
<option value="square_residue_lift">square_residue_lift — Lift a residue decomposition through squaring</option>
<option value="square_residue_witness">square_residue_witness — Package a square residue as an existential witness</option>
<option value="bezout_mod_left">bezout_mod_left — Balanced Bézout identity projected modulo the left modulus</option>
<option value="bezout_mod_right">bezout_mod_right — Balanced Bézout identity projected modulo the right modulus</option>
<option value="mod_eq_predecessor_cancel">mod_eq_predecessor_cancel — Successor-predecessor cancellation in balanced congruence</option>
<option value="binary_crt">binary_crt — Constructive binary Chinese remainder theorem</option>
<option value="binary_crt_remainders">binary_crt_remainders — Binary CRT with directed remainder witnesses</option>
<option value="binary_crt_beta_pair">binary_crt_beta_pair — A single Gödel-beta code realizes two bounded values</option>
<option value="beta_modulus_coprime_base">beta_modulus_coprime_base — A Gödel-beta modulus is coprime to its base</option>
<option value="common_divisor_beta_moduli_divides_gap_times_c">common_divisor_beta_moduli_divides_gap_times_c — A common beta-modulus divisor divides the scaled index gap</option>
<option value="beta_moduli_coprime_of_gap_dvd">beta_moduli_coprime_of_gap_dvd — Divisible index gaps give coprime Gödel-beta moduli</option>
<option value="binary_crt_beta_pair_of_gap_dvd">binary_crt_beta_pair_of_gap_dvd — A divisible index gap supplies a two-position Gödel-beta code</option>
<option value="bounded_common_multiple_step">bounded_common_multiple_step — A bounded common multiple extends by one</option>
<option value="bounded_common_multiple_exists">bounded_common_multiple_exists — Every finite initial interval has a nonzero common multiple</option>
<option value="beta_moduli_coprime_of_lt_bounded_common_multiple">beta_moduli_coprime_of_lt_bounded_common_multiple — Ordered bounded Gödel-beta moduli are coprime</option>
<option value="beta_moduli_pairwise_coprime_bounded">beta_moduli_pairwise_coprime_bounded — A bounded Gödel-beta prefix has pairwise coprime moduli</option>
<option value="bounded_beta_moduli_pairwise_coprime_exists">bounded_beta_moduli_pairwise_coprime_exists — Every finite Gödel-beta prefix admits a pairwise-coprime base</option>
<option value="coprime_mul_left">coprime_mul_left — Coprimality is closed under multiplication on the left</option>
<option value="coprime_mul_right">coprime_mul_right — Coprimality is closed under multiplication on the right</option>
<option value="mod_eq_of_mod_eq_multiple">mod_eq_of_mod_eq_multiple — Congruence descends along modulus divisibility</option>
<option value="binary_crt_fold_step">binary_crt_fold_step — One CRT fold step preserves all accumulated congruences</option>
<option value="right_factor_divides_product">right_factor_divides_product — The right factor divides a product</option>
<option value="beta_accumulated_product_step">beta_accumulated_product_step — Extend the accumulated beta-modulus product invariant</option>
<option value="beta_crt_prefix_congruence_step">beta_crt_prefix_congruence_step — Extend decoded-prefix congruence by one beta position</option>
<option value="beta_crt_prefix_invariant_step">beta_crt_prefix_invariant_step — One full bounded beta-prefix CRT invariant step</option>
<option value="bounded_beta_crt_prefix_invariant">bounded_beta_crt_prefix_invariant — Bounded beta-prefix CRT invariant</option>
<option value="bounded_beta_crt_for_existing_code">bounded_beta_crt_for_existing_code — Bounded CRT witness for an existing beta code</option>
<option value="prime_unbounded">prime_unbounded — There is a prime larger than every given natural</option>
<option value="beta_value_le_code">beta_value_le_code — A decoded beta value is bounded by its code</option>
<option value="base_le_beta_modulus">base_le_beta_modulus — The beta base is bounded by every beta modulus</option>
<option value="le_scaled_nonzero">le_scaled_nonzero — Nonzero scaling is monotone</option>
<option value="scaled_bounded_common_multiple">scaled_bounded_common_multiple — Scaling preserves bounded common multiples</option>
<option value="beta_value_lt_scaled_base">beta_value_lt_scaled_base — Old decoded values fit the scaled target base</option>
<option value="new_value_lt_scaled_base">new_value_lt_scaled_base — An appended value fits the scaled target base</option>
<option value="beta_exclusive_accumulated_product_step">beta_exclusive_accumulated_product_step — Extend an exclusive beta-modulus product invariant</option>
<option value="beta_exclusive_recode_congruence_step">beta_exclusive_recode_congruence_step — Extend exclusive cross-base beta congruences</option>
<option value="beta_exclusive_recode_invariant_step">beta_exclusive_recode_invariant_step — One exclusive beta-recoding invariant step</option>
<option value="bounded_beta_exclusive_recode_invariant">bounded_beta_exclusive_recode_invariant — Bounded exclusive beta-recoding invariant</option>
<option value="beta_prefix_extend">beta_prefix_extend — Recode and append one exact beta-prefix value</option>
<option value="beta_prefix_product_trace_exists">beta_prefix_product_trace_exists — Exact beta-coded prefix-product trace exists</option>
<option value="beta_product_exists">beta_product_exists — Relational finite beta product exists</option>
<option value="beta_product_functional">beta_product_functional — Finite beta Product is functional</option>
<option value="beta_product_exists_unique">beta_product_exists_unique — A unique finite beta Product exists</option>
<option value="beta_product_zero">beta_product_zero — The empty beta Product is one</option>
<option value="beta_product_succ_decompose">beta_product_succ_decompose — Decompose a successor beta Product</option>
<option value="beta_product_succ_append">beta_product_succ_append — Append one factor to a beta Product</option>
<option value="beta_product_transport_prefix">beta_product_transport_prefix — Transport Product across an extensionally preserved factor prefix</option>
<option value="beta_factor_prefix_product_append">beta_factor_prefix_product_append — Extend a factor prefix and Product together</option>
<option value="all_prime_empty">all_prime_empty — AllPrime holds on the empty beta prefix</option>
<option value="all_prime_succ_intro">all_prime_succ_intro — Extend AllPrime across one beta entry</option>
<option value="all_prime_succ_elim_prefix">all_prime_succ_elim_prefix — Project AllPrime to the previous beta prefix</option>
<option value="all_prime_succ_elim_last">all_prime_succ_elim_last — Extract the last prime from AllPrime</option>
<option value="all_prime_transport">all_prime_transport — Transport AllPrime across beta recoding</option>
<option value="sorted_empty">sorted_empty — Adjacent Sorted holds on the empty beta prefix</option>
<option value="sorted_singleton">sorted_singleton — Adjacent Sorted holds on a singleton beta prefix</option>
<option value="sorted_succ_intro">sorted_succ_intro — Extend adjacent Sorted across one beta entry</option>
<option value="sorted_succ_elim_prefix">sorted_succ_elim_prefix — Project adjacent Sorted to the previous beta prefix</option>
<option value="sorted_succ_elim_last">sorted_succ_elim_last — Extract the last adjacent order witness</option>
<option value="sorted_transport">sorted_transport — Transport adjacent Sorted across beta recoding</option>
<option value="beta_prefix_extend_all_prime">beta_prefix_extend_all_prime — Recode a beta prefix and preserve AllPrime</option>
<option value="beta_prefix_extend_sorted_singleton">beta_prefix_extend_sorted_singleton — Recode an empty prefix into a sorted singleton</option>
<option value="beta_prefix_extend_sorted_succ">beta_prefix_extend_sorted_succ — Recode a nonempty prefix and preserve adjacent Sorted</option>
<option value="beta_canonical_append_empty">beta_canonical_append_empty — Canonical first-prime append</option>
<option value="beta_canonical_append_succ">beta_canonical_append_succ — Canonical ordered-prime append</option>
<option value="prime_divides_decidable">prime_divides_decidable — Prime divisibility is constructively decidable</option>
<option value="greatest_prime_divisor_search">greatest_prime_divisor_search — Bounded greatest-prime-divisor search</option>
<option value="greatest_prime_divisor_exists">greatest_prime_divisor_exists — A greatest prime divisor exists</option>
<option value="greatest_prime_divisor_quotient_bound">greatest_prime_divisor_quotient_bound — Prime divisors of the quotient are bounded</option>
<option value="greatest_prime_divisor_descent">greatest_prime_divisor_descent — Greatest-prime-divisor quotient descent</option>
<option value="beta_factor_divides_product">beta_factor_divides_product — Every decoded factor divides its Product</option>
<option value="beta_canonical_append_general">beta_canonical_append_general — Append one prime to any canonical beta prefix</option>
<option value="beta_canonical_last_factor_bound">beta_canonical_last_factor_bound — The last canonical factor obeys prime-divisor bounds</option>
<option value="prime_factorization_exists_up_to">prime_factorization_exists_up_to — Bounded prime-factorization existence</option>
<option value="prime_factorization_existence">prime_factorization_existence — Existence of a finite prime factorization</option>
<option value="beta_prime_divisor_product_member">beta_prime_divisor_product_member — A prime divisor of an AllPrime beta Product occurs as a factor</option>
<option value="beta_sorted_factor_le_last">beta_sorted_factor_le_last — Every sorted factor is bounded by the last factor</option>
<option value="beta_nonempty_all_prime_product_ne_one">beta_nonempty_all_prime_product_ne_one — A nonempty AllPrime beta Product is not one</option>
<option value="beta_all_prime_product_one_iff_length_zero">beta_all_prime_product_one_iff_length_zero — An AllPrime beta Product is one exactly at length zero</option>
<option value="beta_canonical_last_factors_equal">beta_canonical_last_factors_equal — Canonical factorizations have equal last factors</option>
<option value="beta_canonical_product_cancel_last">beta_canonical_product_cancel_last — Cancel the common last factor of canonical Products</option>
<option value="prime_factorization_uniqueness_by_length">prime_factorization_uniqueness_by_length — Prime-factorization uniqueness by length</option>
<option value="prime_factorization_uniqueness">prime_factorization_uniqueness — Uniqueness of finite prime factorization</option>
<option value="fundamental_theorem_of_arithmetic">fundamental_theorem_of_arithmetic — Fundamental theorem of arithmetic</option>
<option value="prime_three">prime_three — Three is prime</option>
<option value="two_prime_product_uniqueness">two_prime_product_uniqueness — A product of two primes is unique up to order</option>
<option value="fourth_power_regroup">fourth_power_regroup — Regroup a fourth power as a square of a square</option>
<option value="mod5_residue_complete">mod5_residue_complete — Every natural has one of five residues modulo five</option>
<option value="mod5_nonzero_residue_cases">mod5_nonzero_residue_cases — A nonmultiple of five has a nonzero residue</option>
<option value="mod5_square_residue_one">mod5_square_residue_one — Squaring residue one modulo five preserves residue one</option>
<option value="mod5_square_residue_two">mod5_square_residue_two — Squaring residue two modulo five gives residue four</option>
<option value="mod5_square_residue_three">mod5_square_residue_three — Squaring residue three modulo five gives residue four</option>
<option value="mod5_square_residue_four">mod5_square_residue_four — Squaring residue four modulo five gives residue one</option>
<option value="mod5_fourth_power_residue_one">mod5_fourth_power_residue_one — Fourth powers preserve residue one modulo five</option>
<option value="mod5_fourth_power_residue_two">mod5_fourth_power_residue_two — Fourth powers of residue two are one modulo five</option>
<option value="mod5_fourth_power_residue_three">mod5_fourth_power_residue_three — Fourth powers of residue three are one modulo five</option>
<option value="mod5_fourth_power_residue_four">mod5_fourth_power_residue_four — Fourth powers of residue four are one modulo five</option>
<option value="mod5_fourth_power_one">mod5_fourth_power_one — A nonmultiple of five has fourth power one modulo five</option>
<option value="parity_cases">parity_cases — Parity cases</option>
<option value="even_odd_exclusive_pointwise">even_odd_exclusive_pointwise — Even odd exclusive pointwise</option>
<option value="even_not_odd">even_not_odd — Even not odd</option>
<option value="odd_not_even">odd_not_even — Odd not even</option>
<option value="successor_odd_of_even">successor_odd_of_even — Successor odd of even</option>
<option value="successor_even_of_odd">successor_even_of_odd — Successor even of odd</option>
<option value="even_add_even">even_add_even — Even add even</option>
<option value="even_add_odd">even_add_odd — Even add odd</option>
<option value="odd_add_even">odd_add_even — Odd add even</option>
<option value="odd_add_odd">odd_add_odd — Odd add odd</option>
<option value="even_mul_left">even_mul_left — Even mul left</option>
<option value="mul_double_right">mul_double_right — Mul double right</option>
<option value="even_mul_right">even_mul_right — Even mul right</option>
<option value="odd_mul_odd">odd_mul_odd — Odd mul odd</option>
<option value="odd_half_unique">odd_half_unique — Odd half unique</option>
<option value="odd_half_exists_unique">odd_half_exists_unique — Odd half exists unique</option>
<option value="four_mul_eq_double_double">four_mul_eq_double_double — Four mul eq double double</option>
<option value="odd_mod4_cases">odd_mod4_cases — Odd mod4 cases</option>
<option value="mod4_one_three_exclusive_pointwise">mod4_one_three_exclusive_pointwise — Mod4 one three exclusive pointwise</option>
<option value="mod4_one_is_odd">mod4_one_is_odd — Mod4 one is odd</option>
<option value="mod4_three_is_odd">mod4_three_is_odd — Mod4 three is odd</option>
<option value="prime_ne_two_is_odd">prime_ne_two_is_odd — Prime ne two is odd</option>
<option value="mod_eq_decidable_from_remainders">mod_eq_decidable_from_remainders — Mod eq decidable from remainders</option>
<option value="mod_eq_decidable_nonzero">mod_eq_decidable_nonzero — Mod eq decidable nonzero</option>
<option value="quadratic_residue_search_up_to">quadratic_residue_search_up_to — Quadratic residue search up to</option>
<option value="quadratic_residue_bounded_decidable_nonzero">quadratic_residue_bounded_decidable_nonzero — Quadratic residue bounded decidable nonzero</option>
<option value="quadratic_residue_bounded_equiv">quadratic_residue_bounded_equiv — Quadratic residue bounded equiv</option>
<option value="quadratic_residue_decidable_nonzero">quadratic_residue_decidable_nonzero — Quadratic residue decidable nonzero</option>
<option value="beta_repeat_empty">beta_repeat_empty — Beta repeat empty</option>
<option value="beta_repeat_succ_extend">beta_repeat_succ_extend — Beta repeat succ extend</option>
<option value="beta_repeat_exists">beta_repeat_exists — Beta repeat exists</option>
<option value="beta_repeat_entry_eq">beta_repeat_entry_eq — Beta repeat entry eq</option>
<option value="beta_repeat_transport_entry">beta_repeat_transport_entry — Beta repeat transport entry</option>
<option value="pow_exists">pow_exists — Pow exists</option>
<option value="pow_zero">pow_zero — Pow zero</option>
<option value="pow_functional">pow_functional — Pow functional</option>
<option value="pow_successor_decompose">pow_successor_decompose — Pow successor decompose</option>
<option value="beta_range_empty">beta_range_empty — Beta range empty</option>
<option value="beta_range_succ_extend">beta_range_succ_extend — Beta range succ extend</option>
<option value="beta_range_exists">beta_range_exists — Beta range exists</option>
<option value="beta_range_entry_eq">beta_range_entry_eq — Beta range entry eq</option>
<option value="beta_range_transport_entry">beta_range_transport_entry — Beta range transport entry</option>
<option value="beta_prefix_sum_trace_exists">beta_prefix_sum_trace_exists — Beta prefix sum trace exists</option>
<option value="beta_sum_exists">beta_sum_exists — Beta sum exists</option>
<option value="beta_sum_trace_functional">beta_sum_trace_functional — Beta sum trace functional</option>
<option value="beta_sum_functional">beta_sum_functional — Beta sum functional</option>
<option value="beta_sum_exists_unique">beta_sum_exists_unique — Beta sum exists unique</option>
<option value="beta_sum_zero">beta_sum_zero — Beta sum zero</option>
<option value="beta_sum_succ_decompose">beta_sum_succ_decompose — Beta sum succ decompose</option>
<option value="beta_product_pointwise_mod_congruent">beta_product_pointwise_mod_congruent — Beta product pointwise mod congruent</option>
<option value="beta_sum_pointwise_mod_congruent">beta_sum_pointwise_mod_congruent — Beta sum pointwise mod congruent</option>
<option value="all_bits_zero">all_bits_zero — All bits zero</option>
<option value="all_bits_prefix_succ">all_bits_prefix_succ — All bits prefix succ</option>
<option value="all_bits_last_succ">all_bits_last_succ — All bits last succ</option>
<option value="bit_count_exists">bit_count_exists — Bit count exists</option>
<option value="bit_count_functional">bit_count_functional — Bit count functional</option>
<option value="bit_count_zero">bit_count_zero — Bit count zero</option>
<option value="bit_count_succ_decompose">bit_count_succ_decompose — Bit count succ decompose</option>
<option value="bit_count_bounded">bit_count_bounded — Bit count bounded</option>
<option value="prime_coprime_or_divides">prime_coprime_or_divides — Prime coprime or divides</option>
<option value="prime_not_divides_coprime">prime_not_divides_coprime — Prime not divides coprime</option>
<option value="distinct_primes_coprime">distinct_primes_coprime — Distinct primes coprime</option>
<option value="coprime_balanced_mod_inverse">coprime_balanced_mod_inverse — Coprime balanced mod inverse</option>
<option value="coprime_mod_inverse">coprime_mod_inverse — Coprime mod inverse</option>
<option value="mod_eq_cancel_coprime">mod_eq_cancel_coprime — Mod eq cancel coprime</option>
<option value="prime_mod_inverse">prime_mod_inverse — Prime mod inverse</option>
<option value="prime_mod_cancel">prime_mod_cancel — Prime mod cancel</option>
<option value="factorial_exists">factorial_exists — Factorial exists</option>
<option value="factorial_functional">factorial_functional — Factorial functional</option>
<option value="factorial_zero">factorial_zero — Factorial zero</option>
<option value="factorial_succ_decompose">factorial_succ_decompose — Factorial succ decompose</option>
<option value="pow_one_from_zero_successor">pow_one_from_zero_successor — Pow one from zero successor</option>
<option value="pow_one">pow_one — Pow one</option>
<option value="pow_successor_pair_mul">pow_successor_pair_mul — Pow successor pair mul</option>
<option value="pow_mod_congruent">pow_mod_congruent — Pow mod congruent</option>
<option value="lt_three_cases">lt_three_cases — Lt three cases</option>
<option value="lt_five_cases">lt_five_cases — Lt five cases</option>
<option value="lt_seven_cases">lt_seven_cases — Lt seven cases</option>
<option value="bounded_square_mod3_classify">bounded_square_mod3_classify — Bounded square mod3 classify</option>
<option value="bounded_square_mod5_classify">bounded_square_mod5_classify — Bounded square mod5 classify</option>
<option value="bounded_square_mod7_classify">bounded_square_mod7_classify — Bounded square mod7 classify</option>
<option value="qres_mod3_zero">qres_mod3_zero — Qres mod3 zero</option>
<option value="qres_mod3_one">qres_mod3_one — Qres mod3 one</option>
<option value="qres_mod5_zero">qres_mod5_zero — Qres mod5 zero</option>
<option value="qres_mod5_one">qres_mod5_one — Qres mod5 one</option>
<option value="qres_mod5_four">qres_mod5_four — Qres mod5 four</option>
<option value="qres_mod7_zero">qres_mod7_zero — Qres mod7 zero</option>
<option value="qres_mod7_one">qres_mod7_one — Qres mod7 one</option>
<option value="qres_mod7_two">qres_mod7_two — Qres mod7 two</option>
<option value="qres_mod7_four">qres_mod7_four — Qres mod7 four</option>
<option value="qres_mod3_canonical_iff">qres_mod3_canonical_iff — Qres mod3 canonical iff</option>
<option value="qres_mod5_canonical_iff">qres_mod5_canonical_iff — Qres mod5 canonical iff</option>
<option value="qres_mod7_canonical_iff">qres_mod7_canonical_iff — Qres mod7 canonical iff</option>
<option value="not_qres_mod3_two">not_qres_mod3_two — Not qres mod3 two</option>
<option value="not_qres_mod5_two">not_qres_mod5_two — Not qres mod5 two</option>
<option value="not_qres_mod5_three">not_qres_mod5_three — Not qres mod5 three</option>
<option value="not_qres_mod7_three">not_qres_mod7_three — Not qres mod7 three</option>
<option value="not_qres_mod7_five">not_qres_mod7_five — Not qres mod7 five</option>
<option value="not_qres_mod7_six">not_qres_mod7_six — Not qres mod7 six</option>
<option value="pow_two_from_one_successor">pow_two_from_one_successor — Pow two from one successor</option>
<option value="pow_two">pow_two — Pow two</option>
<option value="pow_add">pow_add — Pow add</option>
<option value="pow_mul_exp">pow_mul_exp — Pow mul exp</option>
<option value="predecessor_square_mod_one">predecessor_square_mod_one — Predecessor square mod one</option>
<option value="even_successor_to_odd">even_successor_to_odd — Even successor to odd</option>
<option value="odd_successor_to_even">odd_successor_to_even — Odd successor to even</option>
<option value="pow_predecessor_parity_mod">pow_predecessor_parity_mod — Pow predecessor parity mod</option>
<option value="beta_range_injective">beta_range_injective — Beta range injective</option>
<option value="beta_half_range_entry_bounds">beta_half_range_entry_bounds — Beta half range entry bounds</option>
<option value="beta_half_range_mod_eq_value">beta_half_range_mod_eq_value — Beta half range mod eq value</option>
<option value="beta_half_range_mod_injective">beta_half_range_mod_injective — Beta half range mod injective</option>
<option value="finite_surjective_zero">finite_surjective_zero — Finite surjective zero</option>
<option value="finite_injective_prefix_succ">finite_injective_prefix_succ — Finite injective prefix succ</option>
<option value="finite_lt_succ_eq_or_lt">finite_lt_succ_eq_or_lt — Finite lt succ eq or lt</option>
<option value="finite_bounded_entry_lt">finite_bounded_entry_lt — Finite bounded entry lt</option>
<option value="beta_prefix_replace_exists">beta_prefix_replace_exists — Beta prefix replace exists</option>
<option value="beta_prefix_swap_last_from_entries">beta_prefix_swap_last_from_entries — Beta prefix swap last from entries</option>
<option value="beta_prefix_swap_last_exists">beta_prefix_swap_last_exists — Beta prefix swap last exists</option>
<option value="beta_prefix_swap_last_reflect">beta_prefix_swap_last_reflect — Beta prefix swap last reflect</option>
<option value="finite_swap_last_bounded">finite_swap_last_bounded — Finite swap last bounded</option>
<option value="finite_swap_last_injective">finite_swap_last_injective — Finite swap last injective</option>
<option value="finite_swap_last_surjective_back">finite_swap_last_surjective_back — Finite swap last surjective back</option>
<option value="finite_contains_decidable">finite_contains_decidable — Finite contains decidable</option>
<option value="finite_bounded_prefix_without_top">finite_bounded_prefix_without_top — Finite bounded prefix without top</option>
<option value="finite_bounded_last_succ">finite_bounded_last_succ — Finite bounded last succ</option>
<option value="finite_surjective_succ_intro">finite_surjective_succ_intro — Finite surjective succ intro</option>
<option value="finite_last_is_top_from_prefix_surjective">finite_last_is_top_from_prefix_surjective — Finite last is top from prefix surjective</option>
<option value="finite_surjective_succ_from_prefix">finite_surjective_succ_from_prefix — Finite surjective succ from prefix</option>
<option value="finite_no_top_successor_gate">finite_no_top_successor_gate — Finite no top successor gate</option>
<option value="finite_bounded_injective_surjective">finite_bounded_injective_surjective — Finite bounded injective surjective</option>
<option value="beta_prefix_replace_reflect">beta_prefix_replace_reflect — Beta prefix replace reflect</option>
<option value="beta_product_replace_balance">beta_product_replace_balance — Beta product replace balance</option>
<option value="beta_product_swap_last_invariant">beta_product_swap_last_invariant — Beta product swap last invariant</option>
<option value="finite_fixed_last_prefix_bounded">finite_fixed_last_prefix_bounded — Finite fixed last prefix bounded</option>
<option value="beta_reindex_alignment_swap_last">beta_reindex_alignment_swap_last — Beta reindex alignment swap last</option>
<option value="prime_is_succ_succ">prime_is_succ_succ — Prime is succ succ</option>
<option value="prime_bounded_nonzero_mod_inverse">prime_bounded_nonzero_mod_inverse — Prime bounded nonzero mod inverse</option>
<option value="canonical_remainder_exists">canonical_remainder_exists — Canonical remainder existence</option>
<option value="canonical_remainder_functional">canonical_remainder_functional — Canonical remainder functionality</option>
<option value="canonical_remainder_zero_impossible">canonical_remainder_zero_impossible — Canonical remainder excludes modulus zero</option>
<option value="canonical_remainder_exists_unique">canonical_remainder_exists_unique — Unique canonical remainder</option>
<option value="canonical_remainders_characterize_mod_eq">canonical_remainders_characterize_mod_eq — Canonical remainders characterize congruence</option>
<option value="bounded_mod_inverse_unique">bounded_mod_inverse_unique — Uniqueness of bounded modular inverses</option>
<option value="coprime_bounded_mod_inverse">coprime_bounded_mod_inverse — Coprime residues have bounded modular inverses</option>
<option value="mod_inverse_implies_coprime">mod_inverse_implies_coprime — A modular inverse implies coprimality</option>
<option value="coprime_iff_unique_bounded_mod_inverse">coprime_iff_unique_bounded_mod_inverse — Coprimality iff unique bounded modular inverse</option>
<option value="is_lcm_multiple_left">is_lcm_multiple_left — A relational LCM is a multiple of its left input</option>
<option value="is_lcm_multiple_right">is_lcm_multiple_right — A relational LCM is a multiple of its right input</option>
<option value="is_lcm_least">is_lcm_least — A relational LCM divides every common multiple</option>
<option value="is_lcm_symm">is_lcm_symm — Symmetry of relational LCM</option>
<option value="is_lcm_unique">is_lcm_unique — Uniqueness of relational LCM</option>
<option value="is_lcm_zero_right">is_lcm_zero_right — LCM with zero on the right</option>
<option value="is_lcm_zero_left">is_lcm_zero_left — LCM with zero on the left</option>
<option value="balanced_bezout_one_implies_coprime">balanced_bezout_one_implies_coprime — Balanced Bezout result one implies coprimality</option>
<option value="coprime_product_is_lcm">coprime_product_is_lcm — The product of coprime naturals is an LCM</option>
<option value="is_lcm_scale_nonzero">is_lcm_scale_nonzero — Nonzero scaling preserves relational LCM</option>
<option value="balanced_bezout_cancel_gcd">balanced_bezout_cancel_gcd — Cancel a nonzero gcd from balanced Bezout</option>
<option value="gcd_zero_inputs">gcd_zero_inputs — A zero gcd forces zero inputs</option>
<option value="gcd_lcm_compatible_exists">gcd_lcm_compatible_exists — Compatible gcd and LCM witnesses exist</option>
<option value="lcm_exists_relational">lcm_exists_relational — Relational LCM exists</option>
<option value="canonical_lcm_exists_unique">canonical_lcm_exists_unique — Canonical LCM exists uniquely</option>
<option value="gcd_lcm_product">gcd_lcm_product — The gcd-LCM product identity</option>
<option value="mod_eq_zero_iff_eq">mod_eq_zero_iff_eq — Mod eq zero iff eq</option>
<option value="mod_eq_scale">mod_eq_scale — Mod eq scale</option>
<option value="crt_solution_pair_congruent">crt_solution_pair_congruent — Crt solution pair congruent</option>
<option value="crt_common_solution_implies_gcd_compatible">crt_common_solution_implies_gcd_compatible — Crt common solution implies gcd compatible</option>
<option value="crt_incompatibility_obstructs_solution">crt_incompatibility_obstructs_solution — Crt incompatibility obstructs solution</option>
<option value="is_gcd_quotients_coprime_nonzero">is_gcd_quotients_coprime_nonzero — Is gcd quotients coprime nonzero</option>
<option value="mod_eq_common_remainder_decomposition">mod_eq_common_remainder_decomposition — Mod eq common remainder decomposition</option>
<option value="crt_scaled_common_remainder_lift">crt_scaled_common_remainder_lift — Crt scaled common remainder lift</option>
<option value="generalized_binary_crt_sufficient_nonzero">generalized_binary_crt_sufficient_nonzero — Generalized binary crt sufficient nonzero</option>
<option value="generalized_binary_crt_sufficient_zero_left">generalized_binary_crt_sufficient_zero_left — Generalized binary crt sufficient zero left</option>
<option value="generalized_binary_crt_sufficient_zero_right">generalized_binary_crt_sufficient_zero_right — Generalized binary crt sufficient zero right</option>
<option value="generalized_binary_crt_sufficient">generalized_binary_crt_sufficient — Generalized binary crt sufficient</option>
<option value="generalized_binary_crt_solvable_iff">generalized_binary_crt_solvable_iff — Generalized binary crt solvable iff</option>
<option value="mod_eq_ordered_gap_multiple">mod_eq_ordered_gap_multiple — Mod eq ordered gap multiple</option>
<option value="mod_eq_lcm_merge">mod_eq_lcm_merge — Mod eq lcm merge</option>
<option value="mod_eq_lcm_iff_pair">mod_eq_lcm_iff_pair — Mod eq lcm iff pair</option>
<option value="crt_solution_class_iff_lcm">crt_solution_class_iff_lcm — Crt solution class iff lcm</option>
<option value="crt_solution_unique_lcm_zero">crt_solution_unique_lcm_zero — Crt solution unique lcm zero</option>
<option value="crt_solution_canonical_remainder_nonzero">crt_solution_canonical_remainder_nonzero — Crt solution canonical remainder nonzero</option>
<option value="generalized_binary_crt_canonical_boundary">generalized_binary_crt_canonical_boundary — Generalized binary crt canonical boundary</option>
<option value="mod_eq_decidable">mod_eq_decidable — Mod eq decidable</option>
<option value="generalized_binary_crt_solution_or_obstruction">generalized_binary_crt_solution_or_obstruction — Generalized binary crt solution or obstruction</option>
<option value="generalized_binary_crt_total_decision">generalized_binary_crt_total_decision — Generalized binary crt total decision</option>
        </select>
      </label>
      <label>Neighborhood depth
        <select data-pa-hops>
          <option value="1">1 hop</option>
          <option value="2" selected>2 hops</option>
          <option value="3">3 hops</option>
          <option value="4">4 hops</option>
        </select>
      </label>
    </div>
    <div class="pa-focus-graph" data-pa-focus-graph aria-live="polite"></div>
  </section>

  <div class="pa-atlas-list" data-pa-list>
<article class="pa-theorem-card" id="theorem-zero_add"
  data-name="zero_add" data-domain="addition"
  data-status="checked_existing"
  data-dependencies=""
  data-search="zero_add zero is a left identity for addition zero is a left identity for addition; unlike pa3, this needs induction. forall n. 0 + n = n addition">
  <details>
    <summary>
      <span class="pa-card-title"><code>zero_add</code><span>Zero is a left identity for addition</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Zero is a left identity for addition; unlike PA3, this needs induction.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="drop_add_prefix_from_fixed" href="#theorem-drop_add_prefix_from_fixed"><code>drop_add_prefix_from_fixed</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ_self" href="#theorem-le_succ_self"><code>le_succ_self</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_succ" href="#theorem-division_remainder_succ"><code>division_remainder_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_self_of_bound" href="#theorem-beta_at_self_of_bound"><code>beta_at_self_of_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="dvd_to_mod_zero" href="#theorem-dvd_to_mod_zero"><code>dvd_to_mod_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_beta_moduli_divides_gap_times_c" href="#theorem-common_divisor_beta_moduli_divides_gap_times_c"><code>common_divisor_beta_moduli_divides_gap_times_c</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_search_up_to" href="#theorem-quadratic_residue_search_up_to"><code>quadratic_residue_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_succ_decompose" href="#theorem-factorial_succ_decompose"><code>factorial_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="predecessor_square_mod_one" href="#theorem-predecessor_square_mod_one"><code>predecessor_square_mod_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_inverse_implies_coprime" href="#theorem-mod_inverse_implies_coprime"><code>mod_inverse_implies_coprime</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-zero_add">Copy statement</button>
        <pre id="statement-zero_add"><code>forall n. 0 + n = n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-zero_add">Copy proof</button>
        <pre id="proof-zero_add"><code>pa prove forall n. 0 + n = n
induction n
simp
simp [IH]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>17</dd></div>
        <div><dt>Distinct objects</dt><dd>17</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>8</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5f9cb3146e4a2d172359a3fe91ea20dfe532ce415a940d53aeb736973bfeed76">5f9cb3146e4a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for zero_add">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib zero_add</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L309">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/zero_add.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_succ_left"
  data-name="add_succ_left" data-domain="addition"
  data-status="checked_existing"
  data-dependencies=""
  data-search="add_succ_left successor moves through addition on the left a successor can move through addition on the left. forall n m. s n + m = s (n + m) addition">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_succ_left</code><span>Successor moves through addition on the left</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor can move through addition on the left.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="drop_add_prefix_from_fixed" href="#theorem-drop_add_prefix_from_fixed"><code>drop_add_prefix_from_fixed</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ_self" href="#theorem-le_succ_self"><code>le_succ_self</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_to_le" href="#theorem-lt_to_le"><code>lt_to_le</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_trans" href="#theorem-lt_trans"><code>lt_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_not_eq_add_middle" href="#theorem-lt_not_eq_add_middle"><code>lt_not_eq_add_middle</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_succ" href="#theorem-division_remainder_succ"><code>division_remainder_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_beta_moduli_divides_gap_times_c" href="#theorem-common_divisor_beta_moduli_divides_gap_times_c"><code>common_divisor_beta_moduli_divides_gap_times_c</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_add_even" href="#theorem-odd_add_even"><code>odd_add_even</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_add_odd" href="#theorem-odd_add_odd"><code>odd_add_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_mul_odd" href="#theorem-odd_mul_odd"><code>odd_mul_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_search_up_to" href="#theorem-quadratic_residue_search_up_to"><code>quadratic_residue_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_bounded" href="#theorem-bit_count_bounded"><code>bit_count_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_succ_decompose" href="#theorem-factorial_succ_decompose"><code>factorial_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="predecessor_square_mod_one" href="#theorem-predecessor_square_mod_one"><code>predecessor_square_mod_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_succ_left">Copy statement</button>
        <pre id="statement-add_succ_left"><code>forall n m. S n + m = S (n + m)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_succ_left">Copy proof</button>
        <pre id="proof-add_succ_left"><code>pa prove forall n m. S n + m = S (n + m)
intro n
induction m
simp
simp [IH]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>27</dd></div>
        <div><dt>Distinct objects</dt><dd>25</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a551da8ef5117d0c3cc116a4e19ef0415d3f5ec1a3dee412a4fc29cae9e29612">a551da8ef511…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_succ_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_succ_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L316">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_succ_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_comm"
  data-name="add_comm" data-domain="addition"
  data-status="checked_existing"
  data-dependencies="zero_add,add_succ_left"
  data-search="add_comm addition is commutative addition is commutative. forall n m. n + m = m + n addition zero_add add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_comm</code><span>Addition is commutative</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Addition is commutative.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_left_cancel" href="#theorem-add_left_cancel"><code>add_left_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="le_add_right" href="#theorem-le_add_right"><code>le_add_right</code></a> <a class="pa-theorem-chip" data-theorem-link="add_le_add_left" href="#theorem-add_le_add_left"><code>add_le_add_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_lt_mul_succ_left_nonzero" href="#theorem-mul_lt_mul_succ_left_nonzero"><code>mul_lt_mul_succ_left_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="division_block_upper" href="#theorem-division_block_upper"><code>division_block_upper</code></a> <a class="pa-theorem-chip" data-theorem-link="positive_quotient_gap_impossible" href="#theorem-positive_quotient_gap_impossible"><code>positive_quotient_gap_impossible</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_left" href="#theorem-add_eq_zero_left"><code>add_eq_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a> <a class="pa-theorem-chip" data-theorem-link="add_permute_outer" href="#theorem-add_permute_outer"><code>add_permute_outer</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_euclid_step" href="#theorem-balanced_bezout_euclid_step"><code>balanced_bezout_euclid_step</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_divides_balanced_result" href="#theorem-common_divisor_divides_balanced_result"><code>common_divisor_divides_balanced_result</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_add" href="#theorem-mod_eq_add"><code>mod_eq_add</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="add_residue_lift" href="#theorem-add_residue_lift"><code>add_residue_lift</code></a> <a class="pa-theorem-chip" data-theorem-link="bezout_mod_left" href="#theorem-bezout_mod_left"><code>bezout_mod_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_predecessor_cancel" href="#theorem-mod_eq_predecessor_cancel"><code>mod_eq_predecessor_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_lt_bounded_common_multiple" href="#theorem-beta_moduli_coprime_of_lt_bounded_common_multiple"><code>beta_moduli_coprime_of_lt_bounded_common_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_two" href="#theorem-mod5_square_residue_two"><code>mod5_square_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_add_odd" href="#theorem-odd_add_odd"><code>odd_add_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="predecessor_square_mod_one" href="#theorem-predecessor_square_mod_one"><code>predecessor_square_mod_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_ordered_gap_multiple" href="#theorem-mod_eq_ordered_gap_multiple"><code>mod_eq_ordered_gap_multiple</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_comm">Copy statement</button>
        <pre id="statement-add_comm"><code>forall n m. n + m = m + n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_comm">Copy proof</button>
        <pre id="proof-add_comm"><code>pa prove forall n m. n + m = m + n
use zero_add
use add_succ_left
intro n
induction m
simp [zero_add]
simp [add_succ_left, IH]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>73</dd></div>
        <div><dt>Distinct objects</dt><dd>67</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="281109de8768c113612793becafbc23cdbcc8e2e04fe337d50ede95bdb893b4e">281109de8768…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_comm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_comm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L323">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_comm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_assoc"
  data-name="add_assoc" data-domain="addition"
  data-status="checked_existing"
  data-dependencies=""
  data-search="add_assoc addition is associative addition is associative. forall n m k. (n + m) + k = n + (m + k) addition">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_assoc</code><span>Addition is associative</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Addition is associative.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="antisymm_from_witnesses" href="#theorem-antisymm_from_witnesses"><code>antisymm_from_witnesses</code></a> <a class="pa-theorem-chip" data-theorem-link="add_le_add_right" href="#theorem-add_le_add_right"><code>add_le_add_right</code></a> <a class="pa-theorem-chip" data-theorem-link="add_le_add_left" href="#theorem-add_le_add_left"><code>add_le_add_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_le_cancel_right" href="#theorem-add_le_cancel_right"><code>add_le_cancel_right</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_of_le_of_lt" href="#theorem-lt_of_le_of_lt"><code>lt_of_le_of_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_trans" href="#theorem-lt_trans"><code>lt_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="division_block_upper" href="#theorem-division_block_upper"><code>division_block_upper</code></a> <a class="pa-theorem-chip" data-theorem-link="positive_quotient_gap_impossible" href="#theorem-positive_quotient_gap_impossible"><code>positive_quotient_gap_impossible</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a> <a class="pa-theorem-chip" data-theorem-link="add_permute_outer" href="#theorem-add_permute_outer"><code>add_permute_outer</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_euclid_step" href="#theorem-balanced_bezout_euclid_step"><code>balanced_bezout_euclid_step</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="add_residue" href="#theorem-add_residue"><code>add_residue</code></a> <a class="pa-theorem-chip" data-theorem-link="add_residue_lift" href="#theorem-add_residue_lift"><code>add_residue_lift</code></a> <a class="pa-theorem-chip" data-theorem-link="square_decomp" href="#theorem-square_decomp"><code>square_decomp</code></a> <a class="pa-theorem-chip" data-theorem-link="bezout_mod_left" href="#theorem-bezout_mod_left"><code>bezout_mod_left</code></a> <a class="pa-theorem-chip" data-theorem-link="bezout_mod_right" href="#theorem-bezout_mod_right"><code>bezout_mod_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_predecessor_cancel" href="#theorem-mod_eq_predecessor_cancel"><code>mod_eq_predecessor_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_one" href="#theorem-mod5_square_residue_one"><code>mod5_square_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_two" href="#theorem-mod5_square_residue_two"><code>mod5_square_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="even_add_odd" href="#theorem-even_add_odd"><code>even_add_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_add_odd" href="#theorem-odd_add_odd"><code>odd_add_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_mul_odd" href="#theorem-odd_mul_odd"><code>odd_mul_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_bounded" href="#theorem-bit_count_bounded"><code>bit_count_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_balanced_mod_inverse" href="#theorem-coprime_balanced_mod_inverse"><code>coprime_balanced_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="predecessor_square_mod_one" href="#theorem-predecessor_square_mod_one"><code>predecessor_square_mod_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_ordered_gap_multiple" href="#theorem-mod_eq_ordered_gap_multiple"><code>mod_eq_ordered_gap_multiple</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_assoc">Copy statement</button>
        <pre id="statement-add_assoc"><code>forall n m k. (n + m) + k = n + (m + k)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_assoc">Copy proof</button>
        <pre id="proof-add_assoc"><code>pa prove forall n m k. (n + m) + k = n + (m + k)
intro n
intro m
induction k
simp
simp [IH]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>33</dd></div>
        <div><dt>Distinct objects</dt><dd>30</dd></div>
        <div><dt>Reused references</dt><dd>3</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a21351de86c84397586374a2ca54d3c9436641991fb1cd4863690382f075e1f3">a21351de86c8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_assoc">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_assoc</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L335">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_assoc.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_zero_left"
  data-name="mul_zero_left" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies=""
  data-search="mul_zero_left zero is a left annihilator for multiplication zero annihilates multiplication on the left. forall n. 0 * n = 0 multiplication">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_zero_left</code><span>Zero is a left annihilator for multiplication</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Zero annihilates multiplication on the left.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_eq_one_components" href="#theorem-mul_eq_one_components"><code>mul_eq_one_components</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_two" href="#theorem-prime_two"><code>prime_two</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_decidable" href="#theorem-multiple_decidable"><code>multiple_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_nonzero_left" href="#theorem-factor_nonzero_left"><code>factor_nonzero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_self_of_bound" href="#theorem-beta_at_self_of_bound"><code>beta_at_self_of_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_three" href="#theorem-prime_three"><code>prime_three</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_zero_inputs" href="#theorem-gcd_zero_inputs"><code>gcd_zero_inputs</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_zero_iff_eq" href="#theorem-mod_eq_zero_iff_eq"><code>mod_eq_zero_iff_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_nonzero" href="#theorem-generalized_binary_crt_sufficient_nonzero"><code>generalized_binary_crt_sufficient_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_zero_left">Copy statement</button>
        <pre id="statement-mul_zero_left"><code>forall n. 0 * n = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_zero_left">Copy proof</button>
        <pre id="proof-mul_zero_left"><code>pa prove forall n. 0 * n = 0
induction n
simp
simp [IH]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>21</dd></div>
        <div><dt>Distinct objects</dt><dd>21</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>8</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fb469fdd0b5220ae680cd020c27c30ecaec22d9ece8d526a1c42bdc606dd21c0">fb469fdd0b52…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_zero_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_zero_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L342">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_zero_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_succ_left"
  data-name="mul_succ_left" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies="add_comm,add_assoc"
  data-search="mul_succ_left successor moves through multiplication on the left a successor can move through multiplication on the left. forall n m. s n * m = n * m + m multiplication add_comm add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_succ_left</code><span>Successor moves through multiplication on the left</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor can move through multiplication on the left.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="two_large_factors_impossible" href="#theorem-two_large_factors_impossible"><code>two_large_factors_impossible</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_predecessor_cancel" href="#theorem-mod_eq_predecessor_cancel"><code>mod_eq_predecessor_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="base_le_beta_modulus" href="#theorem-base_le_beta_modulus"><code>base_le_beta_modulus</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_three" href="#theorem-prime_three"><code>prime_three</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_one" href="#theorem-mod5_square_residue_one"><code>mod5_square_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_two" href="#theorem-mod5_square_residue_two"><code>mod5_square_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="predecessor_square_mod_one" href="#theorem-predecessor_square_mod_one"><code>predecessor_square_mod_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_succ_left">Copy statement</button>
        <pre id="statement-mul_succ_left"><code>forall n m. S n * m = n * m + m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_succ_left">Copy proof</button>
        <pre id="proof-mul_succ_left"><code>pa prove forall n m. S n * m = n * m + m
use add_comm
use add_assoc
intro n
induction m
simp
specialize add_comm n
specialize add_comm m
simp [IH, add_comm, add_assoc]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>172</dd></div>
        <div><dt>Distinct objects</dt><dd>155</dd></div>
        <div><dt>Reused references</dt><dd>17</dd></div>
        <div><dt>Depth</dt><dd>22</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b57ad3ce119fa27b830014922e22c60d02800e069bfc88b14e807ce09140dfc7">b57ad3ce119f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_succ_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_succ_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L349">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_succ_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_comm"
  data-name="mul_comm" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies="mul_zero_left,mul_succ_left"
  data-search="mul_comm multiplication is commutative multiplication is commutative. forall n m. n * m = m * n multiplication mul_zero_left mul_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_comm</code><span>Multiplication is commutative</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiplication is commutative.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_right_cancel_nonzero" href="#theorem-mul_right_cancel_nonzero"><code>mul_right_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_mul_left" href="#theorem-multiple_mul_left"><code>multiple_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_combination_scale_right" href="#theorem-balanced_combination_scale_right"><code>balanced_combination_scale_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="square_decomp" href="#theorem-square_decomp"><code>square_decomp</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_modulus_coprime_base" href="#theorem-beta_modulus_coprime_base"><code>beta_modulus_coprime_base</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_step" href="#theorem-bounded_common_multiple_step"><code>bounded_common_multiple_step</code></a> <a class="pa-theorem-chip" data-theorem-link="right_factor_divides_product" href="#theorem-right_factor_divides_product"><code>right_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_quotient_bound" href="#theorem-greatest_prime_divisor_quotient_bound"><code>greatest_prime_divisor_quotient_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_descent" href="#theorem-greatest_prime_divisor_descent"><code>greatest_prime_divisor_descent</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="two_prime_product_uniqueness" href="#theorem-two_prime_product_uniqueness"><code>two_prime_product_uniqueness</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_double_right" href="#theorem-mul_double_right"><code>mul_double_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_nonzero" href="#theorem-mod_eq_decidable_nonzero"><code>mod_eq_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainders_characterize_mod_eq" href="#theorem-canonical_remainders_characterize_mod_eq"><code>canonical_remainders_characterize_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_product_is_lcm" href="#theorem-coprime_product_is_lcm"><code>coprime_product_is_lcm</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_common_remainder_decomposition" href="#theorem-mod_eq_common_remainder_decomposition"><code>mod_eq_common_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_merge" href="#theorem-mod_eq_lcm_merge"><code>mod_eq_lcm_merge</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_canonical_remainder_nonzero" href="#theorem-crt_solution_canonical_remainder_nonzero"><code>crt_solution_canonical_remainder_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_comm">Copy statement</button>
        <pre id="statement-mul_comm"><code>forall n m. n * m = m * n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_comm">Copy proof</button>
        <pre id="proof-mul_comm"><code>pa prove forall n m. n * m = m * n
use mul_zero_left
use mul_succ_left
intro n
induction m
simp [mul_zero_left]
simp [IH, mul_succ_left]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>222</dd></div>
        <div><dt>Distinct objects</dt><dd>200</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>24</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c3efa368cf227867a31630c54d4fb334416ca061228ac82609f837d8f947d818">c3efa368cf22…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_comm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_comm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L363">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_comm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_add"
  data-name="mul_add" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies="add_assoc"
  data-search="mul_add multiplication distributes over right addition multiplication distributes over addition on the right. forall n m k. n * (m + k) = n * m + n * k multiplication add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_add</code><span>Multiplication distributes over right addition</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiplication distributes over addition on the right.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_le_mul_left" href="#theorem-mul_le_mul_left"><code>mul_le_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="positive_quotient_gap_impossible" href="#theorem-positive_quotient_gap_impossible"><code>positive_quotient_gap_impossible</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_add" href="#theorem-multiple_add"><code>multiple_add</code></a> <a class="pa-theorem-chip" data-theorem-link="divides_linear_step" href="#theorem-divides_linear_step"><code>divides_linear_step</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_euclid_step" href="#theorem-balanced_bezout_euclid_step"><code>balanced_bezout_euclid_step</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_divides_balanced_result" href="#theorem-common_divisor_divides_balanced_result"><code>common_divisor_divides_balanced_result</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_add" href="#theorem-mod_eq_add"><code>mod_eq_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_residue" href="#theorem-add_residue"><code>add_residue</code></a> <a class="pa-theorem-chip" data-theorem-link="add_residue_lift" href="#theorem-add_residue_lift"><code>add_residue_lift</code></a> <a class="pa-theorem-chip" data-theorem-link="square_decomp" href="#theorem-square_decomp"><code>square_decomp</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_one" href="#theorem-mod5_square_residue_one"><code>mod5_square_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_two" href="#theorem-mod5_square_residue_two"><code>mod5_square_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="even_add_even" href="#theorem-even_add_even"><code>even_add_even</code></a> <a class="pa-theorem-chip" data-theorem-link="even_add_odd" href="#theorem-even_add_odd"><code>even_add_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_add_even" href="#theorem-odd_add_even"><code>odd_add_even</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_add_odd" href="#theorem-odd_add_odd"><code>odd_add_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_mul_odd" href="#theorem-odd_mul_odd"><code>odd_mul_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_mod4_cases" href="#theorem-odd_mod4_cases"><code>odd_mod4_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="mod4_three_is_odd" href="#theorem-mod4_three_is_odd"><code>mod4_three_is_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_cancel_gcd" href="#theorem-balanced_bezout_cancel_gcd"><code>balanced_bezout_cancel_gcd</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_scale" href="#theorem-mod_eq_scale"><code>mod_eq_scale</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_add">Copy statement</button>
        <pre id="statement-mul_add"><code>forall n m k. n * (m + k) = n * m + n * k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_add">Copy proof</button>
        <pre id="proof-mul_add"><code>pa prove forall n m k. n * (m + k) = n * m + n * k
use add_assoc
intro n
intro m
induction k
simp
simp [IH, add_assoc]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>77</dd></div>
        <div><dt>Distinct objects</dt><dd>70</dd></div>
        <div><dt>Reused references</dt><dd>7</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2a65ee30f1db765d8f37b7beb57852a39436cec8aa70ab76c565f9e1447b2bf6">2a65ee30f1db…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_add">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_add</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L375">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_add.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_assoc"
  data-name="mul_assoc" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies="mul_add"
  data-search="mul_assoc multiplication is associative multiplication is associative. forall n m k. (n * m) * k = n * (m * k) multiplication mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_assoc</code><span>Multiplication is associative</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiplication is associative.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_mul_right" href="#theorem-multiple_mul_right"><code>multiple_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_trans" href="#theorem-multiple_trans"><code>multiple_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a> <a class="pa-theorem-chip" data-theorem-link="divides_remainder" href="#theorem-divides_remainder"><code>divides_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="divides_linear_step" href="#theorem-divides_linear_step"><code>divides_linear_step</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_euclid_step" href="#theorem-balanced_bezout_euclid_step"><code>balanced_bezout_euclid_step</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_combination_scale_right" href="#theorem-balanced_combination_scale_right"><code>balanced_combination_scale_right</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_divides_balanced_result" href="#theorem-common_divisor_divides_balanced_result"><code>common_divisor_divides_balanced_result</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_right" href="#theorem-mod_eq_mul_right"><code>mod_eq_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="square_decomp" href="#theorem-square_decomp"><code>square_decomp</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_of_mod_eq_multiple" href="#theorem-mod_eq_of_mod_eq_multiple"><code>mod_eq_of_mod_eq_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="fourth_power_regroup" href="#theorem-fourth_power_regroup"><code>fourth_power_regroup</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_one" href="#theorem-mod5_square_residue_one"><code>mod5_square_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_two" href="#theorem-mod5_square_residue_two"><code>mod5_square_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_one" href="#theorem-mod5_fourth_power_residue_one"><code>mod5_fourth_power_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_two" href="#theorem-mod5_fourth_power_residue_two"><code>mod5_fourth_power_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_three" href="#theorem-mod5_fourth_power_residue_three"><code>mod5_fourth_power_residue_three</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_four" href="#theorem-mod5_fourth_power_residue_four"><code>mod5_fourth_power_residue_four</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_one" href="#theorem-mod5_fourth_power_one"><code>mod5_fourth_power_one</code></a> <a class="pa-theorem-chip" data-theorem-link="even_mul_left" href="#theorem-even_mul_left"><code>even_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_double_right" href="#theorem-mul_double_right"><code>mul_double_right</code></a> <a class="pa-theorem-chip" data-theorem-link="four_mul_eq_double_double" href="#theorem-four_mul_eq_double_double"><code>four_mul_eq_double_double</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_add" href="#theorem-pow_add"><code>pow_add</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_product_is_lcm" href="#theorem-coprime_product_is_lcm"><code>coprime_product_is_lcm</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_scale_nonzero" href="#theorem-is_lcm_scale_nonzero"><code>is_lcm_scale_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_cancel_gcd" href="#theorem-balanced_bezout_cancel_gcd"><code>balanced_bezout_cancel_gcd</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_scale" href="#theorem-mod_eq_scale"><code>mod_eq_scale</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_quotients_coprime_nonzero" href="#theorem-is_gcd_quotients_coprime_nonzero"><code>is_gcd_quotients_coprime_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_assoc">Copy statement</button>
        <pre id="statement-mul_assoc"><code>forall n m k. (n * m) * k = n * (m * k)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_assoc">Copy proof</button>
        <pre id="proof-mul_assoc"><code>pa prove forall n m k. (n * m) * k = n * (m * k)
use mul_add
intro n
intro m
induction k
simp
simp [IH, mul_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>116</dd></div>
        <div><dt>Distinct objects</dt><dd>104</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4784291080cfdd8a04427fb2eaaf1712def81bedeac71b5d27b291cde430ec64">4784291080cf…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_assoc">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_assoc</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L388">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_assoc.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-one_mul"
  data-name="one_mul" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies=""
  data-search="one_mul one is a left identity for multiplication one is a left identity for multiplication. forall n. 1 * n = n multiplication">
  <details>
    <summary>
      <span class="pa-card-title"><code>one_mul</code><span>One is a left identity for multiplication</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">One is a left identity for multiplication.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_eq_one_components" href="#theorem-mul_eq_one_components"><code>mul_eq_one_components</code></a> <a class="pa-theorem-chip" data-theorem-link="one_multiple" href="#theorem-one_multiple"><code>one_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_to_is_gcd_one" href="#theorem-coprime_to_is_gcd_one"><code>coprime_to_is_gcd_one</code></a> <a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="le_scaled_nonzero" href="#theorem-le_scaled_nonzero"><code>le_scaled_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_empty" href="#theorem-beta_canonical_append_empty"><code>beta_canonical_append_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_one_from_zero_successor" href="#theorem-pow_one_from_zero_successor"><code>pow_one_from_zero_successor</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-one_mul">Copy statement</button>
        <pre id="statement-one_mul"><code>forall n. 1 * n = n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-one_mul">Copy proof</button>
        <pre id="proof-one_mul"><code>pa prove forall n. 1 * n = n
induction n
simp
simp [IH]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>26</dd></div>
        <div><dt>Distinct objects</dt><dd>26</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>9</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="09b763d9af1ef12d0dd6e392ea15d9217958ac8a73527ac84a6b9bb723b2372e">09b763d9af1e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for one_mul">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib one_mul</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L401">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/one_mul.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_one"
  data-name="mul_one" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies="zero_add"
  data-search="mul_one one is a right identity for multiplication one is a right identity for multiplication. forall n. n * 1 = n multiplication zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_one</code><span>One is a right identity for multiplication</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">One is a right identity for multiplication.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_to_is_gcd_one" href="#theorem-coprime_to_is_gcd_one"><code>coprime_to_is_gcd_one</code></a> <a class="pa-theorem-chip" data-theorem-link="proper_factor_lt" href="#theorem-proper_factor_lt"><code>proper_factor_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_eq_one_or_self" href="#theorem-prime_divisor_eq_one_or_self"><code>prime_divisor_eq_one_or_self</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_add" href="#theorem-pow_add"><code>pow_add</code></a> <a class="pa-theorem-chip" data-theorem-link="predecessor_square_mod_one" href="#theorem-predecessor_square_mod_one"><code>predecessor_square_mod_one</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_cancel_gcd" href="#theorem-balanced_bezout_cancel_gcd"><code>balanced_bezout_cancel_gcd</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_quotients_coprime_nonzero" href="#theorem-is_gcd_quotients_coprime_nonzero"><code>is_gcd_quotients_coprime_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_one">Copy statement</button>
        <pre id="statement-mul_one"><code>forall n. n * 1 = n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_one">Copy proof</button>
        <pre id="proof-mul_one"><code>pa prove forall n. n * 1 = n
use zero_add
intro n
simp [zero_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>33</dd></div>
        <div><dt>Distinct objects</dt><dd>33</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>9</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c7e423c814dbb43cb69a0fd4289439fdff95d734c9052b7e009f2861931ea115">c7e423c814db…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L408">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_mul"
  data-name="add_mul" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies="mul_comm,mul_add"
  data-search="add_mul left addition distributes through multiplication multiplication distributes over addition on the left. forall n m k. (n + m) * k = n * k + m * k multiplication mul_comm mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_mul</code><span>Left addition distributes through multiplication</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiplication distributes over addition on the left.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_le_mul_right" href="#theorem-mul_le_mul_right"><code>mul_le_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_euclid_step" href="#theorem-balanced_bezout_euclid_step"><code>balanced_bezout_euclid_step</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_combination_scale_right" href="#theorem-balanced_combination_scale_right"><code>balanced_combination_scale_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_right" href="#theorem-mod_eq_mul_right"><code>mod_eq_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="square_decomp" href="#theorem-square_decomp"><code>square_decomp</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_beta_moduli_divides_gap_times_c" href="#theorem-common_divisor_beta_moduli_divides_gap_times_c"><code>common_divisor_beta_moduli_divides_gap_times_c</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_mul_odd" href="#theorem-odd_mul_odd"><code>odd_mul_odd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_mul">Copy statement</button>
        <pre id="statement-add_mul"><code>forall n m k. (n + m) * k = n * k + m * k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_mul">Copy proof</button>
        <pre id="proof-add_mul"><code>pa prove forall n m k. (n + m) * k = n * k + m * k
use mul_comm
use mul_add
intro n
intro m
intro k
simp [mul_comm, mul_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>326</dd></div>
        <div><dt>Distinct objects</dt><dd>263</dd></div>
        <div><dt>Reused references</dt><dd>31</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>9</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="436c20edef86304178faaf6fed7a140eb619fb985bf88777fb0d70e021673653">436c20edef86…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_mul">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_mul</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L415">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_mul.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-succ_ne_zero"
  data-name="succ_ne_zero" data-domain="equality"
  data-status="checked_existing"
  data-dependencies=""
  data-search="succ_ne_zero a successor is not zero no successor is zero (the reusable pa1 lemma). forall n. ~(s n = 0) equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>succ_ne_zero</code><span>A successor is not zero</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">No successor is zero (the reusable PA1 lemma).</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_step" href="#theorem-bounded_common_multiple_step"><code>bounded_common_multiple_step</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_exists" href="#theorem-bounded_common_multiple_exists"><code>bounded_common_multiple_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_exclusive_recode_invariant" href="#theorem-bounded_beta_exclusive_recode_invariant"><code>bounded_beta_exclusive_recode_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_empty" href="#theorem-all_prime_empty"><code>all_prime_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_empty" href="#theorem-sorted_empty"><code>sorted_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_singleton" href="#theorem-sorted_singleton"><code>sorted_singleton</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_all_prime_product_one_iff_length_zero" href="#theorem-beta_all_prime_product_one_iff_length_zero"><code>beta_all_prime_product_one_iff_length_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_empty" href="#theorem-beta_repeat_empty"><code>beta_repeat_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_empty" href="#theorem-beta_range_empty"><code>beta_range_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="all_bits_zero" href="#theorem-all_bits_zero"><code>all_bits_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod3_canonical_iff" href="#theorem-qres_mod3_canonical_iff"><code>qres_mod3_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_zero" href="#theorem-finite_surjective_zero"><code>finite_surjective_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_exists" href="#theorem-beta_prefix_replace_exists"><code>beta_prefix_replace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainder_zero_impossible" href="#theorem-canonical_remainder_zero_impossible"><code>canonical_remainder_zero_impossible</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-succ_ne_zero">Copy statement</button>
        <pre id="statement-succ_ne_zero"><code>forall n. ~(S n = 0)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-succ_ne_zero">Copy proof</button>
        <pre id="proof-succ_ne_zero"><code>pa prove forall n. ~(S n = 0)
apply PA1
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1</dd></div>
        <div><dt>Distinct objects</dt><dd>1</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>1</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="885b0b7ed12a11e6e5da2d29fb2ec8751a61771a711bc8a37100cce0c88c4c5e">885b0b7ed12a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for succ_ne_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib succ_ne_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L422">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/succ_ne_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-succ_injective"
  data-name="succ_injective" data-domain="equality"
  data-status="checked_existing"
  data-dependencies=""
  data-search="succ_injective successor is injective successor is injective (the reusable pa2 lemma). forall n m. s n = s m -&gt; n = m equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>succ_injective</code><span>Successor is injective</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Successor is injective (the reusable PA2 lemma).</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="not_qres_mod3_two" href="#theorem-not_qres_mod3_two"><code>not_qres_mod3_two</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod5_two" href="#theorem-not_qres_mod5_two"><code>not_qres_mod5_two</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod5_three" href="#theorem-not_qres_mod5_three"><code>not_qres_mod5_three</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod7_three" href="#theorem-not_qres_mod7_three"><code>not_qres_mod7_three</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod7_five" href="#theorem-not_qres_mod7_five"><code>not_qres_mod7_five</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod7_six" href="#theorem-not_qres_mod7_six"><code>not_qres_mod7_six</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-succ_injective">Copy statement</button>
        <pre id="statement-succ_injective"><code>forall n m. S n = S m -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-succ_injective">Copy proof</button>
        <pre id="proof-succ_injective"><code>pa prove forall n m. S n = S m -&gt; n = m
apply PA2
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1</dd></div>
        <div><dt>Distinct objects</dt><dd>1</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>1</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2ff195ad0d0dc12d0ca12dd9c74fd341c0461a4f07670e4483895b8f34f935aa">2ff195ad0d0d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for succ_injective">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib succ_injective</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L429">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/succ_injective.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_refl"
  data-name="le_refl" data-domain="order"
  data-status="checked_existing"
  data-dependencies="zero_add"
  data-search="le_refl order is reflexive the defined order is reflexive; zero is its witness. forall n. n &lt;= n order zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_refl</code><span>Order is reflexive</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The defined order is reflexive; zero is its witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_relational" href="#theorem-gcd_exists_relational"><code>gcd_exists_relational</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists" href="#theorem-gcd_balanced_bezout_exists"><code>gcd_balanced_bezout_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists" href="#theorem-prime_divisor_exists"><code>prime_divisor_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_for_existing_code" href="#theorem-bounded_beta_crt_for_existing_code"><code>bounded_beta_crt_for_existing_code</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_append" href="#theorem-beta_product_succ_append"><code>beta_product_succ_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_last" href="#theorem-all_prime_succ_elim_last"><code>all_prime_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_elim_last" href="#theorem-sorted_succ_elim_last"><code>sorted_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_sorted_succ" href="#theorem-beta_prefix_extend_sorted_succ"><code>beta_prefix_extend_sorted_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_succ" href="#theorem-beta_canonical_append_succ"><code>beta_canonical_append_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factor_bound" href="#theorem-beta_canonical_last_factor_bound"><code>beta_canonical_last_factor_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_existence" href="#theorem-prime_factorization_existence"><code>prime_factorization_existence</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_nonempty_all_prime_product_ne_one" href="#theorem-beta_nonempty_all_prime_product_ne_one"><code>beta_nonempty_all_prime_product_ne_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_trace_functional" href="#theorem-beta_sum_trace_functional"><code>beta_sum_trace_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_succ_decompose" href="#theorem-beta_sum_succ_decompose"><code>beta_sum_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_pointwise_mod_congruent" href="#theorem-beta_product_pointwise_mod_congruent"><code>beta_product_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_pointwise_mod_congruent" href="#theorem-beta_sum_pointwise_mod_congruent"><code>beta_sum_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="all_bits_last_succ" href="#theorem-all_bits_last_succ"><code>all_bits_last_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_succ_decompose" href="#theorem-factorial_succ_decompose"><code>factorial_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_from_entries" href="#theorem-beta_prefix_swap_last_from_entries"><code>beta_prefix_swap_last_from_entries</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_bounded" href="#theorem-finite_swap_last_bounded"><code>finite_swap_last_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_injective" href="#theorem-finite_swap_last_injective"><code>finite_swap_last_injective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_surjective_back" href="#theorem-finite_swap_last_surjective_back"><code>finite_swap_last_surjective_back</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_last_succ" href="#theorem-finite_bounded_last_succ"><code>finite_bounded_last_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_intro" href="#theorem-finite_surjective_succ_intro"><code>finite_surjective_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_last_is_top_from_prefix_surjective" href="#theorem-finite_last_is_top_from_prefix_surjective"><code>finite_last_is_top_from_prefix_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_swap_last_invariant" href="#theorem-beta_product_swap_last_invariant"><code>beta_product_swap_last_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_fixed_last_prefix_bounded" href="#theorem-finite_fixed_last_prefix_bounded"><code>finite_fixed_last_prefix_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_refl">Copy statement</button>
        <pre id="statement-le_refl"><code>forall n. n &lt;= n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_refl">Copy proof</button>
        <pre id="proof-le_refl"><code>pa prove forall n. n &lt;= n
use zero_add
intro n
exists 0
simp [zero_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>25</dd></div>
        <div><dt>Distinct objects</dt><dd>25</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>9</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="78852db8db2698d9f9c57ac76b07459725b11d39630dc17bf4cc781beae218de">78852db8db26…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_refl">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_refl</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L436">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_refl.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_trans"
  data-name="le_trans" data-domain="order"
  data-status="checked_existing"
  data-dependencies="add_assoc"
  data-search="le_trans order is transitive order witnesses compose by addition, so the defined order is transitive. forall n m k. n &lt;= m -&gt; m &lt;= k -&gt; n &lt;= k order add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_trans</code><span>Order is transitive</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Order witnesses compose by addition, so the defined order is transitive.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_of_lt_of_le" href="#theorem-lt_of_lt_of_le"><code>lt_of_lt_of_le</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_lt_bounded_common_multiple" href="#theorem-beta_moduli_coprime_of_lt_bounded_common_multiple"><code>beta_moduli_coprime_of_lt_bounded_common_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_value_lt_scaled_base" href="#theorem-beta_value_lt_scaled_base"><code>beta_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="new_value_lt_scaled_base" href="#theorem-new_value_lt_scaled_base"><code>new_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_exclusive_recode_invariant" href="#theorem-bounded_beta_exclusive_recode_invariant"><code>bounded_beta_exclusive_recode_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_trans">Copy statement</button>
        <pre id="statement-le_trans"><code>forall n m k. n &lt;= m -&gt; m &lt;= k -&gt; n &lt;= k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_trans">Copy proof</button>
        <pre id="proof-le_trans"><code>pa prove forall n m k. n &lt;= m -&gt; m &lt;= k -&gt; n &lt;= k
use add_assoc
intro n
intro m
intro k
intro h_nm
intro h_mk
cases h_nm
cases h_mk
exists x1 + x
simp [add_assoc, h_nm_witness, h_mk_witness]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>57</dd></div>
        <div><dt>Distinct objects</dt><dd>54</dd></div>
        <div><dt>Reused references</dt><dd>3</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="eca4525bf3b274aa7f0e9b5f71ff4457ee6833a4c33f07bc4e84c29e0568b7dc">eca4525bf3b2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_trans">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_trans</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L443">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_trans.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-no_succ_add_fixed"
  data-name="no_succ_add_fixed" data-domain="addition"
  data-status="checked_existing"
  data-dependencies=""
  data-search="no_succ_add_fixed adding a positive successor has no fixed point adding a positive successor cannot leave a natural number fixed. forall p n. s p + n = n -&gt; false addition">
  <details>
    <summary>
      <span class="pa-card-title"><code>no_succ_add_fixed</code><span>Adding a positive successor has no fixed point</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Adding a positive successor cannot leave a natural number fixed.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="drop_add_prefix_from_fixed" href="#theorem-drop_add_prefix_from_fixed"><code>drop_add_prefix_from_fixed</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-no_succ_add_fixed">Copy statement</button>
        <pre id="statement-no_succ_add_fixed"><code>forall p n. S p + n = n -&gt; false</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-no_succ_add_fixed">Copy proof</button>
        <pre id="proof-no_succ_add_fixed"><code>pa prove forall p n. S p + n = n -&gt; false
intro p
induction n
intro h
apply PA1
rewrite PA3 at h
exact h
intro h
apply IH
apply PA2
rewrite PA4 at h
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>30</dd></div>
        <div><dt>Distinct objects</dt><dd>30</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3cfcff019a80f1b7e89bd283e8fc81bc7475d1bde7069d5ae4b063e5727558cb">3cfcff019a80…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for no_succ_add_fixed">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib no_succ_add_fixed</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L460">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/no_succ_add_fixed.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-drop_add_prefix_from_fixed"
  data-name="drop_add_prefix_from_fixed" data-domain="addition"
  data-status="checked_existing"
  data-dependencies="zero_add,add_succ_left,no_succ_add_fixed"
  data-search="drop_add_prefix_from_fixed drop an additive prefix from a fixed-point equation a fixed-point equation remains fixed after dropping an additive prefix. forall a b n. (b + a) + n = n -&gt; a + n = n addition zero_add add_succ_left no_succ_add_fixed">
  <details>
    <summary>
      <span class="pa-card-title"><code>drop_add_prefix_from_fixed</code><span>Drop an additive prefix from a fixed-point equation</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A fixed-point equation remains fixed after dropping an additive prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="no_succ_add_fixed" href="#theorem-no_succ_add_fixed"><code>no_succ_add_fixed</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="antisymm_from_witnesses" href="#theorem-antisymm_from_witnesses"><code>antisymm_from_witnesses</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-drop_add_prefix_from_fixed">Copy statement</button>
        <pre id="statement-drop_add_prefix_from_fixed"><code>forall a b n. (b + a) + n = n -&gt; a + n = n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-drop_add_prefix_from_fixed">Copy proof</button>
        <pre id="proof-drop_add_prefix_from_fixed"><code>pa prove forall a b n. (b + a) + n = n -&gt; a + n = n
use zero_add
use add_succ_left
use no_succ_add_fixed
intro a
induction b
intro n
intro h
specialize zero_add a
rewrite zero_add at h
exact h
intro n
intro h
exfalso
specialize no_succ_add_fixed (b + a)
specialize no_succ_add_fixed n
apply no_succ_add_fixed
specialize add_succ_left b
specialize add_succ_left a
rewrite add_succ_left at h
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>120</dd></div>
        <div><dt>Distinct objects</dt><dd>116</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>22</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ebf03686ffd746156ffa10c4a133ca34384653ead79ddfea878af37896d76d0c">ebf03686ffd7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for drop_add_prefix_from_fixed">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib drop_add_prefix_from_fixed</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L479">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/drop_add_prefix_from_fixed.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-antisymm_from_witnesses"
  data-name="antisymm_from_witnesses" data-domain="order"
  data-status="checked_existing"
  data-dependencies="add_assoc,drop_add_prefix_from_fixed"
  data-search="antisymm_from_witnesses opposing additive witnesses force equality opposing additive witnesses force equality. forall a b n m. a + n = m -&gt; b + m = n -&gt; n = m order add_assoc drop_add_prefix_from_fixed">
  <details>
    <summary>
      <span class="pa-card-title"><code>antisymm_from_witnesses</code><span>Opposing additive witnesses force equality</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Opposing additive witnesses force equality.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="drop_add_prefix_from_fixed" href="#theorem-drop_add_prefix_from_fixed"><code>drop_add_prefix_from_fixed</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_antisymm" href="#theorem-le_antisymm"><code>le_antisymm</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-antisymm_from_witnesses">Copy statement</button>
        <pre id="statement-antisymm_from_witnesses"><code>forall a b n m. a + n = m -&gt; b + m = n -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-antisymm_from_witnesses">Copy proof</button>
        <pre id="proof-antisymm_from_witnesses"><code>pa prove forall a b n m. a + n = m -&gt; b + m = n -&gt; n = m
use add_assoc
use drop_add_prefix_from_fixed
intro a
intro b
intro n
intro m
intro h_anm
intro h_bmn
symm
rewrite &lt;- h_anm
specialize drop_add_prefix_from_fixed a
specialize drop_add_prefix_from_fixed b
specialize drop_add_prefix_from_fixed n
apply drop_add_prefix_from_fixed
specialize add_assoc b
specialize add_assoc a
specialize add_assoc n
rewrite add_assoc
rewrite h_anm
rewrite h_bmn
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>200</dd></div>
        <div><dt>Distinct objects</dt><dd>191</dd></div>
        <div><dt>Reused references</dt><dd>9</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b62cd9302971dadc4a9623f3a7a6c212b0dce48ae2e6bfa6ac9c4b61928b311d">b62cd9302971…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for antisymm_from_witnesses">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib antisymm_from_witnesses</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L504">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/antisymm_from_witnesses.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_antisymm"
  data-name="le_antisymm" data-domain="order"
  data-status="checked_existing"
  data-dependencies="antisymm_from_witnesses"
  data-search="le_antisymm order is antisymmetric the witness-defined order is antisymmetric. forall n m. n &lt;= m -&gt; m &lt;= n -&gt; n = m order antisymm_from_witnesses">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_antisymm</code><span>Order is antisymmetric</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The witness-defined order is antisymmetric.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="antisymm_from_witnesses" href="#theorem-antisymm_from_witnesses"><code>antisymm_from_witnesses</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_antisymm">Copy statement</button>
        <pre id="statement-le_antisymm"><code>forall n m. n &lt;= m -&gt; m &lt;= n -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_antisymm">Copy proof</button>
        <pre id="proof-le_antisymm"><code>pa prove forall n m. n &lt;= m -&gt; m &lt;= n -&gt; n = m
use antisymm_from_witnesses
intro n
intro m
intro h_nm
intro h_mn
cases h_nm
cases h_mn
apply antisymm_from_witnesses
exact h_nm_witness
exact h_mn_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>218</dd></div>
        <div><dt>Distinct objects</dt><dd>209</dd></div>
        <div><dt>Reused references</dt><dd>9</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e0c6f0ae6bc7a6981c190224c5cffe52274fd34bc0070420fbac93aa5d8ed898">e0c6f0ae6bc7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_antisymm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_antisymm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L531">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_antisymm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_total"
  data-name="le_total" data-domain="order"
  data-status="checked_existing"
  data-dependencies=""
  data-search="le_total natural-number order is total every pair of natural numbers is comparable in the defined order. forall n m. n &lt;= m \/ m &lt;= n order">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_total</code><span>Natural-number order is total</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every pair of natural numbers is comparable in the defined order.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_merge" href="#theorem-mod_eq_lcm_merge"><code>mod_eq_lcm_merge</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_total">Copy statement</button>
        <pre id="statement-le_total"><code>forall n m. n &lt;= m \/ m &lt;= n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_total">Copy proof</button>
        <pre id="proof-le_total"><code>pa prove forall n m. n &lt;= m \/ m &lt;= n
induction n
intro m
left
exists m
simp
induction m
right
exists (S n)
simp
specialize IH m
cases IH
cases IH_left
left
exists x
rewrite PA4
congr
exact IH_left_witness
cases IH_right
right
exists x
rewrite PA4
congr
exact IH_right_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>49</dd></div>
        <div><dt>Distinct objects</dt><dd>48</dd></div>
        <div><dt>Reused references</dt><dd>1</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="13db746df2987fd277099b393f979fe046a6502eb9294b94bb4b6115ed6fc44e">13db746df298…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_total">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_total</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L548">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_total.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_eq_zero_right"
  data-name="add_eq_zero_right" data-domain="addition"
  data-status="checked_existing"
  data-dependencies=""
  data-search="add_eq_zero_right a zero sum has a zero right summand a sum equal to zero has zero as its right addend. forall a b. a + b = 0 -&gt; b = 0 addition">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_eq_zero_right</code><span>A zero sum has a zero right summand</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A sum equal to zero has zero as its right addend.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_eq_zero" href="#theorem-mul_eq_zero"><code>mul_eq_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_left" href="#theorem-add_eq_zero_left"><code>add_eq_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_components" href="#theorem-add_eq_zero_components"><code>add_eq_zero_components</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_eq_one_components" href="#theorem-mul_eq_one_components"><code>mul_eq_one_components</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_exclusive_recode_invariant" href="#theorem-bounded_beta_exclusive_recode_invariant"><code>bounded_beta_exclusive_recode_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_empty" href="#theorem-all_prime_empty"><code>all_prime_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_search_up_to" href="#theorem-quadratic_residue_search_up_to"><code>quadratic_residue_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_empty" href="#theorem-beta_repeat_empty"><code>beta_repeat_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_empty" href="#theorem-beta_range_empty"><code>beta_range_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="all_bits_zero" href="#theorem-all_bits_zero"><code>all_bits_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_zero" href="#theorem-finite_surjective_zero"><code>finite_surjective_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_exists" href="#theorem-beta_prefix_replace_exists"><code>beta_prefix_replace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_eq_zero_right">Copy statement</button>
        <pre id="statement-add_eq_zero_right"><code>forall a b. a + b = 0 -&gt; b = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_eq_zero_right">Copy proof</button>
        <pre id="proof-add_eq_zero_right"><code>pa prove forall a b. a + b = 0 -&gt; b = 0
intro a
induction b
intro h
refl
intro h
exfalso
apply PA1
rewrite PA4 at h
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>19</dd></div>
        <div><dt>Distinct objects</dt><dd>19</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e9b362b69b8aff2e72459a3450db93f7ecdb6740b656389161ddd2df3ab360b1">e9b362b69b8a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_eq_zero_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_eq_zero_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L579">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_eq_zero_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_eq_zero"
  data-name="mul_eq_zero" data-domain="multiplication"
  data-status="checked_existing"
  data-dependencies="add_eq_zero_right"
  data-search="mul_eq_zero a zero product has a zero factor zero products have a zero factor: the 23-entry core capstone. forall n m. n * m = 0 -&gt; n = 0 \/ m = 0 multiplication add_eq_zero_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_eq_zero</code><span>A zero product has a zero factor</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Zero products have a zero factor: the 23-entry core capstone.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_ne_zero" href="#theorem-mul_ne_zero"><code>mul_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="two_large_factors_impossible" href="#theorem-two_large_factors_impossible"><code>two_large_factors_impossible</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_step" href="#theorem-bounded_common_multiple_step"><code>bounded_common_multiple_step</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_three" href="#theorem-prime_three"><code>prime_three</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_eq_zero">Copy statement</button>
        <pre id="statement-mul_eq_zero"><code>forall n m. n * m = 0 -&gt; n = 0 \/ m = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_eq_zero">Copy proof</button>
        <pre id="proof-mul_eq_zero"><code>pa prove forall n m. n * m = 0 -&gt; n = 0 \/ m = 0
use add_eq_zero_right
intro n
induction m
intro h
right
refl
intro h
left
specialize add_eq_zero_right (n * m)
specialize add_eq_zero_right n
apply add_eq_zero_right
rewrite PA6 at h
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>47</dd></div>
        <div><dt>Distinct objects</dt><dd>47</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ff49ed484000e9fc74d90a29ea04198f0d2abebc6e40485d4811d10bc265847e">ff49ed484000…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_eq_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_eq_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L596">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_eq_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-eq_symm"
  data-name="eq_symm" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="eq_symm equality is symmetric equality is symmetric. forall a b. a = b -&gt; b = a equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>eq_symm</code><span>Equality is symmetric</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Equality is symmetric.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-eq_symm">Copy statement</button>
        <pre id="statement-eq_symm"><code>forall a b. a = b -&gt; b = a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-eq_symm">Copy proof</button>
        <pre id="proof-eq_symm"><code>pa prove forall a b. a = b -&gt; b = a
intro a
intro b
intro h
symm
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5</dd></div>
        <div><dt>Distinct objects</dt><dd>5</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>5</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a7f8dc7f3c547940fa23d0b245a1421fbc041f585f0b636d75cc4f7ea838b606">a7f8dc7f3c54…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for eq_symm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib eq_symm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L619">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/eq_symm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-eq_trans"
  data-name="eq_trans" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="eq_trans equality is transitive equality is transitive. forall a b c. a = b -&gt; b = c -&gt; a = c equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>eq_trans</code><span>Equality is transitive</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Equality is transitive.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-eq_trans">Copy statement</button>
        <pre id="statement-eq_trans"><code>forall a b c. a = b -&gt; b = c -&gt; a = c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-eq_trans">Copy proof</button>
        <pre id="proof-eq_trans"><code>pa prove forall a b c. a = b -&gt; b = c -&gt; a = c
intro a
intro b
intro c
intro hab
intro hbc
trans b
exact hab
exact hbc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>8</dd></div>
        <div><dt>Distinct objects</dt><dd>8</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>7</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b883c2beef2b3ae2b0bc2178641eaff15ee38d1ea9c0db44ba5f8b18f717da47">b883c2beef2b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for eq_trans">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib eq_trans</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L626">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/eq_trans.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-succ_congr"
  data-name="succ_congr" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="succ_congr successor preserves equality successor preserves equality. forall a b. a = b -&gt; s a = s b equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>succ_congr</code><span>Successor preserves equality</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Successor preserves equality.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-succ_congr">Copy statement</button>
        <pre id="statement-succ_congr"><code>forall a b. a = b -&gt; S a = S b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-succ_congr">Copy proof</button>
        <pre id="proof-succ_congr"><code>pa prove forall a b. a = b -&gt; S a = S b
intro a
intro b
intro h
congr
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5</dd></div>
        <div><dt>Distinct objects</dt><dd>5</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>5</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="50f243457746def0d00deaf0db3e41c5b7e69e40214a2c0d4d8da31f4e68e463">50f243457746…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for succ_congr">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib succ_congr</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L642">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/succ_congr.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-zero_or_succ"
  data-name="zero_or_succ" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="zero_or_succ every natural is zero or a successor every natural is either zero or the successor of a natural. forall n. n = 0 \/ exists k. n = s k equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>zero_or_succ</code><span>Every natural is zero or a successor</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural is either zero or the successor of a natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_succ" href="#theorem-division_remainder_succ"><code>division_remainder_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_has_zero_remainder" href="#theorem-multiple_has_zero_remainder"><code>multiple_has_zero_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_step" href="#theorem-bounded_common_multiple_step"><code>bounded_common_multiple_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_three" href="#theorem-prime_three"><code>prime_three</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-zero_or_succ">Copy statement</button>
        <pre id="statement-zero_or_succ"><code>forall n. n = 0 \/ exists k. n = S k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-zero_or_succ">Copy proof</button>
        <pre id="proof-zero_or_succ"><code>pa prove forall n. n = 0 \/ exists k. n = S k
induction n
left
refl
right
exists n
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>8</dd></div>
        <div><dt>Distinct objects</dt><dd>8</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>6</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c045c0f7e88dee8654a076bf42483e85a8d70b9ee00a4eba476a11b71f1bc97d">c045c0f7e88d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for zero_or_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib zero_or_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L649">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/zero_or_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-nonzero_is_succ"
  data-name="nonzero_is_succ" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="nonzero_is_succ every nonzero natural has a predecessor every nonzero natural has a predecessor. forall n. ~(n = 0) -&gt; exists k. n = s k equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>nonzero_is_succ</code><span>Every nonzero natural has a predecessor</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every nonzero natural has a predecessor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_decidable_nonzero" href="#theorem-quadratic_residue_bounded_decidable_nonzero"><code>quadratic_residue_bounded_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_is_succ_succ" href="#theorem-prime_is_succ_succ"><code>prime_is_succ_succ</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-nonzero_is_succ">Copy statement</button>
        <pre id="statement-nonzero_is_succ"><code>forall n. ~(n = 0) -&gt; exists k. n = S k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-nonzero_is_succ">Copy proof</button>
        <pre id="proof-nonzero_is_succ"><code>pa prove forall n. ~(n = 0) -&gt; exists k. n = S k
induction n
intro h
exfalso
apply h
refl
intro h
exists n
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>11</dd></div>
        <div><dt>Distinct objects</dt><dd>11</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>6</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ce59c977bbdf270e7b3b0ffdc561fee967ad3ea13abb44508938f5f0c8b690af">ce59c977bbdf…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for nonzero_is_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib nonzero_is_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L663">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/nonzero_is_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_congr"
  data-name="add_congr" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="add_congr addition preserves equality in both arguments addition preserves equality in both arguments. forall a b c d. a = b -&gt; c = d -&gt; a + c = b + d equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_congr</code><span>Addition preserves equality in both arguments</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Addition preserves equality in both arguments.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_trace_functional" href="#theorem-beta_sum_trace_functional"><code>beta_sum_trace_functional</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_congr">Copy statement</button>
        <pre id="statement-add_congr"><code>forall a b c d. a = b -&gt; c = d -&gt; a + c = b + d</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_congr">Copy proof</button>
        <pre id="proof-add_congr"><code>pa prove forall a b c d. a = b -&gt; c = d -&gt; a + c = b + d
intro a
intro b
intro c
intro d
intro hab
intro hcd
congr
exact hab
exact hcd
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9</dd></div>
        <div><dt>Distinct objects</dt><dd>9</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>8</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="36c4025bd91fab9f8505455c485af2ef30d50c90c778fe65a4130faf2e28c178">36c4025bd91f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_congr">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_congr</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L679">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_congr.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_congr"
  data-name="mul_congr" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="mul_congr multiplication preserves equality in both arguments multiplication preserves equality in both arguments. forall a b c d. a = b -&gt; c = d -&gt; a * c = b * d equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_congr</code><span>Multiplication preserves equality in both arguments</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiplication preserves equality in both arguments.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_congr">Copy statement</button>
        <pre id="statement-mul_congr"><code>forall a b c d. a = b -&gt; c = d -&gt; a * c = b * d</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_congr">Copy proof</button>
        <pre id="proof-mul_congr"><code>pa prove forall a b c d. a = b -&gt; c = d -&gt; a * c = b * d
intro a
intro b
intro c
intro d
intro hab
intro hcd
congr
exact hab
exact hcd
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9</dd></div>
        <div><dt>Distinct objects</dt><dd>9</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>8</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a55a97cc7dfa373f90e29241f31b4189e61f1f6406a13eac5bb244300bc1453a">a55a97cc7dfa…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_congr">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_congr</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L696">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_congr.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_right_cancel"
  data-name="add_right_cancel" data-domain="addition"
  data-status="checked_m20"
  data-dependencies=""
  data-search="add_right_cancel addition cancels on the right a common right addend can be cancelled. forall a b c. a + c = b + c -&gt; a = b addition">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_right_cancel</code><span>Addition cancels on the right</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common right addend can be cancelled.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_left_cancel" href="#theorem-add_left_cancel"><code>add_left_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="add_le_cancel_right" href="#theorem-add_le_cancel_right"><code>add_le_cancel_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_half_unique" href="#theorem-odd_half_unique"><code>odd_half_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_right_cancel">Copy statement</button>
        <pre id="statement-add_right_cancel"><code>forall a b c. a + c = b + c -&gt; a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_right_cancel">Copy proof</button>
        <pre id="proof-add_right_cancel"><code>pa prove forall a b c. a + c = b + c -&gt; a = b
intro a
intro b
induction c
intro h
rewrite PA3 at h
rewrite PA3 at h
exact h
intro h
apply IH
apply PA2
rewrite PA4 at h
rewrite PA4 at h
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>41</dd></div>
        <div><dt>Distinct objects</dt><dd>41</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ea6126f3e7122ade29fec82f4b99c6a8b097fda35af8e50b13cc5376da398c99">ea6126f3e712…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_right_cancel">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_right_cancel</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L715">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_right_cancel.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_left_cancel"
  data-name="add_left_cancel" data-domain="addition"
  data-status="checked_m20"
  data-dependencies="add_comm,add_right_cancel"
  data-search="add_left_cancel addition cancels on the left a common left addend can be cancelled. forall a b c. a + b = a + c -&gt; b = c addition add_comm add_right_cancel">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_left_cancel</code><span>Addition cancels on the left</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common left addend can be cancelled.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_right_cancel" href="#theorem-add_right_cancel"><code>add_right_cancel</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="positive_quotient_gap_impossible" href="#theorem-positive_quotient_gap_impossible"><code>positive_quotient_gap_impossible</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_unique_same_quotient" href="#theorem-remainder_unique_same_quotient"><code>remainder_unique_same_quotient</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_injective" href="#theorem-beta_range_injective"><code>beta_range_injective</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_ordered_gap_multiple" href="#theorem-mod_eq_ordered_gap_multiple"><code>mod_eq_ordered_gap_multiple</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_left_cancel">Copy statement</button>
        <pre id="statement-add_left_cancel"><code>forall a b c. a + b = a + c -&gt; b = c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_left_cancel">Copy proof</button>
        <pre id="proof-add_left_cancel"><code>pa prove forall a b c. a + b = a + c -&gt; b = c
use add_comm
use add_right_cancel
intro a
intro b
intro c
intro h
specialize add_right_cancel b
specialize add_right_cancel c
specialize add_right_cancel a
apply add_right_cancel
trans a + b
apply add_comm
trans a + c
exact h
apply add_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>143</dd></div>
        <div><dt>Distinct objects</dt><dd>137</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="891b97905c1d9af477b981f00892ba445db6ead037bafce9344164f996aa05da">891b97905c1d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_left_cancel">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_left_cancel</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L736">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_left_cancel.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-zero_le"
  data-name="zero_le" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="zero_le zero is below every natural number zero is below every natural number. forall n. 0 &lt;= n order">
  <details>
    <summary>
      <span class="pa-card-title"><code>zero_le</code><span>Zero is below every natural number</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Zero is below every natural number.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_append" href="#theorem-beta_product_succ_append"><code>beta_product_succ_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-zero_le">Copy statement</button>
        <pre id="statement-zero_le"><code>forall n. 0 &lt;= n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-zero_le">Copy proof</button>
        <pre id="proof-zero_le"><code>pa prove forall n. 0 &lt;= n
intro n
exists n
rewrite PA3
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7</dd></div>
        <div><dt>Distinct objects</dt><dd>7</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>6</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7ba583081e4b520bc82dd2a6e16a4242fd2b0ced6d56da75a4ade309077bdc45">7ba583081e4b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for zero_le">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib zero_le</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L757">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/zero_le.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_succ_self"
  data-name="le_succ_self" data-domain="order"
  data-status="checked_m20"
  data-dependencies="zero_add,add_succ_left"
  data-search="le_succ_self every natural is below its successor every natural number is below its successor. forall n. n &lt;= s n order zero_add add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_succ_self</code><span>Every natural is below its successor</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural number is below its successor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_exclusive_recode_invariant" href="#theorem-bounded_beta_exclusive_recode_invariant"><code>bounded_beta_exclusive_recode_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_succ_self">Copy statement</button>
        <pre id="statement-le_succ_self"><code>forall n. n &lt;= S n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_succ_self">Copy proof</button>
        <pre id="proof-le_succ_self"><code>pa prove forall n. n &lt;= S n
use zero_add
use add_succ_left
intro n
exists 1
simp [add_succ_left, zero_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>58</dd></div>
        <div><dt>Distinct objects</dt><dd>54</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1bdf6c9f2c04ef5211f9949e4cdf90bd59cd6c4f105780feb0ca6c8d4b3177a2">1bdf6c9f2c04…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_succ_self">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_succ_self</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L764">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_succ_self.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_zero"
  data-name="le_zero" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right"
  data-search="le_zero only zero lies below zero only zero is less than or equal to zero. forall n. n &lt;= 0 -&gt; n = 0 order add_eq_zero_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_zero</code><span>Only zero lies below zero</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Only zero is less than or equal to zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_up_to" href="#theorem-gcd_exists_up_to"><code>gcd_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_empty" href="#theorem-sorted_empty"><code>sorted_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_singleton" href="#theorem-sorted_singleton"><code>sorted_singleton</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_three_cases" href="#theorem-lt_three_cases"><code>lt_three_cases</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_zero">Copy statement</button>
        <pre id="statement-le_zero"><code>forall n. n &lt;= 0 -&gt; n = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_zero">Copy proof</button>
        <pre id="proof-le_zero"><code>pa prove forall n. n &lt;= 0 -&gt; n = 0
use add_eq_zero_right
intro n
intro h
cases h
apply add_eq_zero_right
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29</dd></div>
        <div><dt>Distinct objects</dt><dd>29</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7674b5d583d84714ca060515211f0b8944a16926956be0c9cf4b396e90ab09ae">7674b5d583d8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L771">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-one_le_of_ne_zero"
  data-name="one_le_of_ne_zero" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="one_le_of_ne_zero every nonzero natural is at least one every nonzero natural is at least one. forall n. ~(n = 0) -&gt; 1 &lt;= n order">
  <details>
    <summary>
      <span class="pa-card-title"><code>one_le_of_ne_zero</code><span>Every nonzero natural is at least one</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every nonzero natural is at least one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divisor_le_nonzero" href="#theorem-divisor_le_nonzero"><code>divisor_le_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_scaled_nonzero" href="#theorem-le_scaled_nonzero"><code>le_scaled_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-one_le_of_ne_zero">Copy statement</button>
        <pre id="statement-one_le_of_ne_zero"><code>forall n. ~(n = 0) -&gt; 1 &lt;= n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-one_le_of_ne_zero">Copy proof</button>
        <pre id="proof-one_le_of_ne_zero"><code>pa prove forall n. ~(n = 0) -&gt; 1 &lt;= n
induction n
intro h
exfalso
apply h
refl
intro h
exists n
simp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>20</dd></div>
        <div><dt>Distinct objects</dt><dd>20</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="627f1a9c62d5ce9f005ec00ef76f76748dd04816fd7a7769deae556455b88afe">627f1a9c62d5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for one_le_of_ne_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib one_le_of_ne_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L784">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/one_le_of_ne_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-ne_zero_of_one_le"
  data-name="ne_zero_of_one_le" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="ne_zero_of_one_le a natural at least one is nonzero a natural at least one is nonzero. forall n. 1 &lt;= n -&gt; ~(n = 0) order">
  <details>
    <summary>
      <span class="pa-card-title"><code>ne_zero_of_one_le</code><span>A natural at least one is nonzero</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A natural at least one is nonzero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-ne_zero_of_one_le">Copy statement</button>
        <pre id="statement-ne_zero_of_one_le"><code>forall n. 1 &lt;= n -&gt; ~(n = 0)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-ne_zero_of_one_le">Copy proof</button>
        <pre id="proof-ne_zero_of_one_le"><code>pa prove forall n. 1 &lt;= n -&gt; ~(n = 0)
intro n
intro h
intro hn
cases h
rewrite hn at h_witness
apply PA1
rewrite PA4 at h_witness
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>21</dd></div>
        <div><dt>Distinct objects</dt><dd>21</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9a743f0b80bdd6dd6cfdd6b5a2d67c3967551d39ab1ff696511a6775525dc035">9a743f0b80bd…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for ne_zero_of_one_le">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib ne_zero_of_one_le</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L800">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/ne_zero_of_one_le.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_add_left"
  data-name="le_add_left" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="le_add_left a number is below a left-added summand adding on the left produces an explicit order witness. forall a b. exists k. k + a = b + a order">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_add_left</code><span>A number is below a left-added summand</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Adding on the left produces an explicit order witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="base_le_beta_modulus" href="#theorem-base_le_beta_modulus"><code>base_le_beta_modulus</code></a> <a class="pa-theorem-chip" data-theorem-link="new_value_lt_scaled_base" href="#theorem-new_value_lt_scaled_base"><code>new_value_lt_scaled_base</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_add_left">Copy statement</button>
        <pre id="statement-le_add_left"><code>forall a b. exists k. k + a = b + a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_add_left">Copy proof</button>
        <pre id="proof-le_add_left"><code>pa prove forall a b. exists k. k + a = b + a
intro a
intro b
exists b
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4</dd></div>
        <div><dt>Distinct objects</dt><dd>4</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>4</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="87a93b4692ab41729ff64d5e17b5e1209a4933cfcf130879aeedba30e7690334">87a93b4692ab…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_add_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_add_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L816">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_add_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_add_right"
  data-name="le_add_right" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_comm"
  data-search="le_add_right a number is below itself plus a right summand adding on the right produces an explicit order witness. forall a b. exists k. k + a = a + b order add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_add_right</code><span>A number is below itself plus a right summand</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Adding on the right produces an explicit order witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_value_lt_scaled_base" href="#theorem-beta_value_lt_scaled_base"><code>beta_value_lt_scaled_base</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_add_right">Copy statement</button>
        <pre id="statement-le_add_right"><code>forall a b. exists k. k + a = a + b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_add_right">Copy proof</button>
        <pre id="proof-le_add_right"><code>pa prove forall a b. exists k. k + a = a + b
use add_comm
intro a
intro b
exists b
apply add_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>80</dd></div>
        <div><dt>Distinct objects</dt><dd>74</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a7c973720d508c5551b09995aaecb6a07af2518613d57e24e752c84b19cd3887">a7c973720d50…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_add_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_add_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L828">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_add_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_le_add_right"
  data-name="add_le_add_right" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_assoc"
  data-search="add_le_add_right adding the same right summand preserves order adding the same right summand preserves the witness-defined order. forall a b c. (exists k. k + a = b) -&gt; exists r. r + (a + c) = b + c order add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_le_add_right</code><span>Adding the same right summand preserves order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Adding the same right summand preserves the witness-defined order.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_le_add_right">Copy statement</button>
        <pre id="statement-add_le_add_right"><code>forall a b c. (exists k. k + a = b) -&gt; exists r. r + (a + c) = b + c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_le_add_right">Copy proof</button>
        <pre id="proof-add_le_add_right"><code>pa prove forall a b c. (exists k. k + a = b) -&gt; exists r. r + (a + c) = b + c
use add_assoc
intro a
intro b
intro c
intro h
cases h
exists x
trans (x + a) + c
symm
apply add_assoc
congr
exact h_witness
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>50</dd></div>
        <div><dt>Distinct objects</dt><dd>47</dd></div>
        <div><dt>Reused references</dt><dd>3</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b9f1f17b67a518224faaa0c5336ee4fbcfe94927a5252fdf41ebbe43aa216ebd">b9f1f17b67a5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_le_add_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_le_add_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L840">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_le_add_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_le_add_left"
  data-name="add_le_add_left" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_comm"
  data-search="add_le_add_left adding the same left summand preserves order adding the same left summand preserves the witness-defined order. forall a b c. (exists k. k + a = b) -&gt; exists r. r + (c + a) = c + b order add_assoc add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_le_add_left</code><span>Adding the same left summand preserves order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Adding the same left summand preserves the witness-defined order.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_le_add_left">Copy statement</button>
        <pre id="statement-add_le_add_left"><code>forall a b c. (exists k. k + a = b) -&gt; exists r. r + (c + a) = c + b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_le_add_left">Copy proof</button>
        <pre id="proof-add_le_add_left"><code>pa prove forall a b c. (exists k. k + a = b) -&gt; exists r. r + (c + a) = c + b
use add_assoc
use add_comm
intro a
intro b
intro c
intro h
cases h
exists x
trans (x + c) + a
symm
apply add_assoc
trans (c + x) + a
congr
apply add_comm
refl
trans c + (x + a)
apply add_assoc
congr
refl
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>135</dd></div>
        <div><dt>Distinct objects</dt><dd>124</dd></div>
        <div><dt>Reused references</dt><dd>11</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2c818a03f8f1c1b3f3c29b3a9d5918ed56e1f5d7b4f13d47ce7cbbc5720b17ae">2c818a03f8f1…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_le_add_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_le_add_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L860">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_le_add_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-succ_le_succ"
  data-name="succ_le_succ" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="succ_le_succ successor preserves order successor preserves the witness-defined order. forall a b. (exists k. k + a = b) -&gt; exists r. r + s a = s b order">
  <details>
    <summary>
      <span class="pa-card-title"><code>succ_le_succ</code><span>Successor preserves order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Successor preserves the witness-defined order.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_value_lt_scaled_base" href="#theorem-beta_value_lt_scaled_base"><code>beta_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="new_value_lt_scaled_base" href="#theorem-new_value_lt_scaled_base"><code>new_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_append" href="#theorem-beta_product_succ_append"><code>beta_product_succ_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_intro" href="#theorem-sorted_succ_intro"><code>sorted_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-succ_le_succ">Copy statement</button>
        <pre id="statement-succ_le_succ"><code>forall a b. (exists k. k + a = b) -&gt; exists r. r + S a = S b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-succ_le_succ">Copy proof</button>
        <pre id="proof-succ_le_succ"><code>pa prove forall a b. (exists k. k + a = b) -&gt; exists r. r + S a = S b
intro a
intro b
intro h
cases h
exists x
rewrite PA4
congr
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>13</dd></div>
        <div><dt>Distinct objects</dt><dd>13</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="72f0bef7672bf607da7e166c9da830594225497ca93b6385a36d4c03f0beaf96">72f0bef7672b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for succ_le_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib succ_le_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L886">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/succ_le_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_of_succ_le_succ"
  data-name="le_of_succ_le_succ" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="le_of_succ_le_succ successor reflects order successor order reflects to the underlying naturals. forall a b. (exists k. k + s a = s b) -&gt; exists r. r + a = b order">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_of_succ_le_succ</code><span>Successor reflects order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Successor order reflects to the underlying naturals.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_up_to" href="#theorem-gcd_exists_up_to"><code>gcd_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_property_succ" href="#theorem-factor_property_succ"><code>factor_property_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_append" href="#theorem-beta_product_succ_append"><code>beta_product_succ_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_intro" href="#theorem-all_prime_succ_intro"><code>all_prime_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_singleton" href="#theorem-sorted_singleton"><code>sorted_singleton</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_intro" href="#theorem-sorted_succ_intro"><code>sorted_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_succ_extend" href="#theorem-beta_repeat_succ_extend"><code>beta_repeat_succ_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_succ_extend" href="#theorem-beta_range_succ_extend"><code>beta_range_succ_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_three_cases" href="#theorem-lt_three_cases"><code>lt_three_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_five_cases" href="#theorem-lt_five_cases"><code>lt_five_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_seven_cases" href="#theorem-lt_seven_cases"><code>lt_seven_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_of_succ_le_succ">Copy statement</button>
        <pre id="statement-le_of_succ_le_succ"><code>forall a b. (exists k. k + S a = S b) -&gt; exists r. r + a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_of_succ_le_succ">Copy proof</button>
        <pre id="proof-le_of_succ_le_succ"><code>pa prove forall a b. (exists k. k + S a = S b) -&gt; exists r. r + a = b
intro a
intro b
intro h
cases h
exists x
apply PA2
trans x + S a
symm
apply PA4
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>16</dd></div>
        <div><dt>Distinct objects</dt><dd>16</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f4da1b80d84f078c295b1d2edd719dcc0ab64fa3d947fc7438df19df399b1b3f">f4da1b80d84f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_of_succ_le_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_of_succ_le_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L902">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_of_succ_le_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_succ"
  data-name="le_succ" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_succ_left"
  data-search="le_succ order is preserved by raising the upper bound a weak inequality remains true after raising its upper bound by one. forall a b. (exists k. k + a = b) -&gt; exists r. r + a = s b order add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_succ</code><span>Order is preserved by raising the upper bound</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A weak inequality remains true after raising its upper bound by one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="base_le_beta_modulus" href="#theorem-base_le_beta_modulus"><code>base_le_beta_modulus</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_prefix" href="#theorem-all_prime_succ_elim_prefix"><code>all_prime_succ_elim_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_elim_prefix" href="#theorem-sorted_succ_elim_prefix"><code>sorted_succ_elim_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_trace_functional" href="#theorem-beta_sum_trace_functional"><code>beta_sum_trace_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_succ_decompose" href="#theorem-beta_sum_succ_decompose"><code>beta_sum_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_pointwise_mod_congruent" href="#theorem-beta_product_pointwise_mod_congruent"><code>beta_product_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_pointwise_mod_congruent" href="#theorem-beta_sum_pointwise_mod_congruent"><code>beta_sum_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="all_bits_prefix_succ" href="#theorem-all_bits_prefix_succ"><code>all_bits_prefix_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_succ_decompose" href="#theorem-factorial_succ_decompose"><code>factorial_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_injective_prefix_succ" href="#theorem-finite_injective_prefix_succ"><code>finite_injective_prefix_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_from_entries" href="#theorem-beta_prefix_swap_last_from_entries"><code>beta_prefix_swap_last_from_entries</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_bounded" href="#theorem-finite_swap_last_bounded"><code>finite_swap_last_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_injective" href="#theorem-finite_swap_last_injective"><code>finite_swap_last_injective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_surjective_back" href="#theorem-finite_swap_last_surjective_back"><code>finite_swap_last_surjective_back</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_prefix_without_top" href="#theorem-finite_bounded_prefix_without_top"><code>finite_bounded_prefix_without_top</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_intro" href="#theorem-finite_surjective_succ_intro"><code>finite_surjective_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_last_is_top_from_prefix_surjective" href="#theorem-finite_last_is_top_from_prefix_surjective"><code>finite_last_is_top_from_prefix_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_swap_last_invariant" href="#theorem-beta_product_swap_last_invariant"><code>beta_product_swap_last_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_fixed_last_prefix_bounded" href="#theorem-finite_fixed_last_prefix_bounded"><code>finite_fixed_last_prefix_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_succ">Copy statement</button>
        <pre id="statement-le_succ"><code>forall a b. (exists k. k + a = b) -&gt; exists r. r + a = S b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_succ">Copy proof</button>
        <pre id="proof-le_succ"><code>pa prove forall a b. (exists k. k + a = b) -&gt; exists r. r + a = S b
use add_succ_left
intro a
intro b
intro h
cases h
exists S x
trans S (x + a)
apply add_succ_left
congr
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>40</dd></div>
        <div><dt>Distinct objects</dt><dd>38</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="acb1d2bedd2946a6092d93bbe92d05a8a2f4f65880e404ad3019089ed9c80427">acb1d2bedd29…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L920">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_to_le"
  data-name="lt_to_le" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_succ_left"
  data-search="lt_to_le strict order entails weak order a witnessed strict inequality entails the corresponding weak inequality. forall a b. (exists k. k + s a = b) -&gt; exists r. r + a = b order add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_to_le</code><span>Strict order entails weak order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A witnessed strict inequality entails the corresponding weak inequality.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_transport" href="#theorem-sorted_transport"><code>sorted_transport</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_to_le">Copy statement</button>
        <pre id="statement-lt_to_le"><code>forall a b. (exists k. k + S a = b) -&gt; exists r. r + a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_to_le">Copy proof</button>
        <pre id="proof-lt_to_le"><code>pa prove forall a b. (exists k. k + S a = b) -&gt; exists r. r + a = b
use add_succ_left
intro a
intro b
intro h
cases h
exists S x
trans x + S a
trans S (x + a)
apply add_succ_left
symm
apply PA4
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>44</dd></div>
        <div><dt>Distinct objects</dt><dd>42</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="04cba73adcda7aa0373f87913499169126fd53b084872b46dde8bde8c7e23b18">04cba73adcda…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_to_le">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_to_le</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L937">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_to_le.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_le_cancel_right"
  data-name="add_le_cancel_right" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_right_cancel"
  data-search="add_le_cancel_right cancel a common right summand from order a common right summand can be cancelled from an order comparison. forall a b c. (exists k. k + (a + c) = b + c) -&gt; exists r. r + a = b order add_assoc add_right_cancel">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_le_cancel_right</code><span>Cancel a common right summand from order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common right summand can be cancelled from an order comparison.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_right_cancel" href="#theorem-add_right_cancel"><code>add_right_cancel</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_le_cancel_right">Copy statement</button>
        <pre id="statement-add_le_cancel_right"><code>forall a b c. (exists k. k + (a + c) = b + c) -&gt; exists r. r + a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_le_cancel_right">Copy proof</button>
        <pre id="proof-add_le_cancel_right"><code>pa prove forall a b c. (exists k. k + (a + c) = b + c) -&gt; exists r. r + a = b
use add_assoc
use add_right_cancel
intro a
intro b
intro c
intro h
cases h
exists x
specialize add_right_cancel (x + a)
specialize add_right_cancel b
specialize add_right_cancel c
apply add_right_cancel
trans x + (a + c)
apply add_assoc
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>103</dd></div>
        <div><dt>Distinct objects</dt><dd>100</dd></div>
        <div><dt>Reused references</dt><dd>3</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="cec17a61991552dd0b5e1c674cb55bd84349395570e02ef6eba191ef146c300c">cec17a619915…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_le_cancel_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_le_cancel_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L956">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_le_cancel_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_irrefl_expanded"
  data-name="lt_irrefl_expanded" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_succ_left,no_succ_add_fixed"
  data-search="lt_irrefl_expanded strict order is irreflexive no natural is strictly below itself, with strict order fully expanded. forall n. ~(exists k. k + s n = n) order add_succ_left no_succ_add_fixed">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_irrefl_expanded</code><span>Strict order is irreflexive</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">No natural is strictly below itself, with strict order fully expanded.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="no_succ_add_fixed" href="#theorem-no_succ_add_fixed"><code>no_succ_add_fixed</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_from_entries" href="#theorem-beta_prefix_swap_last_from_entries"><code>beta_prefix_swap_last_from_entries</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_last_is_top_from_prefix_surjective" href="#theorem-finite_last_is_top_from_prefix_surjective"><code>finite_last_is_top_from_prefix_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_swap_last_invariant" href="#theorem-beta_product_swap_last_invariant"><code>beta_product_swap_last_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_fixed_last_prefix_bounded" href="#theorem-finite_fixed_last_prefix_bounded"><code>finite_fixed_last_prefix_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_irrefl_expanded">Copy statement</button>
        <pre id="statement-lt_irrefl_expanded"><code>forall n. ~(exists k. k + S n = n)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_irrefl_expanded">Copy proof</button>
        <pre id="proof-lt_irrefl_expanded"><code>pa prove forall n. ~(exists k. k + S n = n)
use add_succ_left
use no_succ_add_fixed
intro n
intro h
cases h
specialize no_succ_add_fixed x
specialize no_succ_add_fixed n
apply no_succ_add_fixed
trans x + S n
trans S (x + n)
apply add_succ_left
symm
apply PA4
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>83</dd></div>
        <div><dt>Distinct objects</dt><dd>81</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fb85108bee591fdfcf45f41f1256155dbf01d6c93c4ad1779517d5420a7a8c09">fb85108bee59…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_irrefl_expanded">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_irrefl_expanded</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L977">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_irrefl_expanded.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_eq_or_lt"
  data-name="le_eq_or_lt" data-domain="order"
  data-status="checked_m20"
  data-dependencies="zero_or_succ,zero_add,add_succ_left"
  data-search="le_eq_or_lt a weak inequality is equality or strict inequality a witnessed inequality is either equality or a witnessed strict inequality. forall a b. (exists k. k + a = b) -&gt; a = b \/ exists k. k + s a = b order zero_or_succ zero_add add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_eq_or_lt</code><span>A weak inequality is equality or strict inequality</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A witnessed inequality is either equality or a witnessed strict inequality.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="remainder_bound_step" href="#theorem-remainder_bound_step"><code>remainder_bound_step</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_exists_up_to" href="#theorem-gcd_exists_up_to"><code>gcd_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_property_succ" href="#theorem-factor_property_succ"><code>factor_property_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="proper_factor_lt" href="#theorem-proper_factor_lt"><code>proper_factor_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_append" href="#theorem-beta_product_succ_append"><code>beta_product_succ_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_intro" href="#theorem-all_prime_succ_intro"><code>all_prime_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_intro" href="#theorem-sorted_succ_intro"><code>sorted_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_search_up_to" href="#theorem-quadratic_residue_search_up_to"><code>quadratic_residue_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_succ_extend" href="#theorem-beta_repeat_succ_extend"><code>beta_repeat_succ_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_succ_extend" href="#theorem-beta_range_succ_extend"><code>beta_range_succ_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_three_cases" href="#theorem-lt_three_cases"><code>lt_three_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_five_cases" href="#theorem-lt_five_cases"><code>lt_five_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_seven_cases" href="#theorem-lt_seven_cases"><code>lt_seven_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_eq_or_lt">Copy statement</button>
        <pre id="statement-le_eq_or_lt"><code>forall a b. (exists k. k + a = b) -&gt; a = b \/ exists k. k + S a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_eq_or_lt">Copy proof</button>
        <pre id="proof-le_eq_or_lt"><code>pa prove forall a b. (exists k. k + a = b) -&gt; a = b \/ exists k. k + S a = b
use zero_or_succ
use zero_add
use add_succ_left
intro a
intro b
intro h
cases h
specialize zero_or_succ x
cases zero_or_succ
left
rewrite zero_or_succ_left at h_witness
specialize zero_add a
rewrite zero_add at h_witness
exact h_witness
cases zero_or_succ_right
right
exists x1
trans S x1 + a
trans S (x1 + a)
apply PA4
symm
apply add_succ_left
rewrite &lt;- zero_or_succ_right_witness
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>98</dd></div>
        <div><dt>Distinct objects</dt><dd>94</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="59ff9abf5aa85742eb877ac74c4366ce9a620295453c4e0748b89e907b1a5942">59ff9abf5aa8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_eq_or_lt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_eq_or_lt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L997">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_eq_or_lt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_of_lt_of_le"
  data-name="lt_of_lt_of_le" data-domain="order"
  data-status="checked_m20"
  data-dependencies="le_trans"
  data-search="lt_of_lt_of_le strict order followed by weak order strict order followed by weak order remains strict. forall a b c. (exists k. k + s a = b) -&gt; (exists k. k + b = c) -&gt; exists k. k + s a = c order le_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_of_lt_of_le</code><span>Strict order followed by weak order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Strict order followed by weak order remains strict.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_of_lt_of_le">Copy statement</button>
        <pre id="statement-lt_of_lt_of_le"><code>forall a b c. (exists k. k + S a = b) -&gt; (exists k. k + b = c) -&gt; exists k. k + S a = c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_of_lt_of_le">Copy proof</button>
        <pre id="proof-lt_of_lt_of_le"><code>pa prove forall a b c. (exists k. k + S a = b) -&gt; (exists k. k + b = c) -&gt; exists k. k + S a = c
use le_trans
intro a
intro b
intro c
intro hab
intro hbc
specialize le_trans (S a)
specialize le_trans b
specialize le_trans c
apply le_trans
exact hab
exact hbc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>80</dd></div>
        <div><dt>Distinct objects</dt><dd>77</dd></div>
        <div><dt>Reused references</dt><dd>3</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ef269788128fc2dda9ac2b9f1244a7f1c2e835a7f46472f1a7ed734bb0770b12">ef269788128f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_of_lt_of_le">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_of_lt_of_le</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1026">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_of_lt_of_le.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_of_le_of_lt"
  data-name="lt_of_le_of_lt" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_assoc"
  data-search="lt_of_le_of_lt weak order followed by strict order weak order followed by strict order remains strict. forall a b c. (exists k. k + a = b) -&gt; (exists k. k + s b = c) -&gt; exists k. k + s a = c order add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_of_le_of_lt</code><span>Weak order followed by strict order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Weak order followed by strict order remains strict.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_of_le_of_lt">Copy statement</button>
        <pre id="statement-lt_of_le_of_lt"><code>forall a b c. (exists k. k + a = b) -&gt; (exists k. k + S b = c) -&gt; exists k. k + S a = c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_of_le_of_lt">Copy proof</button>
        <pre id="proof-lt_of_le_of_lt"><code>pa prove forall a b c. (exists k. k + a = b) -&gt; (exists k. k + S b = c) -&gt; exists k. k + S a = c
use add_assoc
intro a
intro b
intro c
intro hab
intro hbc
cases hab
cases hbc
exists x1 + x
trans x1 + (x + S a)
apply add_assoc
rewrite PA4
rewrite hab_witness
exact hbc_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>58</dd></div>
        <div><dt>Distinct objects</dt><dd>55</dd></div>
        <div><dt>Reused references</dt><dd>3</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f3e188673abcd099b0bd98a8d961a0433d2c1bcf100462df0ddacbc616522895">f3e188673abc…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_of_le_of_lt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_of_le_of_lt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1045">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_of_le_of_lt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_trans"
  data-name="lt_trans" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_succ_left"
  data-search="lt_trans strict order is transitive strict order is transitive. forall a b c. (exists k. k + s a = b) -&gt; (exists k. k + s b = c) -&gt; exists k. k + s a = c order add_assoc add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_trans</code><span>Strict order is transitive</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Strict order is transitive.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_trans">Copy statement</button>
        <pre id="statement-lt_trans"><code>forall a b c. (exists k. k + S a = b) -&gt; (exists k. k + S b = c) -&gt; exists k. k + S a = c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_trans">Copy proof</button>
        <pre id="proof-lt_trans"><code>pa prove forall a b c. (exists k. k + S a = b) -&gt; (exists k. k + S b = c) -&gt; exists k. k + S a = c
use add_assoc
use add_succ_left
intro a
intro b
intro c
intro hab
intro hbc
cases hab
cases hbc
exists x1 + S x
trans x1 + (S x + S a)
apply add_assoc
trans x1 + S (x + S a)
congr
refl
apply add_succ_left
trans x1 + S b
congr
refl
congr
exact hab_witness
exact hbc_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>89</dd></div>
        <div><dt>Distinct objects</dt><dd>82</dd></div>
        <div><dt>Reused references</dt><dd>7</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="83ea214a08106ca267bff10fcdc4c0fbeecbf5efa974b9c1ebe426f8185fba43">83ea214a0810…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_trans">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_trans</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1066">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_trans.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_or_lt"
  data-name="le_or_lt" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="le_or_lt weak-or-reverse-strict comparison any two naturals satisfy weak order in one direction or strict order in the other. forall a b. (exists k. k + a = b) \/ exists k. k + s b = a order">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_or_lt</code><span>Weak-or-reverse-strict comparison</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Any two naturals satisfy weak order in one direction or strict order in the other.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_or_lt">Copy statement</button>
        <pre id="statement-le_or_lt"><code>forall a b. (exists k. k + a = b) \/ exists k. k + S b = a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_or_lt">Copy proof</button>
        <pre id="proof-le_or_lt"><code>pa prove forall a b. (exists k. k + a = b) \/ exists k. k + S b = a
induction a
intro b
left
exists b
apply PA3
induction b
right
exists a
trans S (a + 0)
apply PA4
congr
apply PA3
specialize IH b
cases IH
left
cases IH_left
exists x
rewrite PA4
congr
exact IH_left_witness
right
cases IH_right
exists x
rewrite PA4
congr
exact IH_right_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>48</dd></div>
        <div><dt>Distinct objects</dt><dd>48</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8317909b51ce039f62c39bdd2156fa377e52ee5646b3882640918ee050e9be7e">8317909b51ce…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_or_lt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_or_lt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1094">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_or_lt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_trichotomy"
  data-name="lt_trichotomy" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="lt_trichotomy natural strict-order trichotomy two naturals are equal or strictly ordered in exactly one displayed direction. forall a b. a = b \/ ((exists k. k + s a = b) \/ exists k. k + s b = a) order">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_trichotomy</code><span>Natural strict-order trichotomy</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two naturals are equal or strictly ordered in exactly one displayed direction.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_moduli_pairwise_coprime_bounded" href="#theorem-beta_moduli_pairwise_coprime_bounded"><code>beta_moduli_pairwise_coprime_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_trichotomy">Copy statement</button>
        <pre id="statement-lt_trichotomy"><code>forall a b. a = b \/ ((exists k. k + S a = b) \/ exists k. k + S b = a)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_trichotomy">Copy proof</button>
        <pre id="proof-lt_trichotomy"><code>pa prove forall a b. a = b \/ ((exists k. k + S a = b) \/ exists k. k + S b = a)
induction a
induction b
left
refl
right
left
exists b
trans S (b + 0)
apply PA4
congr
apply PA3
induction b
right
right
exists a
trans S (a + 0)
apply PA4
congr
apply PA3
specialize IH b
cases IH
left
congr
exact IH_left
cases IH_right
right
left
cases IH_right_left
exists x
rewrite PA4
congr
exact IH_right_left_witness
right
right
cases IH_right_right
exists x
rewrite PA4
congr
exact IH_right_right_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>66</dd></div>
        <div><dt>Distinct objects</dt><dd>66</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="abdf421beb8664e025fcea572f55a851685daa9c20dc0d082121ee0076fee404">abdf421beb86…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_trichotomy">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_trichotomy</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1128">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_trichotomy.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_not_le"
  data-name="lt_not_le" data-domain="order"
  data-status="checked_m20"
  data-dependencies=""
  data-search="lt_not_le strict order excludes reverse weak order a strict inequality excludes the reverse weak inequality. forall a b. (exists k. k + s a = b) -&gt; ~ (exists k. k + b = a) order">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_not_le</code><span>Strict order excludes reverse weak order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A strict inequality excludes the reverse weak inequality.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_not_lt" href="#theorem-le_not_lt"><code>le_not_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_not_le">Copy statement</button>
        <pre id="statement-lt_not_le"><code>forall a b. (exists k. k + S a = b) -&gt; ~ (exists k. k + b = a)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_not_le">Copy proof</button>
        <pre id="proof-lt_not_le"><code>pa prove forall a b. (exists k. k + S a = b) -&gt; ~ (exists k. k + b = a)
have hbad : forall z u v. ~(z = u + (v + S z))
intro z
induction z
intro u
intro v
intro hz
apply PA1
symm
rewrite PA4 at hz
rewrite PA4 at hz
exact hz
intro u
intro v
intro hz
specialize IH u
specialize IH v
apply IH
apply PA2
rewrite PA4 at hz
rewrite PA4 at hz
exact hz
intro a
intro b
intro hab
intro hba
cases hab
cases hba
specialize hbad a
specialize hbad x1
specialize hbad x
apply hbad
symm
rewrite &lt;- hab_witness at hba_witness
exact hba_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>56</dd></div>
        <div><dt>Distinct objects</dt><dd>56</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>23</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e410e57fb2724608df1a1046e8974b1b3fcd2065bf09b240e6e542b1f84a6dad">e410e57fb272…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_not_le">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_not_le</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1175">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_not_le.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_not_lt"
  data-name="le_not_lt" data-domain="order"
  data-status="checked_m20"
  data-dependencies="lt_not_le"
  data-search="le_not_lt weak order excludes reverse strict order a weak inequality excludes strict inequality in the reverse direction. forall a b. (exists k. k + a = b) -&gt; ~ (exists k. k + s b = a) order lt_not_le">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_not_lt</code><span>Weak order excludes reverse strict order</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A weak inequality excludes strict inequality in the reverse direction.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_not_le" href="#theorem-lt_not_le"><code>lt_not_le</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_not_lt">Copy statement</button>
        <pre id="statement-le_not_lt"><code>forall a b. (exists k. k + a = b) -&gt; ~ (exists k. k + S b = a)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_not_lt">Copy proof</button>
        <pre id="proof-le_not_lt"><code>pa prove forall a b. (exists k. k + a = b) -&gt; ~ (exists k. k + S b = a)
use lt_not_le
intro a
intro b
intro hab
intro hba
specialize lt_not_le b
specialize lt_not_le a
apply lt_not_le
exact hba
exact hab
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>74</dd></div>
        <div><dt>Distinct objects</dt><dd>74</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>24</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d9e660d3f46d7845bb6d236ee433d00c48e309fafa7824f97c962f924a56fcdf">d9e660d3f46d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_not_lt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_not_lt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1217">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_not_lt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_not_eq_add_middle"
  data-name="lt_not_eq_add_middle" data-domain="order"
  data-status="checked_m20"
  data-dependencies="add_succ_left"
  data-search="lt_not_eq_add_middle a strict bound cannot occur inside an additive decomposition of the lower term a strict upper bound prevents the lower term from containing that bound as an additive middle block. forall r m a b. (exists k. k + s r = m) -&gt; ~(r = (a + m) + b) order add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_not_eq_add_middle</code><span>A strict bound cannot occur inside an additive decomposition of the lower term</span></span>
      <span class="pa-badge pa-domain-order">Order</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A strict upper bound prevents the lower term from containing that bound as an additive middle block.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="positive_quotient_gap_impossible" href="#theorem-positive_quotient_gap_impossible"><code>positive_quotient_gap_impossible</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_not_eq_add_middle">Copy statement</button>
        <pre id="statement-lt_not_eq_add_middle"><code>forall r m a b. (exists k. k + S r = m) -&gt; ~(r = (a + m) + b)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_not_eq_add_middle">Copy proof</button>
        <pre id="proof-lt_not_eq_add_middle"><code>pa prove forall r m a b. (exists k. k + S r = m) -&gt; ~(r = (a + m) + b)
use add_succ_left
have hbad : forall z a w b. ~(z = (a + (w + S z)) + b)
intro z
induction z
intro a
intro w
intro b
intro hz
apply PA1
symm
rewrite PA4 at hz
rewrite PA4 at hz
specialize add_succ_left (a + (w + 0))
specialize add_succ_left b
rewrite add_succ_left at hz
exact hz
intro a
intro w
intro b
intro hz
specialize IH a
specialize IH w
specialize IH b
apply IH
apply PA2
rewrite PA4 at hz
rewrite PA4 at hz
specialize add_succ_left (a + (w + S z))
specialize add_succ_left b
rewrite add_succ_left at hz
exact hz
intro r
intro m
intro a
intro b
intro hr
intro heq
cases hr
specialize hbad r
specialize hbad a
specialize hbad x
specialize hbad b
apply hbad
rewrite &lt;- hr_witness at heq
exact heq
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>95</dd></div>
        <div><dt>Distinct objects</dt><dd>93</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="77ec046fb0e447ccbf35186d777b3f7e0e885fcd8accf1d5500785cc5a34e709">77ec046fb0e4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_not_eq_add_middle">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_not_eq_add_middle</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1234">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_not_eq_add_middle.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="dependency-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_le_mul_left"
  data-name="mul_le_mul_left" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_add"
  data-search="mul_le_mul_left left multiplication preserves order left multiplication preserves the witness-defined order. forall a b c. (exists k. k + a = b) -&gt; exists r. r + c * a = c * b multiplication mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_le_mul_left</code><span>Left multiplication preserves order</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Left multiplication preserves the witness-defined order.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_le_mul_left">Copy statement</button>
        <pre id="statement-mul_le_mul_left"><code>forall a b c. (exists k. k + a = b) -&gt; exists r. r + c * a = c * b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_le_mul_left">Copy proof</button>
        <pre id="proof-mul_le_mul_left"><code>pa prove forall a b c. (exists k. k + a = b) -&gt; exists r. r + c * a = c * b
use mul_add
intro a
intro b
intro c
intro h
cases h
exists c * x
trans c * (x + a)
symm
apply mul_add
congr
refl
exact h_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>94</dd></div>
        <div><dt>Distinct objects</dt><dd>87</dd></div>
        <div><dt>Reused references</dt><dd>7</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="44b7ebda990f352e9ad2e7c51d691328a82ef9320d01c3c94bc9523ce7071f73">44b7ebda990f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_le_mul_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_le_mul_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1286">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_le_mul_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_le_mul_right"
  data-name="mul_le_mul_right" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="add_mul"
  data-search="mul_le_mul_right right multiplication preserves order right multiplication preserves the witness-defined order. forall a b c. (exists k. k + a = b) -&gt; exists r. r + a * c = b * c multiplication add_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_le_mul_right</code><span>Right multiplication preserves order</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Right multiplication preserves the witness-defined order.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_scaled_nonzero" href="#theorem-le_scaled_nonzero"><code>le_scaled_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_le_mul_right">Copy statement</button>
        <pre id="statement-mul_le_mul_right"><code>forall a b c. (exists k. k + a = b) -&gt; exists r. r + a * c = b * c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_le_mul_right">Copy proof</button>
        <pre id="proof-mul_le_mul_right"><code>pa prove forall a b c. (exists k. k + a = b) -&gt; exists r. r + a * c = b * c
use add_mul
intro a
intro b
intro c
intro h
cases h
exists x * c
trans (x + a) * c
symm
apply add_mul
congr
exact h_witness
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>343</dd></div>
        <div><dt>Distinct objects</dt><dd>280</dd></div>
        <div><dt>Reused references</dt><dd>31</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>10</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="71720fa700b37ea2809119b5d47cc3c1340cc806529aeaeef8652d1d847a18b2">71720fa700b3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_le_mul_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_le_mul_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1306">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_le_mul_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_lt_mul_succ_left_nonzero"
  data-name="mul_lt_mul_succ_left_nonzero" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="add_comm"
  data-search="mul_lt_mul_succ_left_nonzero a nonzero left factor strictly separates successor products multiplication by a nonzero left factor strictly increases across a successor step. forall c a. ~(c = 0) -&gt; exists r. r + s (c * a) = c * s a multiplication add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_lt_mul_succ_left_nonzero</code><span>A nonzero left factor strictly separates successor products</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiplication by a nonzero left factor strictly increases across a successor step.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_lt_mul_succ_left_nonzero">Copy statement</button>
        <pre id="statement-mul_lt_mul_succ_left_nonzero"><code>forall c a. ~(c = 0) -&gt; exists r. r + S (c * a) = c * S a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_lt_mul_succ_left_nonzero">Copy proof</button>
        <pre id="proof-mul_lt_mul_succ_left_nonzero"><code>pa prove forall c a. ~(c = 0) -&gt; exists r. r + S (c * a) = c * S a
use add_comm
induction c
intro a
intro hc
exfalso
apply hc
refl
intro a
intro hc
exists c
trans S (c + S c * a)
apply PA4
trans S (S c * a + c)
congr
apply add_comm
trans S c * a + S c
symm
apply PA4
symm
apply PA6
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>104</dd></div>
        <div><dt>Distinct objects</dt><dd>98</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>14</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9a2a8ae4e6ea6dfc1292c2e4dd1635b6b40f9427610d4f7fab4e20602137b9a0">9a2a8ae4e6ea…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_lt_mul_succ_left_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_lt_mul_succ_left_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1326">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_lt_mul_succ_left_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-division_remainder_succ"
  data-name="division_remainder_succ" data-domain="division"
  data-status="checked_m20"
  data-dependencies="zero_add,add_succ_left,zero_or_succ"
  data-search="division_remainder_succ division with remainder for successor divisors every dividend has a quotient and bounded remainder for a successor divisor. forall d n. exists q r. n = s d * q + r /\ s r &lt;= s d division zero_add add_succ_left zero_or_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>division_remainder_succ</code><span>Division with remainder for successor divisors</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every dividend has a quotient and bounded remainder for a successor divisor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-division_remainder_succ">Copy statement</button>
        <pre id="statement-division_remainder_succ"><code>forall d n. exists q r. n = S d * q + r /\ S r &lt;= S d</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-division_remainder_succ">Copy proof</button>
        <pre id="proof-division_remainder_succ"><code>pa prove forall d n. exists q r. n = S d * q + r /\ S r &lt;= S d
use zero_add
use add_succ_left
use zero_or_succ
intro d
induction n
exists 0
exists 0
split
simp
exists d
simp
cases IH
cases IH_witness
cases IH_witness_witness
cases IH_witness_witness_right
specialize zero_or_succ x2
cases zero_or_succ
rewrite zero_or_succ_left at IH_witness_witness_right_witness
specialize zero_add S x1
rewrite zero_add at IH_witness_witness_right_witness
have hrd : x1 = d
apply PA2
exact IH_witness_witness_right_witness
exists S x
exists 0
split
rewrite IH_witness_witness_left
rewrite hrd
simp
exists d
simp
cases zero_or_succ_right
exists x
exists S x1
split
rewrite IH_witness_witness_left
simp
exists x3
rewrite &lt;- IH_witness_witness_right_witness
rewrite zero_or_succ_right_witness
simp [add_succ_left]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>179</dd></div>
        <div><dt>Distinct objects</dt><dd>164</dd></div>
        <div><dt>Reused references</dt><dd>15</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1b331ac3a9c42635f029528713c92528190d652fa203b7dcb71ea90432a1ef2b">1b331ac3a9c4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for division_remainder_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib division_remainder_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1353">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/division_remainder_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-division_remainder_exists"
  data-name="division_remainder_exists" data-domain="division"
  data-status="checked_m20"
  data-dependencies="zero_or_succ,division_remainder_succ"
  data-search="division_remainder_exists division with remainder for every nonzero divisor every positive divisor admits a quotient and a strictly bounded remainder. forall m n. ~(m = 0) -&gt; exists q r. n = m * q + r /\ s r &lt;= m division zero_or_succ division_remainder_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>division_remainder_exists</code><span>Division with remainder for every nonzero divisor</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every positive divisor admits a quotient and a strictly bounded remainder.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_succ" href="#theorem-division_remainder_succ"><code>division_remainder_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_up_to" href="#theorem-gcd_exists_up_to"><code>gcd_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_decidable_nonzero" href="#theorem-multiple_decidable_nonzero"><code>multiple_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_nonzero" href="#theorem-mod_eq_decidable_nonzero"><code>mod_eq_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainder_exists" href="#theorem-canonical_remainder_exists"><code>canonical_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_common_remainder_decomposition" href="#theorem-mod_eq_common_remainder_decomposition"><code>mod_eq_common_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_canonical_remainder_nonzero" href="#theorem-crt_solution_canonical_remainder_nonzero"><code>crt_solution_canonical_remainder_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-division_remainder_exists">Copy statement</button>
        <pre id="statement-division_remainder_exists"><code>forall m n. ~(m = 0) -&gt; exists q r. n = m * q + r /\ S r &lt;= m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-division_remainder_exists">Copy proof</button>
        <pre id="proof-division_remainder_exists"><code>pa prove forall m n. ~(m = 0) -&gt; exists q r. n = m * q + r /\ S r &lt;= m
use zero_or_succ
use division_remainder_succ
intro m
intro n
intro hm
specialize zero_or_succ m
cases zero_or_succ
exfalso
apply hm
exact zero_or_succ_left
cases zero_or_succ_right
specialize division_remainder_succ x
specialize division_remainder_succ n
rewrite zero_or_succ_right_witness
rewrite zero_or_succ_right_witness
exact division_remainder_succ
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>219</dd></div>
        <div><dt>Distinct objects</dt><dd>196</dd></div>
        <div><dt>Reused references</dt><dd>16</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9642451ab71ce01883569b13931700e87b0eef846b9b50fd62daf257a5b9aa3d">9642451ab71c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for division_remainder_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib division_remainder_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1399">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/division_remainder_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-remainder_bound_step"
  data-name="remainder_bound_step" data-domain="division"
  data-status="checked_m20"
  data-dependencies="le_eq_or_lt"
  data-search="remainder_bound_step advance a strict remainder bound by one step a bounded remainder either reaches the divisor or remains bounded after successor. forall r d. (exists k. k + s r = d) -&gt; s r = d \/ exists k. k + s (s r) = d division le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>remainder_bound_step</code><span>Advance a strict remainder bound by one step</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded remainder either reaches the divisor or remains bounded after successor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-remainder_bound_step">Copy statement</button>
        <pre id="statement-remainder_bound_step"><code>forall r d. (exists k. k + S r = d) -&gt; S r = d \/ exists k. k + S (S r) = d</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-remainder_bound_step">Copy proof</button>
        <pre id="proof-remainder_bound_step"><code>pa prove forall r d. (exists k. k + S r = d) -&gt; S r = d \/ exists k. k + S (S r) = d
use le_eq_or_lt
intro r
intro d
intro h
specialize le_eq_or_lt (S r)
specialize le_eq_or_lt d
apply le_eq_or_lt
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>113</dd></div>
        <div><dt>Distinct objects</dt><dd>109</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="715004086fe6ff3c80cb98b31024943da22ec3ad3d5f049be9c2dc497d5dc5c4">715004086fe6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for remainder_bound_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib remainder_bound_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1421">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/remainder_bound_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-division_block_upper"
  data-name="division_block_upper" data-domain="division"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_comm"
  data-search="division_block_upper a bounded remainder lies below the next divisor block a bounded remainder keeps its decomposition below the next divisor block. forall d q r. (exists k. k + s r = d) -&gt; exists k. k + s (d * q + r) = d * s q division add_assoc add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>division_block_upper</code><span>A bounded remainder lies below the next divisor block</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded remainder keeps its decomposition below the next divisor block.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-division_block_upper">Copy statement</button>
        <pre id="statement-division_block_upper"><code>forall d q r. (exists k. k + S r = d) -&gt; exists k. k + S (d * q + r) = d * S q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-division_block_upper">Copy proof</button>
        <pre id="proof-division_block_upper"><code>pa prove forall d q r. (exists k. k + S r = d) -&gt; exists k. k + S (d * q + r) = d * S q
use add_assoc
use add_comm
intro d
intro q
intro r
intro h
cases h
exists x
trans S (x + (d * q + r))
apply PA4
trans S ((x + d * q) + r)
congr
symm
apply add_assoc
trans S ((d * q + x) + r)
congr
congr
apply add_comm
refl
trans S (d * q + (x + r))
congr
apply add_assoc
trans d * q + S (x + r)
symm
apply PA4
trans d * q + (x + S r)
congr
refl
symm
apply PA4
trans d * q + d
congr
refl
exact h_witness
symm
apply PA6
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>159</dd></div>
        <div><dt>Distinct objects</dt><dd>148</dd></div>
        <div><dt>Reused references</dt><dd>11</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a723be287d1c026a8d35f84b98675f9af2ca91f1f50a257b4a26bea0f7d9f669">a723be287d1c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for division_block_upper">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib division_block_upper</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1436">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/division_block_upper.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-positive_quotient_gap_impossible"
  data-name="positive_quotient_gap_impossible" data-domain="division"
  data-status="checked_m20"
  data-dependencies="add_comm,add_assoc,mul_add,add_left_cancel,lt_not_eq_add_middle"
  data-search="positive_quotient_gap_impossible a positive quotient gap contradicts bounded remainders a positive gap between quotients makes two bounded-remainder decompositions unequal. forall m q q2 r s k. (exists z. z + s r = m) -&gt; s k + q = q2 -&gt; ~(m * q + r = m * q2 + s) division add_comm add_assoc mul_add add_left_cancel lt_not_eq_add_middle">
  <details>
    <summary>
      <span class="pa-card-title"><code>positive_quotient_gap_impossible</code><span>A positive quotient gap contradicts bounded remainders</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A positive gap between quotients makes two bounded-remainder decompositions unequal.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_left_cancel" href="#theorem-add_left_cancel"><code>add_left_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_not_eq_add_middle" href="#theorem-lt_not_eq_add_middle"><code>lt_not_eq_add_middle</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-positive_quotient_gap_impossible">Copy statement</button>
        <pre id="statement-positive_quotient_gap_impossible"><code>forall m q q2 r s k. (exists z. z + S r = m) -&gt; S k + q = q2 -&gt; ~(m * q + r = m * q2 + s)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-positive_quotient_gap_impossible">Copy proof</button>
        <pre id="proof-positive_quotient_gap_impossible"><code>pa prove forall m q q2 r s k. (exists z. z + S r = m) -&gt; S k + q = q2 -&gt; ~(m * q + r = m * q2 + s)
use add_comm
use add_assoc
use mul_add
use add_left_cancel
use lt_not_eq_add_middle
intro m
intro q
intro q2
intro r
intro s
intro k
intro hr
intro hgap
intro heq
specialize lt_not_eq_add_middle r
specialize lt_not_eq_add_middle m
specialize lt_not_eq_add_middle (m * k)
specialize lt_not_eq_add_middle s
apply lt_not_eq_add_middle
exact hr
specialize add_left_cancel (m * q)
specialize add_left_cancel r
specialize add_left_cancel ((m * k + m) + s)
apply add_left_cancel
trans m * q2 + s
exact heq
rewrite &lt;- hgap
specialize add_comm S k
specialize add_comm q
rewrite add_comm
specialize mul_add m
specialize mul_add q
specialize mul_add S k
rewrite mul_add
rewrite PA6
specialize add_assoc (m * q)
specialize add_assoc (m * k + m)
specialize add_assoc s
apply add_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>517</dd></div>
        <div><dt>Distinct objects</dt><dd>369</dd></div>
        <div><dt>Reused references</dt><dd>18</dd></div>
        <div><dt>Depth</dt><dd>52</dd></div>
        <div><dt>Cuts</dt><dd>13</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="de44a14fab4f478c9624170a2798312d19784b73f18cac2778f7c865cdde3679">de44a14fab4f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for positive_quotient_gap_impossible">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib positive_quotient_gap_impossible</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1478">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/positive_quotient_gap_impossible.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-remainder_unique_same_quotient"
  data-name="remainder_unique_same_quotient" data-domain="division"
  data-status="checked_m20"
  data-dependencies="add_left_cancel"
  data-search="remainder_unique_same_quotient remainders are unique at a fixed quotient equal decompositions with the same quotient have equal remainders. forall d q r s. d * q + r = d * q + s -&gt; r = s division add_left_cancel">
  <details>
    <summary>
      <span class="pa-card-title"><code>remainder_unique_same_quotient</code><span>Remainders are unique at a fixed quotient</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Equal decompositions with the same quotient have equal remainders.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_left_cancel" href="#theorem-add_left_cancel"><code>add_left_cancel</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-remainder_unique_same_quotient">Copy statement</button>
        <pre id="statement-remainder_unique_same_quotient"><code>forall d q r s. d * q + r = d * q + s -&gt; r = s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-remainder_unique_same_quotient">Copy proof</button>
        <pre id="proof-remainder_unique_same_quotient"><code>pa prove forall d q r s. d * q + r = d * q + s -&gt; r = s
use add_left_cancel
intro d
intro q
intro r
intro s
intro h
specialize add_left_cancel (d * q)
specialize add_left_cancel r
specialize add_left_cancel s
apply add_left_cancel
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>164</dd></div>
        <div><dt>Distinct objects</dt><dd>158</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="45700cc00c1d5037c8088d3c20873478a51bf613bd38007135c7ba3697fdcd88">45700cc00c1d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for remainder_unique_same_quotient">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib remainder_unique_same_quotient</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1520">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/remainder_unique_same_quotient.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-division_remainder_unique"
  data-name="division_remainder_unique" data-domain="division"
  data-status="checked_m20"
  data-dependencies="zero_add,le_total,zero_or_succ,add_left_cancel,positive_quotient_gap_impossible"
  data-search="division_remainder_unique quotient and remainder are unique bounded quotient-remainder decompositions have unique quotients and remainders. forall m n q r q2 r2. n = m * q + r -&gt; (exists k. k + s r = m) -&gt; n = m * q2 + r2 -&gt; (exists k. k + s r2 = m) -&gt; q = q2 /\ r = r2 division zero_add le_total zero_or_succ add_left_cancel positive_quotient_gap_impossible">
  <details>
    <summary>
      <span class="pa-card-title"><code>division_remainder_unique</code><span>Quotient and remainder are unique</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Bounded quotient-remainder decompositions have unique quotients and remainders.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="le_total" href="#theorem-le_total"><code>le_total</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="add_left_cancel" href="#theorem-add_left_cancel"><code>add_left_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="positive_quotient_gap_impossible" href="#theorem-positive_quotient_gap_impossible"><code>positive_quotient_gap_impossible</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_decidable_nonzero" href="#theorem-multiple_decidable_nonzero"><code>multiple_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="even_odd_exclusive_pointwise" href="#theorem-even_odd_exclusive_pointwise"><code>even_odd_exclusive_pointwise</code></a> <a class="pa-theorem-chip" data-theorem-link="mod4_one_three_exclusive_pointwise" href="#theorem-mod4_one_three_exclusive_pointwise"><code>mod4_one_three_exclusive_pointwise</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainder_functional" href="#theorem-canonical_remainder_functional"><code>canonical_remainder_functional</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-division_remainder_unique">Copy statement</button>
        <pre id="statement-division_remainder_unique"><code>forall m n q r q2 r2. n = m * q + r -&gt; (exists k. k + S r = m) -&gt; n = m * q2 + r2 -&gt; (exists k. k + S r2 = m) -&gt; q = q2 /\ r = r2</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-division_remainder_unique">Copy proof</button>
        <pre id="proof-division_remainder_unique"><code>pa prove forall m n q r q2 r2. n = m * q + r -&gt; (exists k. k + S r = m) -&gt; n = m * q2 + r2 -&gt; (exists k. k + S r2 = m) -&gt; q = q2 /\ r = r2
use zero_add
use le_total
use zero_or_succ
use add_left_cancel
use positive_quotient_gap_impossible
intro m
intro n
intro q
intro r
intro q2
intro r2
intro h1
intro hr
intro h2
intro hr2
have hsum : m * q + r = m * q2 + r2
trans n
symm
exact h1
exact h2
specialize le_total q
specialize le_total q2
cases le_total
cases le_total_left
specialize zero_or_succ x
cases zero_or_succ
rewrite zero_or_succ_left at le_total_left_witness
specialize zero_add q
rewrite zero_add at le_total_left_witness
split
exact le_total_left_witness
specialize add_left_cancel (m * q)
specialize add_left_cancel r
specialize add_left_cancel r2
apply add_left_cancel
rewrite &lt;- le_total_left_witness at hsum
exact hsum
cases zero_or_succ_right
exfalso
specialize positive_quotient_gap_impossible m
specialize positive_quotient_gap_impossible q
specialize positive_quotient_gap_impossible q2
specialize positive_quotient_gap_impossible r
specialize positive_quotient_gap_impossible r2
specialize positive_quotient_gap_impossible x1
apply positive_quotient_gap_impossible
exact hr
rewrite zero_or_succ_right_witness at le_total_left_witness
exact le_total_left_witness
exact hsum
cases le_total_right
specialize zero_or_succ x
cases zero_or_succ
rewrite zero_or_succ_left at le_total_right_witness
specialize zero_add q2
rewrite zero_add at le_total_right_witness
split
symm
exact le_total_right_witness
specialize add_left_cancel (m * q)
specialize add_left_cancel r
specialize add_left_cancel r2
apply add_left_cancel
rewrite le_total_right_witness at hsum
exact hsum
cases zero_or_succ_right
exfalso
specialize positive_quotient_gap_impossible m
specialize positive_quotient_gap_impossible q2
specialize positive_quotient_gap_impossible q
specialize positive_quotient_gap_impossible r2
specialize positive_quotient_gap_impossible r
specialize positive_quotient_gap_impossible x1
apply positive_quotient_gap_impossible
exact hr2
rewrite zero_or_succ_right_witness at le_total_right_witness
exact le_total_right_witness
symm
exact hsum
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>854</dd></div>
        <div><dt>Distinct objects</dt><dd>544</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>57</dd></div>
        <div><dt>Cuts</dt><dd>22</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1c8ee6b98aaec762c26a9f181526f862a24100b787d1db317d238e7625ef0e0e">1c8ee6b98aae…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for division_remainder_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib division_remainder_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1538">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/division_remainder_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-zero_remainder_implies_multiple"
  data-name="zero_remainder_implies_multiple" data-domain="division"
  data-status="checked_m20"
  data-dependencies=""
  data-search="zero_remainder_implies_multiple zero remainder implies divisibility a quotient decomposition with zero remainder supplies a divisibility witness. forall m n q. n = m * q + 0 -&gt; exists k. n = m * k division">
  <details>
    <summary>
      <span class="pa-card-title"><code>zero_remainder_implies_multiple</code><span>Zero remainder implies divisibility</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A quotient decomposition with zero remainder supplies a divisibility witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-zero_remainder_implies_multiple">Copy statement</button>
        <pre id="statement-zero_remainder_implies_multiple"><code>forall m n q. n = m * q + 0 -&gt; exists k. n = m * k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-zero_remainder_implies_multiple">Copy proof</button>
        <pre id="proof-zero_remainder_implies_multiple"><code>pa prove forall m n q. n = m * q + 0 -&gt; exists k. n = m * k
intro m
intro n
intro q
intro h
exists q
rewrite h
simp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>13</dd></div>
        <div><dt>Distinct objects</dt><dd>13</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="983bdc1e759ae6c7b9b2d45d4315c11d72eaafe270810628051f4f55c4ba3c21">983bdc1e759a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for zero_remainder_implies_multiple">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib zero_remainder_implies_multiple</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1620">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/zero_remainder_implies_multiple.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_has_zero_remainder"
  data-name="multiple_has_zero_remainder" data-domain="division"
  data-status="checked_m20"
  data-dependencies="zero_or_succ"
  data-search="multiple_has_zero_remainder a multiple has a bounded zero remainder every multiple of a nonzero divisor has a bounded zero-remainder decomposition. forall m n. ~(m = 0) -&gt; (exists q. n = m * q) -&gt; exists q r. (n = m * q + r /\ r = 0) /\ s r &lt;= m division zero_or_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_has_zero_remainder</code><span>A multiple has a bounded zero remainder</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every multiple of a nonzero divisor has a bounded zero-remainder decomposition.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_decidable_nonzero" href="#theorem-multiple_decidable_nonzero"><code>multiple_decidable_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_has_zero_remainder">Copy statement</button>
        <pre id="statement-multiple_has_zero_remainder"><code>forall m n. ~(m = 0) -&gt; (exists q. n = m * q) -&gt; exists q r. (n = m * q + r /\ r = 0) /\ S r &lt;= m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_has_zero_remainder">Copy proof</button>
        <pre id="proof-multiple_has_zero_remainder"><code>pa prove forall m n. ~(m = 0) -&gt; (exists q. n = m * q) -&gt; exists q r. (n = m * q + r /\ r = 0) /\ S r &lt;= m
use zero_or_succ
intro m
intro n
intro hm
intro hd
cases hd
specialize zero_or_succ m
cases zero_or_succ
exfalso
apply hm
exact zero_or_succ_left
cases zero_or_succ_right
exists x
exists 0
split
split
rewrite hd_witness
simp
refl
exists x1
rewrite zero_or_succ_right_witness
simp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>54</dd></div>
        <div><dt>Distinct objects</dt><dd>53</dd></div>
        <div><dt>Reused references</dt><dd>1</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2dd49a51275832097abdb15044f720f5bc2f7f59153e0b7f3069c23221cb299c">2dd49a512758…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_has_zero_remainder">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_has_zero_remainder</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1635">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_has_zero_remainder.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_eq_zero_left"
  data-name="add_eq_zero_left" data-domain="addition"
  data-status="checked_m20"
  data-dependencies="add_comm,add_eq_zero_right"
  data-search="add_eq_zero_left a zero sum has a zero left summand a sum equal to zero has zero as its left addend. forall a b. a + b = 0 -&gt; a = 0 addition add_comm add_eq_zero_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_eq_zero_left</code><span>A zero sum has a zero left summand</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A sum equal to zero has zero as its left addend.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_components" href="#theorem-add_eq_zero_components"><code>add_eq_zero_components</code></a> <a class="pa-theorem-chip" data-theorem-link="two_large_factors_impossible" href="#theorem-two_large_factors_impossible"><code>two_large_factors_impossible</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_exists" href="#theorem-bounded_common_multiple_exists"><code>bounded_common_multiple_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_three" href="#theorem-prime_three"><code>prime_three</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_eq_zero_left">Copy statement</button>
        <pre id="statement-add_eq_zero_left"><code>forall a b. a + b = 0 -&gt; a = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_eq_zero_left">Copy proof</button>
        <pre id="proof-add_eq_zero_left"><code>pa prove forall a b. a + b = 0 -&gt; a = 0
use add_comm
use add_eq_zero_right
intro a
intro b
intro h
specialize add_eq_zero_right b
specialize add_eq_zero_right a
apply add_eq_zero_right
trans a + b
apply add_comm
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>112</dd></div>
        <div><dt>Distinct objects</dt><dd>106</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>14</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="546a7553991fddc713153dc3307dcb7f53afcbfd4dcead046c282c731ead7390">546a7553991f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_eq_zero_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_eq_zero_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1664">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_eq_zero_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_eq_zero_components"
  data-name="add_eq_zero_components" data-domain="addition"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_left,add_eq_zero_right"
  data-search="add_eq_zero_components both summands of a zero sum are zero both summands of a zero sum are zero. forall a b. a + b = 0 -&gt; a = 0 /\ b = 0 addition add_eq_zero_left add_eq_zero_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_eq_zero_components</code><span>Both summands of a zero sum are zero</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Both summands of a zero sum are zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_left" href="#theorem-add_eq_zero_left"><code>add_eq_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_eq_zero_components">Copy statement</button>
        <pre id="statement-add_eq_zero_components"><code>forall a b. a + b = 0 -&gt; a = 0 /\ b = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_eq_zero_components">Copy proof</button>
        <pre id="proof-add_eq_zero_components"><code>pa prove forall a b. a + b = 0 -&gt; a = 0 /\ b = 0
use add_eq_zero_left
use add_eq_zero_right
intro a
intro b
intro h
split
apply add_eq_zero_left
exact h
apply add_eq_zero_right
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>147</dd></div>
        <div><dt>Distinct objects</dt><dd>122</dd></div>
        <div><dt>Reused references</dt><dd>7</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5ebeb330038f1e557fc4fb5ad9872b29e3d0241c5af09752dfda014932e75482">5ebeb330038f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_eq_zero_components">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_eq_zero_components</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1681">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_eq_zero_components.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_eq_one_components"
  data-name="mul_eq_one_components" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_zero_left,add_eq_zero_right,one_mul"
  data-search="mul_eq_one_components both factors of a product equal to one are one a product is one only when both natural factors are one. forall a b. a * b = 1 -&gt; a = 1 /\ b = 1 multiplication mul_zero_left add_eq_zero_right one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_eq_one_components</code><span>Both factors of a product equal to one are one</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A product is one only when both natural factors are one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_three" href="#theorem-prime_three"><code>prime_three</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_eq_one_components">Copy statement</button>
        <pre id="statement-mul_eq_one_components"><code>forall a b. a * b = 1 -&gt; a = 1 /\ b = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_eq_one_components">Copy proof</button>
        <pre id="proof-mul_eq_one_components"><code>pa prove forall a b. a * b = 1 -&gt; a = 1 /\ b = 1
use mul_zero_left
use add_eq_zero_right
use one_mul
intro a
induction a
intro b
intro h
specialize mul_zero_left b
rewrite mul_zero_left at h
exfalso
apply PA1
symm
exact h
intro b
induction b
intro h
rewrite PA5 at h
exfalso
apply PA1
symm
exact h
intro h
rewrite PA6 at h
rewrite PA4 at h
have hz : S a * b + a = 0
apply PA2
exact h
specialize add_eq_zero_right (S a * b)
specialize add_eq_zero_right a
have ha0 : a = 0
apply add_eq_zero_right
exact hz
split
congr
exact ha0
rewrite ha0 at hz
rewrite ha0 at hz
rewrite PA3 at hz
specialize one_mul b
rewrite one_mul at hz
congr
exact hz
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>176</dd></div>
        <div><dt>Distinct objects</dt><dd>164</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a6ffdfad047303b10d1e2d89c31935f2b657152cc1fb2185daa79452b5a7ca4b">a6ffdfad0473…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_eq_one_components">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_eq_one_components</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1697">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_eq_one_components.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_ne_zero"
  data-name="mul_ne_zero" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_eq_zero"
  data-search="mul_ne_zero a product of nonzero naturals is nonzero a product of two nonzero naturals is nonzero. forall a b. ~(a = 0) -&gt; ~(b = 0) -&gt; ~(a * b = 0) multiplication mul_eq_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_ne_zero</code><span>A product of nonzero naturals is nonzero</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A product of two nonzero naturals is nonzero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_eq_zero" href="#theorem-mul_eq_zero"><code>mul_eq_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_ne_zero">Copy statement</button>
        <pre id="statement-mul_ne_zero"><code>forall a b. ~(a = 0) -&gt; ~(b = 0) -&gt; ~(a * b = 0)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_ne_zero">Copy proof</button>
        <pre id="proof-mul_ne_zero"><code>pa prove forall a b. ~(a = 0) -&gt; ~(b = 0) -&gt; ~(a * b = 0)
use mul_eq_zero
intro a
intro b
intro ha
intro hb
intro hab
specialize mul_eq_zero a
specialize mul_eq_zero b
have hz : a = 0 \/ b = 0
apply mul_eq_zero
exact hab
cases hz
apply ha
exact hz_left
apply hb
exact hz_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>65</dd></div>
        <div><dt>Distinct objects</dt><dd>65</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="645eefcefbe2da07e4c12437baf6b45d13660dcda68813dc8016ee6580bf48da">645eefcefbe2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_ne_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_ne_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1744">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_ne_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_left_cancel_nonzero"
  data-name="mul_left_cancel_nonzero" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_eq_zero,mul_ne_zero,add_right_cancel,succ_ne_zero"
  data-search="mul_left_cancel_nonzero a nonzero factor cancels on the left a nonzero common left factor can be cancelled. forall a b c. ~(a = 0) -&gt; a * b = a * c -&gt; b = c multiplication mul_eq_zero mul_ne_zero add_right_cancel succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_left_cancel_nonzero</code><span>A nonzero factor cancels on the left</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero common left factor can be cancelled.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_eq_zero" href="#theorem-mul_eq_zero"><code>mul_eq_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_ne_zero" href="#theorem-mul_ne_zero"><code>mul_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="add_right_cancel" href="#theorem-add_right_cancel"><code>add_right_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_right_cancel_nonzero" href="#theorem-mul_right_cancel_nonzero"><code>mul_right_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="proper_factor_lt" href="#theorem-proper_factor_lt"><code>proper_factor_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="two_prime_product_uniqueness" href="#theorem-two_prime_product_uniqueness"><code>two_prime_product_uniqueness</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_half_unique" href="#theorem-odd_half_unique"><code>odd_half_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_scale_nonzero" href="#theorem-is_lcm_scale_nonzero"><code>is_lcm_scale_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_cancel_gcd" href="#theorem-balanced_bezout_cancel_gcd"><code>balanced_bezout_cancel_gcd</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_quotients_coprime_nonzero" href="#theorem-is_gcd_quotients_coprime_nonzero"><code>is_gcd_quotients_coprime_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_left_cancel_nonzero">Copy statement</button>
        <pre id="statement-mul_left_cancel_nonzero"><code>forall a b c. ~(a = 0) -&gt; a * b = a * c -&gt; b = c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_left_cancel_nonzero">Copy proof</button>
        <pre id="proof-mul_left_cancel_nonzero"><code>pa prove forall a b c. ~(a = 0) -&gt; a * b = a * c -&gt; b = c
use mul_eq_zero
use mul_ne_zero
use add_right_cancel
use succ_ne_zero
intro a
induction b
intro c
intro ha
intro h
have hz : a * c = 0
symm
rewrite PA5 at h
exact h
have factors : a = 0 \/ c = 0
specialize mul_eq_zero a
specialize mul_eq_zero c
apply mul_eq_zero
exact hz
cases factors
exfalso
apply ha
exact factors_left
symm
exact factors_right
intro c
induction c
intro ha
intro h
exfalso
specialize mul_ne_zero a
specialize mul_ne_zero (S b)
apply mul_ne_zero
exact ha
specialize succ_ne_zero b
exact succ_ne_zero
rewrite PA5 at h
exact h
intro ha
intro h
congr
apply IH
exact ha
apply add_right_cancel
rewrite PA6 at h
rewrite PA6 at h
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>224</dd></div>
        <div><dt>Distinct objects</dt><dd>177</dd></div>
        <div><dt>Reused references</dt><dd>1</dd></div>
        <div><dt>Depth</dt><dd>23</dd></div>
        <div><dt>Cuts</dt><dd>7</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6ac15cdf9d967db093e9deaeff82c563bc36aa00f120e6830f01ba0710a46377">6ac15cdf9d96…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_left_cancel_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_left_cancel_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1767">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_left_cancel_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_right_cancel_nonzero"
  data-name="mul_right_cancel_nonzero" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_comm,mul_left_cancel_nonzero"
  data-search="mul_right_cancel_nonzero a nonzero factor cancels on the right a nonzero common right factor can be cancelled. forall a b c. ~(c = 0) -&gt; a * c = b * c -&gt; a = b multiplication mul_comm mul_left_cancel_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_right_cancel_nonzero</code><span>A nonzero factor cancels on the right</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero common right factor can be cancelled.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_right_cancel_nonzero">Copy statement</button>
        <pre id="statement-mul_right_cancel_nonzero"><code>forall a b c. ~(c = 0) -&gt; a * c = b * c -&gt; a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_right_cancel_nonzero">Copy proof</button>
        <pre id="proof-mul_right_cancel_nonzero"><code>pa prove forall a b c. ~(c = 0) -&gt; a * c = b * c -&gt; a = b
use mul_comm
use mul_left_cancel_nonzero
intro a
intro b
intro c
intro hc
intro h
specialize mul_left_cancel_nonzero c
specialize mul_left_cancel_nonzero a
specialize mul_left_cancel_nonzero b
apply mul_left_cancel_nonzero
exact hc
trans a * c
apply mul_comm
trans b * c
exact h
apply mul_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>478</dd></div>
        <div><dt>Distinct objects</dt><dd>409</dd></div>
        <div><dt>Reused references</dt><dd>23</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>15</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7c4fbfcfbc65d03790c5307d3c9a3c2322e08f18c1a1bd931262b562be317fbe">7c4fbfcfbc65…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_right_cancel_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_right_cancel_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1817">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_right_cancel_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-two_large_factors_impossible"
  data-name="two_large_factors_impossible" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_succ_left,add_eq_zero_left,mul_eq_zero"
  data-search="two_large_factors_impossible two is not a product of two successors of successors two naturals at least two cannot multiply to two. forall a b. ~(2 = s (s a) * s (s b)) multiplication mul_succ_left add_eq_zero_left mul_eq_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>two_large_factors_impossible</code><span>Two is not a product of two successors of successors</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two naturals at least two cannot multiply to two.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_left" href="#theorem-add_eq_zero_left"><code>add_eq_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_eq_zero" href="#theorem-mul_eq_zero"><code>mul_eq_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_two" href="#theorem-prime_two"><code>prime_two</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-two_large_factors_impossible">Copy statement</button>
        <pre id="statement-two_large_factors_impossible"><code>forall a b. ~(2 = S (S a) * S (S b))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-two_large_factors_impossible">Copy proof</button>
        <pre id="proof-two_large_factors_impossible"><code>pa prove forall a b. ~(2 = S (S a) * S (S b))
use mul_succ_left
use add_eq_zero_left
use mul_eq_zero
intro a
intro b
intro h
specialize mul_succ_left (S a)
specialize mul_succ_left (S (S b))
rewrite mul_succ_left at h
rewrite PA4 at h
rewrite PA4 at h
have hzero : 0 = S a * S (S b) + b
apply PA2
apply PA2
exact h
have hzero&#x27; : S a * S (S b) + b = 0
symm
exact hzero
have hprod : S a * S (S b) = 0
apply add_eq_zero_left
exact hzero&#x27;
specialize mul_eq_zero (S a)
specialize mul_eq_zero (S (S b))
have hz : S a = 0 \/ S (S b) = 0
apply mul_eq_zero
exact hprod
cases hz
apply PA1
exact hz_left
apply PA1
exact hz_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>376</dd></div>
        <div><dt>Distinct objects</dt><dd>267</dd></div>
        <div><dt>Reused references</dt><dd>19</dd></div>
        <div><dt>Depth</dt><dd>23</dd></div>
        <div><dt>Cuts</dt><dd>12</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="33d33a9acbc735971b4f3fada161818360bd459de024a40245377980e94c70f3">33d33a9acbc7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for two_large_factors_impossible">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib two_large_factors_impossible</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1840">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/two_large_factors_impossible.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_two"
  data-name="prime_two" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="mul_zero_left,two_large_factors_impossible"
  data-search="prime_two two is prime two is prime in the expanded first-order prime predicate. ~(2 = 1) /\ forall a b. 2 = a * b -&gt; a = 1 \/ b = 1 primes mul_zero_left two_large_factors_impossible">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_two</code><span>Two is prime</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two is prime in the expanded first-order prime predicate.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="two_large_factors_impossible" href="#theorem-two_large_factors_impossible"><code>two_large_factors_impossible</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_two">Copy statement</button>
        <pre id="statement-prime_two"><code>~(2 = 1) /\ forall a b. 2 = a * b -&gt; a = 1 \/ b = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_two">Copy proof</button>
        <pre id="proof-prime_two"><code>pa prove ~(2 = 1) /\ forall a b. 2 = a * b -&gt; a = 1 \/ b = 1
use mul_zero_left
use two_large_factors_impossible
split
intro h
have h10 : 1 = 0
apply PA2
exact h
apply PA1
exact h10
intro a
induction b
intro h
rewrite PA5 at h
exfalso
apply PA1
exact h
induction b
intro h
right
refl
induction a
intro h
specialize mul_zero_left (S (S b))
rewrite mul_zero_left at h
exfalso
apply PA1
exact h
induction a
intro h
left
refl
intro h
exfalso
specialize two_large_factors_impossible a
specialize two_large_factors_impossible b
apply two_large_factors_impossible
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>456</dd></div>
        <div><dt>Distinct objects</dt><dd>344</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>14</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6f30b33256b8805df13d9b284663fdf19b063823277014ff9858ab90935d326b">6f30b33256b8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_two">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_two</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1876">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_two.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_zero"
  data-name="multiple_zero" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies=""
  data-search="multiple_zero every natural number divides zero zero is a multiple of every natural number. forall a. exists q. 0 = a * q divisibility">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_zero</code><span>Every natural number divides zero</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Zero is a multiple of every natural number.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_zero_right" href="#theorem-is_gcd_zero_right"><code>is_gcd_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_zero_right" href="#theorem-is_lcm_zero_right"><code>is_lcm_zero_right</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_zero">Copy statement</button>
        <pre id="statement-multiple_zero"><code>forall a. exists q. 0 = a * q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_zero">Copy proof</button>
        <pre id="proof-multiple_zero"><code>pa prove forall a. exists q. 0 = a * q
intro a
exists 0
rewrite PA5
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7</dd></div>
        <div><dt>Distinct objects</dt><dd>7</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>6</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2304f77f5c8a2d7e6dc8b1dc65152b0ec98202f49b57d582ce3cbf92a09969b1">2304f77f5c8a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1922">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-one_multiple"
  data-name="one_multiple" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="one_mul"
  data-search="one_multiple one divides every natural number every natural number is a multiple of one. forall n. exists q. n = 1 * q divisibility one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>one_multiple</code><span>One divides every natural number</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural number is a multiple of one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_to_is_gcd_one" href="#theorem-coprime_to_is_gcd_one"><code>coprime_to_is_gcd_one</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-one_multiple">Copy statement</button>
        <pre id="statement-one_multiple"><code>forall n. exists q. n = 1 * q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-one_multiple">Copy proof</button>
        <pre id="proof-one_multiple"><code>pa prove forall n. exists q. n = 1 * q
use one_mul
intro n
exists n
symm
apply one_mul
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>32</dd></div>
        <div><dt>Distinct objects</dt><dd>32</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3493ac8715156f2b7e903d3bd66772d781057b24dce6cd345e3b0a36c255c86a">3493ac871515…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for one_multiple">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib one_multiple</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1929">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/one_multiple.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_refl"
  data-name="multiple_refl" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_one"
  data-search="multiple_refl divisibility is reflexive every natural number is a multiple of itself. forall a. exists q. a = a * q divisibility mul_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_refl</code><span>Divisibility is reflexive</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural number is a multiple of itself.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_zero_right" href="#theorem-is_gcd_zero_right"><code>is_gcd_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_of_dvd" href="#theorem-is_gcd_of_dvd"><code>is_gcd_of_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_exists_up_to" href="#theorem-gcd_exists_up_to"><code>gcd_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_refl">Copy statement</button>
        <pre id="statement-multiple_refl"><code>forall a. exists q. a = a * q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_refl">Copy proof</button>
        <pre id="proof-multiple_refl"><code>pa prove forall a. exists q. a = a * q
use mul_one
intro a
exists 1
symm
apply mul_one
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>39</dd></div>
        <div><dt>Distinct objects</dt><dd>39</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f8eb406ea24d84a7279fdd64f8ab11fabded54b7d269f6ef1ded3f61cbe68a9e">f8eb406ea24d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_refl">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_refl</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1936">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_refl.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_add"
  data-name="multiple_add" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_add"
  data-search="multiple_add a common divisor divides a sum multiples of a fixed number are closed under addition. forall a n m. (exists q. n = a * q) -&gt; (exists r. m = a * r) -&gt; exists s. n + m = a * s divisibility mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_add</code><span>A common divisor divides a sum</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiples of a fixed number are closed under addition.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_add">Copy statement</button>
        <pre id="statement-multiple_add"><code>forall a n m. (exists q. n = a * q) -&gt; (exists r. m = a * r) -&gt; exists s. n + m = a * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_add">Copy proof</button>
        <pre id="proof-multiple_add"><code>pa prove forall a n m. (exists q. n = a * q) -&gt; (exists r. m = a * r) -&gt; exists s. n + m = a * s
use mul_add
intro a
intro n
intro m
intro hn
intro hm
cases hn
cases hm
exists x + x1
rewrite hn_witness
rewrite hm_witness
symm
apply mul_add
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>99</dd></div>
        <div><dt>Distinct objects</dt><dd>92</dd></div>
        <div><dt>Reused references</dt><dd>7</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="40c1927b53469ec5bc2387e4a0676fb9e39888c4494765d4f4e2ddb60c9ce2fb">40c1927b5346…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_add">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_add</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1943">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_add.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_mul_right"
  data-name="multiple_mul_right" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_assoc"
  data-search="multiple_mul_right a divisor remains a divisor after right multiplication a right multiple of a multiple remains a multiple. forall a n m. (exists q. n = a * q) -&gt; exists s. n * m = a * s divisibility mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_mul_right</code><span>A divisor remains a divisor after right multiplication</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A right multiple of a multiple remains a multiple.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_mul_left" href="#theorem-multiple_mul_left"><code>multiple_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_step" href="#theorem-bounded_common_multiple_step"><code>bounded_common_multiple_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="scaled_bounded_common_multiple" href="#theorem-scaled_bounded_common_multiple"><code>scaled_bounded_common_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_mul_right">Copy statement</button>
        <pre id="statement-multiple_mul_right"><code>forall a n m. (exists q. n = a * q) -&gt; exists s. n * m = a * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_mul_right">Copy proof</button>
        <pre id="proof-multiple_mul_right"><code>pa prove forall a n m. (exists q. n = a * q) -&gt; exists s. n * m = a * s
use mul_assoc
intro a
intro n
intro m
intro hn
cases hn
exists x * m
rewrite hn_witness
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>131</dd></div>
        <div><dt>Distinct objects</dt><dd>119</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e2b7b5396400be3476f25ab9566ab6af80795541bf56bd754ad421443095be83">e2b7b5396400…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_mul_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_mul_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1963">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_mul_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_mul_left"
  data-name="multiple_mul_left" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_comm,multiple_mul_right"
  data-search="multiple_mul_left a divisor remains a divisor after left multiplication a left multiple of a multiple remains a multiple. forall a n m. (exists q. n = a * q) -&gt; exists s. m * n = a * s divisibility mul_comm multiple_mul_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_mul_left</code><span>A divisor remains a divisor after left multiplication</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A left multiple of a multiple remains a multiple.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_mul_right" href="#theorem-multiple_mul_right"><code>multiple_mul_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_mul_left">Copy statement</button>
        <pre id="statement-multiple_mul_left"><code>forall a n m. (exists q. n = a * q) -&gt; exists s. m * n = a * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_mul_left">Copy proof</button>
        <pre id="proof-multiple_mul_left"><code>pa prove forall a n m. (exists q. n = a * q) -&gt; exists s. m * n = a * s
use mul_comm
use multiple_mul_right
intro a
intro n
intro m
intro hn
suffices hswap : m * n = n * m
rewrite hswap
apply multiple_mul_right
exact hn
apply mul_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>370</dd></div>
        <div><dt>Distinct objects</dt><dd>304</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>11</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="532e24fbf50688728446962083eb12ba0f9c2cbc3e0e7b7535b519d9e8ae552a">532e24fbf506…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_mul_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_mul_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1979">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_mul_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_trans"
  data-name="multiple_trans" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_assoc"
  data-search="multiple_trans divisibility is transitive the multiple relation is transitive. forall a b n. (exists q. n = a * q) -&gt; (exists r. a = b * r) -&gt; exists s. n = b * s divisibility mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_trans</code><span>Divisibility is transitive</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The multiple relation is transitive.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mul_left" href="#theorem-coprime_mul_left"><code>coprime_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_quotient_bound" href="#theorem-greatest_prime_divisor_quotient_bound"><code>greatest_prime_divisor_quotient_bound</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_trans">Copy statement</button>
        <pre id="statement-multiple_trans"><code>forall a b n. (exists q. n = a * q) -&gt; (exists r. a = b * r) -&gt; exists s. n = b * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_trans">Copy proof</button>
        <pre id="proof-multiple_trans"><code>pa prove forall a b n. (exists q. n = a * q) -&gt; (exists r. a = b * r) -&gt; exists s. n = b * s
use mul_assoc
intro a
intro b
intro n
intro hn
intro hab
cases hn
cases hab
exists x1 * x
rewrite hn_witness
rewrite hab_witness
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>137</dd></div>
        <div><dt>Distinct objects</dt><dd>125</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8cb32c63f8acbf1e64b9009b9d5da09cf7272c28e08199d5a93ba3028db9ca36">8cb32c63f8ac…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_trans">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_trans</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L1996">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_trans.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-divisor_le_nonzero"
  data-name="divisor_le_nonzero" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="one_le_of_ne_zero"
  data-search="divisor_le_nonzero a divisor of a nonzero natural is bounded a divisor of a nonzero natural is bounded by that natural. forall d n. ~(n = 0) -&gt; (exists q. n = d * q) -&gt; exists k. k + d = n divisibility one_le_of_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>divisor_le_nonzero</code><span>A divisor of a nonzero natural is bounded</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A divisor of a nonzero natural is bounded by that natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="one_le_of_ne_zero" href="#theorem-one_le_of_ne_zero"><code>one_le_of_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_or_composite" href="#theorem-prime_or_composite"><code>prime_or_composite</code></a> <a class="pa-theorem-chip" data-theorem-link="proper_factor_lt" href="#theorem-proper_factor_lt"><code>proper_factor_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_exists" href="#theorem-greatest_prime_divisor_exists"><code>greatest_prime_divisor_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-divisor_le_nonzero">Copy statement</button>
        <pre id="statement-divisor_le_nonzero"><code>forall d n. ~(n = 0) -&gt; (exists q. n = d * q) -&gt; exists k. k + d = n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-divisor_le_nonzero">Copy proof</button>
        <pre id="proof-divisor_le_nonzero"><code>pa prove forall d n. ~(n = 0) -&gt; (exists q. n = d * q) -&gt; exists k. k + d = n
use one_le_of_ne_zero
intro d
intro n
intro hn
intro hd
cases hd
have hq : ~(x = 0)
intro hx
apply hn
trans d * x
exact hd_witness
rewrite hx
apply PA5
specialize one_le_of_ne_zero x
have h1q : exists k. k + 1 = x
apply one_le_of_ne_zero
exact hq
cases h1q
have hs : S x1 = x
trans x1 + 1
simp
exact h1q_witness
exists d * x1
trans d * S x1
symm
apply PA6
trans d * x
congr
refl
exact hs
symm
exact hd_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>64</dd></div>
        <div><dt>Distinct objects</dt><dd>62</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b96a5e2d28436420e64b70a1cd5e9f5d26ed2f75f67d6df642ef396992fc9899">b96a5e2d2843…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for divisor_le_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib divisor_le_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2015">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/divisor_le_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-divisor_one"
  data-name="divisor_one" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_eq_one_components"
  data-search="divisor_one every divisor of one is one every natural divisor of one equals one. forall d. (exists y. 1 = d * y) -&gt; d = 1 divisibility mul_eq_one_components">
  <details>
    <summary>
      <span class="pa-card-title"><code>divisor_one</code><span>Every divisor of one is one</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural divisor of one equals one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_eq_one_components" href="#theorem-mul_eq_one_components"><code>mul_eq_one_components</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_one_right" href="#theorem-coprime_one_right"><code>coprime_one_right</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_one_left" href="#theorem-coprime_one_left"><code>coprime_one_left</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_one_to_coprime" href="#theorem-is_gcd_one_to_coprime"><code>is_gcd_one_to_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_modulus_coprime_base" href="#theorem-beta_modulus_coprime_base"><code>beta_modulus_coprime_base</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_nonempty_all_prime_product_ne_one" href="#theorem-beta_nonempty_all_prime_product_ne_one"><code>beta_nonempty_all_prime_product_ne_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_inverse_implies_coprime" href="#theorem-mod_inverse_implies_coprime"><code>mod_inverse_implies_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_one_implies_coprime" href="#theorem-balanced_bezout_one_implies_coprime"><code>balanced_bezout_one_implies_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_quotients_coprime_nonzero" href="#theorem-is_gcd_quotients_coprime_nonzero"><code>is_gcd_quotients_coprime_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-divisor_one">Copy statement</button>
        <pre id="statement-divisor_one"><code>forall d. (exists y. 1 = d * y) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-divisor_one">Copy proof</button>
        <pre id="proof-divisor_one"><code>pa prove forall d. (exists y. 1 = d * y) -&gt; d = 1
use mul_eq_one_components
intro d
intro h
cases h
specialize mul_eq_one_components d
specialize mul_eq_one_components x
have parts : d = 1 /\ x = 1
apply mul_eq_one_components
symm
exact h_witness
cases parts
exact parts_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>188</dd></div>
        <div><dt>Distinct objects</dt><dd>176</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ef2c18d807f38df95b1ab5fdb836cbda2ddada33b5a3978eae47c5d0c9486ee3">ef2c18d807f3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for divisor_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib divisor_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2054">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/divisor_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_antisymm"
  data-name="multiple_antisymm" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="zero_or_succ,mul_zero_left,mul_assoc,mul_one,mul_left_cancel_nonzero,mul_eq_one_components"
  data-search="multiple_antisymm divisibility is antisymmetric mutual divisibility is antisymmetric over natural numbers. forall a b. (exists x. b = a * x) -&gt; (exists y. a = b * y) -&gt; a = b divisibility zero_or_succ mul_zero_left mul_assoc mul_one mul_left_cancel_nonzero mul_eq_one_components">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_antisymm</code><span>Divisibility is antisymmetric</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Mutual divisibility is antisymmetric over natural numbers.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_eq_one_components" href="#theorem-mul_eq_one_components"><code>mul_eq_one_components</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_unique" href="#theorem-is_gcd_unique"><code>is_gcd_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_unique" href="#theorem-is_lcm_unique"><code>is_lcm_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_antisymm">Copy statement</button>
        <pre id="statement-multiple_antisymm"><code>forall a b. (exists x. b = a * x) -&gt; (exists y. a = b * y) -&gt; a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_antisymm">Copy proof</button>
        <pre id="proof-multiple_antisymm"><code>pa prove forall a b. (exists x. b = a * x) -&gt; (exists y. a = b * y) -&gt; a = b
use zero_or_succ
use mul_zero_left
use mul_assoc
use mul_one
use mul_left_cancel_nonzero
use mul_eq_one_components
intro a
intro b
intro hab
intro hba
cases hab
cases hba
specialize zero_or_succ a
cases zero_or_succ
rewrite zero_or_succ_left
rewrite zero_or_succ_left at hab_witness
specialize mul_zero_left x
rewrite mul_zero_left at hab_witness
symm
exact hab_witness
cases zero_or_succ_right
have ha : ~(a = 0)
intro ha0
rewrite zero_or_succ_right_witness at ha0
apply PA1
exact ha0
have hcycle : a = a * (x * x1)
trans b * x1
exact hba_witness
trans (a * x) * x1
congr
exact hab_witness
refl
apply mul_assoc
specialize mul_left_cancel_nonzero a
specialize mul_left_cancel_nonzero 1
specialize mul_left_cancel_nonzero (x * x1)
have hunit : 1 = x * x1
apply mul_left_cancel_nonzero
exact ha
specialize mul_one a
trans a
apply mul_one
exact hcycle
specialize mul_eq_one_components x
specialize mul_eq_one_components x1
have hparts : x = 1 /\ x1 = 1
apply mul_eq_one_components
symm
exact hunit
cases hparts
symm
trans a * x
exact hab_witness
rewrite hparts_left
apply mul_one
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>646</dd></div>
        <div><dt>Distinct objects</dt><dd>527</dd></div>
        <div><dt>Reused references</dt><dd>35</dd></div>
        <div><dt>Depth</dt><dd>33</dd></div>
        <div><dt>Cuts</dt><dd>19</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2b8e9547aaac701315d583c58930c68a8c5588e745526281855aee5d5a132737">2b8e9547aaac…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_antisymm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_antisymm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2073">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_antisymm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factor_difference"
  data-name="factor_difference" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="zero_add,add_eq_zero_right,add_right_cancel,add_assoc,add_comm"
  data-search="factor_difference a common-factor difference retains the factor a common-factor difference is itself a multiple of that factor. forall c u v r. c * u = c * v + r -&gt; exists w. r = c * w divisibility zero_add add_eq_zero_right add_right_cancel add_assoc add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>factor_difference</code><span>A common-factor difference retains the factor</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common-factor difference is itself a multiple of that factor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="add_right_cancel" href="#theorem-add_right_cancel"><code>add_right_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divides_remainder" href="#theorem-divides_remainder"><code>divides_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_divides_balanced_result" href="#theorem-common_divisor_divides_balanced_result"><code>common_divisor_divides_balanced_result</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_ordered_gap_multiple" href="#theorem-mod_eq_ordered_gap_multiple"><code>mod_eq_ordered_gap_multiple</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factor_difference">Copy statement</button>
        <pre id="statement-factor_difference"><code>forall c u v r. c * u = c * v + r -&gt; exists w. r = c * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factor_difference">Copy proof</button>
        <pre id="proof-factor_difference"><code>pa prove forall c u v r. c * u = c * v + r -&gt; exists w. r = c * w
use zero_add
use add_eq_zero_right
use add_right_cancel
use add_assoc
use add_comm
intro c
induction u
intro v
intro r
intro h
rewrite PA5 at h
have hr : r = 0
apply add_eq_zero_right
symm
exact h
exists 0
rewrite hr
rewrite PA5
refl
intro v
induction v
intro r
intro h
exists S u
rewrite PA5 at h
specialize zero_add r
rewrite zero_add at h
symm
exact h
intro r
intro h
have hred : c * u = c * v + r
specialize add_right_cancel (c * u)
specialize add_right_cancel (c * v + r)
specialize add_right_cancel c
apply add_right_cancel
rewrite PA6 at h
rewrite PA6 at h
trans (c * v + c) + r
exact h
trans c * v + (c + r)
apply add_assoc
trans c * v + (r + c)
congr
refl
apply add_comm
symm
apply add_assoc
specialize IH v
specialize IH r
apply IH
exact hred
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>265</dd></div>
        <div><dt>Distinct objects</dt><dd>237</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>7</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c26302d91bcbed6b8cc5d0ad0489fd8aa3bd836d4403ad5de11158293eee5b05">c26302d91bcb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factor_difference">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factor_difference</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2138">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factor_difference.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-divides_remainder"
  data-name="divides_remainder" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_assoc,factor_difference"
  data-search="divides_remainder a common divisor divides a euclidean remainder a common divisor of a dividend and divisor also divides the remainder. forall c a b q r. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; a = b * q + r -&gt; exists w. r = c * w divisibility mul_assoc factor_difference">
  <details>
    <summary>
      <span class="pa-card-title"><code>divides_remainder</code><span>A common divisor divides a Euclidean remainder</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common divisor of a dividend and divisor also divides the remainder.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_euclid_forward" href="#theorem-is_gcd_euclid_forward"><code>is_gcd_euclid_forward</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_euclid_backward" href="#theorem-is_gcd_euclid_backward"><code>is_gcd_euclid_backward</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_modulus_coprime_base" href="#theorem-beta_modulus_coprime_base"><code>beta_modulus_coprime_base</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_beta_moduli_divides_gap_times_c" href="#theorem-common_divisor_beta_moduli_divides_gap_times_c"><code>common_divisor_beta_moduli_divides_gap_times_c</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-divides_remainder">Copy statement</button>
        <pre id="statement-divides_remainder"><code>forall c a b q r. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; a = b * q + r -&gt; exists w. r = c * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-divides_remainder">Copy proof</button>
        <pre id="proof-divides_remainder"><code>pa prove forall c a b q r. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; a = b * q + r -&gt; exists w. r = c * w
use mul_assoc
use factor_difference
intro c
intro a
intro b
intro q
intro r
intro ha
intro hb
intro h
cases ha
cases hb
specialize factor_difference c
specialize factor_difference x
specialize factor_difference (x1 * q)
specialize factor_difference r
apply factor_difference
trans a
symm
exact ha_witness
trans b * q + r
exact h
congr
rewrite hb_witness
apply mul_assoc
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>427</dd></div>
        <div><dt>Distinct objects</dt><dd>357</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>11</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2bd033084870d2b73072773ead98db0a7da37082fc68f066eccc1ebf96288147">2bd033084870…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for divides_remainder">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib divides_remainder</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2193">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/divides_remainder.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-divides_linear_step"
  data-name="divides_linear_step" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_assoc,mul_add"
  data-search="divides_linear_step a common divisor divides a euclidean linear step a common divisor of a divisor and remainder divides their euclidean linear step. forall c b q r. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. b * q + r = c * w divisibility mul_assoc mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>divides_linear_step</code><span>A common divisor divides a Euclidean linear step</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common divisor of a divisor and remainder divides their Euclidean linear step.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_euclid_forward" href="#theorem-is_gcd_euclid_forward"><code>is_gcd_euclid_forward</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_euclid_backward" href="#theorem-is_gcd_euclid_backward"><code>is_gcd_euclid_backward</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-divides_linear_step">Copy statement</button>
        <pre id="statement-divides_linear_step"><code>forall c b q r. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. b * q + r = c * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-divides_linear_step">Copy proof</button>
        <pre id="proof-divides_linear_step"><code>pa prove forall c b q r. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. b * q + r = c * w
use mul_assoc
use mul_add
intro c
intro b
intro q
intro r
intro hb
intro hr
cases hb
cases hr
exists x * q + x1
rewrite hb_witness
rewrite hr_witness
trans c * (x * q) + c * x1
congr
apply mul_assoc
refl
symm
apply mul_add
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>224</dd></div>
        <div><dt>Distinct objects</dt><dd>135</dd></div>
        <div><dt>Reused references</dt><dd>13</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="faf479e85693ecef2497c8767f2708d7779a8b1f9689743188d99ba08705064a">faf479e85693…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for divides_linear_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib divides_linear_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2225">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/divides_linear_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_multiple_pointwise"
  data-name="not_multiple_pointwise" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies=""
  data-search="not_multiple_pointwise a nonmultiple differs from every candidate multiple turn a negated existential multiple into pointwise inequalities. forall a n. ~(exists q. n = a * q) -&gt; forall q. ~(n = a * q) divisibility">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_multiple_pointwise</code><span>A nonmultiple differs from every candidate multiple</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Turn a negated existential multiple into pointwise inequalities.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_multiple_pointwise">Copy statement</button>
        <pre id="statement-not_multiple_pointwise"><code>forall a n. ~(exists q. n = a * q) -&gt; forall q. ~(n = a * q)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_multiple_pointwise">Copy proof</button>
        <pre id="proof-not_multiple_pointwise"><code>pa prove forall a n. ~(exists q. n = a * q) -&gt; forall q. ~(n = a * q)
intro a
intro n
intro h
intro q
intro hq
apply h
exists q
exact hq
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9</dd></div>
        <div><dt>Distinct objects</dt><dd>9</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>8</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fd88abf61d9cdcd410d8e4ff98239472b0d1db8ced09f82a37f5f47c48e66b63">fd88abf61d9c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_multiple_pointwise">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_multiple_pointwise</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2250">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_multiple_pointwise.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_multiple_from_pointwise"
  data-name="not_multiple_from_pointwise" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies=""
  data-search="not_multiple_from_pointwise pointwise inequality excludes every multiple witness reconstruct a negated existential from pointwise inequalities. forall a n. (forall q. ~(n = a * q)) -&gt; ~(exists q. n = a * q) divisibility">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_multiple_from_pointwise</code><span>Pointwise inequality excludes every multiple witness</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Reconstruct a negated existential from pointwise inequalities.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_multiple_from_pointwise">Copy statement</button>
        <pre id="statement-not_multiple_from_pointwise"><code>forall a n. (forall q. ~(n = a * q)) -&gt; ~(exists q. n = a * q)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_multiple_from_pointwise">Copy proof</button>
        <pre id="proof-not_multiple_from_pointwise"><code>pa prove forall a n. (forall q. ~(n = a * q)) -&gt; ~(exists q. n = a * q)
intro a
intro n
intro h
intro hex
cases hex
specialize h x
apply h
exact hex_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>13</dd></div>
        <div><dt>Distinct objects</dt><dd>13</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>9</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="53691b6629a86f8dab8a80291ed4cd4172b1fe1ad0a3cf8dfa4a91d4de54c370">53691b6629a8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_multiple_from_pointwise">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_multiple_from_pointwise</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2266">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_multiple_from_pointwise.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_zero_right"
  data-name="is_gcd_zero_right" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_refl,multiple_zero"
  data-search="is_gcd_zero_right every natural is the gcd of itself and zero every natural is the relational gcd of itself and zero. forall a. (((exists x. a = a * x) /\ (exists y. 0 = a * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. 0 = c * v) -&gt; exists w. a = c * w) gcd_coprime multiple_refl multiple_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_zero_right</code><span>Every natural is the gcd of itself and zero</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural is the relational gcd of itself and zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_zero" href="#theorem-multiple_zero"><code>multiple_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_left" href="#theorem-generalized_binary_crt_sufficient_zero_left"><code>generalized_binary_crt_sufficient_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_right" href="#theorem-generalized_binary_crt_sufficient_zero_right"><code>generalized_binary_crt_sufficient_zero_right</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_zero_right">Copy statement</button>
        <pre id="statement-is_gcd_zero_right"><code>forall a. (((exists x. a = a * x) /\ (exists y. 0 = a * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. 0 = c * v) -&gt; exists w. a = c * w)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_zero_right">Copy proof</button>
        <pre id="proof-is_gcd_zero_right"><code>pa prove forall a. (((exists x. a = a * x) /\ (exists y. 0 = a * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. 0 = c * v) -&gt; exists w. a = c * w)
use multiple_refl
use multiple_zero
intro a
split
split
specialize multiple_refl a
exact multiple_refl
specialize multiple_zero a
exact multiple_zero
intro c
intro ha
intro hz
exact ha
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>65</dd></div>
        <div><dt>Distinct objects</dt><dd>65</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1d964354c1b3df2275746a9b0b1e64eb47638e3ee620ebac354a2354aaab1168">1d964354c1b3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_zero_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_zero_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2282">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_zero_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_symm"
  data-name="is_gcd_symm" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_gcd_symm the relational gcd specification is symmetric the expanded relational greatest-common-divisor specification is symmetric. forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; ((exists x. b = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. a = c * v) -&gt; exists w. g = c * w gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_symm</code><span>The relational gcd specification is symmetric</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The expanded relational greatest-common-divisor specification is symmetric.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_left" href="#theorem-generalized_binary_crt_sufficient_zero_left"><code>generalized_binary_crt_sufficient_zero_left</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_symm">Copy statement</button>
        <pre id="statement-is_gcd_symm"><code>forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; ((exists x. b = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. a = c * v) -&gt; exists w. g = c * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_symm">Copy proof</button>
        <pre id="proof-is_gcd_symm"><code>pa prove forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; ((exists x. b = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. a = c * v) -&gt; exists w. g = c * w
intro g
intro a
intro b
intro h
cases h
cases h_left
split
split
exact h_left_right
exact h_left_left
intro c
intro hb
intro ha
specialize h_right c
apply h_right
exact ha
exact hb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>36</dd></div>
        <div><dt>Distinct objects</dt><dd>36</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="bf63a0e526c3fbbbc313b6d105f5b98edbefe5b09ad48257637397db93425af0">bf63a0e526c3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_symm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_symm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2301">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_symm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_dvd_left"
  data-name="is_gcd_dvd_left" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_gcd_dvd_left a relational gcd divides the left input a relational greatest common divisor divides its left input. forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; exists x. a = g * x gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_dvd_left</code><span>A relational gcd divides the left input</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational greatest common divisor divides its left input.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_common_solution_implies_gcd_compatible" href="#theorem-crt_common_solution_implies_gcd_compatible"><code>crt_common_solution_implies_gcd_compatible</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_nonzero" href="#theorem-generalized_binary_crt_sufficient_nonzero"><code>generalized_binary_crt_sufficient_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_dvd_left">Copy statement</button>
        <pre id="statement-is_gcd_dvd_left"><code>forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; exists x. a = g * x</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_dvd_left">Copy proof</button>
        <pre id="proof-is_gcd_dvd_left"><code>pa prove forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; exists x. a = g * x
intro g
intro a
intro b
intro h
cases h
cases h_left
exact h_left_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>21</dd></div>
        <div><dt>Distinct objects</dt><dd>21</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="848a8df1aab96094ed63ce2bf3d09d59aa98ec7a7c50caa079f4bdd99f9e23bf">848a8df1aab9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_dvd_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_dvd_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2326">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_dvd_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_dvd_right"
  data-name="is_gcd_dvd_right" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_gcd_dvd_right a relational gcd divides the right input a relational greatest common divisor divides its right input. forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; exists y. b = g * y gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_dvd_right</code><span>A relational gcd divides the right input</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational greatest common divisor divides its right input.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_common_solution_implies_gcd_compatible" href="#theorem-crt_common_solution_implies_gcd_compatible"><code>crt_common_solution_implies_gcd_compatible</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_nonzero" href="#theorem-generalized_binary_crt_sufficient_nonzero"><code>generalized_binary_crt_sufficient_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_dvd_right">Copy statement</button>
        <pre id="statement-is_gcd_dvd_right"><code>forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; exists y. b = g * y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_dvd_right">Copy proof</button>
        <pre id="proof-is_gcd_dvd_right"><code>pa prove forall g a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; exists y. b = g * y
intro g
intro a
intro b
intro h
cases h
cases h_left
exact h_left_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>21</dd></div>
        <div><dt>Distinct objects</dt><dd>21</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="bdbcd5dadc7777321fbf770aa7ac10f523c08bd412d6c6f9c2b8e76da0edfd67">bdbcd5dadc77…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_dvd_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_dvd_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2341">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_dvd_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_greatest"
  data-name="is_gcd_greatest" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_gcd_greatest every common divisor divides a relational gcd every common divisor of the inputs divides their relational gcd. forall g a b c. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; exists w. g = d * w) -&gt; (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_greatest</code><span>Every common divisor divides a relational gcd</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every common divisor of the inputs divides their relational gcd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_quotients_coprime_nonzero" href="#theorem-is_gcd_quotients_coprime_nonzero"><code>is_gcd_quotients_coprime_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_greatest">Copy statement</button>
        <pre id="statement-is_gcd_greatest"><code>forall g a b c. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; exists w. g = d * w) -&gt; (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_greatest">Copy proof</button>
        <pre id="proof-is_gcd_greatest"><code>pa prove forall g a b c. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; exists w. g = d * w) -&gt; (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w
intro g
intro a
intro b
intro c
intro h
intro ha
intro hb
cases h
specialize h_right c
apply h_right
exact ha
exact hb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>24</dd></div>
        <div><dt>Distinct objects</dt><dd>24</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="90f411bbe2541f1cc127b54b3175b911800c9a3132efb726fa20987751761b83">90f411bbe254…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_greatest">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_greatest</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2356">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_greatest.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_of_dvd"
  data-name="is_gcd_of_dvd" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_refl"
  data-search="is_gcd_of_dvd a divisor is the gcd of itself and its multiple if the left input divides the right, the left input is their relational gcd. forall a b. (exists y. b = a * y) -&gt; (((exists x. a = a * x) /\ (exists y. b = a * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. a = c * w) gcd_coprime multiple_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_of_dvd</code><span>A divisor is the gcd of itself and its multiple</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">If the left input divides the right, the left input is their relational gcd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_of_dvd">Copy statement</button>
        <pre id="statement-is_gcd_of_dvd"><code>forall a b. (exists y. b = a * y) -&gt; (((exists x. a = a * x) /\ (exists y. b = a * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. a = c * w)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_of_dvd">Copy proof</button>
        <pre id="proof-is_gcd_of_dvd"><code>pa prove forall a b. (exists y. b = a * y) -&gt; (((exists x. a = a * x) /\ (exists y. b = a * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. a = c * w)
use multiple_refl
intro a
intro b
intro hd
split
split
specialize multiple_refl a
exact multiple_refl
exact hd
intro c
intro ha
intro hb
exact ha
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>55</dd></div>
        <div><dt>Distinct objects</dt><dd>55</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3377fa1041e5c2f05f895cd3ec5852278f403aa0ed780e32e691e421d832a181">3377fa1041e5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_of_dvd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_of_dvd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2376">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_of_dvd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_unique"
  data-name="is_gcd_unique" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_antisymm"
  data-search="is_gcd_unique the relational greatest common divisor is unique the fully expanded relational greatest common divisor is unique. forall g h a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; (((exists x. a = h * x) /\ (exists y. b = h * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. h = c * w) -&gt; g = h gcd_coprime multiple_antisymm">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_unique</code><span>The relational greatest common divisor is unique</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The fully expanded relational greatest common divisor is unique.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_product" href="#theorem-gcd_lcm_product"><code>gcd_lcm_product</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_left" href="#theorem-generalized_binary_crt_sufficient_zero_left"><code>generalized_binary_crt_sufficient_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_right" href="#theorem-generalized_binary_crt_sufficient_zero_right"><code>generalized_binary_crt_sufficient_zero_right</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_unique">Copy statement</button>
        <pre id="statement-is_gcd_unique"><code>forall g h a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; (((exists x. a = h * x) /\ (exists y. b = h * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. h = c * w) -&gt; g = h</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_unique">Copy proof</button>
        <pre id="proof-is_gcd_unique"><code>pa prove forall g h a b. (((exists x. a = g * x) /\ (exists y. b = g * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. g = c * w) -&gt; (((exists x. a = h * x) /\ (exists y. b = h * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. h = c * w) -&gt; g = h
use multiple_antisymm
intro g
intro h
intro a
intro b
intro hg
intro hh
cases hg
cases hg_left
cases hh
cases hh_left
specialize hg_right h
have hdg : exists w. g = h * w
apply hg_right
exact hh_left_left
exact hh_left_right
specialize hh_right g
have gdh : exists w. h = g * w
apply hh_right
exact hg_left_left
exact hg_left_right
specialize multiple_antisymm g
specialize multiple_antisymm h
apply multiple_antisymm
exact gdh
exact hdg
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>680</dd></div>
        <div><dt>Distinct objects</dt><dd>561</dd></div>
        <div><dt>Reused references</dt><dd>35</dd></div>
        <div><dt>Depth</dt><dd>34</dd></div>
        <div><dt>Cuts</dt><dd>20</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f903e743755008f6461433b1dffe57510bad96d941ea02f4cde3fb0fca48c891">f903e7437550…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2396">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_euclid_forward"
  data-name="is_gcd_euclid_forward" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="divides_remainder,divides_linear_step"
  data-search="is_gcd_euclid_forward euclidean gcd invariance in the forward direction a relational gcd of divisor and remainder is a gcd of dividend and divisor. forall d a b q r. a = b * q + r -&gt; (((exists x. b = d * x) /\ (exists y. r = d * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. d = c * w) -&gt; (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) gcd_coprime divides_remainder divides_linear_step">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_euclid_forward</code><span>Euclidean gcd invariance in the forward direction</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational gcd of divisor and remainder is a gcd of dividend and divisor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divides_remainder" href="#theorem-divides_remainder"><code>divides_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="divides_linear_step" href="#theorem-divides_linear_step"><code>divides_linear_step</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_up_to" href="#theorem-gcd_exists_up_to"><code>gcd_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_euclid_forward">Copy statement</button>
        <pre id="statement-is_gcd_euclid_forward"><code>forall d a b q r. a = b * q + r -&gt; (((exists x. b = d * x) /\ (exists y. r = d * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. d = c * w) -&gt; (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_euclid_forward">Copy proof</button>
        <pre id="proof-is_gcd_euclid_forward"><code>pa prove forall d a b q r. a = b * q + r -&gt; (((exists x. b = d * x) /\ (exists y. r = d * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. d = c * w) -&gt; (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w)
use divides_remainder
use divides_linear_step
intro d
intro a
intro b
intro q
intro r
intro hstep
intro hg
cases hg
cases hg_left
split
split
rewrite hstep
specialize divides_linear_step d
specialize divides_linear_step b
specialize divides_linear_step q
specialize divides_linear_step r
apply divides_linear_step
exact hg_left_left
exact hg_left_right
exact hg_left_left
intro c
intro hca
intro hcb
specialize hg_right c
apply hg_right
exact hcb
specialize divides_remainder c
specialize divides_remainder a
specialize divides_remainder b
specialize divides_remainder q
specialize divides_remainder r
apply divides_remainder
exact hca
exact hcb
exact hstep
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>741</dd></div>
        <div><dt>Distinct objects</dt><dd>478</dd></div>
        <div><dt>Reused references</dt><dd>24</dd></div>
        <div><dt>Depth</dt><dd>38</dd></div>
        <div><dt>Cuts</dt><dd>18</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3da415ea4ec64d0dc36bfb293300b230774989a43694f58aeb2f857e9ad65d3d">3da415ea4ec6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_euclid_forward">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_euclid_forward</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2429">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_euclid_forward.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_euclid_backward"
  data-name="is_gcd_euclid_backward" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="divides_remainder,divides_linear_step"
  data-search="is_gcd_euclid_backward euclidean gcd invariance in the backward direction a relational gcd of dividend and divisor is a gcd of divisor and remainder. forall d a b q r. a = b * q + r -&gt; (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) -&gt; (((exists x. b = d * x) /\ (exists y. r = d * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. d = c * w) gcd_coprime divides_remainder divides_linear_step">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_euclid_backward</code><span>Euclidean gcd invariance in the backward direction</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational gcd of dividend and divisor is a gcd of divisor and remainder.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divides_remainder" href="#theorem-divides_remainder"><code>divides_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="divides_linear_step" href="#theorem-divides_linear_step"><code>divides_linear_step</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_euclid_backward">Copy statement</button>
        <pre id="statement-is_gcd_euclid_backward"><code>forall d a b q r. a = b * q + r -&gt; (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) -&gt; (((exists x. b = d * x) /\ (exists y. r = d * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. d = c * w)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_euclid_backward">Copy proof</button>
        <pre id="proof-is_gcd_euclid_backward"><code>pa prove forall d a b q r. a = b * q + r -&gt; (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) -&gt; (((exists x. b = d * x) /\ (exists y. r = d * y)) /\ forall c. (exists u. b = c * u) -&gt; (exists v. r = c * v) -&gt; exists w. d = c * w)
use divides_remainder
use divides_linear_step
intro d
intro a
intro b
intro q
intro r
intro hstep
intro hg
cases hg
cases hg_left
split
split
exact hg_left_right
specialize divides_remainder d
specialize divides_remainder a
specialize divides_remainder b
specialize divides_remainder q
specialize divides_remainder r
apply divides_remainder
exact hg_left_left
exact hg_left_right
exact hstep
intro c
intro hcb
intro hcr
specialize hg_right c
apply hg_right
rewrite hstep
specialize divides_linear_step c
specialize divides_linear_step b
specialize divides_linear_step q
specialize divides_linear_step r
apply divides_linear_step
exact hcb
exact hcr
exact hcb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>741</dd></div>
        <div><dt>Distinct objects</dt><dd>478</dd></div>
        <div><dt>Reused references</dt><dd>24</dd></div>
        <div><dt>Depth</dt><dd>37</dd></div>
        <div><dt>Cuts</dt><dd>18</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="bd24f6b65f7ea9596ff43f0d28a29faf4c07a273ec1948a3661091d1f3004ed9">bd24f6b65f7e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_euclid_backward">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_euclid_backward</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2472">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_euclid_backward.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gcd_exists_up_to"
  data-name="gcd_exists_up_to" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_refl,le_zero,le_eq_or_lt,le_of_succ_le_succ,division_remainder_exists,is_gcd_euclid_forward"
  data-search="gcd_exists_up_to a greatest common divisor exists below a fixed bound bounded induction constructs a relational gcd whenever the right input is at most the bound. forall b b. (exists t. t + b = b) -&gt; forall a. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) gcd_coprime multiple_refl le_zero le_eq_or_lt le_of_succ_le_succ division_remainder_exists is_gcd_euclid_forward">
  <details>
    <summary>
      <span class="pa-card-title"><code>gcd_exists_up_to</code><span>A greatest common divisor exists below a fixed bound</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Bounded induction constructs a relational gcd whenever the right input is at most the bound.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_euclid_forward" href="#theorem-is_gcd_euclid_forward"><code>is_gcd_euclid_forward</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_relational" href="#theorem-gcd_exists_relational"><code>gcd_exists_relational</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gcd_exists_up_to">Copy statement</button>
        <pre id="statement-gcd_exists_up_to"><code>forall B b. (exists t. t + b = B) -&gt; forall a. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gcd_exists_up_to">Copy proof</button>
        <pre id="proof-gcd_exists_up_to"><code>pa prove forall B b. (exists t. t + b = B) -&gt; forall a. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w)
use multiple_refl
use le_zero
use le_eq_or_lt
use le_of_succ_le_succ
use division_remainder_exists
use is_gcd_euclid_forward
intro B
induction B
intro b
intro hb
intro a
have hb0 : b = 0
apply le_zero
exact hb
exists a
split
split
specialize multiple_refl a
exact multiple_refl
exists 0
trans 0
exact hb0
symm
apply PA5
intro c
intro hca
intro hcb
exact hca
intro b
intro hb
intro a
specialize le_eq_or_lt b
specialize le_eq_or_lt (S B)
have hsplit : b = S B \/ exists k. k + S b = S B
apply le_eq_or_lt
exact hb
cases hsplit
have hb0 : ~(b = 0)
intro hzero
apply PA1
trans b
symm
exact hsplit_left
exact hzero
have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b
apply division_remainder_exists
exact hb0
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
have hrB : exists k. k + x1 = B
apply le_of_succ_le_succ
rewrite hsplit_left at hdiv_witness_witness_right
exact hdiv_witness_witness_right
have hsmall : exists d. (((exists u. b = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. b = c * s) -&gt; (exists t. x1 = c * t) -&gt; exists w. d = c * w)
specialize IH x1
have hall : forall z. exists d. (((exists u. z = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. z = c * s) -&gt; (exists t. x1 = c * t) -&gt; exists w. d = c * w)
apply IH
exact hrB
specialize hall b
exact hall
cases hsmall
exists x2
specialize is_gcd_euclid_forward x2
specialize is_gcd_euclid_forward a
specialize is_gcd_euclid_forward b
specialize is_gcd_euclid_forward x
specialize is_gcd_euclid_forward x1
apply is_gcd_euclid_forward
exact hdiv_witness_witness_left
exact hsmall_witness
have hbB : exists k. k + b = B
apply le_of_succ_le_succ
exact hsplit_right
specialize IH b
have hall : forall z. exists d. (((exists u. z = d * u) /\ (exists v. b = d * v)) /\ forall c. (exists s. z = c * s) -&gt; (exists t. b = c * t) -&gt; exists w. d = c * w)
apply IH
exact hbB
specialize hall a
exact hall
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,232</dd></div>
        <div><dt>Distinct objects</dt><dd>814</dd></div>
        <div><dt>Reused references</dt><dd>47</dd></div>
        <div><dt>Depth</dt><dd>44</dd></div>
        <div><dt>Cuts</dt><dd>35</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ef027a9b219f588aecded0329db96affc7c247ce5b074d0409ead24ba79a6f6f">ef027a9b219f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gcd_exists_up_to">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gcd_exists_up_to</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2515">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gcd_exists_up_to.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gcd_exists_relational"
  data-name="gcd_exists_relational" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="le_refl,gcd_exists_up_to"
  data-search="gcd_exists_relational a greatest common divisor exists every pair of naturals has a relational greatest common divisor. forall a b. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) gcd_coprime le_refl gcd_exists_up_to">
  <details>
    <summary>
      <span class="pa-card-title"><code>gcd_exists_relational</code><span>A greatest common divisor exists</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every pair of naturals has a relational greatest common divisor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_exists_up_to" href="#theorem-gcd_exists_up_to"><code>gcd_exists_up_to</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="euclid_prime_dvd_product" href="#theorem-euclid_prime_dvd_product"><code>euclid_prime_dvd_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_coprime_or_divides" href="#theorem-prime_coprime_or_divides"><code>prime_coprime_or_divides</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_total_decision" href="#theorem-generalized_binary_crt_total_decision"><code>generalized_binary_crt_total_decision</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gcd_exists_relational">Copy statement</button>
        <pre id="statement-gcd_exists_relational"><code>forall a b. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gcd_exists_relational">Copy proof</button>
        <pre id="proof-gcd_exists_relational"><code>pa prove forall a b. exists d. (((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w)
use le_refl
use gcd_exists_up_to
intro a
intro b
specialize gcd_exists_up_to b
specialize gcd_exists_up_to b
have hbb : exists t. t + b = b
apply le_refl
have hall : forall z. exists d. (((exists x. z = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. z = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w)
apply gcd_exists_up_to
exact hbb
specialize hall a
exact hall
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,268</dd></div>
        <div><dt>Distinct objects</dt><dd>833</dd></div>
        <div><dt>Reused references</dt><dd>48</dd></div>
        <div><dt>Depth</dt><dd>46</dd></div>
        <div><dt>Cuts</dt><dd>38</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ee2e36ed07e48a1abae210c372bd263e4639ab2421421e93795b000861d9cf08">ee2e36ed07e4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gcd_exists_relational">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gcd_exists_relational</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2604">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gcd_exists_relational.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_symm"
  data-name="coprime_symm" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="coprime_symm coprimality is symmetric coprimality in its expanded common-divisor form is symmetric. forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; forall c. (exists u. b = c * u) -&gt; (exists v. a = c * v) -&gt; c = 1 gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_symm</code><span>Coprimality is symmetric</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Coprimality in its expanded common-divisor form is symmetric.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_mul_right" href="#theorem-coprime_mul_right"><code>coprime_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_mod_cancel" href="#theorem-prime_mod_cancel"><code>prime_mod_cancel</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_symm">Copy statement</button>
        <pre id="statement-coprime_symm"><code>forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; forall c. (exists u. b = c * u) -&gt; (exists v. a = c * v) -&gt; c = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_symm">Copy proof</button>
        <pre id="proof-coprime_symm"><code>pa prove forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; forall c. (exists u. b = c * u) -&gt; (exists v. a = c * v) -&gt; c = 1
intro a
intro b
intro h
intro c
intro hb
intro ha
specialize h c
apply h
exact ha
exact hb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>15</dd></div>
        <div><dt>Distinct objects</dt><dd>15</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3f127d01f8343b8c3950089898a4abc7794db0dccd7555bdc5f986693fb013af">3f127d01f834…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_symm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_symm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2623">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_symm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_one_right"
  data-name="coprime_one_right" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="divisor_one"
  data-search="coprime_one_right every natural number is coprime to one every natural is coprime to one in the expanded common-divisor relation. forall a d. (exists x. a = d * x) -&gt; (exists y. 1 = d * y) -&gt; d = 1 gcd_coprime divisor_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_one_right</code><span>Every natural number is coprime to one</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural is coprime to one in the expanded common-divisor relation.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_one_right">Copy statement</button>
        <pre id="statement-coprime_one_right"><code>forall a d. (exists x. a = d * x) -&gt; (exists y. 1 = d * y) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_one_right">Copy proof</button>
        <pre id="proof-coprime_one_right"><code>pa prove forall a d. (exists x. a = d * x) -&gt; (exists y. 1 = d * y) -&gt; d = 1
use divisor_one
intro a
intro d
intro ha
intro h1
specialize divisor_one d
apply divisor_one
exact h1
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>200</dd></div>
        <div><dt>Distinct objects</dt><dd>188</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="904cdc493146e95b4c52f6e3a8c7d5d1a5d769b035272c772d601dce85c5fe6b">904cdc493146…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_one_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_one_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2641">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_one_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_one_left"
  data-name="coprime_one_left" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="divisor_one"
  data-search="coprime_one_left one is coprime to every natural number one is coprime to every natural in the expanded common-divisor relation. forall a d. (exists x. 1 = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1 gcd_coprime divisor_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_one_left</code><span>One is coprime to every natural number</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">One is coprime to every natural in the expanded common-divisor relation.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_exclusive_recode_invariant" href="#theorem-bounded_beta_exclusive_recode_invariant"><code>bounded_beta_exclusive_recode_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_one_left">Copy statement</button>
        <pre id="statement-coprime_one_left"><code>forall a d. (exists x. 1 = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_one_left">Copy proof</button>
        <pre id="proof-coprime_one_left"><code>pa prove forall a d. (exists x. 1 = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1
use divisor_one
intro a
intro d
intro h1
intro ha
specialize divisor_one d
apply divisor_one
exact h1
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>200</dd></div>
        <div><dt>Distinct objects</dt><dd>188</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6bb2edf69b5ebd7fdb6c9a787af7f69a0dc1f9ddcd73c603cd88c10c760c2d80">6bb2edf69b5e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_one_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_one_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2656">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_one_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_to_is_gcd_one"
  data-name="coprime_to_is_gcd_one" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="one_multiple,one_mul,mul_one"
  data-search="coprime_to_is_gcd_one coprimality constructs a relational gcd equal to one expanded coprimality constructs the relational gcd witness one. forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. 1 = c * w) gcd_coprime one_multiple one_mul mul_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_to_is_gcd_one</code><span>Coprimality constructs a relational gcd equal to one</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Expanded coprimality constructs the relational gcd witness one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="one_multiple" href="#theorem-one_multiple"><code>one_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_to_is_gcd_one">Copy statement</button>
        <pre id="statement-coprime_to_is_gcd_one"><code>forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. 1 = c * w)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_to_is_gcd_one">Copy proof</button>
        <pre id="proof-coprime_to_is_gcd_one"><code>pa prove forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. 1 = c * w)
use one_multiple
use one_mul
use mul_one
intro a
intro b
intro h
split
split
specialize one_multiple a
exact one_multiple
exists b
symm
apply one_mul
intro c
intro ha
intro hb
specialize h c
have hc : c = 1
apply h
exact ha
exact hb
exists 1
rewrite hc
symm
apply mul_one
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>120</dd></div>
        <div><dt>Distinct objects</dt><dd>90</dd></div>
        <div><dt>Reused references</dt><dd>5</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="530efb1368fb616cf8b16e9ea07c0d44cfe072e2edc6d838829d3920bd41ac1f">530efb1368fb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_to_is_gcd_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_to_is_gcd_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2671">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_to_is_gcd_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_one_to_coprime"
  data-name="is_gcd_one_to_coprime" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="divisor_one"
  data-search="is_gcd_one_to_coprime a relational gcd equal to one implies coprimality a relational gcd witness one implies expanded coprimality. forall a b. (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; exists w. 1 = d * w) -&gt; forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; c = 1 gcd_coprime divisor_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_one_to_coprime</code><span>A relational gcd equal to one implies coprimality</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational gcd witness one implies expanded coprimality.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="euclid_prime_dvd_product" href="#theorem-euclid_prime_dvd_product"><code>euclid_prime_dvd_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_coprime_or_divides" href="#theorem-prime_coprime_or_divides"><code>prime_coprime_or_divides</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_one_to_coprime">Copy statement</button>
        <pre id="statement-is_gcd_one_to_coprime"><code>forall a b. (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; exists w. 1 = d * w) -&gt; forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; c = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_one_to_coprime">Copy proof</button>
        <pre id="proof-is_gcd_one_to_coprime"><code>pa prove forall a b. (((exists x. a = 1 * x) /\ (exists y. b = 1 * y)) /\ forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; exists w. 1 = d * w) -&gt; forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; c = 1
use divisor_one
intro a
intro b
intro hg
intro c
intro ha
intro hb
cases hg
specialize hg_right c
have hd : exists w. 1 = c * w
apply hg_right
exact ha
exact hb
specialize divisor_one c
apply divisor_one
exact hd
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>205</dd></div>
        <div><dt>Distinct objects</dt><dd>193</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5f7782d1cc3c24525dbadb53187bedf2d0ef087af513c35e4beee74720e8159e">5f7782d1cc3c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_one_to_coprime">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_one_to_coprime</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2701">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_one_to_coprime.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_permute_outer"
  data-name="add_permute_outer" data-domain="addition"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_comm"
  data-search="add_permute_outer the outer terms of two additive pairs may be permuted permute the outer entries of two additive pairs. forall a b c d. (a + b) + (c + d) = (c + b) + (a + d) addition add_assoc add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_permute_outer</code><span>The outer terms of two additive pairs may be permuted</span></span>
      <span class="pa-badge pa-domain-addition">Addition</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Permute the outer entries of two additive pairs.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="balanced_bezout_euclid_step" href="#theorem-balanced_bezout_euclid_step"><code>balanced_bezout_euclid_step</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_add" href="#theorem-mod_eq_add"><code>mod_eq_add</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_permute_outer">Copy statement</button>
        <pre id="statement-add_permute_outer"><code>forall a b c d. (a + b) + (c + d) = (c + b) + (a + d)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_permute_outer">Copy proof</button>
        <pre id="proof-add_permute_outer"><code>pa prove forall a b c d. (a + b) + (c + d) = (c + b) + (a + d)
use add_assoc
use add_comm
intro a
intro b
intro c
intro d
trans a + (b + (c + d))
apply add_assoc
trans a + ((b + c) + d)
congr
refl
symm
apply add_assoc
trans a + ((c + b) + d)
congr
refl
congr
apply add_comm
refl
trans (a + (c + b)) + d
symm
apply add_assoc
trans ((c + b) + a) + d
congr
apply add_comm
refl
apply add_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>149</dd></div>
        <div><dt>Distinct objects</dt><dd>138</dd></div>
        <div><dt>Reused references</dt><dd>11</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="897b1a1c5b727b8ea340d39bcfcc9ebad1df3132cf15cb2e95a286c2b784671c">897b1a1c5b72…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_permute_outer">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_permute_outer</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2727">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_permute_outer.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-balanced_bezout_euclid_step"
  data-name="balanced_bezout_euclid_step" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_comm,mul_add,mul_assoc,add_mul,add_permute_outer"
  data-search="balanced_bezout_euclid_step balanced bézout coefficients cross one euclidean step transport balanced natural bezout coefficients across one euclidean division step. forall a b q r d xp yp xn yn. a = b * q + r -&gt; b * xp + r * yp = d + (b * xn + r * yn) -&gt; a * yp + b * (xp + q * yn) = d + (a * yn + b * (xn + q * yp)) gcd_coprime add_assoc add_comm mul_add mul_assoc add_mul add_permute_outer">
  <details>
    <summary>
      <span class="pa-card-title"><code>balanced_bezout_euclid_step</code><span>Balanced Bézout coefficients cross one Euclidean step</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Transport balanced natural Bezout coefficients across one Euclidean division step.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="add_permute_outer" href="#theorem-add_permute_outer"><code>add_permute_outer</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-balanced_bezout_euclid_step">Copy statement</button>
        <pre id="statement-balanced_bezout_euclid_step"><code>forall a b q r d xp yp xn yn. a = b * q + r -&gt; b * xp + r * yp = d + (b * xn + r * yn) -&gt; a * yp + b * (xp + q * yn) = d + (a * yn + b * (xn + q * yp))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-balanced_bezout_euclid_step">Copy proof</button>
        <pre id="proof-balanced_bezout_euclid_step"><code>pa prove forall a b q r d xp yp xn yn. a = b * q + r -&gt; b * xp + r * yp = d + (b * xn + r * yn) -&gt; a * yp + b * (xp + q * yn) = d + (a * yn + b * (xn + q * yp))
use add_assoc
use add_comm
use mul_add
use mul_assoc
use add_mul
use add_permute_outer
intro a
intro b
intro q
intro r
intro d
intro xp
intro yp
intro xn
intro yn
intro hab
intro hbez
rewrite hab
trans ((b * q) * yp + r * yp) + b * (xp + q * yn)
congr
apply add_mul
refl
trans ((b * q) * yp + r * yp) + (b * xp + b * (q * yn))
congr
refl
apply mul_add
trans ((b * q) * yp + r * yp) + (b * xp + (b * q) * yn)
congr
refl
congr
refl
symm
apply mul_assoc
trans (b * xp + r * yp) + ((b * q) * yp + (b * q) * yn)
apply add_permute_outer
trans (b * xp + r * yp) + ((b * q) * yn + (b * q) * yp)
congr
refl
apply add_comm
trans (d + (b * xn + r * yn)) + ((b * q) * yn + (b * q) * yp)
congr
exact hbez
refl
trans d + ((b * xn + r * yn) + ((b * q) * yn + (b * q) * yp))
apply add_assoc
trans d + (((b * q) * yn + r * yn) + (b * xn + (b * q) * yp))
congr
refl
apply add_permute_outer
trans d + ((b * q + r) * yn + (b * xn + (b * q) * yp))
congr
refl
congr
symm
apply add_mul
refl
trans d + ((b * q + r) * yn + (b * xn + b * (q * yp)))
congr
refl
congr
refl
congr
refl
apply mul_assoc
congr
refl
congr
congr
symm
exact hab
refl
symm
apply mul_add
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>880</dd></div>
        <div><dt>Distinct objects</dt><dd>446</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>35</dd></div>
        <div><dt>Cuts</dt><dd>24</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="feae8ba0dfcb242f2442b7201e5d45c248b898844374ca77b38a15b05cd0026a">feae8ba0dfcb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for balanced_bezout_euclid_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib balanced_bezout_euclid_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2760">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/balanced_bezout_euclid_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gcd_balanced_bezout_exists_up_to"
  data-name="gcd_balanced_bezout_exists_up_to" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="zero_add,le_zero,le_eq_or_lt,le_of_succ_le_succ,division_remainder_exists,is_gcd_zero_right,is_gcd_euclid_forward,balanced_bezout_euclid_step"
  data-search="gcd_balanced_bezout_exists_up_to a gcd with balanced bézout witnesses exists below a bound bounded euclidean descent simultaneously constructs a relational gcd and balanced natural bezout witnesses. forall b b. (exists t. t + b = b) -&gt; forall a. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn)) gcd_coprime zero_add le_zero le_eq_or_lt le_of_succ_le_succ division_remainder_exists is_gcd_zero_right is_gcd_euclid_forward balanced_bezout_euclid_step">
  <details>
    <summary>
      <span class="pa-card-title"><code>gcd_balanced_bezout_exists_up_to</code><span>A gcd with balanced Bézout witnesses exists below a bound</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Bounded Euclidean descent simultaneously constructs a relational gcd and balanced natural Bezout witnesses.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_zero_right" href="#theorem-is_gcd_zero_right"><code>is_gcd_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_euclid_forward" href="#theorem-is_gcd_euclid_forward"><code>is_gcd_euclid_forward</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_euclid_step" href="#theorem-balanced_bezout_euclid_step"><code>balanced_bezout_euclid_step</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists" href="#theorem-gcd_balanced_bezout_exists"><code>gcd_balanced_bezout_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gcd_balanced_bezout_exists_up_to">Copy statement</button>
        <pre id="statement-gcd_balanced_bezout_exists_up_to"><code>forall B b. (exists t. t + b = B) -&gt; forall a. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gcd_balanced_bezout_exists_up_to">Copy proof</button>
        <pre id="proof-gcd_balanced_bezout_exists_up_to"><code>pa prove forall B b. (exists t. t + b = B) -&gt; forall a. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))
use zero_add
use le_zero
use le_eq_or_lt
use le_of_succ_le_succ
use division_remainder_exists
use is_gcd_zero_right
use is_gcd_euclid_forward
use balanced_bezout_euclid_step
intro B
induction B
intro b
intro hb
intro a
have hb0 : b = 0
apply le_zero
exact hb
exists a
split
rewrite hb0
rewrite hb0
specialize is_gcd_zero_right a
exact is_gcd_zero_right
exists 1
exists 0
exists 0
exists 0
rewrite hb0
simp [zero_add]
intro b
intro hb
intro a
specialize le_eq_or_lt b
specialize le_eq_or_lt (S B)
have hsplit : b = S B \/ exists k. k + S b = S B
apply le_eq_or_lt
exact hb
cases hsplit
have hb0 : ~(b = 0)
intro hzero
apply PA1
trans b
symm
exact hsplit_left
exact hzero
have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b
apply division_remainder_exists
exact hb0
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
have hrB : exists k. k + x1 = B
apply le_of_succ_le_succ
rewrite hsplit_left at hdiv_witness_witness_right
exact hdiv_witness_witness_right
have hsmall : exists d. ((((exists u. b = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. b = c * s) -&gt; (exists t. x1 = c * t) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. b * xp + x1 * yp = d + (b * xn + x1 * yn))
specialize IH x1
have hall : forall z. exists d. ((((exists u. z = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. z = c * s) -&gt; (exists t. x1 = c * t) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. z * xp + x1 * yp = d + (z * xn + x1 * yn))
apply IH
exact hrB
specialize hall b
exact hall
cases hsmall
cases hsmall_witness
cases hsmall_witness_right
cases hsmall_witness_right_witness
cases hsmall_witness_right_witness_witness
cases hsmall_witness_right_witness_witness_witness
exists x2
split
apply is_gcd_euclid_forward
exact hdiv_witness_witness_left
exact hsmall_witness_left
exists x4
exists x3 + x * x6
exists x6
exists x5 + x * x4
apply balanced_bezout_euclid_step
exact hdiv_witness_witness_left
exact hsmall_witness_right_witness_witness_witness_witness
have hbB : exists k. k + b = B
apply le_of_succ_le_succ
exact hsplit_right
specialize IH b
have hall : forall z. exists d. ((((exists u. z = d * u) /\ (exists v. b = d * v)) /\ forall c. (exists s. z = c * s) -&gt; (exists t. b = c * t) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. z * xp + b * yp = d + (z * xn + b * yn))
apply IH
exact hbB
specialize hall a
exact hall
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,233</dd></div>
        <div><dt>Distinct objects</dt><dd>1,187</dd></div>
        <div><dt>Reused references</dt><dd>80</dd></div>
        <div><dt>Depth</dt><dd>45</dd></div>
        <div><dt>Cuts</dt><dd>63</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2e611f8aee45ae3a9d970163212fecf60aa3f5ea6c2e2cc4f9de81bc661703f5">2e611f8aee45…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gcd_balanced_bezout_exists_up_to">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gcd_balanced_bezout_exists_up_to</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2842">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gcd_balanced_bezout_exists_up_to.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gcd_balanced_bezout_exists"
  data-name="gcd_balanced_bezout_exists" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="le_refl,gcd_balanced_bezout_exists_up_to"
  data-search="gcd_balanced_bezout_exists a gcd has balanced natural bézout coefficients every pair has a relational gcd together with balanced natural bezout witnesses. forall a b. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn)) gcd_coprime le_refl gcd_balanced_bezout_exists_up_to">
  <details>
    <summary>
      <span class="pa-card-title"><code>gcd_balanced_bezout_exists</code><span>A gcd has balanced natural Bézout coefficients</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every pair has a relational gcd together with balanced natural Bezout witnesses.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists_up_to" href="#theorem-gcd_balanced_bezout_exists_up_to"><code>gcd_balanced_bezout_exists_up_to</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_balanced_bezout" href="#theorem-coprime_balanced_bezout"><code>coprime_balanced_bezout</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gcd_balanced_bezout_exists">Copy statement</button>
        <pre id="statement-gcd_balanced_bezout_exists"><code>forall a b. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gcd_balanced_bezout_exists">Copy proof</button>
        <pre id="proof-gcd_balanced_bezout_exists"><code>pa prove forall a b. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))
use le_refl
use gcd_balanced_bezout_exists_up_to
intro a
intro b
specialize gcd_balanced_bezout_exists_up_to b
specialize gcd_balanced_bezout_exists_up_to b
have hbb : exists t. t + b = b
apply le_refl
have hall : forall z. exists d. ((((exists x. z = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. z = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. z * xp + b * yp = d + (z * xn + b * yn))
apply gcd_balanced_bezout_exists_up_to
exact hbb
specialize hall a
exact hall
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,269</dd></div>
        <div><dt>Distinct objects</dt><dd>1,206</dd></div>
        <div><dt>Reused references</dt><dd>81</dd></div>
        <div><dt>Depth</dt><dd>47</dd></div>
        <div><dt>Cuts</dt><dd>66</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0c34da8ea071e4db38ddf96626687c588d09b1a3639878f914c0d2c71f321e6c">0c34da8ea071…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gcd_balanced_bezout_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gcd_balanced_bezout_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2939">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gcd_balanced_bezout_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-balanced_combination_scale_right"
  data-name="balanced_combination_scale_right" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="mul_assoc,mul_comm,add_mul"
  data-search="balanced_combination_scale_right a balanced combination may be scaled on the right scale a balanced natural combination on the right. forall a b d xp yp xn yn z. a * xp + b * yp = d + (a * xn + b * yn) -&gt; a * (xp * z) + (b * z) * yp = d * z + (a * (xn * z) + (b * z) * yn) gcd_coprime mul_assoc mul_comm add_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>balanced_combination_scale_right</code><span>A balanced combination may be scaled on the right</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Scale a balanced natural combination on the right.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-balanced_combination_scale_right">Copy statement</button>
        <pre id="statement-balanced_combination_scale_right"><code>forall a b d xp yp xn yn z. a * xp + b * yp = d + (a * xn + b * yn) -&gt; a * (xp * z) + (b * z) * yp = d * z + (a * (xn * z) + (b * z) * yn)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-balanced_combination_scale_right">Copy proof</button>
        <pre id="proof-balanced_combination_scale_right"><code>pa prove forall a b d xp yp xn yn z. a * xp + b * yp = d + (a * xn + b * yn) -&gt; a * (xp * z) + (b * z) * yp = d * z + (a * (xn * z) + (b * z) * yn)
use mul_assoc
use mul_comm
use add_mul
intro a
intro b
intro d
intro xp
intro yp
intro xn
intro yn
intro z
intro h
trans (a * xp) * z + (b * z) * yp
congr
symm
apply mul_assoc
refl
trans (a * xp) * z + (b * yp) * z
congr
refl
trans b * (z * yp)
apply mul_assoc
trans b * (yp * z)
congr
refl
apply mul_comm
symm
apply mul_assoc
trans (a * xp + b * yp) * z
symm
apply add_mul
trans (d + (a * xn + b * yn)) * z
congr
exact h
refl
trans d * z + (a * xn + b * yn) * z
apply add_mul
trans d * z + ((a * xn) * z + (b * yn) * z)
congr
refl
apply add_mul
trans d * z + (a * (xn * z) + (b * yn) * z)
congr
refl
congr
apply mul_assoc
refl
congr
refl
congr
refl
trans b * (yn * z)
apply mul_assoc
trans b * (z * yn)
congr
refl
apply mul_comm
symm
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>754</dd></div>
        <div><dt>Distinct objects</dt><dd>387</dd></div>
        <div><dt>Reused references</dt><dd>38</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>20</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="dfb696fa22b514d253db7605418c48cdf678147d99df1a41a746298797f4ff89">dfb696fa22b5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for balanced_combination_scale_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib balanced_combination_scale_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L2958">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/balanced_combination_scale_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-common_divisor_divides_balanced_result"
  data-name="common_divisor_divides_balanced_result" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="mul_assoc,mul_add,add_comm,factor_difference"
  data-search="common_divisor_divides_balanced_result a common divisor divides a balanced-combination result every common divisor of two inputs divides the result of a balanced natural combination. forall c a b d xp yp xn yn. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; a * xp + b * yp = d + (a * xn + b * yn) -&gt; exists w. d = c * w gcd_coprime mul_assoc mul_add add_comm factor_difference">
  <details>
    <summary>
      <span class="pa-card-title"><code>common_divisor_divides_balanced_result</code><span>A common divisor divides a balanced-combination result</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every common divisor of two inputs divides the result of a balanced natural combination.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_inverse_implies_coprime" href="#theorem-mod_inverse_implies_coprime"><code>mod_inverse_implies_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_one_implies_coprime" href="#theorem-balanced_bezout_one_implies_coprime"><code>balanced_bezout_one_implies_coprime</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-common_divisor_divides_balanced_result">Copy statement</button>
        <pre id="statement-common_divisor_divides_balanced_result"><code>forall c a b d xp yp xn yn. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; a * xp + b * yp = d + (a * xn + b * yn) -&gt; exists w. d = c * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-common_divisor_divides_balanced_result">Copy proof</button>
        <pre id="proof-common_divisor_divides_balanced_result"><code>pa prove forall c a b d xp yp xn yn. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; a * xp + b * yp = d + (a * xn + b * yn) -&gt; exists w. d = c * w
use mul_assoc
use mul_add
use add_comm
use factor_difference
intro c
intro a
intro b
intro d
intro xp
intro yp
intro xn
intro yn
intro ha
intro hb
intro h
cases ha
cases hb
specialize factor_difference c
specialize factor_difference (x * xp + x1 * yp)
specialize factor_difference (x * xn + x1 * yn)
specialize factor_difference d
apply factor_difference
trans c * (x * xp) + c * (x1 * yp)
apply mul_add
trans (c * x) * xp + (c * x1) * yp
congr
symm
apply mul_assoc
symm
apply mul_assoc
trans a * xp + b * yp
rewrite ha_witness
rewrite hb_witness
refl
trans d + (a * xn + b * yn)
exact h
trans (a * xn + b * yn) + d
apply add_comm
trans ((c * x) * xn + (c * x1) * yn) + d
rewrite ha_witness
rewrite hb_witness
refl
trans (c * (x * xn) + c * (x1 * yn)) + d
congr
congr
apply mul_assoc
apply mul_assoc
refl
congr
symm
apply mul_add
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>626</dd></div>
        <div><dt>Distinct objects</dt><dd>406</dd></div>
        <div><dt>Reused references</dt><dd>24</dd></div>
        <div><dt>Depth</dt><dd>39</dd></div>
        <div><dt>Cuts</dt><dd>16</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b8a6860c94698f1c9f4f6156f304c3b28ea52a79afc77b2691026da2ad368d0b">b8a6860c9469…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for common_divisor_divides_balanced_result">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib common_divisor_divides_balanced_result</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3022">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/common_divisor_divides_balanced_result.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_balanced_bezout"
  data-name="coprime_balanced_bezout" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="gcd_balanced_bezout_exists"
  data-search="coprime_balanced_bezout coprime inputs have a balanced bézout identity coprime inputs admit balanced natural bezout coefficients with result one. forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; exists xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn) gcd_coprime gcd_balanced_bezout_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_balanced_bezout</code><span>Coprime inputs have a balanced Bézout identity</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Coprime inputs admit balanced natural Bezout coefficients with result one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists" href="#theorem-gcd_balanced_bezout_exists"><code>gcd_balanced_bezout_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_balanced_mod_inverse" href="#theorem-coprime_balanced_mod_inverse"><code>coprime_balanced_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_balanced_bezout">Copy statement</button>
        <pre id="statement-coprime_balanced_bezout"><code>forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; exists xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_balanced_bezout">Copy proof</button>
        <pre id="proof-coprime_balanced_bezout"><code>pa prove forall a b. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; exists xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn)
use gcd_balanced_bezout_exists
intro a
intro b
intro hcop
have hgb : exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))
apply gcd_balanced_bezout_exists
cases hgb
cases hgb_witness
cases hgb_witness_left
cases hgb_witness_left_left
have hd : x = 1
specialize hcop x
apply hcop
exact hgb_witness_left_left_left
exact hgb_witness_left_left_right
cases hgb_witness_right
cases hgb_witness_right_witness
cases hgb_witness_right_witness_witness
cases hgb_witness_right_witness_witness_witness
exists x1
exists x2
exists x3
exists x4
rewrite hd at hgb_witness_right_witness_witness_witness_witness
exact hgb_witness_right_witness_witness_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,304</dd></div>
        <div><dt>Distinct objects</dt><dd>1,241</dd></div>
        <div><dt>Reused references</dt><dd>81</dd></div>
        <div><dt>Depth</dt><dd>48</dd></div>
        <div><dt>Cuts</dt><dd>67</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="342339e0e63d551124a62c6bbacd70559da6eff0492af8f6405a6c77a5fbcc27">342339e0e63d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_balanced_bezout">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_balanced_bezout</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3078">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_balanced_bezout.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gauss_coprime_cancel"
  data-name="gauss_coprime_cancel" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_refl,one_mul,coprime_balanced_bezout,balanced_combination_scale_right,common_divisor_divides_balanced_result"
  data-search="gauss_coprime_cancel gauss cancellation for coprime factors cancel a coprime factor from a divisibility witness (gauss cancellation). forall a b z. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; (exists q. b * z = a * q) -&gt; exists w. z = a * w gcd_coprime multiple_refl one_mul coprime_balanced_bezout balanced_combination_scale_right common_divisor_divides_balanced_result">
  <details>
    <summary>
      <span class="pa-card-title"><code>gauss_coprime_cancel</code><span>Gauss cancellation for coprime factors</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Cancel a coprime factor from a divisibility witness (Gauss cancellation).</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_balanced_bezout" href="#theorem-coprime_balanced_bezout"><code>coprime_balanced_bezout</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_combination_scale_right" href="#theorem-balanced_combination_scale_right"><code>balanced_combination_scale_right</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_divides_balanced_result" href="#theorem-common_divisor_divides_balanced_result"><code>common_divisor_divides_balanced_result</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="euclid_prime_dvd_product" href="#theorem-euclid_prime_dvd_product"><code>euclid_prime_dvd_product</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mul_left" href="#theorem-coprime_mul_left"><code>coprime_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_product_is_lcm" href="#theorem-coprime_product_is_lcm"><code>coprime_product_is_lcm</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gauss_coprime_cancel">Copy statement</button>
        <pre id="statement-gauss_coprime_cancel"><code>forall a b z. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; (exists q. b * z = a * q) -&gt; exists w. z = a * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gauss_coprime_cancel">Copy proof</button>
        <pre id="proof-gauss_coprime_cancel"><code>pa prove forall a b z. (forall d. (exists x. a = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; (exists q. b * z = a * q) -&gt; exists w. z = a * w
use multiple_refl
use one_mul
use coprime_balanced_bezout
use balanced_combination_scale_right
use common_divisor_divides_balanced_result
intro a
intro b
intro z
intro hcop
intro hdiv
have hbez : exists xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn)
apply coprime_balanced_bezout
exact hcop
cases hbez
cases hbez_witness
cases hbez_witness_witness
cases hbez_witness_witness_witness
have hscaled : a * (x * z) + (b * z) * x1 = 1 * z + (a * (x2 * z) + (b * z) * x3)
apply balanced_combination_scale_right
exact hbez_witness_witness_witness_witness
specialize one_mul z
rewrite one_mul at hscaled
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result (b * z)
specialize common_divisor_divides_balanced_result z
specialize common_divisor_divides_balanced_result (x * z)
specialize common_divisor_divides_balanced_result x1
specialize common_divisor_divides_balanced_result (x2 * z)
specialize common_divisor_divides_balanced_result x3
apply common_divisor_divides_balanced_result
specialize multiple_refl a
exact multiple_refl
exact hdiv
exact hscaled
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,800</dd></div>
        <div><dt>Distinct objects</dt><dd>1,499</dd></div>
        <div><dt>Reused references</dt><dd>93</dd></div>
        <div><dt>Depth</dt><dd>51</dd></div>
        <div><dt>Cuts</dt><dd>110</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="763e42141ac25ecef8fe28a3284c93af105ef2015bbfaa2067d90aeac22335db">763e42141ac2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gauss_coprime_cancel">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gauss_coprime_cancel</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3110">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gauss_coprime_cancel.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-eq_decidable"
  data-name="eq_decidable" data-domain="equality"
  data-status="checked_m20"
  data-dependencies=""
  data-search="eq_decidable equality of naturals is decidable equality of natural numbers is constructively decidable. forall a b. a = b \/ ~(a = b) equality">
  <details>
    <summary>
      <span class="pa-card-title"><code>eq_decidable</code><span>Equality of naturals is decidable</span></span>
      <span class="pa-badge pa-domain-equality">Equality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Equality of natural numbers is constructively decidable.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_decidable_nonzero" href="#theorem-multiple_decidable_nonzero"><code>multiple_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_decidable" href="#theorem-multiple_decidable"><code>multiple_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_decidable" href="#theorem-prime_decidable"><code>prime_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_from_remainders" href="#theorem-mod_eq_decidable_from_remainders"><code>mod_eq_decidable_from_remainders</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_reflect" href="#theorem-beta_prefix_swap_last_reflect"><code>beta_prefix_swap_last_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_bounded" href="#theorem-finite_swap_last_bounded"><code>finite_swap_last_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_reflect" href="#theorem-beta_prefix_replace_reflect"><code>beta_prefix_replace_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient" href="#theorem-generalized_binary_crt_sufficient"><code>generalized_binary_crt_sufficient</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_canonical_boundary" href="#theorem-generalized_binary_crt_canonical_boundary"><code>generalized_binary_crt_canonical_boundary</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable" href="#theorem-mod_eq_decidable"><code>mod_eq_decidable</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-eq_decidable">Copy statement</button>
        <pre id="statement-eq_decidable"><code>forall a b. a = b \/ ~(a = b)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-eq_decidable">Copy proof</button>
        <pre id="proof-eq_decidable"><code>pa prove forall a b. a = b \/ ~(a = b)
intro a
induction a
intro b
induction b
left
refl
right
intro h
apply PA1
symm
exact h
intro b
induction b
right
intro h
apply PA1
exact h
specialize IH b
cases IH
left
congr
exact IH_left
right
intro h
apply IH_right
apply PA2
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>48</dd></div>
        <div><dt>Distinct objects</dt><dd>48</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d89ef3447e28a28ab792d7fa21faea761036166dcb1ca11b60321e1edde00df3">d89ef3447e28…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for eq_decidable">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib eq_decidable</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3154">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/eq_decidable.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_decidable_nonzero"
  data-name="multiple_decidable_nonzero" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="eq_decidable,division_remainder_exists,multiple_has_zero_remainder,division_remainder_unique"
  data-search="multiple_decidable_nonzero divisibility by a nonzero natural is decidable divisibility by a nonzero natural is constructively decidable. forall d n. ~(d = 0) -&gt; (exists q. n = d * q) \/ ~(exists q. n = d * q) divisibility eq_decidable division_remainder_exists multiple_has_zero_remainder division_remainder_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_decidable_nonzero</code><span>Divisibility by a nonzero natural is decidable</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Divisibility by a nonzero natural is constructively decidable.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_has_zero_remainder" href="#theorem-multiple_has_zero_remainder"><code>multiple_has_zero_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_decidable" href="#theorem-multiple_decidable"><code>multiple_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_decidable_nonzero">Copy statement</button>
        <pre id="statement-multiple_decidable_nonzero"><code>forall d n. ~(d = 0) -&gt; (exists q. n = d * q) \/ ~(exists q. n = d * q)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_decidable_nonzero">Copy proof</button>
        <pre id="proof-multiple_decidable_nonzero"><code>pa prove forall d n. ~(d = 0) -&gt; (exists q. n = d * q) \/ ~(exists q. n = d * q)
use eq_decidable
use division_remainder_exists
use multiple_has_zero_remainder
use division_remainder_unique
intro d
intro n
intro hd
have hdiv : exists q r. n = d * q + r /\ S r &lt;= d
apply division_remainder_exists
exact hd
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
specialize eq_decidable x1
specialize eq_decidable 0
have hr : x1 = 0 \/ ~(x1 = 0)
apply eq_decidable
cases hr
left
exists x
rewrite hr_left at hdiv_witness_witness_left
rewrite PA3 at hdiv_witness_witness_left
exact hdiv_witness_witness_left
right
intro hmul
have hzero : exists q r. ((n = d * q + r /\ r = 0) /\ S r &lt;= d)
apply multiple_has_zero_remainder
exact hd
exact hmul
cases hzero
cases hzero_witness
cases hzero_witness_witness
cases hzero_witness_witness_left
have huniq : x = x2 /\ x1 = x3
apply division_remainder_unique
exact hdiv_witness_witness_left
exact hdiv_witness_witness_right
exact hzero_witness_witness_left_left
exact hzero_witness_witness_right
cases huniq
apply hr_right
trans x3
exact huniq_right
exact hzero_witness_witness_left_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,242</dd></div>
        <div><dt>Distinct objects</dt><dd>848</dd></div>
        <div><dt>Reused references</dt><dd>43</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>32</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e472d09fa3657d1d6bd8e2976a074c32a9957cd876a8864a9e6a74dbb76793cf">e472d09fa365…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_decidable_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_decidable_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3189">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_decidable_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-multiple_decidable"
  data-name="multiple_decidable" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_zero_left,eq_decidable,multiple_decidable_nonzero"
  data-search="multiple_decidable divisibility of naturals is decidable divisibility of natural numbers is constructively decidable, including the zero divisor case. forall d n. (exists q. n = d * q) \/ ~(exists q. n = d * q) divisibility mul_zero_left eq_decidable multiple_decidable_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>multiple_decidable</code><span>Divisibility of naturals is decidable</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Divisibility of natural numbers is constructively decidable, including the zero divisor case.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_decidable_nonzero" href="#theorem-multiple_decidable_nonzero"><code>multiple_decidable_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divides_decidable" href="#theorem-prime_divides_decidable"><code>prime_divides_decidable</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-multiple_decidable">Copy statement</button>
        <pre id="statement-multiple_decidable"><code>forall d n. (exists q. n = d * q) \/ ~(exists q. n = d * q)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-multiple_decidable">Copy proof</button>
        <pre id="proof-multiple_decidable"><code>pa prove forall d n. (exists q. n = d * q) \/ ~(exists q. n = d * q)
use mul_zero_left
use eq_decidable
use multiple_decidable_nonzero
intro d
intro n
specialize eq_decidable d
specialize eq_decidable 0
have hd : d = 0 \/ ~(d = 0)
apply eq_decidable
cases hd
specialize eq_decidable_before n
specialize eq_decidable_before 0
have hn : n = 0 \/ ~(n = 0)
apply eq_decidable_before
cases hn
left
exists 0
trans 0
exact hn_left
symm
rewrite hd_left
apply mul_zero_left
right
intro hmultiple
cases hmultiple
apply hn_right
trans d * x
exact hmultiple_witness
rewrite hd_left
apply mul_zero_left
apply multiple_decidable_nonzero
exact hd_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,352</dd></div>
        <div><dt>Distinct objects</dt><dd>907</dd></div>
        <div><dt>Reused references</dt><dd>47</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>35</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="27aa9616c05f0c33fb1fc32b6eb12769a4a3b02fc6e0fa504c99364b7d727513">27aa9616c05f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for multiple_decidable">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib multiple_decidable</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3242">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/multiple_decidable.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factor_property_succ"
  data-name="factor_property_succ" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="le_eq_or_lt,le_of_succ_le_succ"
  data-search="factor_property_succ a bounded factor property extends across one boundary extend a bounded prime factor-pair property by checking the new boundary. forall b n. (forall c d. (exists k. k + c = b) -&gt; n = c * d -&gt; c = 1 \/ d = 1) -&gt; (forall d. n = s b * d -&gt; s b = 1 \/ d = 1) -&gt; forall c d. (exists k. k + c = s b) -&gt; n = c * d -&gt; c = 1 \/ d = 1 primes le_eq_or_lt le_of_succ_le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>factor_property_succ</code><span>A bounded factor property extends across one boundary</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extend a bounded prime factor-pair property by checking the new boundary.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factor_property_succ">Copy statement</button>
        <pre id="statement-factor_property_succ"><code>forall B n. (forall c d. (exists k. k + c = B) -&gt; n = c * d -&gt; c = 1 \/ d = 1) -&gt; (forall d. n = S B * d -&gt; S B = 1 \/ d = 1) -&gt; forall c d. (exists k. k + c = S B) -&gt; n = c * d -&gt; c = 1 \/ d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factor_property_succ">Copy proof</button>
        <pre id="proof-factor_property_succ"><code>pa prove forall B n. (forall c d. (exists k. k + c = B) -&gt; n = c * d -&gt; c = 1 \/ d = 1) -&gt; (forall d. n = S B * d -&gt; S B = 1 \/ d = 1) -&gt; forall c d. (exists k. k + c = S B) -&gt; n = c * d -&gt; c = 1 \/ d = 1
use le_eq_or_lt
use le_of_succ_le_succ
intro B
intro n
intro hprev
intro hboundary
intro c
intro d
intro hc
intro hfac
specialize le_eq_or_lt c
specialize le_eq_or_lt (S B)
have hsplit : c = S B \/ exists k. k + S c = S B
apply le_eq_or_lt
exact hc
cases hsplit
rewrite hsplit_left
specialize hboundary d
apply hboundary
rewrite &lt;- hsplit_left
exact hfac
have hcB : exists k. k + c = B
apply le_of_succ_le_succ
exact hsplit_right
specialize hprev c
specialize hprev d
apply hprev
exact hcB
exact hfac
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>150</dd></div>
        <div><dt>Distinct objects</dt><dd>146</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0d6bbb6b64800fb92e960101070f82d89f533ece9862ccc8bc6003b4efa666a9">0d6bbb6b6480…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factor_property_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factor_property_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3279">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factor_property_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factor_search_up_to"
  data-name="factor_search_up_to" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="mul_zero_left,succ_ne_zero,le_zero,le_refl,le_succ,mul_left_cancel_nonzero,eq_decidable,multiple_decidable_nonzero,factor_property_succ"
  data-search="factor_search_up_to bounded nontrivial factor search constructively decide whether a nonzero natural has a bounded nontrivial factor pair. forall b n. ~(n = 0) -&gt; ((forall c d. (exists k. k + c = b) -&gt; n = c * d -&gt; c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = b) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d)) primes mul_zero_left succ_ne_zero le_zero le_refl le_succ mul_left_cancel_nonzero eq_decidable multiple_decidable_nonzero factor_property_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>factor_search_up_to</code><span>Bounded nontrivial factor search</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Constructively decide whether a nonzero natural has a bounded nontrivial factor pair.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_decidable_nonzero" href="#theorem-multiple_decidable_nonzero"><code>multiple_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_property_succ" href="#theorem-factor_property_succ"><code>factor_property_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_or_composite" href="#theorem-prime_or_composite"><code>prime_or_composite</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factor_search_up_to">Copy statement</button>
        <pre id="statement-factor_search_up_to"><code>forall B n. ~(n = 0) -&gt; ((forall c d. (exists k. k + c = B) -&gt; n = c * d -&gt; c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factor_search_up_to">Copy proof</button>
        <pre id="proof-factor_search_up_to"><code>pa prove forall B n. ~(n = 0) -&gt; ((forall c d. (exists k. k + c = B) -&gt; n = c * d -&gt; c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d))
use mul_zero_left
use succ_ne_zero
use le_zero
use le_refl
use le_succ
use mul_left_cancel_nonzero
use eq_decidable
use multiple_decidable_nonzero
use factor_property_succ
intro B
induction B
intro n
intro hn
left
intro c
intro d
intro hc
intro hfac
have hc0 : c = 0
apply le_zero
exact hc
exfalso
apply hn
trans c * d
exact hfac
rewrite hc0
apply mul_zero_left
intro n
intro hn
specialize IH n
have hprev : (forall c d. (exists k. k + c = B) -&gt; n = c * d -&gt; c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d)
apply IH
exact hn
cases hprev
have hs0 : ~(S B = 0)
specialize succ_ne_zero B
exact succ_ne_zero
specialize multiple_decidable_nonzero (S B)
specialize multiple_decidable_nonzero n
have hdiv : (exists q. n = S B * q) \/ ~(exists q. n = S B * q)
apply multiple_decidable_nonzero
exact hs0
cases hdiv
cases hdiv_left
specialize eq_decidable (S B)
specialize eq_decidable 1
have hc1 : S B = 1 \/ ~(S B = 1)
apply eq_decidable
cases hc1
left
apply factor_property_succ
exact hprev_left
intro d
intro hboundary
left
exact hc1_left
specialize eq_decidable_before x
specialize eq_decidable_before 1
have hq1 : x = 1 \/ ~(x = 1)
apply eq_decidable_before
cases hq1
left
apply factor_property_succ
exact hprev_left
intro d
intro hboundary
right
trans x
apply mul_left_cancel_nonzero
exact hs0
trans n
symm
exact hboundary
exact hdiv_left_witness
exact hq1_left
right
exists S B
exists x
split
split
split
apply le_refl
exact hc1_right
exact hq1_right
exact hdiv_left_witness
left
apply factor_property_succ
exact hprev_left
intro d
intro hboundary
exfalso
apply hdiv_right
exists d
exact hboundary
right
cases hprev_right
cases hprev_right_witness
cases hprev_right_witness_witness
cases hprev_right_witness_witness_left
cases hprev_right_witness_witness_left_left
exists x
exists x1
split
split
split
apply le_succ
exact hprev_right_witness_witness_left_left_left
exact hprev_right_witness_witness_left_left_right
exact hprev_right_witness_witness_left_right
exact hprev_right_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,925</dd></div>
        <div><dt>Distinct objects</dt><dd>1,276</dd></div>
        <div><dt>Reused references</dt><dd>56</dd></div>
        <div><dt>Depth</dt><dd>69</dd></div>
        <div><dt>Cuts</dt><dd>56</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b678af35c4dbb9a63bcbdbf03ddca2f03714b1b37f1d0de364c7025c98b232f1">b678af35c4db…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factor_search_up_to">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factor_search_up_to</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3314">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factor_search_up_to.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_or_composite"
  data-name="prime_or_composite" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="divisor_le_nonzero,factor_search_up_to"
  data-search="prime_or_composite every nontrivial natural is prime or composite every nonzero nonunit natural is constructively prime or has a nontrivial factor pair. forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; ((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d)) primes divisor_le_nonzero factor_search_up_to">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_or_composite</code><span>Every nontrivial natural is prime or composite</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every nonzero nonunit natural is constructively prime or has a nontrivial factor pair.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divisor_le_nonzero" href="#theorem-divisor_le_nonzero"><code>divisor_le_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_search_up_to" href="#theorem-factor_search_up_to"><code>factor_search_up_to</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_decidable" href="#theorem-prime_decidable"><code>prime_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_or_composite">Copy statement</button>
        <pre id="statement-prime_or_composite"><code>forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; ((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_or_composite">Copy proof</button>
        <pre id="proof-prime_or_composite"><code>pa prove forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; ((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d))
use divisor_le_nonzero
use factor_search_up_to
intro n
intro hn0
intro hn1
specialize factor_search_up_to n
specialize factor_search_up_to n
have hsearch : (forall c d. (exists k. k + c = n) -&gt; n = c * d -&gt; c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = n) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d)
apply factor_search_up_to
exact hn0
cases hsearch
left
split
exact hn1
intro c
intro d
intro hfac
specialize hsearch_left c
specialize hsearch_left d
apply hsearch_left
specialize divisor_le_nonzero c
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn0
exists d
exact hfac
exact hfac
right
cases hsearch_right
cases hsearch_right_witness
cases hsearch_right_witness_witness
cases hsearch_right_witness_witness_left
cases hsearch_right_witness_witness_left_left
exists x
exists x1
split
split
exact hsearch_right_witness_witness_left_left_right
exact hsearch_right_witness_witness_left_right
exact hsearch_right_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,038</dd></div>
        <div><dt>Distinct objects</dt><dd>1,385</dd></div>
        <div><dt>Reused references</dt><dd>60</dd></div>
        <div><dt>Depth</dt><dd>71</dd></div>
        <div><dt>Cuts</dt><dd>59</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4f3834b266fc7ff365a0464d94b2fadcff92e87bea40e99d703517f25ecb4111">4f3834b266fc…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_or_composite">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_or_composite</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3433">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_or_composite.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_nonzero"
  data-name="prime_nonzero" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="mul_zero_left,succ_ne_zero"
  data-search="prime_nonzero every prime natural is nonzero every prime natural is nonzero. forall p. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; ~(p = 0) primes mul_zero_left succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_nonzero</code><span>Every prime natural is nonzero</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every prime natural is nonzero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_decidable" href="#theorem-prime_decidable"><code>prime_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a> <a class="pa-theorem-chip" data-theorem-link="two_prime_product_uniqueness" href="#theorem-two_prime_product_uniqueness"><code>two_prime_product_uniqueness</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_mod_inverse" href="#theorem-prime_mod_inverse"><code>prime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_mod_cancel" href="#theorem-prime_mod_cancel"><code>prime_mod_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_is_succ_succ" href="#theorem-prime_is_succ_succ"><code>prime_is_succ_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_nonzero">Copy statement</button>
        <pre id="statement-prime_nonzero"><code>forall p. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; ~(p = 0)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_nonzero">Copy proof</button>
        <pre id="proof-prime_nonzero"><code>pa prove forall p. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; ~(p = 0)
use mul_zero_left
use succ_ne_zero
intro p
intro hp
intro hp0
cases hp
specialize hp_right 0
specialize hp_right 0
have hunit : 0 = 1 \/ 0 = 1
apply hp_right
rewrite hp0
symm
apply mul_zero_left
cases hunit
specialize succ_ne_zero 0
apply succ_ne_zero
symm
exact hunit_left
specialize succ_ne_zero 0
apply succ_ne_zero
symm
exact hunit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>49</dd></div>
        <div><dt>Distinct objects</dt><dd>49</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="28430940e08dfab2565eae42005fa5f7e1b95a3cbf5c389ecbcf09c3d4246a05">28430940e08d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3479">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_decidable"
  data-name="prime_decidable" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="eq_decidable,prime_or_composite,prime_nonzero"
  data-search="prime_decidable primality of naturals is decidable primality of every natural number is constructively decidable. forall n. ((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ ~((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1))) primes eq_decidable prime_or_composite prime_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_decidable</code><span>Primality of naturals is decidable</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Primality of every natural number is constructively decidable.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_or_composite" href="#theorem-prime_or_composite"><code>prime_or_composite</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divides_decidable" href="#theorem-prime_divides_decidable"><code>prime_divides_decidable</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_decidable">Copy statement</button>
        <pre id="statement-prime_decidable"><code>forall n. ((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ ~((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_decidable">Copy proof</button>
        <pre id="proof-prime_decidable"><code>pa prove forall n. ((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ ~((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1)))
use eq_decidable
use prime_or_composite
use prime_nonzero
intro n
specialize eq_decidable n
specialize eq_decidable 0
have hn0 : n = 0 \/ ~(n = 0)
apply eq_decidable
cases hn0
right
intro hp
specialize prime_nonzero n
apply prime_nonzero
exact hp
exact hn0_left
specialize eq_decidable_before n
specialize eq_decidable_before 1
have hn1 : n = 1 \/ ~(n = 1)
apply eq_decidable_before
cases hn1
right
intro hp
cases hp
apply hp_left
exact hn1_left
specialize prime_or_composite n
have hkind : ((~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d))
apply prime_or_composite
exact hn0_right
exact hn1_right
cases hkind
left
exact hkind_left
right
intro hp
cases hp
cases hkind_right
cases hkind_right_witness
cases hkind_right_witness_witness
cases hkind_right_witness_witness_left
specialize hp_right x
specialize hp_right x1
have hunit : x = 1 \/ x1 = 1
apply hp_right
exact hkind_right_witness_witness_right
cases hunit
apply hkind_right_witness_witness_left_left
exact hunit_left
apply hkind_right_witness_witness_left_right
exact hunit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,194</dd></div>
        <div><dt>Distinct objects</dt><dd>1,471</dd></div>
        <div><dt>Reused references</dt><dd>63</dd></div>
        <div><dt>Depth</dt><dd>73</dd></div>
        <div><dt>Cuts</dt><dd>64</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="80a5f7837c8ead5260cb192a038b0773d02a46335b670416d8624dad88c53074">80a5f7837c8e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_decidable">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_decidable</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3507">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_decidable.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factor_nonzero_left"
  data-name="factor_nonzero_left" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_zero_left"
  data-search="factor_nonzero_left a left factor of a nonzero product is nonzero the left factor of a nonzero product is nonzero. forall n c d. ~(n = 0) -&gt; n = c * d -&gt; ~(c = 0) multiplication mul_zero_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>factor_nonzero_left</code><span>A left factor of a nonzero product is nonzero</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The left factor of a nonzero product is nonzero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_descent" href="#theorem-greatest_prime_divisor_descent"><code>greatest_prime_divisor_descent</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factor_nonzero_left">Copy statement</button>
        <pre id="statement-factor_nonzero_left"><code>forall n c d. ~(n = 0) -&gt; n = c * d -&gt; ~(c = 0)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factor_nonzero_left">Copy proof</button>
        <pre id="proof-factor_nonzero_left"><code>pa prove forall n c d. ~(n = 0) -&gt; n = c * d -&gt; ~(c = 0)
use mul_zero_left
intro n
intro c
intro d
intro hn
intro hfac
intro hc
apply hn
trans c * d
exact hfac
rewrite hc
apply mul_zero_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>37</dd></div>
        <div><dt>Distinct objects</dt><dd>37</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="623e666aaba60f46434bf5df0ec25bb00f53a075f872297f8f49636eba104912">623e666aaba6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factor_nonzero_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factor_nonzero_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3562">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factor_nonzero_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-proper_factor_lt"
  data-name="proper_factor_lt" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="divisor_le_nonzero,le_eq_or_lt,mul_left_cancel_nonzero,mul_one"
  data-search="proper_factor_lt a proper factor is strictly smaller than its product a factor with a nonunit cofactor is strictly smaller than a nonzero product. forall n c d. ~(n = 0) -&gt; n = c * d -&gt; ~(d = 1) -&gt; exists k. k + s c = n primes divisor_le_nonzero le_eq_or_lt mul_left_cancel_nonzero mul_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>proper_factor_lt</code><span>A proper factor is strictly smaller than its product</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A factor with a nonunit cofactor is strictly smaller than a nonzero product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divisor_le_nonzero" href="#theorem-divisor_le_nonzero"><code>divisor_le_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_descent" href="#theorem-greatest_prime_divisor_descent"><code>greatest_prime_divisor_descent</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-proper_factor_lt">Copy statement</button>
        <pre id="statement-proper_factor_lt"><code>forall n c d. ~(n = 0) -&gt; n = c * d -&gt; ~(d = 1) -&gt; exists k. k + S c = n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-proper_factor_lt">Copy proof</button>
        <pre id="proof-proper_factor_lt"><code>pa prove forall n c d. ~(n = 0) -&gt; n = c * d -&gt; ~(d = 1) -&gt; exists k. k + S c = n
use divisor_le_nonzero
use le_eq_or_lt
use mul_left_cancel_nonzero
use mul_one
intro n
intro c
intro d
intro hn
intro hfactor
intro hd
have hle : exists k. k + c = n
specialize divisor_le_nonzero c
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn
exists d
exact hfactor
have hcases : c = n \/ exists k. k + S c = n
specialize le_eq_or_lt c
specialize le_eq_or_lt n
apply le_eq_or_lt
exact hle
cases hcases
exfalso
apply hd
have hc : ~(c = 0)
intro hc0
apply hn
trans c
symm
exact hcases_left
exact hc0
specialize mul_left_cancel_nonzero c
specialize mul_left_cancel_nonzero d
specialize mul_left_cancel_nonzero 1
apply mul_left_cancel_nonzero
exact hc
trans n
symm
exact hfactor
trans c
symm
exact hcases_left
symm
specialize mul_one c
exact mul_one
exact hcases_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>468</dd></div>
        <div><dt>Distinct objects</dt><dd>396</dd></div>
        <div><dt>Reused references</dt><dd>10</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>16</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="22b2140fa2bd79acd5378a7ce775317150348f9d9c6de5372d3a9d5d63643f2b">22b2140fa2bd…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for proper_factor_lt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib proper_factor_lt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3581">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/proper_factor_lt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_divisor_exists_up_to"
  data-name="prime_divisor_exists_up_to" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="mul_zero_left,le_zero,lt_of_lt_of_le,le_of_succ_le_succ,multiple_refl,multiple_trans,prime_or_composite,proper_factor_lt"
  data-search="prime_divisor_exists_up_to bounded prime-divisor existence bounded strong induction constructs a prime divisor of every nonzero nonunit natural. forall b n. (exists t. t + n = b) -&gt; ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. n = p * k) primes mul_zero_left le_zero lt_of_lt_of_le le_of_succ_le_succ multiple_refl multiple_trans prime_or_composite proper_factor_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_divisor_exists_up_to</code><span>Bounded prime-divisor existence</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Bounded strong induction constructs a prime divisor of every nonzero nonunit natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_of_lt_of_le" href="#theorem-lt_of_lt_of_le"><code>lt_of_lt_of_le</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_trans" href="#theorem-multiple_trans"><code>multiple_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_or_composite" href="#theorem-prime_or_composite"><code>prime_or_composite</code></a> <a class="pa-theorem-chip" data-theorem-link="proper_factor_lt" href="#theorem-proper_factor_lt"><code>proper_factor_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists" href="#theorem-prime_divisor_exists"><code>prime_divisor_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_divisor_exists_up_to">Copy statement</button>
        <pre id="statement-prime_divisor_exists_up_to"><code>forall B n. (exists t. t + n = B) -&gt; ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. n = p * k)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_divisor_exists_up_to">Copy proof</button>
        <pre id="proof-prime_divisor_exists_up_to"><code>pa prove forall B n. (exists t. t + n = B) -&gt; ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. n = p * k)
use mul_zero_left
use le_zero
use lt_of_lt_of_le
use le_of_succ_le_succ
use multiple_refl
use multiple_trans
use prime_or_composite
use proper_factor_lt
intro B
induction B
intro n
intro hnB
intro hn0
intro hn1
exfalso
apply hn0
apply le_zero
exact hnB
intro n
intro hnB
intro hn0
intro hn1
specialize prime_or_composite n
have hpc : (~(n = 1) /\ forall a b. n = a * b -&gt; a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d)
apply prime_or_composite
exact hn0
exact hn1
cases hpc
exists n
split
exact hpc_left
apply multiple_refl
cases hpc_right
cases hpc_right_witness
cases hpc_right_witness_witness
cases hpc_right_witness_witness_left
have hc0 : ~(x = 0)
intro hc
apply hn0
trans x * x1
exact hpc_right_witness_witness_right
rewrite hc
apply mul_zero_left
have hcn : exists k. k + S x = n
specialize proper_factor_lt n
specialize proper_factor_lt x
specialize proper_factor_lt x1
apply proper_factor_lt
exact hn0
exact hpc_right_witness_witness_right
exact hpc_right_witness_witness_left_right
have hcSB : exists k. k + S x = S B
specialize lt_of_lt_of_le x
specialize lt_of_lt_of_le n
specialize lt_of_lt_of_le (S B)
apply lt_of_lt_of_le
exact hcn
exact hnB
have hcB : exists k. k + x = B
apply le_of_succ_le_succ
exact hcSB
specialize IH x
have hp : exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. x = p * k)
apply IH
exact hcB
exact hc0
exact hpc_right_witness_witness_left_left
cases hp
cases hp_witness
exists x2
split
exact hp_witness_left
specialize multiple_trans x
specialize multiple_trans x2
specialize multiple_trans n
apply multiple_trans
exists x1
exact hpc_right_witness_witness_right
exact hp_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,931</dd></div>
        <div><dt>Distinct objects</dt><dd>1,659</dd></div>
        <div><dt>Reused references</dt><dd>77</dd></div>
        <div><dt>Depth</dt><dd>78</dd></div>
        <div><dt>Cuts</dt><dd>91</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1258bfd21a67c530ec72c8e8d546eb8fbbdae2a09f563712794671cb02684add">1258bfd21a67…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_divisor_exists_up_to">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_divisor_exists_up_to</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3637">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_divisor_exists_up_to.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_divisor_exists"
  data-name="prime_divisor_exists" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="le_refl,prime_divisor_exists_up_to"
  data-search="prime_divisor_exists every nontrivial natural has a prime divisor every nonzero nonunit natural has a prime divisor. forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. n = p * k) primes le_refl prime_divisor_exists_up_to">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_divisor_exists</code><span>Every nontrivial natural has a prime divisor</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every nonzero nonunit natural has a prime divisor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists_up_to" href="#theorem-prime_divisor_exists_up_to"><code>prime_divisor_exists_up_to</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_exists" href="#theorem-greatest_prime_divisor_exists"><code>greatest_prime_divisor_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_divisor_exists">Copy statement</button>
        <pre id="statement-prime_divisor_exists"><code>forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. n = p * k)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_divisor_exists">Copy proof</button>
        <pre id="proof-prime_divisor_exists"><code>pa prove forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. n = p * k)
use le_refl
use prime_divisor_exists_up_to
intro n
intro hn0
intro hn1
specialize prime_divisor_exists_up_to n
specialize prime_divisor_exists_up_to n
apply prime_divisor_exists_up_to
apply le_refl
exact hn0
exact hn1
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,977</dd></div>
        <div><dt>Distinct objects</dt><dd>1,680</dd></div>
        <div><dt>Reused references</dt><dd>78</dd></div>
        <div><dt>Depth</dt><dd>80</dd></div>
        <div><dt>Cuts</dt><dd>94</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fab66d90500951594d41609b1994e723ac5fb049a3041c6618b3799b68d36d4b">fab66d905009…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_divisor_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_divisor_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3725">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_divisor_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_divisor_eq_one_or_self"
  data-name="prime_divisor_eq_one_or_self" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="mul_one"
  data-search="prime_divisor_eq_one_or_self every divisor of a prime is one or the prime every divisor of a prime is one or the prime itself. forall p g. (~(p = 1) /\ forall c d. p = c * d -&gt; c = 1 \/ d = 1) -&gt; (exists x. p = g * x) -&gt; g = 1 \/ p = g primes mul_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_divisor_eq_one_or_self</code><span>Every divisor of a prime is one or the prime</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every divisor of a prime is one or the prime itself.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="euclid_prime_dvd_product" href="#theorem-euclid_prime_dvd_product"><code>euclid_prime_dvd_product</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="two_prime_product_uniqueness" href="#theorem-two_prime_product_uniqueness"><code>two_prime_product_uniqueness</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_coprime_or_divides" href="#theorem-prime_coprime_or_divides"><code>prime_coprime_or_divides</code></a> <a class="pa-theorem-chip" data-theorem-link="distinct_primes_coprime" href="#theorem-distinct_primes_coprime"><code>distinct_primes_coprime</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_divisor_eq_one_or_self">Copy statement</button>
        <pre id="statement-prime_divisor_eq_one_or_self"><code>forall p g. (~(p = 1) /\ forall c d. p = c * d -&gt; c = 1 \/ d = 1) -&gt; (exists x. p = g * x) -&gt; g = 1 \/ p = g</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_divisor_eq_one_or_self">Copy proof</button>
        <pre id="proof-prime_divisor_eq_one_or_self"><code>pa prove forall p g. (~(p = 1) /\ forall c d. p = c * d -&gt; c = 1 \/ d = 1) -&gt; (exists x. p = g * x) -&gt; g = 1 \/ p = g
use mul_one
intro p
intro g
intro hp
intro hdiv
cases hp
cases hdiv
specialize hp_right g
specialize hp_right x
have hfactor : g = 1 \/ x = 1
apply hp_right
exact hdiv_witness
cases hfactor
left
exact hfactor_left
right
trans g * x
exact hdiv_witness
rewrite hfactor_right
apply mul_one
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>57</dd></div>
        <div><dt>Distinct objects</dt><dd>57</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>12</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e7e3017fe0ec916869c91a094be8a21f81ddc39ca6cc73d6f163a71ccea57fd5">e7e3017fe0ec…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_divisor_eq_one_or_self">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_divisor_eq_one_or_self</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3742">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_divisor_eq_one_or_self.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-euclid_prime_dvd_product"
  data-name="euclid_prime_dvd_product" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="prime_divisor_eq_one_or_self,gcd_exists_relational,is_gcd_one_to_coprime,gauss_coprime_cancel"
  data-search="euclid_prime_dvd_product euclid&#x27;s lemma a prime dividing a product divides at least one factor (euclid&#x27;s lemma). forall p a b. (~(p = 1) /\ forall c d. p = c * d -&gt; c = 1 \/ d = 1) -&gt; (exists k. a * b = p * k) -&gt; (exists u. a = p * u) \/ exists v. b = p * v primes prime_divisor_eq_one_or_self gcd_exists_relational is_gcd_one_to_coprime gauss_coprime_cancel">
  <details>
    <summary>
      <span class="pa-card-title"><code>euclid_prime_dvd_product</code><span>Euclid&#x27;s lemma</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A prime dividing a product divides at least one factor (Euclid&#x27;s lemma).</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divisor_eq_one_or_self" href="#theorem-prime_divisor_eq_one_or_self"><code>prime_divisor_eq_one_or_self</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_exists_relational" href="#theorem-gcd_exists_relational"><code>gcd_exists_relational</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_one_to_coprime" href="#theorem-is_gcd_one_to_coprime"><code>is_gcd_one_to_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="two_prime_product_uniqueness" href="#theorem-two_prime_product_uniqueness"><code>two_prime_product_uniqueness</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-euclid_prime_dvd_product">Copy statement</button>
        <pre id="statement-euclid_prime_dvd_product"><code>forall p a b. (~(p = 1) /\ forall c d. p = c * d -&gt; c = 1 \/ d = 1) -&gt; (exists k. a * b = p * k) -&gt; (exists u. a = p * u) \/ exists v. b = p * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-euclid_prime_dvd_product">Copy proof</button>
        <pre id="proof-euclid_prime_dvd_product"><code>pa prove forall p a b. (~(p = 1) /\ forall c d. p = c * d -&gt; c = 1 \/ d = 1) -&gt; (exists k. a * b = p * k) -&gt; (exists u. a = p * u) \/ exists v. b = p * v
use prime_divisor_eq_one_or_self
use gcd_exists_relational
use is_gcd_one_to_coprime
use gauss_coprime_cancel
intro p
intro a
intro b
intro hp
intro hab
have hg : exists g. (((exists x. p = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. p = c * u) -&gt; (exists v. a = c * v) -&gt; exists w. g = c * w)
apply gcd_exists_relational
cases hg
have hgfull : (((exists u. p = x * u) /\ (exists v. a = x * v)) /\ forall c. (exists s. p = c * s) -&gt; (exists t. a = c * t) -&gt; exists w. x = c * w)
exact hg_witness
cases hg_witness
cases hg_witness_left
have hfactor : x = 1 \/ p = x
specialize prime_divisor_eq_one_or_self p
specialize prime_divisor_eq_one_or_self x
apply prime_divisor_eq_one_or_self
exact hp
exact hg_witness_left_left
cases hfactor
right
apply gauss_coprime_cancel
have hcop : forall d. (exists u. p = d * u) -&gt; (exists v. a = d * v) -&gt; d = 1
apply is_gcd_one_to_coprime
have hg1 : (((exists u. p = 1 * u) /\ (exists v. a = 1 * v)) /\ forall c. (exists s. p = c * s) -&gt; (exists t. a = c * t) -&gt; exists w. 1 = c * w)
rewrite &lt;- hfactor_left
rewrite &lt;- hfactor_left
rewrite &lt;- hfactor_left
exact hgfull
exact hg1
exact hcop
exact hab
left
cases hg_witness_left_right
exists x1
rewrite hfactor_right
exact hg_witness_left_right_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,382</dd></div>
        <div><dt>Distinct objects</dt><dd>1,806</dd></div>
        <div><dt>Reused references</dt><dd>113</dd></div>
        <div><dt>Depth</dt><dd>55</dd></div>
        <div><dt>Cuts</dt><dd>159</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8db2385c53a7f73f65e812822abeb564a8dff57bf9bcd1b65c9d707b0f7897b7">8db2385c53a7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for euclid_prime_dvd_product">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib euclid_prime_dvd_product</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3769">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/euclid_prime_dvd_product.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_refl"
  data-name="mod_eq_refl" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies=""
  data-search="mod_eq_refl balanced natural congruence is reflexive balanced natural congruence is reflexive. forall m a. exists u v. a + m * u = a + m * v congruence">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_refl</code><span>Balanced natural congruence is reflexive</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced natural congruence is reflexive.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_pointwise_mod_congruent" href="#theorem-beta_product_pointwise_mod_congruent"><code>beta_product_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_pointwise_mod_congruent" href="#theorem-beta_sum_pointwise_mod_congruent"><code>beta_sum_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_mod_congruent" href="#theorem-pow_mod_congruent"><code>pow_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_scaled_common_remainder_lift" href="#theorem-crt_scaled_common_remainder_lift"><code>crt_scaled_common_remainder_lift</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_left" href="#theorem-generalized_binary_crt_sufficient_zero_left"><code>generalized_binary_crt_sufficient_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_right" href="#theorem-generalized_binary_crt_sufficient_zero_right"><code>generalized_binary_crt_sufficient_zero_right</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_refl">Copy statement</button>
        <pre id="statement-mod_eq_refl"><code>forall m a. exists u v. a + m * u = a + m * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_refl">Copy proof</button>
        <pre id="proof-mod_eq_refl"><code>pa prove forall m a. exists u v. a + m * u = a + m * v
intro m
intro a
exists 0
exists 0
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5</dd></div>
        <div><dt>Distinct objects</dt><dd>5</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>5</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="48a2acf45d577c2a9e05d872319a1081968be461c5c73eef63c76eebce9568fc">48a2acf45d57…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_refl">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_refl</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3818">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_refl.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_symm"
  data-name="mod_eq_symm" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies=""
  data-search="mod_eq_symm balanced natural congruence is symmetric balanced natural congruence is symmetric. forall m a b. (exists u v. a + m * u = b + m * v) -&gt; exists r s. b + m * r = a + m * s congruence">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_symm</code><span>Balanced natural congruence is symmetric</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced natural congruence is symmetric.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_from_remainders" href="#theorem-mod_eq_decidable_from_remainders"><code>mod_eq_decidable_from_remainders</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainders_characterize_mod_eq" href="#theorem-canonical_remainders_characterize_mod_eq"><code>canonical_remainders_characterize_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_pair_congruent" href="#theorem-crt_solution_pair_congruent"><code>crt_solution_pair_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_common_solution_implies_gcd_compatible" href="#theorem-crt_common_solution_implies_gcd_compatible"><code>crt_common_solution_implies_gcd_compatible</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_common_remainder_decomposition" href="#theorem-mod_eq_common_remainder_decomposition"><code>mod_eq_common_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_right" href="#theorem-generalized_binary_crt_sufficient_zero_right"><code>generalized_binary_crt_sufficient_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_merge" href="#theorem-mod_eq_lcm_merge"><code>mod_eq_lcm_merge</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_canonical_remainder_nonzero" href="#theorem-crt_solution_canonical_remainder_nonzero"><code>crt_solution_canonical_remainder_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_symm">Copy statement</button>
        <pre id="statement-mod_eq_symm"><code>forall m a b. (exists u v. a + m * u = b + m * v) -&gt; exists r s. b + m * r = a + m * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_symm">Copy proof</button>
        <pre id="proof-mod_eq_symm"><code>pa prove forall m a b. (exists u v. a + m * u = b + m * v) -&gt; exists r s. b + m * r = a + m * s
intro m
intro a
intro b
intro h
cases h
cases h_witness
exists x1
exists x
symm
exact h_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>12</dd></div>
        <div><dt>Distinct objects</dt><dd>12</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="136980f4284d727b1c82930328c17059d327ac6c83b9095df97216ebda74dd89">136980f4284d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_symm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_symm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3831">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_symm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_trans"
  data-name="mod_eq_trans" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_comm,mul_add"
  data-search="mod_eq_trans balanced natural congruence is transitive balanced natural congruence is transitive. forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. b + m * r = c + m * s) -&gt; exists x y. a + m * x = c + m * y congruence add_assoc add_comm mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_trans</code><span>Balanced natural congruence is transitive</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced natural congruence is transitive.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_mul" href="#theorem-mod_eq_mul"><code>mod_eq_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_fold_step" href="#theorem-binary_crt_fold_step"><code>binary_crt_fold_step</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_from_remainders" href="#theorem-mod_eq_decidable_from_remainders"><code>mod_eq_decidable_from_remainders</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod3_classify" href="#theorem-bounded_square_mod3_classify"><code>bounded_square_mod3_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod5_classify" href="#theorem-bounded_square_mod5_classify"><code>bounded_square_mod5_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod7_classify" href="#theorem-bounded_square_mod7_classify"><code>bounded_square_mod7_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainders_characterize_mod_eq" href="#theorem-canonical_remainders_characterize_mod_eq"><code>canonical_remainders_characterize_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_pair_congruent" href="#theorem-crt_solution_pair_congruent"><code>crt_solution_pair_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_common_solution_implies_gcd_compatible" href="#theorem-crt_common_solution_implies_gcd_compatible"><code>crt_common_solution_implies_gcd_compatible</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_common_remainder_decomposition" href="#theorem-mod_eq_common_remainder_decomposition"><code>mod_eq_common_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_class_iff_lcm" href="#theorem-crt_solution_class_iff_lcm"><code>crt_solution_class_iff_lcm</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_trans">Copy statement</button>
        <pre id="statement-mod_eq_trans"><code>forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. b + m * r = c + m * s) -&gt; exists x y. a + m * x = c + m * y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_trans">Copy proof</button>
        <pre id="proof-mod_eq_trans"><code>pa prove forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. b + m * r = c + m * s) -&gt; exists x y. a + m * x = c + m * y
use add_assoc
use add_comm
use mul_add
intro m
intro a
intro b
intro c
intro hab
intro hbc
cases hab
cases hab_witness
cases hbc
cases hbc_witness
exists x + x2
exists x3 + x1
trans a + (m * x + m * x2)
congr
refl
apply mul_add
trans (a + m * x) + m * x2
symm
apply add_assoc
trans (b + m * x1) + m * x2
congr
exact hab_witness_witness
refl
trans b + (m * x1 + m * x2)
apply add_assoc
trans b + (m * x2 + m * x1)
congr
refl
apply add_comm
trans (b + m * x2) + m * x1
symm
apply add_assoc
trans (c + m * x3) + m * x1
congr
exact hbc_witness_witness
refl
trans c + (m * x3 + m * x1)
apply add_assoc
congr
refl
symm
apply mul_add
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>252</dd></div>
        <div><dt>Distinct objects</dt><dd>204</dd></div>
        <div><dt>Reused references</dt><dd>16</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="052be6f7213b8697002669ec4b938db550329a8573d520d03cb51af28630bd61">052be6f7213b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_trans">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_trans</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3849">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_trans.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_add"
  data-name="mod_eq_add" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mul_add,add_comm,add_permute_outer"
  data-search="mod_eq_add balanced congruence respects addition balanced natural congruence respects addition. forall m a b c d. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. c + m * r = d + m * s) -&gt; exists x y. (a + c) + m * x = (b + d) + m * y congruence mul_add add_comm add_permute_outer">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_add</code><span>Balanced congruence respects addition</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced natural congruence respects addition.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_permute_outer" href="#theorem-add_permute_outer"><code>add_permute_outer</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_pointwise_mod_congruent" href="#theorem-beta_sum_pointwise_mod_congruent"><code>beta_sum_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_scaled_common_remainder_lift" href="#theorem-crt_scaled_common_remainder_lift"><code>crt_scaled_common_remainder_lift</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_add">Copy statement</button>
        <pre id="statement-mod_eq_add"><code>forall m a b c d. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. c + m * r = d + m * s) -&gt; exists x y. (a + c) + m * x = (b + d) + m * y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_add">Copy proof</button>
        <pre id="proof-mod_eq_add"><code>pa prove forall m a b c d. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. c + m * r = d + m * s) -&gt; exists x y. (a + c) + m * x = (b + d) + m * y
use mul_add
use add_comm
use add_permute_outer
intro m
intro a
intro b
intro c
intro d
intro hab
intro hcd
cases hab
cases hab_witness
cases hcd
cases hcd_witness
exists x2 + x
exists x3 + x1
trans (a + c) + (m * x2 + m * x)
congr
refl
apply mul_add
trans (m * x2 + c) + (a + m * x)
apply add_permute_outer
trans (c + m * x2) + (a + m * x)
congr
apply add_comm
refl
trans (a + m * x) + (c + m * x2)
apply add_comm
trans (b + m * x1) + (d + m * x3)
congr
exact hab_witness_witness
exact hcd_witness_witness
trans (d + m * x3) + (b + m * x1)
apply add_comm
trans (m * x3 + d) + (b + m * x1)
congr
apply add_comm
refl
trans (b + d) + (m * x3 + m * x1)
symm
apply add_permute_outer
congr
refl
symm
apply mul_add
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>370</dd></div>
        <div><dt>Distinct objects</dt><dd>249</dd></div>
        <div><dt>Reused references</dt><dd>17</dd></div>
        <div><dt>Depth</dt><dd>30</dd></div>
        <div><dt>Cuts</dt><dd>10</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="49e4d310fb281152161969987650ed529899ec2db8d310000cbe9c0aebb8b986">49e4d310fb28…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_add">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_add</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3899">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_add.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_mul_right"
  data-name="mod_eq_mul_right" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_mul,mul_assoc"
  data-search="mod_eq_mul_right balanced congruence is stable under right multiplication balanced congruence is preserved by multiplication on the right. forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; exists r s. (a * c) + m * r = (b * c) + m * s congruence add_mul mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_mul_right</code><span>Balanced congruence is stable under right multiplication</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced congruence is preserved by multiplication on the right.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul" href="#theorem-mod_eq_mul"><code>mod_eq_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_mul_right">Copy statement</button>
        <pre id="statement-mod_eq_mul_right"><code>forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; exists r s. (a * c) + m * r = (b * c) + m * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_mul_right">Copy proof</button>
        <pre id="proof-mod_eq_mul_right"><code>pa prove forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; exists r s. (a * c) + m * r = (b * c) + m * s
use add_mul
use mul_assoc
intro m
intro a
intro b
intro c
intro h
cases h
cases h_witness
exists x * c
exists x1 * c
trans a * c + (m * x) * c
congr
refl
symm
apply mul_assoc
trans (a + m * x) * c
symm
apply add_mul
trans (b + m * x1) * c
congr
exact h_witness_witness
refl
trans b * c + (m * x1) * c
apply add_mul
congr
refl
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>484</dd></div>
        <div><dt>Distinct objects</dt><dd>339</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>13</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4994212781f9a86bb60622ca1fe8ad409d0bb500791af6a24b5a825098729e27">4994212781f9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_mul_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_mul_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3949">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_mul_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_mul_left"
  data-name="mod_eq_mul_left" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod_eq_mul_right,mul_comm"
  data-search="mod_eq_mul_left balanced congruence is stable under left multiplication balanced congruence is preserved by multiplication on the left. forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; exists r s. (c * a) + m * r = (c * b) + m * s congruence mod_eq_mul_right mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_mul_left</code><span>Balanced congruence is stable under left multiplication</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced congruence is preserved by multiplication on the left.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_right" href="#theorem-mod_eq_mul_right"><code>mod_eq_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_mul" href="#theorem-mod_eq_mul"><code>mod_eq_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_mul_left">Copy statement</button>
        <pre id="statement-mod_eq_mul_left"><code>forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; exists r s. (c * a) + m * r = (c * b) + m * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_mul_left">Copy proof</button>
        <pre id="proof-mod_eq_mul_left"><code>pa prove forall m a b c. (exists u v. a + m * u = b + m * v) -&gt; exists r s. (c * a) + m * r = (c * b) + m * s
use mod_eq_mul_right
use mul_comm
intro m
intro a
intro b
intro c
intro h
specialize mod_eq_mul_right m
specialize mod_eq_mul_right a
specialize mod_eq_mul_right b
specialize mod_eq_mul_right c
have hr : exists r s. (a * c) + m * r = (b * c) + m * s
apply mod_eq_mul_right
exact h
cases hr
cases hr_witness
exists x
exists x1
trans a * c + m * x
congr
apply mul_comm
refl
trans b * c + m * x1
exact hr_witness_witness
congr
apply mul_comm
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>738</dd></div>
        <div><dt>Distinct objects</dt><dd>371</dd></div>
        <div><dt>Reused references</dt><dd>38</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>21</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="84e29f574f4ebbcb3993c2746183e370648a84346c8cf4e46f50a28581bf9dc6">84e29f574f4e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_mul_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_mul_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L3983">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_mul_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_mul"
  data-name="mod_eq_mul" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod_eq_mul_right,mod_eq_mul_left,mod_eq_trans"
  data-search="mod_eq_mul balanced congruence respects multiplication balanced natural congruence respects multiplication. forall m a b c d. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. c + m * r = d + m * s) -&gt; exists x y. (a * c) + m * x = (b * d) + m * y congruence mod_eq_mul_right mod_eq_mul_left mod_eq_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_mul</code><span>Balanced congruence respects multiplication</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced natural congruence respects multiplication.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_right" href="#theorem-mod_eq_mul_right"><code>mod_eq_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_pointwise_mod_congruent" href="#theorem-beta_product_pointwise_mod_congruent"><code>beta_product_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_mod_congruent" href="#theorem-pow_mod_congruent"><code>pow_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_mul">Copy statement</button>
        <pre id="statement-mod_eq_mul"><code>forall m a b c d. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. c + m * r = d + m * s) -&gt; exists x y. (a * c) + m * x = (b * d) + m * y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_mul">Copy proof</button>
        <pre id="proof-mod_eq_mul"><code>pa prove forall m a b c d. (exists u v. a + m * u = b + m * v) -&gt; (exists r s. c + m * r = d + m * s) -&gt; exists x y. (a * c) + m * x = (b * d) + m * y
use mod_eq_mul_right
use mod_eq_mul_left
use mod_eq_trans
intro m
intro a
intro b
intro c
intro d
intro hab
intro hcd
have hacbc : exists r s. (a * c) + m * r = (b * c) + m * s
specialize mod_eq_mul_right m
specialize mod_eq_mul_right a
specialize mod_eq_mul_right b
specialize mod_eq_mul_right c
apply mod_eq_mul_right
exact hab
have hbcbd : exists r s. (b * c) + m * r = (b * d) + m * s
specialize mod_eq_mul_left m
specialize mod_eq_mul_left c
specialize mod_eq_mul_left d
specialize mod_eq_mul_left b
apply mod_eq_mul_left
exact hcd
specialize mod_eq_trans m
specialize mod_eq_trans (a * c)
specialize mod_eq_trans (b * c)
specialize mod_eq_trans (b * d)
apply mod_eq_trans
exact hacbc
exact hbcbd
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,505</dd></div>
        <div><dt>Distinct objects</dt><dd>471</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>32</dd></div>
        <div><dt>Cuts</dt><dd>43</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="660f19930d52443997b878d9fbc824d96e6070e8e7304d08159dcb591af5cc56">660f19930d52…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_mul">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_mul</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4016">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_mul.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-remainder_decomposition_to_mod_eq"
  data-name="remainder_decomposition_to_mod_eq" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_comm,mul_comm"
  data-search="remainder_decomposition_to_mod_eq a quotient-remainder decomposition gives congruence a directed quotient/remainder equation gives balanced congruence to its remainder. forall m b q x. b = q * m + x -&gt; exists u v. b + m * u = x + m * v congruence add_comm mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>remainder_decomposition_to_mod_eq</code><span>A quotient-remainder decomposition gives congruence</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A directed quotient/remainder equation gives balanced congruence to its remainder.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_to_mod_eq" href="#theorem-beta_at_to_mod_eq"><code>beta_at_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_from_remainders" href="#theorem-mod_eq_decidable_from_remainders"><code>mod_eq_decidable_from_remainders</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainders_characterize_mod_eq" href="#theorem-canonical_remainders_characterize_mod_eq"><code>canonical_remainders_characterize_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_common_remainder_decomposition" href="#theorem-mod_eq_common_remainder_decomposition"><code>mod_eq_common_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_merge" href="#theorem-mod_eq_lcm_merge"><code>mod_eq_lcm_merge</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_canonical_remainder_nonzero" href="#theorem-crt_solution_canonical_remainder_nonzero"><code>crt_solution_canonical_remainder_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-remainder_decomposition_to_mod_eq">Copy statement</button>
        <pre id="statement-remainder_decomposition_to_mod_eq"><code>forall m b q x. b = q * m + x -&gt; exists u v. b + m * u = x + m * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-remainder_decomposition_to_mod_eq">Copy proof</button>
        <pre id="proof-remainder_decomposition_to_mod_eq"><code>pa prove forall m b q x. b = q * m + x -&gt; exists u v. b + m * u = x + m * v
use add_comm
use mul_comm
intro m
intro b
intro q
intro x
intro h
exists 0
exists q
rewrite PA5
rewrite PA3
trans q * m + x
exact h
trans x + q * m
apply add_comm
congr
refl
apply mul_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>323</dd></div>
        <div><dt>Distinct objects</dt><dd>228</dd></div>
        <div><dt>Reused references</dt><dd>23</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>10</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="acea3f60f7fa7dfcd1745c5cb1dd1d20436c173affa5518ebcb4f981b6893b19">acea3f60f7fa…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for remainder_decomposition_to_mod_eq">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib remainder_decomposition_to_mod_eq</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4052">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/remainder_decomposition_to_mod_eq.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_bounded_unique"
  data-name="mod_eq_bounded_unique" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_comm,division_remainder_unique"
  data-search="mod_eq_bounded_unique bounded congruent representatives are equal two balanced-congruent values below the same modulus are equal. forall m a b. (exists ha. ha + s a = m) -&gt; (exists hb. hb + s b = m) -&gt; (exists u v. a + m * u = b + m * v) -&gt; a = b congruence add_comm division_remainder_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_bounded_unique</code><span>Bounded congruent representatives are equal</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two balanced-congruent values below the same modulus are equal.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_from_remainders" href="#theorem-mod_eq_decidable_from_remainders"><code>mod_eq_decidable_from_remainders</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod3_classify" href="#theorem-bounded_square_mod3_classify"><code>bounded_square_mod3_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod5_classify" href="#theorem-bounded_square_mod5_classify"><code>bounded_square_mod5_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod7_classify" href="#theorem-bounded_square_mod7_classify"><code>bounded_square_mod7_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_mod_eq_value" href="#theorem-beta_half_range_mod_eq_value"><code>beta_half_range_mod_eq_value</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainders_characterize_mod_eq" href="#theorem-canonical_remainders_characterize_mod_eq"><code>canonical_remainders_characterize_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_canonical_remainder_nonzero" href="#theorem-crt_solution_canonical_remainder_nonzero"><code>crt_solution_canonical_remainder_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_bounded_unique">Copy statement</button>
        <pre id="statement-mod_eq_bounded_unique"><code>forall m a b. (exists ha. ha + S a = m) -&gt; (exists hb. hb + S b = m) -&gt; (exists u v. a + m * u = b + m * v) -&gt; a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_bounded_unique">Copy proof</button>
        <pre id="proof-mod_eq_bounded_unique"><code>pa prove forall m a b. (exists ha. ha + S a = m) -&gt; (exists hb. hb + S b = m) -&gt; (exists u v. a + m * u = b + m * v) -&gt; a = b
use add_comm
use division_remainder_unique
intro m
intro a
intro b
intro ha
intro hb
intro hab
cases hab
cases hab_witness
have hda : a + m * x = m * x + a
apply add_comm
have hdb : a + m * x = m * x1 + b
trans b + m * x1
exact hab_witness_witness
apply add_comm
specialize division_remainder_unique m
specialize division_remainder_unique (a + m * x)
specialize division_remainder_unique x
specialize division_remainder_unique a
specialize division_remainder_unique x1
specialize division_remainder_unique b
have huniq : x = x1 /\ a = b
apply division_remainder_unique
exact hda
exact ha
exact hdb
exact hb
cases huniq
exact huniq_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>961</dd></div>
        <div><dt>Distinct objects</dt><dd>578</dd></div>
        <div><dt>Reused references</dt><dd>23</dd></div>
        <div><dt>Depth</dt><dd>59</dd></div>
        <div><dt>Cuts</dt><dd>26</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9bdbf756db7d40a03088e05e9f311290d4ce31c6304913bcc5a3a12d5a0c2f89">9bdbf756db7d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_bounded_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_bounded_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4076">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_bounded_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_to_remainder_decomposition"
  data-name="mod_eq_to_remainder_decomposition" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="division_remainder_exists,add_comm,mul_comm,mod_eq_trans,mod_eq_bounded_unique"
  data-search="mod_eq_to_remainder_decomposition a bounded congruent representative is a directed remainder a bounded balanced residue has a directed quotient/remainder witness. forall m b x. ~(m = 0) -&gt; (exists h. h + s x = m) -&gt; (exists u v. b + m * u = x + m * v) -&gt; exists q. b = q * m + x congruence division_remainder_exists add_comm mul_comm mod_eq_trans mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_to_remainder_decomposition</code><span>A bounded congruent representative is a directed remainder</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded balanced residue has a directed quotient/remainder witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_of_mod_eq_bound" href="#theorem-beta_at_of_mod_eq_bound"><code>beta_at_of_mod_eq_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_remainders" href="#theorem-binary_crt_remainders"><code>binary_crt_remainders</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_common_remainder_decomposition" href="#theorem-mod_eq_common_remainder_decomposition"><code>mod_eq_common_remainder_decomposition</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_to_remainder_decomposition">Copy statement</button>
        <pre id="statement-mod_eq_to_remainder_decomposition"><code>forall m b x. ~(m = 0) -&gt; (exists h. h + S x = m) -&gt; (exists u v. b + m * u = x + m * v) -&gt; exists q. b = q * m + x</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_to_remainder_decomposition">Copy proof</button>
        <pre id="proof-mod_eq_to_remainder_decomposition"><code>pa prove forall m b x. ~(m = 0) -&gt; (exists h. h + S x = m) -&gt; (exists u v. b + m * u = x + m * v) -&gt; exists q. b = q * m + x
use division_remainder_exists
use add_comm
use mul_comm
use mod_eq_trans
use mod_eq_bounded_unique
intro m
intro b
intro x
intro hm
intro hx
intro hbx
have hdiv : exists q r. b = m * q + r /\ exists h. h + S r = m
specialize division_remainder_exists m
specialize division_remainder_exists b
apply division_remainder_exists
exact hm
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
have hremb : exists u v. x2 + m * u = b + m * v
exists x1
exists 0
trans m * x1 + x2
apply add_comm
trans b
symm
exact hdiv_witness_witness_left
symm
rewrite PA5
apply PA3
have hremx : exists u v. x2 + m * u = x + m * v
specialize mod_eq_trans m
specialize mod_eq_trans x2
specialize mod_eq_trans b
specialize mod_eq_trans x
apply mod_eq_trans
exact hremb
exact hbx
have hrx : x2 = x
specialize mod_eq_bounded_unique m
specialize mod_eq_bounded_unique x2
specialize mod_eq_bounded_unique x
apply mod_eq_bounded_unique
exact hdiv_witness_witness_right
exact hx
exact hremx
exists x1
trans m * x1 + x2
exact hdiv_witness_witness_left
trans x1 * m + x2
congr
apply mul_comm
refl
congr
refl
exact hrx
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,793</dd></div>
        <div><dt>Distinct objects</dt><dd>962</dd></div>
        <div><dt>Reused references</dt><dd>59</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>50</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a92fbaccbecc0472384e7c424f6b72dda864ce0922174b87828afea85ba5320a">a92fbaccbecc…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_to_remainder_decomposition">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_to_remainder_decomposition</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4112">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_to_remainder_decomposition.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_modulus_nonzero"
  data-name="beta_modulus_nonzero" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="succ_ne_zero"
  data-search="beta_modulus_nonzero every gödel-beta modulus is nonzero every gödel-beta decoding modulus is nonzero. forall c i. ~(s ((s i) * c) = 0) factorization succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_modulus_nonzero</code><span>Every Gödel-beta modulus is nonzero</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every Gödel-beta decoding modulus is nonzero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_of_mod_eq_bound" href="#theorem-beta_at_of_mod_eq_bound"><code>beta_at_of_mod_eq_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_beta_pair" href="#theorem-binary_crt_beta_pair"><code>binary_crt_beta_pair</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_modulus_nonzero">Copy statement</button>
        <pre id="statement-beta_modulus_nonzero"><code>forall c i. ~(S ((S i) * c) = 0)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_modulus_nonzero">Copy proof</button>
        <pre id="proof-beta_modulus_nonzero"><code>pa prove forall c i. ~(S ((S i) * c) = 0)
use succ_ne_zero
intro c
intro i
specialize succ_ne_zero ((S i) * c)
exact succ_ne_zero
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9</dd></div>
        <div><dt>Distinct objects</dt><dd>9</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>6</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e8ce620074f6ed37285a3dc034e72bc8f267c4442673ed7dc77c9db067d2f314">e8ce620074f6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_modulus_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_modulus_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4180">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_modulus_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_at_self_of_bound"
  data-name="beta_at_self_of_bound" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="mul_zero_left,zero_add"
  data-search="beta_at_self_of_bound a bounded value is its own gödel-beta residue a value below a gödel-beta modulus decodes to itself when used as the code. forall c i x. (exists h. h + s x = s ((s i) * c)) -&gt; ((exists h. h + s x = s ((s i) * c)) /\ exists q. x = q * s ((s i) * c) + x) factorization mul_zero_left zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_at_self_of_bound</code><span>A bounded value is its own Gödel-beta residue</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A value below a Gödel-beta modulus decodes to itself when used as the code.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_at_self_of_bound">Copy statement</button>
        <pre id="statement-beta_at_self_of_bound"><code>forall c i x. (exists h. h + S x = S ((S i) * c)) -&gt; ((exists h. h + S x = S ((S i) * c)) /\ exists q. x = q * S ((S i) * c) + x)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_at_self_of_bound">Copy proof</button>
        <pre id="proof-beta_at_self_of_bound"><code>pa prove forall c i x. (exists h. h + S x = S ((S i) * c)) -&gt; ((exists h. h + S x = S ((S i) * c)) /\ exists q. x = q * S ((S i) * c) + x)
use mul_zero_left
use zero_add
intro c
intro i
intro x
intro hx
split
exact hx
exists 0
specialize mul_zero_left (S ((S i) * c))
rewrite mul_zero_left
specialize zero_add x
rewrite zero_add
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>62</dd></div>
        <div><dt>Distinct objects</dt><dd>61</dd></div>
        <div><dt>Reused references</dt><dd>1</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b563c1208a1c868c1c93ba1f03ddef49f5acdcf564dc44edfd0d3ea4e3f5aef4">b563c1208a1c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_at_self_of_bound">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_at_self_of_bound</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4192">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_at_self_of_bound.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_at_exists"
  data-name="beta_at_exists" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_modulus_nonzero,mul_comm,division_remainder_exists"
  data-search="beta_at_exists every gödel-beta position has a decoded value every gödel-beta position has a bounded decoded residue. forall b c i. exists x. ((exists h. h + s x = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + x) factorization beta_modulus_nonzero mul_comm division_remainder_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_at_exists</code><span>Every Gödel-beta position has a decoded value</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every Gödel-beta position has a bounded decoded residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_exists_unique" href="#theorem-beta_at_exists_unique"><code>beta_at_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_exists" href="#theorem-beta_product_exists"><code>beta_product_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_exists" href="#theorem-beta_sum_exists"><code>beta_sum_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_exists" href="#theorem-beta_prefix_replace_exists"><code>beta_prefix_replace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_exists" href="#theorem-beta_prefix_swap_last_exists"><code>beta_prefix_swap_last_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_reflect" href="#theorem-beta_prefix_swap_last_reflect"><code>beta_prefix_swap_last_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_reflect" href="#theorem-beta_prefix_replace_reflect"><code>beta_prefix_replace_reflect</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_at_exists">Copy statement</button>
        <pre id="statement-beta_at_exists"><code>forall b c i. exists x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_at_exists">Copy proof</button>
        <pre id="proof-beta_at_exists"><code>pa prove forall b c i. exists x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
use beta_modulus_nonzero
use mul_comm
use division_remainder_exists
intro b
intro c
intro i
have hm0 : ~(S ((S i) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero i
exact beta_modulus_nonzero
specialize division_remainder_exists (S ((S i) * c))
specialize division_remainder_exists b
have hdiv : exists q r. b = S ((S i) * c) * q + r /\ exists h. h + S r = S ((S i) * c)
apply division_remainder_exists
exact hm0
cases hdiv
cases hdiv_witness
cases hdiv_witness_witness
exists x1
split
exact hdiv_witness_witness_right
exists x
trans S ((S i) * c) * x + x1
exact hdiv_witness_witness_left
congr
apply mul_comm
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>479</dd></div>
        <div><dt>Distinct objects</dt><dd>392</dd></div>
        <div><dt>Reused references</dt><dd>38</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>15</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="967de23f5a2e16ad6917ba20073cb2b63a1ab562945069360c57b040c48078d4">967de23f5a2e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_at_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_at_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4212">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_at_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_at_unique"
  data-name="beta_at_unique" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="mul_comm,division_remainder_unique"
  data-search="beta_at_unique a gödel-beta decoded value is unique the decoded residue at a gödel-beta position is unique. forall b c i x y. ((exists h. h + s x = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + x) -&gt; ((exists h. h + s y = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + y) -&gt; x = y factorization mul_comm division_remainder_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_at_unique</code><span>A Gödel-beta decoded value is unique</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The decoded residue at a Gödel-beta position is unique.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_exists_unique" href="#theorem-beta_at_exists_unique"><code>beta_at_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_zero" href="#theorem-beta_product_zero"><code>beta_product_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_entry_eq" href="#theorem-beta_repeat_entry_eq"><code>beta_repeat_entry_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_entry_eq" href="#theorem-beta_range_entry_eq"><code>beta_range_entry_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_trace_functional" href="#theorem-beta_sum_trace_functional"><code>beta_sum_trace_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_zero" href="#theorem-beta_sum_zero"><code>beta_sum_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_succ_decompose" href="#theorem-beta_sum_succ_decompose"><code>beta_sum_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_succ_decompose" href="#theorem-bit_count_succ_decompose"><code>bit_count_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_entry_lt" href="#theorem-finite_bounded_entry_lt"><code>finite_bounded_entry_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_exists" href="#theorem-beta_prefix_replace_exists"><code>beta_prefix_replace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_reflect" href="#theorem-beta_prefix_swap_last_reflect"><code>beta_prefix_swap_last_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_reflect" href="#theorem-beta_prefix_replace_reflect"><code>beta_prefix_replace_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_swap_last_invariant" href="#theorem-beta_product_swap_last_invariant"><code>beta_product_swap_last_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_reindex_alignment_swap_last" href="#theorem-beta_reindex_alignment_swap_last"><code>beta_reindex_alignment_swap_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_at_unique">Copy statement</button>
        <pre id="statement-beta_at_unique"><code>forall b c i x y. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y) -&gt; x = y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_at_unique">Copy proof</button>
        <pre id="proof-beta_at_unique"><code>pa prove forall b c i x y. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y) -&gt; x = y
use mul_comm
use division_remainder_unique
intro b
intro c
intro i
intro x
intro y
intro hx
intro hy
cases hx
cases hy
cases hx_right
cases hy_right
have hdx : b = S ((S i) * c) * x1 + x
trans x1 * S ((S i) * c) + x
exact hx_right_witness
congr
apply mul_comm
refl
have hdy : b = S ((S i) * c) * x2 + y
trans x2 * S ((S i) * c) + y
exact hy_right_witness
congr
apply mul_comm
refl
specialize division_remainder_unique (S ((S i) * c))
specialize division_remainder_unique b
specialize division_remainder_unique x1
specialize division_remainder_unique x
specialize division_remainder_unique x2
specialize division_remainder_unique y
have huniq : x1 = x2 /\ x = y
apply division_remainder_unique
exact hdx
exact hx_left
exact hdy
exact hy_left
cases huniq
exact huniq_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,121</dd></div>
        <div><dt>Distinct objects</dt><dd>692</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>59</dd></div>
        <div><dt>Cuts</dt><dd>30</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="891320ec08736c26f18d9ac34c38da3df2b764b63794d0a33c8820ce51caf2ae">891320ec0873…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_at_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_at_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4244">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_at_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_at_exists_unique"
  data-name="beta_at_exists_unique" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_at_exists,beta_at_unique"
  data-search="beta_at_exists_unique every gödel-beta position has exactly one decoded value every gödel-beta position has exactly one decoded residue. forall b c i. exists x. (((exists h. h + s x = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + x) /\ forall y. ((exists h. h + s y = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + y) -&gt; x = y) factorization beta_at_exists beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_at_exists_unique</code><span>Every Gödel-beta position has exactly one decoded value</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every Gödel-beta position has exactly one decoded residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_at_exists_unique">Copy statement</button>
        <pre id="statement-beta_at_exists_unique"><code>forall b c i. exists x. (((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) /\ forall y. ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y) -&gt; x = y)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_at_exists_unique">Copy proof</button>
        <pre id="proof-beta_at_exists_unique"><code>pa prove forall b c i. exists x. (((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) /\ forall y. ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y) -&gt; x = y)
use beta_at_exists
use beta_at_unique
intro b
intro c
intro i
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists i
have hx : exists x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
apply beta_at_exists
cases hx
exists x
split
exact hx_witness
intro y
intro hy
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique y
apply beta_at_unique
exact hx_witness
exact hy
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,625</dd></div>
        <div><dt>Distinct objects</dt><dd>901</dd></div>
        <div><dt>Reused references</dt><dd>55</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>47</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="37ae2a410d200b75cd68831454765e500dc8dafcc77b8a51ed60f9a79f971d8c">37ae2a410d20…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_at_exists_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_at_exists_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4289">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_at_exists_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_at_to_mod_eq"
  data-name="beta_at_to_mod_eq" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="remainder_decomposition_to_mod_eq"
  data-search="beta_at_to_mod_eq a gödel-beta value is congruent to its code every expanded gödel-beta value is balanced-congruent to its code. forall b c i x. ((exists h. h + s x = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + x) -&gt; exists u v. b + s ((s i) * c) * u = x + s ((s i) * c) * v factorization remainder_decomposition_to_mod_eq">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_at_to_mod_eq</code><span>A Gödel-beta value is congruent to its code</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every expanded Gödel-beta value is balanced-congruent to its code.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_at_to_mod_eq">Copy statement</button>
        <pre id="statement-beta_at_to_mod_eq"><code>forall b c i x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; exists u v. b + S ((S i) * c) * u = x + S ((S i) * c) * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_at_to_mod_eq">Copy proof</button>
        <pre id="proof-beta_at_to_mod_eq"><code>pa prove forall b c i x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; exists u v. b + S ((S i) * c) * u = x + S ((S i) * c) * v
use remainder_decomposition_to_mod_eq
intro b
intro c
intro i
intro x
intro hat
cases hat
cases hat_right
specialize remainder_decomposition_to_mod_eq (S ((S i) * c))
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq x1
specialize remainder_decomposition_to_mod_eq x
apply remainder_decomposition_to_mod_eq
exact hat_right_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>358</dd></div>
        <div><dt>Distinct objects</dt><dd>263</dd></div>
        <div><dt>Reused references</dt><dd>23</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>11</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="dd174002d4701711239c5958acc580ca4ff11c1788aff4936b9a8d9ad65562e6">dd174002d470…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_at_to_mod_eq">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_at_to_mod_eq</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4319">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_at_to_mod_eq.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_at_of_mod_eq_bound"
  data-name="beta_at_of_mod_eq_bound" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_modulus_nonzero,mod_eq_to_remainder_decomposition"
  data-search="beta_at_of_mod_eq_bound a bounded congruent value is a gödel-beta value a bounded value congruent to a code is its expanded gödel-beta value. forall b c i x. (exists h. h + s x = s ((s i) * c)) -&gt; (exists u v. b + s ((s i) * c) * u = x + s ((s i) * c) * v) -&gt; ((exists h. h + s x = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + x) factorization beta_modulus_nonzero mod_eq_to_remainder_decomposition">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_at_of_mod_eq_bound</code><span>A bounded congruent value is a Gödel-beta value</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded value congruent to a code is its expanded Gödel-beta value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt_beta_pair" href="#theorem-binary_crt_beta_pair"><code>binary_crt_beta_pair</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_at_of_mod_eq_bound">Copy statement</button>
        <pre id="statement-beta_at_of_mod_eq_bound"><code>forall b c i x. (exists h. h + S x = S ((S i) * c)) -&gt; (exists u v. b + S ((S i) * c) * u = x + S ((S i) * c) * v) -&gt; ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_at_of_mod_eq_bound">Copy proof</button>
        <pre id="proof-beta_at_of_mod_eq_bound"><code>pa prove forall b c i x. (exists h. h + S x = S ((S i) * c)) -&gt; (exists u v. b + S ((S i) * c) * u = x + S ((S i) * c) * v) -&gt; ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x)
use beta_modulus_nonzero
use mod_eq_to_remainder_decomposition
intro b
intro c
intro i
intro x
intro hx
intro hmod
split
exact hx
specialize mod_eq_to_remainder_decomposition (S ((S i) * c))
specialize mod_eq_to_remainder_decomposition b
specialize mod_eq_to_remainder_decomposition x
apply mod_eq_to_remainder_decomposition
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero i
exact beta_modulus_nonzero
exact hx
exact hmod
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,839</dd></div>
        <div><dt>Distinct objects</dt><dd>1,008</dd></div>
        <div><dt>Reused references</dt><dd>59</dd></div>
        <div><dt>Depth</dt><dd>66</dd></div>
        <div><dt>Cuts</dt><dd>53</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e4a2ead06ca651304be645d679f5e7e81da4ede0afd9997f2f59864f7b01074f">e4a2ead06ca6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_at_of_mod_eq_bound">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_at_of_mod_eq_bound</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4340">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_at_of_mod_eq_bound.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-dvd_to_mod_zero"
  data-name="dvd_to_mod_zero" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="zero_add"
  data-search="dvd_to_mod_zero a multiple is congruent to zero a multiple is balanced-congruent to zero. forall m a. (exists k. a = m * k) -&gt; exists u v. a + m * u = 0 + m * v congruence zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>dvd_to_mod_zero</code><span>A multiple is congruent to zero</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A multiple is balanced-congruent to zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-dvd_to_mod_zero">Copy statement</button>
        <pre id="statement-dvd_to_mod_zero"><code>forall m a. (exists k. a = m * k) -&gt; exists u v. a + m * u = 0 + m * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-dvd_to_mod_zero">Copy proof</button>
        <pre id="proof-dvd_to_mod_zero"><code>pa prove forall m a. (exists k. a = m * k) -&gt; exists u v. a + m * u = 0 + m * v
use zero_add
intro m
intro a
intro h
cases h
exists 0
exists x
rewrite h_witness
simp [zero_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>41</dd></div>
        <div><dt>Distinct objects</dt><dd>40</dd></div>
        <div><dt>Reused references</dt><dd>1</dd></div>
        <div><dt>Depth</dt><dd>14</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fa1d8f3ac2a809b22e7f1e8e10bc5246042d0ad636555ebd6506c20d91cfc45b">fa1d8f3ac2a8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for dvd_to_mod_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib dvd_to_mod_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4365">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/dvd_to_mod_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_residue"
  data-name="add_residue" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_assoc,mul_add"
  data-search="add_residue absorb a known residue decomposition into a multiple absorb a second quotient into an existing residue equation. forall a u c r s. r = a * c + s -&gt; a * u + r = a * (u + c) + s congruence add_assoc mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_residue</code><span>Absorb a known residue decomposition into a multiple</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Absorb a second quotient into an existing residue equation.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="square_residue_lift" href="#theorem-square_residue_lift"><code>square_residue_lift</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_residue">Copy statement</button>
        <pre id="statement-add_residue"><code>forall a u c r s. r = a * c + s -&gt; a * u + r = a * (u + c) + s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_residue">Copy proof</button>
        <pre id="proof-add_residue"><code>pa prove forall a u c r s. r = a * c + s -&gt; a * u + r = a * (u + c) + s
use add_assoc
use mul_add
intro a
intro u
intro c
intro r
intro s
intro hr
trans a * u + (a * c + s)
congr
refl
exact hr
trans (a * u + a * c) + s
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>135</dd></div>
        <div><dt>Distinct objects</dt><dd>95</dd></div>
        <div><dt>Reused references</dt><dd>8</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2b9ca2734b621bbba1e0d205fed8d84086e57b9f505c5e6d8f7f9d0208ca1cbf">2b9ca2734b62…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_residue">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_residue</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4383">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_residue.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-add_residue_lift"
  data-name="add_residue_lift" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_comm,add_assoc,mul_add"
  data-search="add_residue_lift lift an additive residue decomposition combine two quotient-and-residue summands and normalize the residue. forall a x u r q t c s. x = a * q + t -&gt; r + t = a * c + s -&gt; (a * u + r) + x = a * ((u + q) + c) + s congruence add_comm add_assoc mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>add_residue_lift</code><span>Lift an additive residue decomposition</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Combine two quotient-and-residue summands and normalize the residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-add_residue_lift">Copy statement</button>
        <pre id="statement-add_residue_lift"><code>forall a x u r q t c s. x = a * q + t -&gt; r + t = a * c + s -&gt; (a * u + r) + x = a * ((u + q) + c) + s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-add_residue_lift">Copy proof</button>
        <pre id="proof-add_residue_lift"><code>pa prove forall a x u r q t c s. x = a * q + t -&gt; r + t = a * c + s -&gt; (a * u + r) + x = a * ((u + q) + c) + s
use add_comm
use add_assoc
use mul_add
intro a
intro x
intro u
intro r
intro q
intro t
intro c
intro s
intro hx
intro hr
trans (a * u + r) + (a * q + t)
congr
refl
exact hx
trans a * u + (r + (a * q + t))
apply add_assoc
trans a * u + ((r + a * q) + t)
congr
refl
symm
apply add_assoc
trans a * u + ((a * q + r) + t)
congr
refl
congr
apply add_comm
refl
trans a * u + (a * q + (r + t))
congr
refl
apply add_assoc
trans (a * u + a * q) + (r + t)
symm
apply add_assoc
trans a * (u + q) + (r + t)
congr
symm
apply mul_add
refl
trans a * (u + q) + (a * c + s)
congr
refl
exact hr
trans (a * (u + q) + a * c) + s
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>259</dd></div>
        <div><dt>Distinct objects</dt><dd>211</dd></div>
        <div><dt>Reused references</dt><dd>16</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7eb051f21c6a3afffe2dcab88d3de40a906816f822f7ce497d6640ed0f2df415">7eb051f21c6a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for add_residue_lift">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib add_residue_lift</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4408">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/add_residue_lift.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-square_decomp"
  data-name="square_decomp" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_assoc,mul_comm,mul_add,add_mul,mul_assoc"
  data-search="square_decomp expand the square of a quotient-residue decomposition expand a square while retaining an explicit quotient and remainder. forall a z q r. z = a * q + r -&gt; z * z = a * (q * z + r * q) + r * r congruence add_assoc mul_comm mul_add add_mul mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>square_decomp</code><span>Expand the square of a quotient-residue decomposition</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Expand a square while retaining an explicit quotient and remainder.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="square_residue_lift" href="#theorem-square_residue_lift"><code>square_residue_lift</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-square_decomp">Copy statement</button>
        <pre id="statement-square_decomp"><code>forall a z q r. z = a * q + r -&gt; z * z = a * (q * z + r * q) + r * r</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-square_decomp">Copy proof</button>
        <pre id="proof-square_decomp"><code>pa prove forall a z q r. z = a * q + r -&gt; z * z = a * (q * z + r * q) + r * r
use add_assoc
use mul_comm
use mul_add
use add_mul
use mul_assoc
intro a
intro z
intro q
intro r
intro hz
trans (a * q + r) * z
congr
exact hz
refl
trans (a * q) * z + r * z
apply add_mul
trans a * (q * z) + r * z
congr
apply mul_assoc
refl
trans a * (q * z) + r * (a * q + r)
congr
refl
congr
refl
exact hz
trans a * (q * z) + (r * (a * q) + r * r)
congr
refl
apply mul_add
trans a * (q * z) + (a * (r * q) + r * r)
congr
refl
congr
trans (r * a) * q
symm
apply mul_assoc
trans (a * r) * q
congr
apply mul_comm
refl
apply mul_assoc
refl
trans (a * (q * z) + a * (r * q)) + r * r
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>847</dd></div>
        <div><dt>Distinct objects</dt><dd>370</dd></div>
        <div><dt>Reused references</dt><dd>40</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>23</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="504cec4892220f10b7e710079033516dd7e19b4bf49f1651654fc15b942771d9">504cec489222…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for square_decomp">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib square_decomp</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4466">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/square_decomp.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-square_residue_lift"
  data-name="square_residue_lift" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="square_decomp,add_residue"
  data-search="square_residue_lift lift a residue decomposition through squaring lift one quotient-and-remainder equation through squaring. forall a z q r c s. z = a * q + r -&gt; r * r = a * c + s -&gt; z * z = a * ((q * z + r * q) + c) + s congruence square_decomp add_residue">
  <details>
    <summary>
      <span class="pa-card-title"><code>square_residue_lift</code><span>Lift a residue decomposition through squaring</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Lift one quotient-and-remainder equation through squaring.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="square_decomp" href="#theorem-square_decomp"><code>square_decomp</code></a> <a class="pa-theorem-chip" data-theorem-link="add_residue" href="#theorem-add_residue"><code>add_residue</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="square_residue_witness" href="#theorem-square_residue_witness"><code>square_residue_witness</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_three" href="#theorem-mod5_square_residue_three"><code>mod5_square_residue_three</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_four" href="#theorem-mod5_square_residue_four"><code>mod5_square_residue_four</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_one" href="#theorem-mod5_fourth_power_one"><code>mod5_fourth_power_one</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-square_residue_lift">Copy statement</button>
        <pre id="statement-square_residue_lift"><code>forall a z q r c s. z = a * q + r -&gt; r * r = a * c + s -&gt; z * z = a * ((q * z + r * q) + c) + s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-square_residue_lift">Copy proof</button>
        <pre id="proof-square_residue_lift"><code>pa prove forall a z q r c s. z = a * q + r -&gt; r * r = a * c + s -&gt; z * z = a * ((q * z + r * q) + c) + s
use square_decomp
use add_residue
intro a
intro z
intro q
intro r
intro c
intro s
intro hz
intro hrc
trans a * (q * z + r * q) + r * r
apply square_decomp
exact hz
apply add_residue
exact hrc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,008</dd></div>
        <div><dt>Distinct objects</dt><dd>421</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>30</dd></div>
        <div><dt>Cuts</dt><dd>28</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="efdeed4ea2968783395ce0f8b64a6aa44729fd919b1e0a4a947aba2a9590b7ba">efdeed4ea296…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for square_residue_lift">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib square_residue_lift</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4519">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/square_residue_lift.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-square_residue_witness"
  data-name="square_residue_witness" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="square_residue_lift"
  data-search="square_residue_witness package a square residue as an existential witness existential wrapper for the generic square-residue lift. forall a z q r c s. z = a * q + r -&gt; r * r = a * c + s -&gt; exists w. z * z = a * w + s congruence square_residue_lift">
  <details>
    <summary>
      <span class="pa-card-title"><code>square_residue_witness</code><span>Package a square residue as an existential witness</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Existential wrapper for the generic square-residue lift.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="square_residue_lift" href="#theorem-square_residue_lift"><code>square_residue_lift</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-square_residue_witness">Copy statement</button>
        <pre id="statement-square_residue_witness"><code>forall a z q r c s. z = a * q + r -&gt; r * r = a * c + s -&gt; exists w. z * z = a * w + s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-square_residue_witness">Copy proof</button>
        <pre id="proof-square_residue_witness"><code>pa prove forall a z q r c s. z = a * q + r -&gt; r * r = a * c + s -&gt; exists w. z * z = a * w + s
use square_residue_lift
intro a
intro z
intro q
intro r
intro c
intro s
intro hz
intro hrc
exists (q * z + r * q) + c
apply square_residue_lift
exact hz
exact hrc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,029</dd></div>
        <div><dt>Distinct objects</dt><dd>442</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>29</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3246695c5c674aeb6882f07e598df7a19fb38fe228839d89e3b183cf18f14701">3246695c5c67…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for square_residue_witness">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib square_residue_witness</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4540">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/square_residue_witness.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bezout_mod_left"
  data-name="bezout_mod_left" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_comm"
  data-search="bezout_mod_left balanced bézout identity projected modulo the left modulus a balanced bezout identity selects the right coefficient modulo the left modulus. forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -&gt; exists u v. n * yp + m * u = (1 + n * yn) + m * v congruence add_assoc add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>bezout_mod_left</code><span>Balanced Bézout identity projected modulo the left modulus</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A balanced Bezout identity selects the right coefficient modulo the left modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bezout_mod_left">Copy statement</button>
        <pre id="statement-bezout_mod_left"><code>forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -&gt; exists u v. n * yp + m * u = (1 + n * yn) + m * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bezout_mod_left">Copy proof</button>
        <pre id="proof-bezout_mod_left"><code>pa prove forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -&gt; exists u v. n * yp + m * u = (1 + n * yn) + m * v
use add_assoc
use add_comm
intro m
intro n
intro xp
intro yp
intro xn
intro yn
intro h
exists xp
exists xn
trans m * xp + n * yp
apply add_comm
trans 1 + (m * xn + n * yn)
exact h
trans 1 + (n * yn + m * xn)
congr
refl
apply add_comm
symm
apply add_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>134</dd></div>
        <div><dt>Distinct objects</dt><dd>123</dd></div>
        <div><dt>Reused references</dt><dd>11</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0ba24c738b192b0a35c82006181468cc99f2d1cea106cfdaf43d38e80d5b20e2">0ba24c738b19…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bezout_mod_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bezout_mod_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4681">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bezout_mod_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bezout_mod_right"
  data-name="bezout_mod_right" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_assoc"
  data-search="bezout_mod_right balanced bézout identity projected modulo the right modulus a balanced bezout identity selects the left coefficient modulo the right modulus. forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -&gt; exists u v. m * xp + n * u = (1 + m * xn) + n * v congruence add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>bezout_mod_right</code><span>Balanced Bézout identity projected modulo the right modulus</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A balanced Bezout identity selects the left coefficient modulo the right modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bezout_mod_right">Copy statement</button>
        <pre id="statement-bezout_mod_right"><code>forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -&gt; exists u v. m * xp + n * u = (1 + m * xn) + n * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bezout_mod_right">Copy proof</button>
        <pre id="proof-bezout_mod_right"><code>pa prove forall m n xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn) -&gt; exists u v. m * xp + n * u = (1 + m * xn) + n * v
use add_assoc
intro m
intro n
intro xp
intro yp
intro xn
intro yn
intro h
exists yp
exists yn
trans 1 + (m * xn + n * yn)
exact h
symm
apply add_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>50</dd></div>
        <div><dt>Distinct objects</dt><dd>47</dd></div>
        <div><dt>Reused references</dt><dd>3</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2b31fb490cc73a830a30434cc534a5a880ed1d52921a4ec97c3e6cdbd932beb2">2b31fb490cc7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bezout_mod_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bezout_mod_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4695">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bezout_mod_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_predecessor_cancel"
  data-name="mod_eq_predecessor_cancel" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_assoc,add_comm,mul_succ_left"
  data-search="mod_eq_predecessor_cancel successor-predecessor cancellation in balanced congruence the predecessor of a successor acts as minus one in balanced congruence. forall k a z. exists u v. ((a + z) + k * z) + s k * u = a + s k * v congruence add_assoc add_comm mul_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_predecessor_cancel</code><span>Successor-predecessor cancellation in balanced congruence</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The predecessor of a successor acts as minus one in balanced congruence.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_predecessor_cancel">Copy statement</button>
        <pre id="statement-mod_eq_predecessor_cancel"><code>forall k a z. exists u v. ((a + z) + k * z) + S k * u = a + S k * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_predecessor_cancel">Copy proof</button>
        <pre id="proof-mod_eq_predecessor_cancel"><code>pa prove forall k a z. exists u v. ((a + z) + k * z) + S k * u = a + S k * v
use add_assoc
use add_comm
use mul_succ_left
intro k
intro a
intro z
exists 0
exists z
rewrite PA5
rewrite PA3
specialize mul_succ_left k
specialize mul_succ_left z
rewrite mul_succ_left
trans a + (z + k * z)
apply add_assoc
congr
refl
apply add_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>315</dd></div>
        <div><dt>Distinct objects</dt><dd>192</dd></div>
        <div><dt>Reused references</dt><dd>19</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>9</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="35e5bcc4216481e35319981c1f0536cda87b5ec2a6c2215b49d5b686cea7686f">35e5bcc42164…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_predecessor_cancel">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_predecessor_cancel</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4707">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_predecessor_cancel.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-binary_crt"
  data-name="binary_crt" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="nonzero_is_succ,coprime_balanced_bezout,bezout_mod_left,bezout_mod_right,mod_eq_mul_left,mul_add,mul_one,dvd_to_mod_zero,mul_assoc,mul_comm,mod_eq_add,mod_eq_refl,mod_eq_trans,mod_eq_predecessor_cancel,zero_add"
  data-search="binary_crt constructive binary chinese remainder theorem constructive binary crt for positive coprime natural moduli using balanced congruence. forall m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. m = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; exists x. (exists u v. x + m * u = a + m * v) /\ (exists r s. x + n * r = b + n * s) congruence nonzero_is_succ coprime_balanced_bezout bezout_mod_left bezout_mod_right mod_eq_mul_left mul_add mul_one dvd_to_mod_zero mul_assoc mul_comm mod_eq_add mod_eq_refl mod_eq_trans mod_eq_predecessor_cancel zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>binary_crt</code><span>Constructive binary Chinese remainder theorem</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Constructive binary CRT for positive coprime natural moduli using balanced congruence.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="nonzero_is_succ" href="#theorem-nonzero_is_succ"><code>nonzero_is_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_balanced_bezout" href="#theorem-coprime_balanced_bezout"><code>coprime_balanced_bezout</code></a> <a class="pa-theorem-chip" data-theorem-link="bezout_mod_left" href="#theorem-bezout_mod_left"><code>bezout_mod_left</code></a> <a class="pa-theorem-chip" data-theorem-link="bezout_mod_right" href="#theorem-bezout_mod_right"><code>bezout_mod_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="dvd_to_mod_zero" href="#theorem-dvd_to_mod_zero"><code>dvd_to_mod_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_add" href="#theorem-mod_eq_add"><code>mod_eq_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_predecessor_cancel" href="#theorem-mod_eq_predecessor_cancel"><code>mod_eq_predecessor_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt_remainders" href="#theorem-binary_crt_remainders"><code>binary_crt_remainders</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_beta_pair" href="#theorem-binary_crt_beta_pair"><code>binary_crt_beta_pair</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_fold_step" href="#theorem-binary_crt_fold_step"><code>binary_crt_fold_step</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_scaled_common_remainder_lift" href="#theorem-crt_scaled_common_remainder_lift"><code>crt_scaled_common_remainder_lift</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-binary_crt">Copy statement</button>
        <pre id="statement-binary_crt"><code>forall m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. m = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; exists x. (exists u v. x + m * u = a + m * v) /\ (exists r s. x + n * r = b + n * s)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-binary_crt">Copy proof</button>
        <pre id="proof-binary_crt"><code>pa prove forall m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. m = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; exists x. (exists u v. x + m * u = a + m * v) /\ (exists r s. x + n * r = b + n * s)
use nonzero_is_succ
use coprime_balanced_bezout
use bezout_mod_left
use bezout_mod_right
use mod_eq_mul_left
use mul_add
use mul_one
use dvd_to_mod_zero
use mul_assoc
use mul_comm
use mod_eq_add
use mod_eq_refl
use mod_eq_trans
use mod_eq_predecessor_cancel
use zero_add
intro m
intro n
intro a
intro b
intro hm
intro hn
intro hcop
have hms : exists k. m = S k
specialize nonzero_is_succ m
apply nonzero_is_succ
exact hm
have hns : exists k. n = S k
specialize nonzero_is_succ n
apply nonzero_is_succ
exact hn
have hbez : exists xp yp xn yn. m * xp + n * yp = 1 + (m * xn + n * yn)
specialize coprime_balanced_bezout m
specialize coprime_balanced_bezout n
apply coprime_balanced_bezout
exact hcop
cases hms
cases hns
cases hbez
cases hbez_witness
cases hbez_witness_witness
cases hbez_witness_witness_witness
have hbl : exists u v. n * x3 + m * u = (1 + n * x5) + m * v
specialize bezout_mod_left m
specialize bezout_mod_left n
specialize bezout_mod_left x2
specialize bezout_mod_left x3
specialize bezout_mod_left x4
specialize bezout_mod_left x5
apply bezout_mod_left
exact hbez_witness_witness_witness_witness
have hbr : exists u v. m * x2 + n * u = (1 + m * x4) + n * v
specialize bezout_mod_right m
specialize bezout_mod_right n
specialize bezout_mod_right x2
specialize bezout_mod_right x3
specialize bezout_mod_right x4
specialize bezout_mod_right x5
apply bezout_mod_right
exact hbez_witness_witness_witness_witness
have hal0 : exists u v. (a * (n * x3)) + m * u = (a * (1 + n * x5)) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left (n * x3)
specialize mod_eq_mul_left (1 + n * x5)
specialize mod_eq_mul_left a
apply mod_eq_mul_left
exact hbl
have hal : exists u v. (a * (n * x3)) + m * u = (a + a * (n * x5)) + m * v
have haexpand : a * (1 + n * x5) = a + a * (n * x5)
trans a * 1 + a * (n * x5)
apply mul_add
congr
apply mul_one
refl
rewrite &lt;- haexpand
exact hal0
have hbm : exists u v. (b * (m * x2)) + m * u = 0 + m * v
apply dvd_to_mod_zero
exists b * x2
trans (b * m) * x2
symm
apply mul_assoc
trans (m * b) * x2
congr
apply mul_comm
refl
apply mul_assoc
have hym : exists u v. ((a * (n * x3)) + (b * (m * x2))) + m * u = ((a + a * (n * x5)) + 0) + m * v
specialize mod_eq_add m
specialize mod_eq_add (a * (n * x3))
specialize mod_eq_add (a + a * (n * x5))
specialize mod_eq_add (b * (m * x2))
specialize mod_eq_add 0
apply mod_eq_add
exact hal
exact hbm
have hym_norm : exists u v. ((a * (n * x3)) + (b * (m * x2))) + m * u = (a + a * (n * x5)) + m * v
have hym_zero : (a + a * (n * x5)) + 0 = a + a * (n * x5)
rewrite PA3
refl
rewrite &lt;- hym_zero
exact hym
have hkm : exists u v. (x * (a * (n * x5))) + m * u = (x * (a * (n * x5))) + m * v
specialize mod_eq_refl m
specialize mod_eq_refl (x * (a * (n * x5)))
apply mod_eq_refl
have hymk : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + m * u = ((a + a * (n * x5)) + (x * (a * (n * x5)))) + m * v
specialize mod_eq_add m
specialize mod_eq_add ((a * (n * x3)) + (b * (m * x2)))
specialize mod_eq_add (a + a * (n * x5))
specialize mod_eq_add (x * (a * (n * x5)))
specialize mod_eq_add (x * (a * (n * x5)))
apply mod_eq_add
exact hym_norm
exact hkm
have hcancelm : exists u v. ((a + a * (n * x5)) + x * (a * (n * x5))) + S x * u = a + S x * v
specialize mod_eq_predecessor_cancel x
specialize mod_eq_predecessor_cancel a
specialize mod_eq_predecessor_cancel (a * (n * x5))
apply mod_eq_predecessor_cancel
rewrite &lt;- hms_witness at hcancelm
rewrite &lt;- hms_witness at hcancelm
have hbasem : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + m * u = a + m * v
specialize mod_eq_trans m
specialize mod_eq_trans (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
specialize mod_eq_trans ((a + a * (n * x5)) + (x * (a * (n * x5))))
specialize mod_eq_trans a
apply mod_eq_trans
exact hymk
exact hcancelm
have hknznm : exists u v. (x1 * (b * (m * x4))) + m * u = 0 + m * v
apply dvd_to_mod_zero
exists x1 * (b * x4)
trans x1 * ((b * m) * x4)
congr
refl
symm
apply mul_assoc
trans x1 * ((m * b) * x4)
congr
refl
congr
apply mul_comm
refl
trans x1 * (m * (b * x4))
congr
refl
apply mul_assoc
trans (x1 * m) * (b * x4)
symm
apply mul_assoc
trans (m * x1) * (b * x4)
congr
apply mul_comm
refl
apply mul_assoc
have hfinalm0 : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + m * u = (a + 0) + m * v
specialize mod_eq_add m
specialize mod_eq_add (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
specialize mod_eq_add a
specialize mod_eq_add (x1 * (b * (m * x4)))
specialize mod_eq_add 0
apply mod_eq_add
exact hbasem
exact hknznm
have hazerom : exists u v. (a + 0) + m * u = a + m * v
exists 0
exists 0
simp
have hfinalm : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + m * u = a + m * v
specialize mod_eq_trans m
specialize mod_eq_trans ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4))))
specialize mod_eq_trans (a + 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hfinalm0
exact hazerom
have hbn0 : exists u v. (b * (m * x2)) + n * u = (b * (1 + m * x4)) + n * v
specialize mod_eq_mul_left n
specialize mod_eq_mul_left (m * x2)
specialize mod_eq_mul_left (1 + m * x4)
specialize mod_eq_mul_left b
apply mod_eq_mul_left
exact hbr
have hbn : exists u v. (b * (m * x2)) + n * u = (b + b * (m * x4)) + n * v
have hbexpand : b * (1 + m * x4) = b + b * (m * x4)
trans b * 1 + b * (m * x4)
apply mul_add
congr
apply mul_one
refl
rewrite &lt;- hbexpand
exact hbn0
have han : exists u v. (a * (n * x3)) + n * u = 0 + n * v
apply dvd_to_mod_zero
exists a * x3
trans (a * n) * x3
symm
apply mul_assoc
trans (n * a) * x3
congr
apply mul_comm
refl
apply mul_assoc
have hyn0 : exists u v. ((a * (n * x3)) + (b * (m * x2))) + n * u = (0 + (b + b * (m * x4))) + n * v
specialize mod_eq_add n
specialize mod_eq_add (a * (n * x3))
specialize mod_eq_add 0
specialize mod_eq_add (b * (m * x2))
specialize mod_eq_add (b + b * (m * x4))
apply mod_eq_add
exact han
exact hbn
have hyn_norm : exists u v. ((a * (n * x3)) + (b * (m * x2))) + n * u = (b + b * (m * x4)) + n * v
have hyn_zero : 0 + (b + b * (m * x4)) = b + b * (m * x4)
specialize zero_add (b + b * (m * x4))
exact zero_add
rewrite &lt;- hyn_zero
exact hyn0
have hkmz : exists u v. (x * (a * (n * x5))) + n * u = 0 + n * v
apply dvd_to_mod_zero
exists x * (a * x5)
trans x * ((a * n) * x5)
congr
refl
symm
apply mul_assoc
trans x * ((n * a) * x5)
congr
refl
congr
apply mul_comm
refl
trans x * (n * (a * x5))
congr
refl
apply mul_assoc
trans (x * n) * (a * x5)
symm
apply mul_assoc
trans (n * x) * (a * x5)
congr
apply mul_comm
refl
apply mul_assoc
have hyn1 : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + n * u = ((b + b * (m * x4)) + 0) + n * v
specialize mod_eq_add n
specialize mod_eq_add ((a * (n * x3)) + (b * (m * x2)))
specialize mod_eq_add (b + b * (m * x4))
specialize mod_eq_add (x * (a * (n * x5)))
specialize mod_eq_add 0
apply mod_eq_add
exact hyn_norm
exact hkmz
have hyn1_norm : exists u v. (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + n * u = (b + b * (m * x4)) + n * v
have hyn1_zero : (b + b * (m * x4)) + 0 = b + b * (m * x4)
rewrite PA3
refl
rewrite &lt;- hyn1_zero
exact hyn1
have hkn : exists u v. (x1 * (b * (m * x4))) + n * u = (x1 * (b * (m * x4))) + n * v
specialize mod_eq_refl n
specialize mod_eq_refl (x1 * (b * (m * x4)))
apply mod_eq_refl
have hynk : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + n * u = ((b + b * (m * x4)) + (x1 * (b * (m * x4)))) + n * v
specialize mod_eq_add n
specialize mod_eq_add (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5))))
specialize mod_eq_add (b + b * (m * x4))
specialize mod_eq_add (x1 * (b * (m * x4)))
specialize mod_eq_add (x1 * (b * (m * x4)))
apply mod_eq_add
exact hyn1_norm
exact hkn
have hcanceln : exists u v. ((b + b * (m * x4)) + x1 * (b * (m * x4))) + S x1 * u = b + S x1 * v
specialize mod_eq_predecessor_cancel x1
specialize mod_eq_predecessor_cancel b
specialize mod_eq_predecessor_cancel (b * (m * x4))
apply mod_eq_predecessor_cancel
rewrite &lt;- hns_witness at hcanceln
rewrite &lt;- hns_witness at hcanceln
have hfinaln : exists u v. ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))) + n * u = b + n * v
specialize mod_eq_trans n
specialize mod_eq_trans ((((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4))))
specialize mod_eq_trans ((b + b * (m * x4)) + (x1 * (b * (m * x4))))
specialize mod_eq_trans b
apply mod_eq_trans
exact hynk
exact hcanceln
exists (((a * (n * x3)) + (b * (m * x2))) + (x * (a * (n * x5)))) + (x1 * (b * (m * x4)))
split
exact hfinalm
exact hfinaln
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,044</dd></div>
        <div><dt>Distinct objects</dt><dd>1,929</dd></div>
        <div><dt>Reused references</dt><dd>109</dd></div>
        <div><dt>Depth</dt><dd>51</dd></div>
        <div><dt>Cuts</dt><dd>144</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fd5384ba933f194fe0229c01f97f3261d12dfe8586196f1fdd390349aefad2df">fd5384ba933f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for binary_crt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib binary_crt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4721">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/binary_crt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-binary_crt_remainders"
  data-name="binary_crt_remainders" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="binary_crt,mod_eq_to_remainder_decomposition"
  data-search="binary_crt_remainders binary crt with directed remainder witnesses binary crt with bounded residues exposed as directed quotient/remainder equations. forall m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. m = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; (exists ha. ha + s a = m) -&gt; (exists hb. hb + s b = n) -&gt; exists x q r. (x = q * m + a /\ x = r * n + b) congruence binary_crt mod_eq_to_remainder_decomposition">
  <details>
    <summary>
      <span class="pa-card-title"><code>binary_crt_remainders</code><span>Binary CRT with directed remainder witnesses</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Binary CRT with bounded residues exposed as directed quotient/remainder equations.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-binary_crt_remainders">Copy statement</button>
        <pre id="statement-binary_crt_remainders"><code>forall m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. m = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; (exists ha. ha + S a = m) -&gt; (exists hb. hb + S b = n) -&gt; exists x q r. (x = q * m + a /\ x = r * n + b)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-binary_crt_remainders">Copy proof</button>
        <pre id="proof-binary_crt_remainders"><code>pa prove forall m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. m = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; (exists ha. ha + S a = m) -&gt; (exists hb. hb + S b = n) -&gt; exists x q r. (x = q * m + a /\ x = r * n + b)
use binary_crt
use mod_eq_to_remainder_decomposition
intro m
intro n
intro a
intro b
intro hm
intro hn
intro hcop
intro ha
intro hb
have hcrt : exists x. (exists u v. x + m * u = a + m * v) /\ (exists r s. x + n * r = b + n * s)
specialize binary_crt m
specialize binary_crt n
specialize binary_crt a
specialize binary_crt b
apply binary_crt
exact hm
exact hn
exact hcop
cases hcrt
cases hcrt_witness
have hma : exists q. x = q * m + a
specialize mod_eq_to_remainder_decomposition m
specialize mod_eq_to_remainder_decomposition x
specialize mod_eq_to_remainder_decomposition a
apply mod_eq_to_remainder_decomposition
exact hm
exact ha
exact hcrt_witness_left
have hnb : exists q. x = q * n + b
specialize mod_eq_to_remainder_decomposition n
specialize mod_eq_to_remainder_decomposition x
specialize mod_eq_to_remainder_decomposition b
apply mod_eq_to_remainder_decomposition
exact hn
exact hb
exact hcrt_witness_right
cases hma
cases hnb
exists x
exists x1
exists x2
split
exact hma_witness
exact hnb_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,890</dd></div>
        <div><dt>Distinct objects</dt><dd>2,442</dd></div>
        <div><dt>Reused references</dt><dd>125</dd></div>
        <div><dt>Depth</dt><dd>66</dd></div>
        <div><dt>Cuts</dt><dd>196</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f3432e4bdae49a7b4c832eb34d5c1550436a146e36a4321130d2045f4637bd2f">f3432e4bdae4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for binary_crt_remainders">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib binary_crt_remainders</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4864">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/binary_crt_remainders.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-binary_crt_beta_pair"
  data-name="binary_crt_beta_pair" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_modulus_nonzero,binary_crt,beta_at_of_mod_eq_bound"
  data-search="binary_crt_beta_pair a single gödel-beta code realizes two bounded values pairwise coprime beta moduli admit a single code realizing two bounded beta values. forall c i j a b. (forall d. (exists u. s ((s i) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) -&gt; (exists ha. ha + s a = s ((s i) * c)) -&gt; (exists hb. hb + s b = s ((s j) * c)) -&gt; exists code. (((exists ha. ha + s a = s ((s i) * c)) /\ exists q. code = q * s ((s i) * c) + a) /\ ((exists hb. hb + s b = s ((s j) * c)) /\ exists r. code = r * s ((s j) * c) + b)) factorization beta_modulus_nonzero binary_crt beta_at_of_mod_eq_bound">
  <details>
    <summary>
      <span class="pa-card-title"><code>binary_crt_beta_pair</code><span>A single Gödel-beta code realizes two bounded values</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Pairwise coprime beta moduli admit a single code realizing two bounded beta values.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_of_mod_eq_bound" href="#theorem-beta_at_of_mod_eq_bound"><code>beta_at_of_mod_eq_bound</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt_beta_pair_of_gap_dvd" href="#theorem-binary_crt_beta_pair_of_gap_dvd"><code>binary_crt_beta_pair_of_gap_dvd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-binary_crt_beta_pair">Copy statement</button>
        <pre id="statement-binary_crt_beta_pair"><code>forall c i j a b. (forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; (exists ha. ha + S a = S ((S i) * c)) -&gt; (exists hb. hb + S b = S ((S j) * c)) -&gt; exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-binary_crt_beta_pair">Copy proof</button>
        <pre id="proof-binary_crt_beta_pair"><code>pa prove forall c i j a b. (forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; (exists ha. ha + S a = S ((S i) * c)) -&gt; (exists hb. hb + S b = S ((S j) * c)) -&gt; exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))
use beta_modulus_nonzero
use binary_crt
use beta_at_of_mod_eq_bound
intro c
intro i
intro j
intro a
intro b
intro hcop
intro ha
intro hb
have hmi : ~(S ((S i) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero i
exact beta_modulus_nonzero
have hmj : ~(S ((S j) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero j
exact beta_modulus_nonzero
have hcrt : exists code. (exists u v. code + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ (exists r s. code + S ((S j) * c) * r = b + S ((S j) * c) * s)
specialize binary_crt (S ((S i) * c))
specialize binary_crt (S ((S j) * c))
specialize binary_crt a
specialize binary_crt b
apply binary_crt
exact hmi
exact hmj
exact hcop
cases hcrt
cases hcrt_witness
have hati : ((exists h. h + S a = S ((S i) * c)) /\ exists q. x = q * S ((S i) * c) + a)
specialize beta_at_of_mod_eq_bound x
specialize beta_at_of_mod_eq_bound c
specialize beta_at_of_mod_eq_bound i
specialize beta_at_of_mod_eq_bound a
apply beta_at_of_mod_eq_bound
exact ha
exact hcrt_witness_left
have hatj : ((exists h. h + S b = S ((S j) * c)) /\ exists q. x = q * S ((S j) * c) + b)
specialize beta_at_of_mod_eq_bound x
specialize beta_at_of_mod_eq_bound c
specialize beta_at_of_mod_eq_bound j
specialize beta_at_of_mod_eq_bound b
apply beta_at_of_mod_eq_bound
exact hb
exact hcrt_witness_right
exists x
split
exact hati
exact hatj
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,941</dd></div>
        <div><dt>Distinct objects</dt><dd>2,484</dd></div>
        <div><dt>Reused references</dt><dd>126</dd></div>
        <div><dt>Depth</dt><dd>69</dd></div>
        <div><dt>Cuts</dt><dd>201</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d0c6658e1cbb304cd57f39f2a60f1695aeac5bd52587d87d8d22ecdf29067776">d0c6658e1cbb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for binary_crt_beta_pair">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib binary_crt_beta_pair</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4885">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/binary_crt_beta_pair.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_modulus_coprime_base"
  data-name="beta_modulus_coprime_base" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="divides_remainder,divisor_one,mul_comm"
  data-search="beta_modulus_coprime_base a gödel-beta modulus is coprime to its base every beta-shaped successor modulus is coprime to its base c. forall c k d. (exists u. s (k * c) = d * u) -&gt; (exists v. c = d * v) -&gt; d = 1 factorization divides_remainder divisor_one mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_modulus_coprime_base</code><span>A Gödel-beta modulus is coprime to its base</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every beta-shaped successor modulus is coprime to its base c.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divides_remainder" href="#theorem-divides_remainder"><code>divides_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_modulus_coprime_base">Copy statement</button>
        <pre id="statement-beta_modulus_coprime_base"><code>forall c k d. (exists u. S (k * c) = d * u) -&gt; (exists v. c = d * v) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_modulus_coprime_base">Copy proof</button>
        <pre id="proof-beta_modulus_coprime_base"><code>pa prove forall c k d. (exists u. S (k * c) = d * u) -&gt; (exists v. c = d * v) -&gt; d = 1
use divides_remainder
use divisor_one
use mul_comm
intro c
intro k
intro d
intro hm
intro hc
have hstep : S (k * c) = c * k + 1
simp [mul_comm]
have h1 : exists w. 1 = d * w
specialize divides_remainder d
specialize divides_remainder (S (k * c))
specialize divides_remainder c
specialize divides_remainder k
specialize divides_remainder 1
apply divides_remainder
exact hm
exact hc
exact hstep
specialize divisor_one d
apply divisor_one
exact h1
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>874</dd></div>
        <div><dt>Distinct objects</dt><dd>630</dd></div>
        <div><dt>Reused references</dt><dd>54</dd></div>
        <div><dt>Depth</dt><dd>30</dd></div>
        <div><dt>Cuts</dt><dd>24</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f7e3c800ecbe062e709ee0d115860418d316389e361f5b26c5e460340ed6ce42">f7e3c800ecbe…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_modulus_coprime_base">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_modulus_coprime_base</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4910">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_modulus_coprime_base.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-common_divisor_beta_moduli_divides_gap_times_c"
  data-name="common_divisor_beta_moduli_divides_gap_times_c" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="divides_remainder,add_succ_left,add_mul,zero_add"
  data-search="common_divisor_beta_moduli_divides_gap_times_c a common beta-modulus divisor divides the scaled index gap a common divisor of two ordered beta moduli divides the index gap times c. forall c i j gap d. j = i + gap -&gt; (exists u. s ((s i) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; exists w. gap * c = d * w factorization divides_remainder add_succ_left add_mul zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>common_divisor_beta_moduli_divides_gap_times_c</code><span>A common beta-modulus divisor divides the scaled index gap</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common divisor of two ordered beta moduli divides the index gap times c.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="divides_remainder" href="#theorem-divides_remainder"><code>divides_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-common_divisor_beta_moduli_divides_gap_times_c">Copy statement</button>
        <pre id="statement-common_divisor_beta_moduli_divides_gap_times_c"><code>forall c i j gap d. j = i + gap -&gt; (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; exists w. gap * c = d * w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-common_divisor_beta_moduli_divides_gap_times_c">Copy proof</button>
        <pre id="proof-common_divisor_beta_moduli_divides_gap_times_c"><code>pa prove forall c i j gap d. j = i + gap -&gt; (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; exists w. gap * c = d * w
use divides_remainder
use add_succ_left
use add_mul
use zero_add
intro c
intro i
intro j
intro gap
intro d
intro hij
intro hmi
intro hmj
have hstep : S ((S j) * c) = S ((S i) * c) * 1 + gap * c
rewrite hij
specialize add_succ_left i
specialize add_succ_left gap
rewrite &lt;- add_succ_left
simp [add_mul, zero_add]
symm
specialize add_succ_left_before (S i * c)
specialize add_succ_left_before (gap * c)
exact add_succ_left_before
specialize divides_remainder d
specialize divides_remainder (S ((S j) * c))
specialize divides_remainder (S ((S i) * c))
specialize divides_remainder 1
specialize divides_remainder (gap * c)
apply divides_remainder
exact hmj
exact hmi
exact hstep
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>855</dd></div>
        <div><dt>Distinct objects</dt><dd>540</dd></div>
        <div><dt>Reused references</dt><dd>45</dd></div>
        <div><dt>Depth</dt><dd>30</dd></div>
        <div><dt>Cuts</dt><dd>24</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="42a60bc7d8feda4822b114ce9a25a29d27d03a2ab6b9cb2e8a078f4942a8862a">42a60bc7d8fe…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for common_divisor_beta_moduli_divides_gap_times_c">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib common_divisor_beta_moduli_divides_gap_times_c</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4939">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/common_divisor_beta_moduli_divides_gap_times_c.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_moduli_coprime_of_gap_dvd"
  data-name="beta_moduli_coprime_of_gap_dvd" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_modulus_coprime_base,common_divisor_beta_moduli_divides_gap_times_c,multiple_trans,multiple_refl,gauss_coprime_cancel,mul_comm"
  data-search="beta_moduli_coprime_of_gap_dvd divisible index gaps give coprime gödel-beta moduli beta moduli at an additive index gap dividing c are coprime. forall c i j gap. j = i + gap -&gt; (exists k. c = gap * k) -&gt; forall d. (exists u. s ((s i) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1 factorization beta_modulus_coprime_base common_divisor_beta_moduli_divides_gap_times_c multiple_trans multiple_refl gauss_coprime_cancel mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_moduli_coprime_of_gap_dvd</code><span>Divisible index gaps give coprime Gödel-beta moduli</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Beta moduli at an additive index gap dividing c are coprime.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_modulus_coprime_base" href="#theorem-beta_modulus_coprime_base"><code>beta_modulus_coprime_base</code></a> <a class="pa-theorem-chip" data-theorem-link="common_divisor_beta_moduli_divides_gap_times_c" href="#theorem-common_divisor_beta_moduli_divides_gap_times_c"><code>common_divisor_beta_moduli_divides_gap_times_c</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_trans" href="#theorem-multiple_trans"><code>multiple_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt_beta_pair_of_gap_dvd" href="#theorem-binary_crt_beta_pair_of_gap_dvd"><code>binary_crt_beta_pair_of_gap_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_lt_bounded_common_multiple" href="#theorem-beta_moduli_coprime_of_lt_bounded_common_multiple"><code>beta_moduli_coprime_of_lt_bounded_common_multiple</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_moduli_coprime_of_gap_dvd">Copy statement</button>
        <pre id="statement-beta_moduli_coprime_of_gap_dvd"><code>forall c i j gap. j = i + gap -&gt; (exists k. c = gap * k) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_moduli_coprime_of_gap_dvd">Copy proof</button>
        <pre id="proof-beta_moduli_coprime_of_gap_dvd"><code>pa prove forall c i j gap. j = i + gap -&gt; (exists k. c = gap * k) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
use beta_modulus_coprime_base
use common_divisor_beta_moduli_divides_gap_times_c
use multiple_trans
use multiple_refl
use gauss_coprime_cancel
use mul_comm
intro c
intro i
intro j
intro gap
intro hij
intro hgapc
intro d
intro hmi
intro hmj
have hcopdc : forall e. (exists u. d = e * u) -&gt; (exists v. c = e * v) -&gt; e = 1
intro e
intro hed
intro hec
have hmei : exists u. S ((S i) * c) = e * u
specialize multiple_trans d
specialize multiple_trans e
specialize multiple_trans (S ((S i) * c))
apply multiple_trans
exact hmi
exact hed
specialize beta_modulus_coprime_base c
specialize beta_modulus_coprime_base (S i)
specialize beta_modulus_coprime_base e
apply beta_modulus_coprime_base
exact hmei
exact hec
have hgapprod : exists w. gap * c = d * w
specialize common_divisor_beta_moduli_divides_gap_times_c c
specialize common_divisor_beta_moduli_divides_gap_times_c i
specialize common_divisor_beta_moduli_divides_gap_times_c j
specialize common_divisor_beta_moduli_divides_gap_times_c gap
specialize common_divisor_beta_moduli_divides_gap_times_c d
apply common_divisor_beta_moduli_divides_gap_times_c
exact hij
exact hmi
exact hmj
cases hgapprod
have hdivgap : exists w. gap = d * w
specialize gauss_coprime_cancel d
specialize gauss_coprime_cancel c
specialize gauss_coprime_cancel gap
apply gauss_coprime_cancel
exact hcopdc
exists x
trans gap * c
apply mul_comm
exact hgapprod_witness
have hdc : exists w. c = d * w
specialize multiple_trans gap
specialize multiple_trans d
specialize multiple_trans c
apply multiple_trans
exact hgapc
exact hdivgap
specialize hcopdc d
apply hcopdc
specialize multiple_refl d
exact multiple_refl
exact hdc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,007</dd></div>
        <div><dt>Distinct objects</dt><dd>1,803</dd></div>
        <div><dt>Reused references</dt><dd>119</dd></div>
        <div><dt>Depth</dt><dd>56</dd></div>
        <div><dt>Cuts</dt><dd>175</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e31f87a1af34325c3566489d1e3ffe0220e721312a89d0f9a62ea1ea88cf3fe8">e31f87a1af34…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_moduli_coprime_of_gap_dvd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_moduli_coprime_of_gap_dvd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4975">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_moduli_coprime_of_gap_dvd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-binary_crt_beta_pair_of_gap_dvd"
  data-name="binary_crt_beta_pair_of_gap_dvd" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_moduli_coprime_of_gap_dvd,binary_crt_beta_pair"
  data-search="binary_crt_beta_pair_of_gap_dvd a divisible index gap supplies a two-position gödel-beta code discharge the beta-pair crt coprimality premise from a divisible index gap. forall c i j gap a b. j = i + gap -&gt; (exists k. c = gap * k) -&gt; (exists ha. ha + s a = s ((s i) * c)) -&gt; (exists hb. hb + s b = s ((s j) * c)) -&gt; exists code. (((exists ha. ha + s a = s ((s i) * c)) /\ exists q. code = q * s ((s i) * c) + a) /\ ((exists hb. hb + s b = s ((s j) * c)) /\ exists r. code = r * s ((s j) * c) + b)) factorization beta_moduli_coprime_of_gap_dvd binary_crt_beta_pair">
  <details>
    <summary>
      <span class="pa-card-title"><code>binary_crt_beta_pair_of_gap_dvd</code><span>A divisible index gap supplies a two-position Gödel-beta code</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Discharge the beta-pair CRT coprimality premise from a divisible index gap.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_beta_pair" href="#theorem-binary_crt_beta_pair"><code>binary_crt_beta_pair</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-binary_crt_beta_pair_of_gap_dvd">Copy statement</button>
        <pre id="statement-binary_crt_beta_pair_of_gap_dvd"><code>forall c i j gap a b. j = i + gap -&gt; (exists k. c = gap * k) -&gt; (exists ha. ha + S a = S ((S i) * c)) -&gt; (exists hb. hb + S b = S ((S j) * c)) -&gt; exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-binary_crt_beta_pair_of_gap_dvd">Copy proof</button>
        <pre id="proof-binary_crt_beta_pair_of_gap_dvd"><code>pa prove forall c i j gap a b. j = i + gap -&gt; (exists k. c = gap * k) -&gt; (exists ha. ha + S a = S ((S i) * c)) -&gt; (exists hb. hb + S b = S ((S j) * c)) -&gt; exists code. (((exists ha. ha + S a = S ((S i) * c)) /\ exists q. code = q * S ((S i) * c) + a) /\ ((exists hb. hb + S b = S ((S j) * c)) /\ exists r. code = r * S ((S j) * c) + b))
use beta_moduli_coprime_of_gap_dvd
use binary_crt_beta_pair
intro c
intro i
intro j
intro gap
intro a
intro b
intro hij
intro hgapc
intro ha
intro hb
have hcop : forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
specialize beta_moduli_coprime_of_gap_dvd c
specialize beta_moduli_coprime_of_gap_dvd i
specialize beta_moduli_coprime_of_gap_dvd j
specialize beta_moduli_coprime_of_gap_dvd gap
apply beta_moduli_coprime_of_gap_dvd
exact hij
exact hgapc
specialize binary_crt_beta_pair c
specialize binary_crt_beta_pair i
specialize binary_crt_beta_pair j
specialize binary_crt_beta_pair a
specialize binary_crt_beta_pair b
apply binary_crt_beta_pair
exact hcop
exact ha
exact hb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>12,980</dd></div>
        <div><dt>Distinct objects</dt><dd>3,078</dd></div>
        <div><dt>Reused references</dt><dd>165</dd></div>
        <div><dt>Depth</dt><dd>71</dd></div>
        <div><dt>Cuts</dt><dd>378</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="79ec20e402f2b19088c6fb04d4e63229715dbf4e5565e648b4b0f38842fa2a47">79ec20e402f2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for binary_crt_beta_pair_of_gap_dvd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib binary_crt_beta_pair_of_gap_dvd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5050">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/binary_crt_beta_pair_of_gap_dvd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_common_multiple_step"
  data-name="bounded_common_multiple_step" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_eq_zero,succ_ne_zero,zero_or_succ,multiple_mul_right,mul_comm"
  data-search="bounded_common_multiple_step a bounded common multiple extends by one extend a nonzero common multiple through the next positive natural. forall b c. ~(c = 0) -&gt; (forall t. (exists h. s t + s h = s b) -&gt; exists k. c = s t * k) -&gt; exists c2. (~(c2 = 0) /\ forall t. (exists h. s t + s h = s (s b)) -&gt; exists k. c2 = s t * k) divisibility mul_eq_zero succ_ne_zero zero_or_succ multiple_mul_right mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_common_multiple_step</code><span>A bounded common multiple extends by one</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extend a nonzero common multiple through the next positive natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_eq_zero" href="#theorem-mul_eq_zero"><code>mul_eq_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_mul_right" href="#theorem-multiple_mul_right"><code>multiple_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_exists" href="#theorem-bounded_common_multiple_exists"><code>bounded_common_multiple_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_common_multiple_step">Copy statement</button>
        <pre id="statement-bounded_common_multiple_step"><code>forall B c. ~(c = 0) -&gt; (forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k) -&gt; exists c2. (~(c2 = 0) /\ forall t. (exists h. S t + S h = S (S B)) -&gt; exists k. c2 = S t * k)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_common_multiple_step">Copy proof</button>
        <pre id="proof-bounded_common_multiple_step"><code>pa prove forall B c. ~(c = 0) -&gt; (forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k) -&gt; exists c2. (~(c2 = 0) /\ forall t. (exists h. S t + S h = S (S B)) -&gt; exists k. c2 = S t * k)
use mul_eq_zero
use succ_ne_zero
use zero_or_succ
use multiple_mul_right
use mul_comm
intro B
intro c
intro hc
intro hall
exists c * S B
split
have hSB : ~(S B = 0)
specialize succ_ne_zero B
exact succ_ne_zero
have hprod : ~(c * S B = 0)
intro hzero
have hz : c = 0 \/ S B = 0
specialize mul_eq_zero c
specialize mul_eq_zero (S B)
apply mul_eq_zero
exact hzero
cases hz
apply hc
exact hz_left
apply hSB
exact hz_right
exact hprod
intro t
intro ht
cases ht
specialize zero_or_succ x
cases zero_or_succ
rewrite zero_or_succ_left at ht_witness
have hteq : S t = S B
rewrite PA4 at ht_witness
rewrite PA3 at ht_witness
apply PA2
exact ht_witness
exists c
rewrite hteq
apply mul_comm
cases zero_or_succ_right
have hprev : exists h. S t + S h = S B
exists x1
rewrite zero_or_succ_right_witness at ht_witness
rewrite PA4 at ht_witness
apply PA2
exact ht_witness
have hdivc : exists k. c = S t * k
specialize hall t
apply hall
exact hprev
specialize multiple_mul_right (S t)
specialize multiple_mul_right c
specialize multiple_mul_right (S B)
apply multiple_mul_right
exact hdivc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>483</dd></div>
        <div><dt>Distinct objects</dt><dd>417</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>15</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="aa455c44508fbe46578348227387b413695af701093b7b5daf55c1a284c9ccd0">aa455c44508f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_common_multiple_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_common_multiple_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5075">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_common_multiple_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_common_multiple_exists"
  data-name="bounded_common_multiple_exists" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="bounded_common_multiple_step,succ_ne_zero,add_eq_zero_left"
  data-search="bounded_common_multiple_exists every finite initial interval has a nonzero common multiple every finite initial interval has a nonzero common-multiple surrogate. forall b. exists c. (~(c = 0) /\ forall t. (exists h. s t + s h = s b) -&gt; exists k. c = s t * k) divisibility bounded_common_multiple_step succ_ne_zero add_eq_zero_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_common_multiple_exists</code><span>Every finite initial interval has a nonzero common multiple</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every finite initial interval has a nonzero common-multiple surrogate.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_step" href="#theorem-bounded_common_multiple_step"><code>bounded_common_multiple_step</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_left" href="#theorem-add_eq_zero_left"><code>add_eq_zero_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_moduli_pairwise_coprime_exists" href="#theorem-bounded_beta_moduli_pairwise_coprime_exists"><code>bounded_beta_moduli_pairwise_coprime_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_unbounded" href="#theorem-prime_unbounded"><code>prime_unbounded</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_common_multiple_exists">Copy statement</button>
        <pre id="statement-bounded_common_multiple_exists"><code>forall B. exists c. (~(c = 0) /\ forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_common_multiple_exists">Copy proof</button>
        <pre id="proof-bounded_common_multiple_exists"><code>pa prove forall B. exists c. (~(c = 0) /\ forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k)
use bounded_common_multiple_step
use succ_ne_zero
use add_eq_zero_left
intro B
induction B
exists 1
split
specialize succ_ne_zero 0
exact succ_ne_zero
intro t
intro ht
cases ht
exfalso
have hz : S t + x = 0
rewrite PA4 at ht_witness
apply PA2
exact ht_witness
have hst0 : S t = 0
specialize add_eq_zero_left (S t)
specialize add_eq_zero_left x
apply add_eq_zero_left
exact hz
specialize succ_ne_zero t
apply succ_ne_zero
exact hst0
cases IH
cases IH_witness
specialize bounded_common_multiple_step B
specialize bounded_common_multiple_step x
apply bounded_common_multiple_step
exact IH_witness_left
exact IH_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>640</dd></div>
        <div><dt>Distinct objects</dt><dd>481</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>30</dd></div>
        <div><dt>Cuts</dt><dd>22</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ccb71e803625625f870e7768b2428a556b41ee1700e549c7f2ddb728865729bd">ccb71e803625…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_common_multiple_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_common_multiple_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5109">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_common_multiple_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_moduli_coprime_of_lt_bounded_common_multiple"
  data-name="beta_moduli_coprime_of_lt_bounded_common_multiple" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_moduli_coprime_of_gap_dvd,add_comm,le_trans"
  data-search="beta_moduli_coprime_of_lt_bounded_common_multiple ordered bounded gödel-beta moduli are coprime ordered bounded indices have coprime beta moduli when c is a common multiple of the bounded positive gaps. forall b c i j. (forall t. (exists h. s t + s h = s b) -&gt; exists k. c = s t * k) -&gt; (exists g. g + s i = j) -&gt; (exists h. h + j = b) -&gt; forall d. (exists u. s ((s i) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1 factorization beta_moduli_coprime_of_gap_dvd add_comm le_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_moduli_coprime_of_lt_bounded_common_multiple</code><span>Ordered bounded Gödel-beta moduli are coprime</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Ordered bounded indices have coprime beta moduli when c is a common multiple of the bounded positive gaps.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_gap_dvd" href="#theorem-beta_moduli_coprime_of_gap_dvd"><code>beta_moduli_coprime_of_gap_dvd</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_moduli_pairwise_coprime_bounded" href="#theorem-beta_moduli_pairwise_coprime_bounded"><code>beta_moduli_pairwise_coprime_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_moduli_coprime_of_lt_bounded_common_multiple">Copy statement</button>
        <pre id="statement-beta_moduli_coprime_of_lt_bounded_common_multiple"><code>forall B c i j. (forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k) -&gt; (exists g. g + S i = j) -&gt; (exists h. h + j = B) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_moduli_coprime_of_lt_bounded_common_multiple">Copy proof</button>
        <pre id="proof-beta_moduli_coprime_of_lt_bounded_common_multiple"><code>pa prove forall B c i j. (forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k) -&gt; (exists g. g + S i = j) -&gt; (exists h. h + j = B) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
use beta_moduli_coprime_of_gap_dvd
use add_comm
use le_trans
intro B
intro c
intro i
intro j
intro hcm
intro hlt
intro hjB
intro d
intro hdi
intro hdj
cases hlt
have hij : j = i + S x
symm
trans x + S i
simp [add_comm]
exact hlt_witness
have hgaple : exists r. r + S x = B
specialize le_trans (S x)
specialize le_trans j
specialize le_trans B
apply le_trans
exists i
symm
exact hij
exact hjB
cases hgaple
have hgapbound : exists h. S x + S h = S B
exists x1
rewrite PA4
congr
trans x1 + S x
apply add_comm
exact hgaple_witness
have hgapdvd : exists k. c = S x * k
specialize hcm x
apply hcm
exact hgapbound
have hcop : forall e. (exists u. S ((S i) * c) = e * u) -&gt; (exists v. S ((S j) * c) = e * v) -&gt; e = 1
specialize beta_moduli_coprime_of_gap_dvd c
specialize beta_moduli_coprime_of_gap_dvd i
specialize beta_moduli_coprime_of_gap_dvd j
specialize beta_moduli_coprime_of_gap_dvd (S x)
apply beta_moduli_coprime_of_gap_dvd
exact hij
exact hgapdvd
specialize hcop d
apply hcop
exact hdi
exact hdj
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,227</dd></div>
        <div><dt>Distinct objects</dt><dd>1,913</dd></div>
        <div><dt>Reused references</dt><dd>125</dd></div>
        <div><dt>Depth</dt><dd>57</dd></div>
        <div><dt>Cuts</dt><dd>181</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9d97203f21642818bc2e1d67faa7c2966de4009a0c2f54aacedce2859e59f32b">9d97203f2164…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_moduli_coprime_of_lt_bounded_common_multiple">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_moduli_coprime_of_lt_bounded_common_multiple</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5134">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_moduli_coprime_of_lt_bounded_common_multiple.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_moduli_pairwise_coprime_bounded"
  data-name="beta_moduli_pairwise_coprime_bounded" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="lt_trichotomy,beta_moduli_coprime_of_lt_bounded_common_multiple"
  data-search="beta_moduli_pairwise_coprime_bounded a bounded gödel-beta prefix has pairwise coprime moduli distinct indices in a bounded prefix have pairwise coprime beta moduli under a bounded common-multiple invariant. forall b c. (forall t. (exists h. s t + s h = s b) -&gt; exists k. c = s t * k) -&gt; forall i j. ~(i = j) -&gt; (exists hi. hi + i = b) -&gt; (exists hj. hj + j = b) -&gt; forall d. (exists u. s ((s i) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1 factorization lt_trichotomy beta_moduli_coprime_of_lt_bounded_common_multiple">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_moduli_pairwise_coprime_bounded</code><span>A bounded Gödel-beta prefix has pairwise coprime moduli</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Distinct indices in a bounded prefix have pairwise coprime beta moduli under a bounded common-multiple invariant.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_trichotomy" href="#theorem-lt_trichotomy"><code>lt_trichotomy</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_lt_bounded_common_multiple" href="#theorem-beta_moduli_coprime_of_lt_bounded_common_multiple"><code>beta_moduli_coprime_of_lt_bounded_common_multiple</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_moduli_pairwise_coprime_exists" href="#theorem-bounded_beta_moduli_pairwise_coprime_exists"><code>bounded_beta_moduli_pairwise_coprime_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_moduli_pairwise_coprime_bounded">Copy statement</button>
        <pre id="statement-beta_moduli_pairwise_coprime_bounded"><code>forall B c. (forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k) -&gt; forall i j. ~(i = j) -&gt; (exists hi. hi + i = B) -&gt; (exists hj. hj + j = B) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_moduli_pairwise_coprime_bounded">Copy proof</button>
        <pre id="proof-beta_moduli_pairwise_coprime_bounded"><code>pa prove forall B c. (forall t. (exists h. S t + S h = S B) -&gt; exists k. c = S t * k) -&gt; forall i j. ~(i = j) -&gt; (exists hi. hi + i = B) -&gt; (exists hj. hj + j = B) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
use lt_trichotomy
use beta_moduli_coprime_of_lt_bounded_common_multiple
intro B
intro c
intro hcm
intro i
intro j
intro hne
intro hiB
intro hjB
intro d
intro hdi
intro hdj
specialize lt_trichotomy i
specialize lt_trichotomy j
cases lt_trichotomy
exfalso
apply hne
exact lt_trichotomy_left
cases lt_trichotomy_right
have hcopij : forall e. (exists u. S ((S i) * c) = e * u) -&gt; (exists v. S ((S j) * c) = e * v) -&gt; e = 1
specialize beta_moduli_coprime_of_lt_bounded_common_multiple B
specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
specialize beta_moduli_coprime_of_lt_bounded_common_multiple i
specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
apply beta_moduli_coprime_of_lt_bounded_common_multiple
exact hcm
exact lt_trichotomy_right_left
exact hjB
specialize hcopij d
apply hcopij
exact hdi
exact hdj
have hcopji : forall e. (exists u. S ((S j) * c) = e * u) -&gt; (exists v. S ((S i) * c) = e * v) -&gt; e = 1
specialize beta_moduli_coprime_of_lt_bounded_common_multiple B
specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
specialize beta_moduli_coprime_of_lt_bounded_common_multiple i
apply beta_moduli_coprime_of_lt_bounded_common_multiple
exact hcm
exact lt_trichotomy_right_right
exact hiB
specialize hcopji d
apply hcopji
exact hdj
exact hdi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,348</dd></div>
        <div><dt>Distinct objects</dt><dd>2,034</dd></div>
        <div><dt>Reused references</dt><dd>125</dd></div>
        <div><dt>Depth</dt><dd>59</dd></div>
        <div><dt>Cuts</dt><dd>183</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="67f94b6555418915f7bddeb843f5a7fd534561870f47f2bbf34d46e198321e50">67f94b655541…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_moduli_pairwise_coprime_bounded">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_moduli_pairwise_coprime_bounded</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5166">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_moduli_pairwise_coprime_bounded.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_beta_moduli_pairwise_coprime_exists"
  data-name="bounded_beta_moduli_pairwise_coprime_exists" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="bounded_common_multiple_exists,beta_moduli_pairwise_coprime_bounded"
  data-search="bounded_beta_moduli_pairwise_coprime_exists every finite gödel-beta prefix admits a pairwise-coprime base every finite beta-modulus prefix admits a nonzero base making its distinct positions pairwise coprime. forall b. exists c. (~(c = 0) /\ forall i j. ~(i = j) -&gt; (exists hi. hi + i = b) -&gt; (exists hj. hj + j = b) -&gt; forall d. (exists u. s ((s i) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) factorization bounded_common_multiple_exists beta_moduli_pairwise_coprime_bounded">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_beta_moduli_pairwise_coprime_exists</code><span>Every finite Gödel-beta prefix admits a pairwise-coprime base</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every finite beta-modulus prefix admits a nonzero base making its distinct positions pairwise coprime.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_exists" href="#theorem-bounded_common_multiple_exists"><code>bounded_common_multiple_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_pairwise_coprime_bounded" href="#theorem-beta_moduli_pairwise_coprime_bounded"><code>beta_moduli_pairwise_coprime_bounded</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_beta_moduli_pairwise_coprime_exists">Copy statement</button>
        <pre id="statement-bounded_beta_moduli_pairwise_coprime_exists"><code>forall B. exists c. (~(c = 0) /\ forall i j. ~(i = j) -&gt; (exists hi. hi + i = B) -&gt; (exists hj. hj + j = B) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_beta_moduli_pairwise_coprime_exists">Copy proof</button>
        <pre id="proof-bounded_beta_moduli_pairwise_coprime_exists"><code>pa prove forall B. exists c. (~(c = 0) /\ forall i j. ~(i = j) -&gt; (exists hi. hi + i = B) -&gt; (exists hj. hj + j = B) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)
use bounded_common_multiple_exists
use beta_moduli_pairwise_coprime_bounded
intro B
specialize bounded_common_multiple_exists B
cases bounded_common_multiple_exists
cases bounded_common_multiple_exists_witness
exists x
split
exact bounded_common_multiple_exists_witness_left
specialize beta_moduli_pairwise_coprime_bounded B
specialize beta_moduli_pairwise_coprime_bounded x
apply beta_moduli_pairwise_coprime_bounded
exact bounded_common_multiple_exists_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7,019</dd></div>
        <div><dt>Distinct objects</dt><dd>2,247</dd></div>
        <div><dt>Reused references</dt><dd>132</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>207</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6d8ad65d4fb5f26e141244738ab53b71c3e02eb6fde9cc0f4b4960929099b2b4">6d8ad65d4fb5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_beta_moduli_pairwise_coprime_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_beta_moduli_pairwise_coprime_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5198">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_beta_moduli_pairwise_coprime_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_mul_left"
  data-name="coprime_mul_left" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_trans,gauss_coprime_cancel"
  data-search="coprime_mul_left coprimality is closed under multiplication on the left coprimality with a fixed right operand is closed under multiplication on the left. forall a b n. (forall d. (exists x. a = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1) -&gt; (forall d. (exists x. b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1) -&gt; forall d. (exists x. a * b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1 gcd_coprime multiple_trans gauss_coprime_cancel">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_mul_left</code><span>Coprimality is closed under multiplication on the left</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Coprimality with a fixed right operand is closed under multiplication on the left.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_trans" href="#theorem-multiple_trans"><code>multiple_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_mul_right" href="#theorem-coprime_mul_right"><code>coprime_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_mul_left">Copy statement</button>
        <pre id="statement-coprime_mul_left"><code>forall a b n. (forall d. (exists x. a = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1) -&gt; (forall d. (exists x. b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1) -&gt; forall d. (exists x. a * b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_mul_left">Copy proof</button>
        <pre id="proof-coprime_mul_left"><code>pa prove forall a b n. (forall d. (exists x. a = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1) -&gt; (forall d. (exists x. b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1) -&gt; forall d. (exists x. a * b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1
use multiple_trans
use gauss_coprime_cancel
intro a
intro b
intro n
intro han
intro hbn
intro d
intro hab
intro hdn
have hda : forall e. (exists u. d = e * u) -&gt; (exists v. a = e * v) -&gt; e = 1
intro e
intro hed
intro hea
have hen : exists q. n = e * q
specialize multiple_trans d
specialize multiple_trans e
specialize multiple_trans n
apply multiple_trans
exact hdn
exact hed
specialize han e
apply han
exact hea
exact hen
have hdb : exists w. b = d * w
specialize gauss_coprime_cancel d
specialize gauss_coprime_cancel a
specialize gauss_coprime_cancel b
apply gauss_coprime_cancel
exact hda
exact hab
specialize hbn d
apply hbn
exact hdb
exact hdn
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,975</dd></div>
        <div><dt>Distinct objects</dt><dd>1,558</dd></div>
        <div><dt>Reused references</dt><dd>94</dd></div>
        <div><dt>Depth</dt><dd>53</dd></div>
        <div><dt>Cuts</dt><dd>115</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="51b298808927c2b05a997c183519cd9f611b49d94b9e8e067b70cccf4ef65891">51b298808927…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_mul_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_mul_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5217">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_mul_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_mul_right"
  data-name="coprime_mul_right" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="coprime_mul_left,coprime_symm"
  data-search="coprime_mul_right coprimality is closed under multiplication on the right coprimality with a fixed left operand is closed under multiplication on the right. forall n a b. (forall d. (exists x. n = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1) -&gt; (forall d. (exists x. n = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; forall d. (exists x. n = d * x) -&gt; (exists y. a * b = d * y) -&gt; d = 1 gcd_coprime coprime_mul_left coprime_symm">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_mul_right</code><span>Coprimality is closed under multiplication on the right</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Coprimality with a fixed left operand is closed under multiplication on the right.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_mul_left" href="#theorem-coprime_mul_left"><code>coprime_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_symm" href="#theorem-coprime_symm"><code>coprime_symm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_mul_right">Copy statement</button>
        <pre id="statement-coprime_mul_right"><code>forall n a b. (forall d. (exists x. n = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1) -&gt; (forall d. (exists x. n = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; forall d. (exists x. n = d * x) -&gt; (exists y. a * b = d * y) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_mul_right">Copy proof</button>
        <pre id="proof-coprime_mul_right"><code>pa prove forall n a b. (forall d. (exists x. n = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1) -&gt; (forall d. (exists x. n = d * x) -&gt; (exists y. b = d * y) -&gt; d = 1) -&gt; forall d. (exists x. n = d * x) -&gt; (exists y. a * b = d * y) -&gt; d = 1
use coprime_mul_left
use coprime_symm
intro n
intro a
intro b
intro hna
intro hnb
have han : forall d. (exists x. a = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1
specialize coprime_symm n
specialize coprime_symm a
apply coprime_symm
exact hna
have hbn : forall d. (exists x. b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1
specialize coprime_symm n
specialize coprime_symm b
apply coprime_symm
exact hnb
have habn : forall d. (exists x. a * b = d * x) -&gt; (exists y. n = d * y) -&gt; d = 1
specialize coprime_mul_left a
specialize coprime_mul_left b
specialize coprime_mul_left n
apply coprime_mul_left
exact han
exact hbn
specialize coprime_symm (a * b)
specialize coprime_symm n
apply coprime_symm
exact habn
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,017</dd></div>
        <div><dt>Distinct objects</dt><dd>1,600</dd></div>
        <div><dt>Reused references</dt><dd>94</dd></div>
        <div><dt>Depth</dt><dd>54</dd></div>
        <div><dt>Cuts</dt><dd>117</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8a3a38d99c52a152ee05e9848a8c207d5ad54494e24915ed01edc34d0e575c57">8a3a38d99c52…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_mul_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_mul_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5240">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_mul_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_of_mod_eq_multiple"
  data-name="mod_eq_of_mod_eq_multiple" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mul_assoc"
  data-search="mod_eq_of_mod_eq_multiple congruence descends along modulus divisibility balanced congruence descends from a multiple modulus to every divisor modulus. forall m p x a. (exists k. p = m * k) -&gt; (exists u v. x + p * u = a + p * v) -&gt; exists r s. x + m * r = a + m * s congruence mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_of_mod_eq_multiple</code><span>Congruence descends along modulus divisibility</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced congruence descends from a multiple modulus to every divisor modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt_fold_step" href="#theorem-binary_crt_fold_step"><code>binary_crt_fold_step</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_common_solution_implies_gcd_compatible" href="#theorem-crt_common_solution_implies_gcd_compatible"><code>crt_common_solution_implies_gcd_compatible</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_iff_pair" href="#theorem-mod_eq_lcm_iff_pair"><code>mod_eq_lcm_iff_pair</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_of_mod_eq_multiple">Copy statement</button>
        <pre id="statement-mod_eq_of_mod_eq_multiple"><code>forall m P x a. (exists k. P = m * k) -&gt; (exists u v. x + P * u = a + P * v) -&gt; exists r s. x + m * r = a + m * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_of_mod_eq_multiple">Copy proof</button>
        <pre id="proof-mod_eq_of_mod_eq_multiple"><code>pa prove forall m P x a. (exists k. P = m * k) -&gt; (exists u v. x + P * u = a + P * v) -&gt; exists r s. x + m * r = a + m * s
use mul_assoc
intro m
intro P
intro x
intro a
intro hdiv
intro hmod
cases hdiv
cases hmod
cases hmod_witness
rewrite hdiv_witness at hmod_witness_witness
rewrite hdiv_witness at hmod_witness_witness
exists x1 * x2
exists x1 * x3
trans x + (m * x1) * x2
congr
refl
symm
apply mul_assoc
trans a + (m * x1) * x3
exact hmod_witness_witness
congr
refl
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>157</dd></div>
        <div><dt>Distinct objects</dt><dd>145</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>23</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f3d6047561573ffeeeb14c5985c18ababcc42f38cc2784a6f4f5275e68d6bf76">f3d604756157…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_of_mod_eq_multiple">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_of_mod_eq_multiple</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5263">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_of_mod_eq_multiple.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-binary_crt_fold_step"
  data-name="binary_crt_fold_step" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="binary_crt,mod_eq_of_mod_eq_multiple,mod_eq_trans"
  data-search="binary_crt_fold_step one crt fold step preserves all accumulated congruences one binary crt extension preserves every old congruence whose modulus divides the accumulated product. forall p n x b. ~(p = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. p = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; exists z. ((forall m a. (exists k. p = m * k) -&gt; (exists u v. x + m * u = a + m * v) -&gt; exists r s. z + m * r = a + m * s) /\ exists q r. z + n * q = b + n * r) congruence binary_crt mod_eq_of_mod_eq_multiple mod_eq_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>binary_crt_fold_step</code><span>One CRT fold step preserves all accumulated congruences</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">One binary CRT extension preserves every old congruence whose modulus divides the accumulated product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_of_mod_eq_multiple" href="#theorem-mod_eq_of_mod_eq_multiple"><code>mod_eq_of_mod_eq_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-binary_crt_fold_step">Copy statement</button>
        <pre id="statement-binary_crt_fold_step"><code>forall P n x b. ~(P = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. P = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; exists z. ((forall m a. (exists k. P = m * k) -&gt; (exists u v. x + m * u = a + m * v) -&gt; exists r s. z + m * r = a + m * s) /\ exists q r. z + n * q = b + n * r)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-binary_crt_fold_step">Copy proof</button>
        <pre id="proof-binary_crt_fold_step"><code>pa prove forall P n x b. ~(P = 0) -&gt; ~(n = 0) -&gt; (forall d. (exists u. P = d * u) -&gt; (exists v. n = d * v) -&gt; d = 1) -&gt; exists z. ((forall m a. (exists k. P = m * k) -&gt; (exists u v. x + m * u = a + m * v) -&gt; exists r s. z + m * r = a + m * s) /\ exists q r. z + n * q = b + n * r)
use binary_crt
use mod_eq_of_mod_eq_multiple
use mod_eq_trans
intro P
intro n
intro x
intro b
intro hP
intro hn
intro hcop
have hcrt : exists z. (exists u v. z + P * u = x + P * v) /\ (exists q r. z + n * q = b + n * r)
specialize binary_crt P
specialize binary_crt n
specialize binary_crt x
specialize binary_crt b
apply binary_crt
exact hP
exact hn
exact hcop
cases hcrt
cases hcrt_witness
exists x1
split
intro m
intro a
intro hmP
intro hxa
have hzx : exists u v. x1 + m * u = x + m * v
specialize mod_eq_of_mod_eq_multiple m
specialize mod_eq_of_mod_eq_multiple P
specialize mod_eq_of_mod_eq_multiple x1
specialize mod_eq_of_mod_eq_multiple x
apply mod_eq_of_mod_eq_multiple
exact hmP
exact hcrt_witness_left
specialize mod_eq_trans m
specialize mod_eq_trans x1
specialize mod_eq_trans x
specialize mod_eq_trans a
apply mod_eq_trans
exact hzx
exact hxa
exact hcrt_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,501</dd></div>
        <div><dt>Distinct objects</dt><dd>2,018</dd></div>
        <div><dt>Reused references</dt><dd>111</dd></div>
        <div><dt>Depth</dt><dd>52</dd></div>
        <div><dt>Cuts</dt><dd>156</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f65c05b0db8af551e664f3194314657c999a9e6528c3dcf71a0ad0f02161f820">f65c05b0db8a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for binary_crt_fold_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib binary_crt_fold_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5282">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/binary_crt_fold_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-right_factor_divides_product"
  data-name="right_factor_divides_product" data-domain="divisibility"
  data-status="checked_m20"
  data-dependencies="mul_comm"
  data-search="right_factor_divides_product the right factor divides a product the right factor divides a product. forall a b. exists k. a * b = b * k divisibility mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>right_factor_divides_product</code><span>The right factor divides a product</span></span>
      <span class="pa-badge pa-domain-divisibility">Divisibility</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The right factor divides a product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-right_factor_divides_product">Copy statement</button>
        <pre id="statement-right_factor_divides_product"><code>forall a b. exists k. a * b = b * k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-right_factor_divides_product">Copy proof</button>
        <pre id="proof-right_factor_divides_product"><code>pa prove forall a b. exists k. a * b = b * k
use mul_comm
intro a
intro b
exists a
apply mul_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>229</dd></div>
        <div><dt>Distinct objects</dt><dd>207</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>7</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="91ff76024f693baa1003685dc3cd57b2e1ebbf3c51dbf38f26f7bce1c573ba35">91ff76024f69…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for right_factor_divides_product">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib right_factor_divides_product</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5310">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/right_factor_divides_product.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_accumulated_product_step"
  data-name="beta_accumulated_product_step" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="mul_ne_zero,right_factor_divides_product,beta_modulus_nonzero,le_eq_or_lt,le_of_succ_le_succ,multiple_mul_right,le_succ_self,lt_of_le_of_lt,lt_irrefl_expanded,beta_moduli_pairwise_coprime_bounded,coprime_mul_left"
  data-search="beta_accumulated_product_step extend the accumulated beta-modulus product invariant extend the accumulated beta-modulus product invariant by one bounded position. forall n c k p. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; (exists h. h + s k = n) -&gt; ~(p = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. p = s ((s i) * c) * q) -&gt; (forall j. (exists g. g + s k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) -&gt; (~(p * s ((s (s k)) * c) = 0) /\ ((forall i. (exists h. h + i = s k) -&gt; exists q. p * s ((s (s k)) * c) = s ((s i) * c) * q) /\ forall j. (exists g. g + s (s k) = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p * s ((s (s k)) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1)) factorization mul_ne_zero right_factor_divides_product beta_modulus_nonzero le_eq_or_lt le_of_succ_le_succ multiple_mul_right le_succ_self lt_of_le_of_lt lt_irrefl_expanded beta_moduli_pairwise_coprime_bounded coprime_mul_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_accumulated_product_step</code><span>Extend the accumulated beta-modulus product invariant</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extend the accumulated beta-modulus product invariant by one bounded position.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_ne_zero" href="#theorem-mul_ne_zero"><code>mul_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="right_factor_divides_product" href="#theorem-right_factor_divides_product"><code>right_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_mul_right" href="#theorem-multiple_mul_right"><code>multiple_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ_self" href="#theorem-le_succ_self"><code>le_succ_self</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_of_le_of_lt" href="#theorem-lt_of_le_of_lt"><code>lt_of_le_of_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_pairwise_coprime_bounded" href="#theorem-beta_moduli_pairwise_coprime_bounded"><code>beta_moduli_pairwise_coprime_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mul_left" href="#theorem-coprime_mul_left"><code>coprime_mul_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_invariant_step" href="#theorem-beta_crt_prefix_invariant_step"><code>beta_crt_prefix_invariant_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_accumulated_product_step">Copy statement</button>
        <pre id="statement-beta_accumulated_product_step"><code>forall N c k P. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -&gt; exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S (S k) = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S (S k)) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_accumulated_product_step">Copy proof</button>
        <pre id="proof-beta_accumulated_product_step"><code>pa prove forall N c k P. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -&gt; exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S (S k) = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S (S k)) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1))
use mul_ne_zero
use right_factor_divides_product
use beta_modulus_nonzero
use le_eq_or_lt
use le_of_succ_le_succ
use multiple_mul_right
use le_succ_self
use lt_of_le_of_lt
use lt_irrefl_expanded
use beta_moduli_pairwise_coprime_bounded
use coprime_mul_left
intro N
intro c
intro k
intro P
intro hcm
intro hkN
intro hP
intro hdiv
intro hfuture
have hnew : ~(S ((S (S k)) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero (S k)
exact beta_modulus_nonzero
split
specialize mul_ne_zero P
specialize mul_ne_zero (S ((S (S k)) * c))
intro hzero
apply mul_ne_zero
exact hP
exact hnew
exact hzero
split
intro i
intro hi
have hsplit : i = S k \/ exists r. r + S i = S k
specialize le_eq_or_lt i
specialize le_eq_or_lt (S k)
apply le_eq_or_lt
exact hi
cases hsplit
rewrite hsplit_left
specialize right_factor_divides_product P
specialize right_factor_divides_product (S ((S (S k)) * c))
exact right_factor_divides_product
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hsplit_right
have hiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hik
specialize multiple_mul_right (S ((S i) * c))
specialize multiple_mul_right P
specialize multiple_mul_right (S ((S (S k)) * c))
apply multiple_mul_right
exact hiP
intro j
intro hSkj
intro hjN
have hkj : exists r. r + S k = j
have hkSk : exists r. r + k = S k
specialize le_succ_self k
exact le_succ_self
specialize lt_of_le_of_lt k
specialize lt_of_le_of_lt (S k)
specialize lt_of_le_of_lt j
apply lt_of_le_of_lt
exact hkSk
exact hSkj
have hPj : forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
specialize hfuture j
apply hfuture
exact hkj
exact hjN
have hneq : ~(S k = j)
intro heq
rewrite &lt;- heq at hSkj
specialize lt_irrefl_expanded (S k)
apply lt_irrefl_expanded
exact hSkj
have hpairs : forall i j. ~(i = j) -&gt; (exists hi. hi + i = N) -&gt; (exists hj. hj + j = N) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
specialize beta_moduli_pairwise_coprime_bounded N
specialize beta_moduli_pairwise_coprime_bounded c
apply beta_moduli_pairwise_coprime_bounded
exact hcm
have hnewj : forall d. (exists u. S ((S (S k)) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
specialize hpairs (S k)
specialize hpairs j
apply hpairs
exact hneq
exact hkN
exact hjN
specialize coprime_mul_left P
specialize coprime_mul_left (S ((S (S k)) * c))
specialize coprime_mul_left (S ((S j) * c))
apply coprime_mul_left
exact hPj
exact hnewj
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>11,174</dd></div>
        <div><dt>Distinct objects</dt><dd>2,348</dd></div>
        <div><dt>Reused references</dt><dd>136</dd></div>
        <div><dt>Depth</dt><dd>69</dd></div>
        <div><dt>Cuts</dt><dd>330</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6da6cc49d4d9374497ee0572f98c23f835adb41e2432a1557fb0a47d9cc7495f">6da6cc49d4d9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_accumulated_product_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_accumulated_product_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5320">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_accumulated_product_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_crt_prefix_congruence_step"
  data-name="beta_crt_prefix_congruence_step" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_modulus_nonzero,le_refl,binary_crt_fold_step,beta_at_exists,beta_at_unique,le_eq_or_lt,le_of_succ_le_succ"
  data-search="beta_crt_prefix_congruence_step extend decoded-prefix congruence by one beta position extend balanced congruence to one more decoded beta position using the crt fold step. forall n c b k p z. (exists h. h + s k = n) -&gt; ~(p = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. p = s ((s i) * c) * q) -&gt; (forall i a. (exists h. h + i = k) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; exists u v. z + s ((s i) * c) * u = a + s ((s i) * c) * v) -&gt; (forall j. (exists g. g + s k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. forall i a. (exists h. h + i = s k) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; exists u v. z2 + s ((s i) * c) * u = a + s ((s i) * c) * v factorization beta_modulus_nonzero le_refl binary_crt_fold_step beta_at_exists beta_at_unique le_eq_or_lt le_of_succ_le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_crt_prefix_congruence_step</code><span>Extend decoded-prefix congruence by one beta position</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extend balanced congruence to one more decoded beta position using the CRT fold step.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_fold_step" href="#theorem-binary_crt_fold_step"><code>binary_crt_fold_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_invariant_step" href="#theorem-beta_crt_prefix_invariant_step"><code>beta_crt_prefix_invariant_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_crt_prefix_congruence_step">Copy statement</button>
        <pre id="statement-beta_crt_prefix_congruence_step"><code>forall N c b k P z. (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. forall i a. (exists h. h + i = S k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_crt_prefix_congruence_step">Copy proof</button>
        <pre id="proof-beta_crt_prefix_congruence_step"><code>pa prove forall N c b k P z. (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. forall i a. (exists h. h + i = S k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
use beta_modulus_nonzero
use le_refl
use binary_crt_fold_step
use beta_at_exists
use beta_at_unique
use le_eq_or_lt
use le_of_succ_le_succ
intro N
intro c
intro b
intro k
intro P
intro z
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
have hnew : ~(S ((S (S k)) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero (S k)
exact beta_modulus_nonzero
have hstrict : exists g. g + S k = S k
specialize le_refl (S k)
exact le_refl
have hcop : forall d. (exists u. P = d * u) -&gt; (exists v. S ((S (S k)) * c) = d * v) -&gt; d = 1
specialize hfuture (S k)
apply hfuture
exact hstrict
exact hkN
have hvalue : exists a. ((exists h. h + S a = S ((S (S k)) * c)) /\ exists q. b = q * S ((S (S k)) * c) + a)
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists (S k)
exact beta_at_exists
cases hvalue
have hfold : exists z2. ((forall m a. (exists q. P = m * q) -&gt; (exists u v. z + m * u = a + m * v) -&gt; exists r s. z2 + m * r = a + m * s) /\ exists q r. z2 + S ((S (S k)) * c) * q = x + S ((S (S k)) * c) * r)
specialize binary_crt_fold_step P
specialize binary_crt_fold_step (S ((S (S k)) * c))
specialize binary_crt_fold_step z
specialize binary_crt_fold_step x
apply binary_crt_fold_step
exact hP
exact hnew
exact hcop
cases hfold
cases hfold_witness
exists x1
intro i
intro a
intro hi
intro hati
have hsplit : i = S k \/ exists r. r + S i = S k
specialize le_eq_or_lt i
specialize le_eq_or_lt (S k)
apply le_eq_or_lt
exact hi
cases hsplit
have hati_new : ((exists h. h + S a = S ((S (S k)) * c)) /\ exists q. b = q * S ((S (S k)) * c) + a)
rewrite &lt;- hsplit_left
rewrite &lt;- hsplit_left
exact hati
have haeq : a = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique (S k)
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
exact hati_new
exact hvalue_witness
rewrite hsplit_left
rewrite hsplit_left
rewrite haeq
exact hfold_witness_right
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hsplit_right
have hmiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hik
have hzold : exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
specialize hcong i
specialize hcong a
apply hcong
exact hik
exact hati
specialize hfold_witness_left (S ((S i) * c))
specialize hfold_witness_left a
apply hfold_witness_left
exact hmiP
exact hzold
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7,352</dd></div>
        <div><dt>Distinct objects</dt><dd>2,564</dd></div>
        <div><dt>Reused references</dt><dd>129</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>213</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="39d62088be96c5368f12cc2426c8468e21c1cea2233409483a95eb2279300038">39d62088be96…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_crt_prefix_congruence_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_crt_prefix_congruence_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5393">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_crt_prefix_congruence_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_crt_prefix_invariant_step"
  data-name="beta_crt_prefix_invariant_step" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_accumulated_product_step,beta_crt_prefix_congruence_step"
  data-search="beta_crt_prefix_invariant_step one full bounded beta-prefix crt invariant step one concrete induction step for the bounded beta-prefix crt invariant. forall n c b k p z. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; (exists h. h + s k = n) -&gt; ~(p = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. p = s ((s i) * c) * q) -&gt; (forall i a. (exists h. h + i = k) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; exists u v. z + s ((s i) * c) * u = a + s ((s i) * c) * v) -&gt; (forall j. (exists g. g + s k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. (~(p * s ((s (s k)) * c) = 0) /\ ((forall i. (exists h. h + i = s k) -&gt; exists q. p * s ((s (s k)) * c) = s ((s i) * c) * q) /\ ((forall i a. (exists h. h + i = s k) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; exists u v. z2 + s ((s i) * c) * u = a + s ((s i) * c) * v) /\ forall j. (exists g. g + s (s k) = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p * s ((s (s k)) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1))) factorization beta_accumulated_product_step beta_crt_prefix_congruence_step">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_crt_prefix_invariant_step</code><span>One full bounded beta-prefix CRT invariant step</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">One concrete induction step for the bounded beta-prefix CRT invariant.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_accumulated_product_step" href="#theorem-beta_accumulated_product_step"><code>beta_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_congruence_step" href="#theorem-beta_crt_prefix_congruence_step"><code>beta_crt_prefix_congruence_step</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_crt_prefix_invariant_step">Copy statement</button>
        <pre id="statement-beta_crt_prefix_invariant_step"><code>forall N c b k P z. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -&gt; exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = S k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S (S k) = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S (S k)) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_crt_prefix_invariant_step">Copy proof</button>
        <pre id="proof-beta_crt_prefix_invariant_step"><code>pa prove forall N c b k P z. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -&gt; exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = S k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S (S k) = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S (S k)) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
use beta_accumulated_product_step
use beta_crt_prefix_congruence_step
intro N
intro c
intro b
intro k
intro P
intro z
intro hcm
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
have hproduct : (~(P * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -&gt; exists q. P * S ((S (S k)) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S (S k) = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S (S k)) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1))
specialize beta_accumulated_product_step N
specialize beta_accumulated_product_step c
specialize beta_accumulated_product_step k
specialize beta_accumulated_product_step P
apply beta_accumulated_product_step
exact hcm
exact hkN
exact hP
exact hdiv
exact hfuture
have hcodes : exists z2. forall i a. (exists h. h + i = S k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
specialize beta_crt_prefix_congruence_step N
specialize beta_crt_prefix_congruence_step c
specialize beta_crt_prefix_congruence_step b
specialize beta_crt_prefix_congruence_step k
specialize beta_crt_prefix_congruence_step P
specialize beta_crt_prefix_congruence_step z
apply beta_crt_prefix_congruence_step
exact hkN
exact hP
exact hdiv
exact hcong
exact hfuture
cases hcodes
cases hproduct
cases hproduct_right
exists x
split
exact hproduct_left
split
exact hproduct_right_left
split
exact hcodes_witness
exact hproduct_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>18,613</dd></div>
        <div><dt>Distinct objects</dt><dd>3,749</dd></div>
        <div><dt>Reused references</dt><dd>186</dd></div>
        <div><dt>Depth</dt><dd>70</dd></div>
        <div><dt>Cuts</dt><dd>545</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9cb74ed1e6aa131bab8b5a7775bd80588f8064838fffb78df2f016f26b6de5dd">9cb74ed1e6aa…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_crt_prefix_invariant_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_crt_prefix_invariant_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5450">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_crt_prefix_invariant_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_beta_crt_prefix_invariant"
  data-name="bounded_beta_crt_prefix_invariant" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_modulus_nonzero,le_zero,multiple_refl,beta_at_to_mod_eq,beta_moduli_coprime_of_lt_bounded_common_multiple,le_succ_self,le_trans,beta_crt_prefix_invariant_step"
  data-search="bounded_beta_crt_prefix_invariant bounded beta-prefix crt invariant concrete ordinary-induction fold of the beta crt invariant through every bounded prefix. forall n c b. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; forall k. (exists h. h + k = n) -&gt; exists p z. (~(p = 0) /\ ((forall i. (exists h. h + i = k) -&gt; exists q. p = s ((s i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; exists u v. z + s ((s i) * c) * u = a + s ((s i) * c) * v) /\ forall j. (exists g. g + s k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1))) factorization beta_modulus_nonzero le_zero multiple_refl beta_at_to_mod_eq beta_moduli_coprime_of_lt_bounded_common_multiple le_succ_self le_trans beta_crt_prefix_invariant_step">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_beta_crt_prefix_invariant</code><span>Bounded beta-prefix CRT invariant</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Concrete ordinary-induction fold of the beta CRT invariant through every bounded prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_refl" href="#theorem-multiple_refl"><code>multiple_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_to_mod_eq" href="#theorem-beta_at_to_mod_eq"><code>beta_at_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_coprime_of_lt_bounded_common_multiple" href="#theorem-beta_moduli_coprime_of_lt_bounded_common_multiple"><code>beta_moduli_coprime_of_lt_bounded_common_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ_self" href="#theorem-le_succ_self"><code>le_succ_self</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_crt_prefix_invariant_step" href="#theorem-beta_crt_prefix_invariant_step"><code>beta_crt_prefix_invariant_step</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_for_existing_code" href="#theorem-bounded_beta_crt_for_existing_code"><code>bounded_beta_crt_for_existing_code</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_beta_crt_prefix_invariant">Copy statement</button>
        <pre id="statement-bounded_beta_crt_prefix_invariant"><code>forall N c b. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; forall k. (exists h. h + k = N) -&gt; exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_beta_crt_prefix_invariant">Copy proof</button>
        <pre id="proof-bounded_beta_crt_prefix_invariant"><code>pa prove forall N c b. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; forall k. (exists h. h + k = N) -&gt; exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
use beta_modulus_nonzero
use le_zero
use multiple_refl
use beta_at_to_mod_eq
use beta_moduli_coprime_of_lt_bounded_common_multiple
use le_succ_self
use le_trans
use beta_crt_prefix_invariant_step
intro N
intro c
intro b
intro hcm
induction k
intro hkN
exists S ((S 0) * c)
exists b
split
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero 0
exact beta_modulus_nonzero
split
intro i
intro hi
have hi0 : i = 0
specialize le_zero i
apply le_zero
exact hi
specialize multiple_refl (S ((S 0) * c))
rewrite hi0
exact multiple_refl
split
intro i
intro a
intro hi
intro hati
specialize beta_at_to_mod_eq b
specialize beta_at_to_mod_eq c
specialize beta_at_to_mod_eq i
specialize beta_at_to_mod_eq a
apply beta_at_to_mod_eq
exact hati
intro j
intro h0j
intro hjN
specialize beta_moduli_coprime_of_lt_bounded_common_multiple N
specialize beta_moduli_coprime_of_lt_bounded_common_multiple c
specialize beta_moduli_coprime_of_lt_bounded_common_multiple 0
specialize beta_moduli_coprime_of_lt_bounded_common_multiple j
apply beta_moduli_coprime_of_lt_bounded_common_multiple
exact hcm
exact h0j
exact hjN
intro hkN
have hkprev : exists h. h + k = N
have hkstep : exists h. h + k = S k
specialize le_succ_self k
exact le_succ_self
specialize le_trans k
specialize le_trans (S k)
specialize le_trans N
apply le_trans
exact hkstep
exact hkN
have hprev : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
apply IH
exact hkprev
cases hprev
cases hprev_witness
cases hprev_witness_witness
cases hprev_witness_witness_right
cases hprev_witness_witness_right_right
have hnext : exists z2. (~(x * S ((S (S k)) * c) = 0) /\ ((forall i. (exists h. h + i = S k) -&gt; exists q. x * S ((S (S k)) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = S k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S (S k) = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. x * S ((S (S k)) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
specialize beta_crt_prefix_invariant_step N
specialize beta_crt_prefix_invariant_step c
specialize beta_crt_prefix_invariant_step b
specialize beta_crt_prefix_invariant_step k
specialize beta_crt_prefix_invariant_step x
specialize beta_crt_prefix_invariant_step x1
apply beta_crt_prefix_invariant_step
exact hcm
exact hkN
exact hprev_witness_witness_left
exact hprev_witness_witness_right_left
exact hprev_witness_witness_right_right_left
exact hprev_witness_witness_right_right_right
cases hnext
exists x * S ((S (S k)) * c)
exists x2
exact hnext_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>25,496</dd></div>
        <div><dt>Distinct objects</dt><dd>3,918</dd></div>
        <div><dt>Reused references</dt><dd>194</dd></div>
        <div><dt>Depth</dt><dd>78</dd></div>
        <div><dt>Cuts</dt><dd>752</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ef961db40c76a35a48af0bc94bc2b691844d77fa63efd64520718dcca2cdc072">ef961db40c76…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_beta_crt_prefix_invariant">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_beta_crt_prefix_invariant</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5476">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_beta_crt_prefix_invariant.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_beta_crt_for_existing_code"
  data-name="bounded_beta_crt_for_existing_code" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="bounded_beta_crt_prefix_invariant,le_refl"
  data-search="bounded_beta_crt_for_existing_code bounded crt witness for an existing beta code fold-produced bounded crt witness for residues decoded from an already supplied beta code. forall n c b. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; exists z. forall i a. (exists h. h + i = n) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; exists u v. z + s ((s i) * c) * u = a + s ((s i) * c) * v factorization bounded_beta_crt_prefix_invariant le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_beta_crt_for_existing_code</code><span>Bounded CRT witness for an existing beta code</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Fold-produced bounded CRT witness for residues decoded from an already supplied beta code.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_crt_prefix_invariant" href="#theorem-bounded_beta_crt_prefix_invariant"><code>bounded_beta_crt_prefix_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_beta_crt_for_existing_code">Copy statement</button>
        <pre id="statement-bounded_beta_crt_for_existing_code"><code>forall N c b. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; exists z. forall i a. (exists h. h + i = N) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_beta_crt_for_existing_code">Copy proof</button>
        <pre id="proof-bounded_beta_crt_for_existing_code"><code>pa prove forall N c b. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; exists z. forall i a. (exists h. h + i = N) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
use bounded_beta_crt_prefix_invariant
use le_refl
intro N
intro c
intro b
intro hcm
have hfold : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = N) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = N) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S N = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
have hall : forall k. (exists h. h + k = N) -&gt; exists P z. (~(P = 0) /\ ((forall i. (exists h. h + i = k) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + i = k) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
specialize bounded_beta_crt_prefix_invariant N
specialize bounded_beta_crt_prefix_invariant c
specialize bounded_beta_crt_prefix_invariant b
apply bounded_beta_crt_prefix_invariant
exact hcm
specialize hall N
apply hall
specialize le_refl N
exact le_refl
cases hfold
cases hfold_witness
cases hfold_witness_witness
cases hfold_witness_witness_right
cases hfold_witness_witness_right_right
exists x1
exact hfold_witness_witness_right_right_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>25,545</dd></div>
        <div><dt>Distinct objects</dt><dd>3,942</dd></div>
        <div><dt>Reused references</dt><dd>195</dd></div>
        <div><dt>Depth</dt><dd>79</dd></div>
        <div><dt>Cuts</dt><dd>755</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8d9242fe5e071655fc62172df0a001c9a8389703d1d4c58ade5bacf0a313369c">8d9242fe5e07…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_beta_crt_for_existing_code">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_beta_crt_for_existing_code</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5535">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_beta_crt_for_existing_code.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_unbounded"
  data-name="prime_unbounded" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="bounded_common_multiple_exists,prime_divisor_exists,prime_nonzero,nonzero_is_succ,add_succ_left,add_comm,divides_remainder,divisor_one,mul_one,le_or_lt"
  data-search="prime_unbounded there is a prime larger than every given natural euclid&#x27;s common-multiple argument constructs a prime above every natural. forall n. exists p. (exists k. k + s n = p) /\ (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) primes bounded_common_multiple_exists prime_divisor_exists prime_nonzero nonzero_is_succ add_succ_left add_comm divides_remainder divisor_one mul_one le_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_unbounded</code><span>There is a prime larger than every given natural</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Euclid&#x27;s common-multiple argument constructs a prime above every natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_exists" href="#theorem-bounded_common_multiple_exists"><code>bounded_common_multiple_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists" href="#theorem-prime_divisor_exists"><code>prime_divisor_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="nonzero_is_succ" href="#theorem-nonzero_is_succ"><code>nonzero_is_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="divides_remainder" href="#theorem-divides_remainder"><code>divides_remainder</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="le_or_lt" href="#theorem-le_or_lt"><code>le_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_unbounded">Copy statement</button>
        <pre id="statement-prime_unbounded"><code>forall n. exists p. (exists k. k + S n = p) /\ (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_unbounded">Copy proof</button>
        <pre id="proof-prime_unbounded"><code>pa prove forall n. exists p. (exists k. k + S n = p) /\ (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1)
use bounded_common_multiple_exists
use prime_divisor_exists
use prime_nonzero
use nonzero_is_succ
use add_succ_left
use add_comm
use divides_remainder
use divisor_one
use mul_one
use le_or_lt
intro n
specialize bounded_common_multiple_exists n
have hcommon : exists c. (~(c = 0) /\ forall t. (exists h. S t + S h = S n) -&gt; exists k. c = S t * k)
exact bounded_common_multiple_exists
cases hcommon
cases hcommon_witness
have hsucc_not_one : ~(S x = 1)
intro hsucc_one
apply hcommon_witness_left
apply PA2
exact hsucc_one
have hprime_divisor : exists p. ((~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) /\ exists k. S x = p * k)
specialize prime_divisor_exists (S x)
apply prime_divisor_exists
intro hsucc_zero
apply PA1
exact hsucc_zero
exact hsucc_not_one
cases hprime_divisor
cases hprime_divisor_witness
exists x1
split
have horder : (exists k. k + x1 = n) \/ exists k. k + S n = x1
specialize le_or_lt x1
specialize le_or_lt n
exact le_or_lt
cases horder
exfalso
have hp_nonzero : ~(x1 = 0)
intro hp_zero
specialize prime_nonzero x1
apply prime_nonzero
exact hprime_divisor_witness_left
exact hp_zero
have hp_succ : exists t. x1 = S t
specialize nonzero_is_succ x1
apply nonzero_is_succ
exact hp_nonzero
cases hp_succ
have hp_bounded : exists h. S x2 + S h = S n
cases horder_left
exists x3
rewrite hp_succ_witness at horder_left_witness
trans S (x2 + S x3)
apply add_succ_left
trans S (S (x2 + x3))
congr
apply PA4
trans S (S (x3 + x2))
congr
congr
apply add_comm
trans S (x3 + S x2)
congr
symm
apply PA4
congr
exact horder_left_witness
have hp_divides_common : exists k. x = x1 * k
specialize hcommon_witness_right x2
have hpred_divides : exists k. x = S x2 * k
apply hcommon_witness_right
exact hp_bounded
rewrite hp_succ_witness
exact hpred_divides
have hp_divides_one : exists w. 1 = x1 * w
specialize divides_remainder x1
specialize divides_remainder (S x)
specialize divides_remainder x
specialize divides_remainder 1
specialize divides_remainder 1
apply divides_remainder
exact hprime_divisor_witness_right
exact hp_divides_common
specialize mul_one x
rewrite mul_one
simp
cases hprime_divisor_witness_left
apply hprime_divisor_witness_left_left
specialize divisor_one x1
apply divisor_one
exact hp_divides_one
exact horder_right
exact hprime_divisor_witness_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,595</dd></div>
        <div><dt>Distinct objects</dt><dd>2,387</dd></div>
        <div><dt>Reused references</dt><dd>126</dd></div>
        <div><dt>Depth</dt><dd>82</dd></div>
        <div><dt>Cuts</dt><dd>146</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8a44fb2d207c2a41684de6d6630674f3f3b951cd036f733b3dd493321099d37b">8a44fb2d207c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_unbounded">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_unbounded</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L4567">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_unbounded.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_value_le_code"
  data-name="beta_value_le_code" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies=""
  data-search="beta_value_le_code a decoded beta value is bounded by its code every decoded beta value is at most its code. forall b c i x. ((exists h. h + s x = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + x) -&gt; exists h. h + x = b factorization">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_value_le_code</code><span>A decoded beta value is bounded by its code</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded beta value is at most its code.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_value_lt_scaled_base" href="#theorem-beta_value_lt_scaled_base"><code>beta_value_lt_scaled_base</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_value_le_code">Copy statement</button>
        <pre id="statement-beta_value_le_code"><code>forall b c i x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; exists h. h + x = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_value_le_code">Copy proof</button>
        <pre id="proof-beta_value_le_code"><code>pa prove forall b c i x. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; exists h. h + x = b
intro b
intro c
intro i
intro x
intro hat
cases hat
cases hat_right
exists x1 * S ((S i) * c)
symm
exact hat_right_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>18</dd></div>
        <div><dt>Distinct objects</dt><dd>18</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f037744e9dd7652f7148d661d88996ad038bf475bb06018383f213f5f268956b">f037744e9dd7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_value_le_code">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_value_le_code</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5563">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_value_le_code.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-base_le_beta_modulus"
  data-name="base_le_beta_modulus" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_add_left,mul_succ_left,le_succ"
  data-search="base_le_beta_modulus the beta base is bounded by every beta modulus a beta base is at most every beta modulus over that base. forall c i. exists h. h + c = s ((s i) * c) factorization le_add_left mul_succ_left le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>base_le_beta_modulus</code><span>The beta base is bounded by every beta modulus</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A beta base is at most every beta modulus over that base.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_add_left" href="#theorem-le_add_left"><code>le_add_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_value_lt_scaled_base" href="#theorem-beta_value_lt_scaled_base"><code>beta_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="new_value_lt_scaled_base" href="#theorem-new_value_lt_scaled_base"><code>new_value_lt_scaled_base</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-base_le_beta_modulus">Copy statement</button>
        <pre id="statement-base_le_beta_modulus"><code>forall c i. exists h. h + c = S ((S i) * c)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-base_le_beta_modulus">Copy proof</button>
        <pre id="proof-base_le_beta_modulus"><code>pa prove forall c i. exists h. h + c = S ((S i) * c)
use le_add_left
use mul_succ_left
use le_succ
intro c
intro i
have hproduct : exists h. h + c = S i * c
specialize mul_succ_left i
specialize mul_succ_left c
rewrite mul_succ_left
specialize le_add_left c
specialize le_add_left (i * c)
exact le_add_left
specialize le_succ c
specialize le_succ (S i * c)
apply le_succ
exact hproduct
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>233</dd></div>
        <div><dt>Distinct objects</dt><dd>189</dd></div>
        <div><dt>Reused references</dt><dd>18</dd></div>
        <div><dt>Depth</dt><dd>24</dd></div>
        <div><dt>Cuts</dt><dd>8</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="cdc7fe6d2ef27872c6be9917a443e0e6bf77b1c48d3b68e3db87e6a2aaab443b">cdc7fe6d2ef2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for base_le_beta_modulus">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib base_le_beta_modulus</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5578">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/base_le_beta_modulus.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-le_scaled_nonzero"
  data-name="le_scaled_nonzero" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="one_le_of_ne_zero,mul_le_mul_right,one_mul"
  data-search="le_scaled_nonzero nonzero scaling is monotone scaling by a nonzero natural does not decrease a natural. forall c b. ~(c = 0) -&gt; exists h. h + b = c * b factorization one_le_of_ne_zero mul_le_mul_right one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>le_scaled_nonzero</code><span>Nonzero scaling is monotone</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Scaling by a nonzero natural does not decrease a natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="one_le_of_ne_zero" href="#theorem-one_le_of_ne_zero"><code>one_le_of_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_le_mul_right" href="#theorem-mul_le_mul_right"><code>mul_le_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_value_lt_scaled_base" href="#theorem-beta_value_lt_scaled_base"><code>beta_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="new_value_lt_scaled_base" href="#theorem-new_value_lt_scaled_base"><code>new_value_lt_scaled_base</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-le_scaled_nonzero">Copy statement</button>
        <pre id="statement-le_scaled_nonzero"><code>forall C B. ~(C = 0) -&gt; exists h. h + B = C * B</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-le_scaled_nonzero">Copy proof</button>
        <pre id="proof-le_scaled_nonzero"><code>pa prove forall C B. ~(C = 0) -&gt; exists h. h + B = C * B
use one_le_of_ne_zero
use mul_le_mul_right
use one_mul
intro C
intro B
intro hC
have h1C : exists h. h + 1 = C
specialize one_le_of_ne_zero C
apply one_le_of_ne_zero
exact hC
have hscaled : exists h. h + 1 * B = C * B
specialize mul_le_mul_right 1
specialize mul_le_mul_right C
specialize mul_le_mul_right B
apply mul_le_mul_right
exact h1C
specialize one_mul B
rewrite one_mul at hscaled
exact hscaled
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>407</dd></div>
        <div><dt>Distinct objects</dt><dd>338</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>13</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d68bec41b22273c876385ad01d69025f97c61d815a3fdf54b6c2b7a5045f6652">d68bec41b222…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for le_scaled_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib le_scaled_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5595">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/le_scaled_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-scaled_bounded_common_multiple"
  data-name="scaled_bounded_common_multiple" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="multiple_mul_right"
  data-search="scaled_bounded_common_multiple scaling preserves bounded common multiples a right multiple of a bounded common multiple remains such a common multiple. forall n c b. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; forall t. (exists h. s t + s h = s n) -&gt; exists q. c * b = s t * q factorization multiple_mul_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>scaled_bounded_common_multiple</code><span>Scaling preserves bounded common multiples</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A right multiple of a bounded common multiple remains such a common multiple.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_mul_right" href="#theorem-multiple_mul_right"><code>multiple_mul_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-scaled_bounded_common_multiple">Copy statement</button>
        <pre id="statement-scaled_bounded_common_multiple"><code>forall N C B. (forall t. (exists h. S t + S h = S N) -&gt; exists q. C = S t * q) -&gt; forall t. (exists h. S t + S h = S N) -&gt; exists q. C * B = S t * q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-scaled_bounded_common_multiple">Copy proof</button>
        <pre id="proof-scaled_bounded_common_multiple"><code>pa prove forall N C B. (forall t. (exists h. S t + S h = S N) -&gt; exists q. C = S t * q) -&gt; forall t. (exists h. S t + S h = S N) -&gt; exists q. C * B = S t * q
use multiple_mul_right
intro N
intro C
intro B
intro hcm
intro t
intro ht
have htC : exists q. C = S t * q
specialize hcm t
apply hcm
exact ht
specialize multiple_mul_right (S t)
specialize multiple_mul_right C
specialize multiple_mul_right B
apply multiple_mul_right
exact htC
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>147</dd></div>
        <div><dt>Distinct objects</dt><dd>135</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c4ce3a408de716082d8b9f72c5efcb6a8e52b689ee07ad6d396d06eedec9dbe4">c4ce3a408de7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for scaled_bounded_common_multiple">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib scaled_bounded_common_multiple</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5615">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/scaled_bounded_common_multiple.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_value_lt_scaled_base"
  data-name="beta_value_lt_scaled_base" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_value_le_code,le_add_right,succ_le_succ,le_trans,le_scaled_nonzero,base_le_beta_modulus"
  data-search="beta_value_lt_scaled_base old decoded values fit the scaled target base an old beta value fits every modulus after a constructive scaled-base rebase. forall b c i x c s j. ((exists h. h + s x = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + x) -&gt; ~(c = 0) -&gt; exists h. h + s x = s ((s j) * (c * s (b + s))) factorization beta_value_le_code le_add_right succ_le_succ le_trans le_scaled_nonzero base_le_beta_modulus">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_value_lt_scaled_base</code><span>Old decoded values fit the scaled target base</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">An old beta value fits every modulus after a constructive scaled-base rebase.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_value_le_code" href="#theorem-beta_value_le_code"><code>beta_value_le_code</code></a> <a class="pa-theorem-chip" data-theorem-link="le_add_right" href="#theorem-le_add_right"><code>le_add_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_le_succ" href="#theorem-succ_le_succ"><code>succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="le_scaled_nonzero" href="#theorem-le_scaled_nonzero"><code>le_scaled_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="base_le_beta_modulus" href="#theorem-base_le_beta_modulus"><code>base_le_beta_modulus</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_value_lt_scaled_base">Copy statement</button>
        <pre id="statement-beta_value_lt_scaled_base"><code>forall b c i x C s j. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; ~(C = 0) -&gt; exists h. h + S x = S ((S j) * (C * S (b + s)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_value_lt_scaled_base">Copy proof</button>
        <pre id="proof-beta_value_lt_scaled_base"><code>pa prove forall b c i x C s j. ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) -&gt; ~(C = 0) -&gt; exists h. h + S x = S ((S j) * (C * S (b + s)))
use beta_value_le_code
use le_add_right
use succ_le_succ
use le_trans
use le_scaled_nonzero
use base_le_beta_modulus
intro b
intro c
intro i
intro x
intro C
intro s
intro j
intro hat
intro hC
have hxb : exists h. h + x = b
specialize beta_value_le_code b
specialize beta_value_le_code c
specialize beta_value_le_code i
specialize beta_value_le_code x
apply beta_value_le_code
exact hat
have hbs : exists h. h + b = b + s
specialize le_add_right b
specialize le_add_right s
exact le_add_right
have hxs : exists h. h + x = b + s
specialize le_trans x
specialize le_trans b
specialize le_trans (b + s)
apply le_trans
exact hxb
exact hbs
have hsx : exists h. h + S x = S (b + s)
specialize succ_le_succ x
specialize succ_le_succ (b + s)
apply succ_le_succ
exact hxs
have hscale : exists h. h + S (b + s) = C * S (b + s)
specialize le_scaled_nonzero C
specialize le_scaled_nonzero (S (b + s))
apply le_scaled_nonzero
exact hC
have hxbase : exists h. h + S x = C * S (b + s)
specialize le_trans (S x)
specialize le_trans (S (b + s))
specialize le_trans (C * S (b + s))
apply le_trans
exact hsx
exact hscale
have hmod : exists h. h + C * S (b + s) = S ((S j) * (C * S (b + s)))
specialize base_le_beta_modulus (C * S (b + s))
specialize base_le_beta_modulus j
exact base_le_beta_modulus
specialize le_trans (S x)
specialize le_trans (C * S (b + s))
specialize le_trans (S ((S j) * (C * S (b + s))))
apply le_trans
exact hxbase
exact hmod
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>863</dd></div>
        <div><dt>Distinct objects</dt><dd>489</dd></div>
        <div><dt>Reused references</dt><dd>41</dd></div>
        <div><dt>Depth</dt><dd>33</dd></div>
        <div><dt>Cuts</dt><dd>31</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="05aeb5bdd1f80ada1023ab728c03df39a8064475d8bfd5bdcdfff30bf6a8fb27">05aeb5bdd1f8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_value_lt_scaled_base">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_value_lt_scaled_base</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5636">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_value_lt_scaled_base.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-new_value_lt_scaled_base"
  data-name="new_value_lt_scaled_base" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_add_left,succ_le_succ,le_scaled_nonzero,le_trans,base_le_beta_modulus"
  data-search="new_value_lt_scaled_base an appended value fits the scaled target base the appended value fits every modulus after the same constructive scaled-base rebase. forall b s c j. ~(c = 0) -&gt; exists h. h + s s = s ((s j) * (c * s (b + s))) factorization le_add_left succ_le_succ le_scaled_nonzero le_trans base_le_beta_modulus">
  <details>
    <summary>
      <span class="pa-card-title"><code>new_value_lt_scaled_base</code><span>An appended value fits the scaled target base</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The appended value fits every modulus after the same constructive scaled-base rebase.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_add_left" href="#theorem-le_add_left"><code>le_add_left</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_le_succ" href="#theorem-succ_le_succ"><code>succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_scaled_nonzero" href="#theorem-le_scaled_nonzero"><code>le_scaled_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="base_le_beta_modulus" href="#theorem-base_le_beta_modulus"><code>base_le_beta_modulus</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-new_value_lt_scaled_base">Copy statement</button>
        <pre id="statement-new_value_lt_scaled_base"><code>forall b s C j. ~(C = 0) -&gt; exists h. h + S s = S ((S j) * (C * S (b + s)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-new_value_lt_scaled_base">Copy proof</button>
        <pre id="proof-new_value_lt_scaled_base"><code>pa prove forall b s C j. ~(C = 0) -&gt; exists h. h + S s = S ((S j) * (C * S (b + s)))
use le_add_left
use succ_le_succ
use le_scaled_nonzero
use le_trans
use base_le_beta_modulus
intro b
intro s
intro C
intro j
intro hC
have hsb : exists h. h + s = b + s
specialize le_add_left s
specialize le_add_left b
exact le_add_left
have hss : exists h. h + S s = S (b + s)
specialize succ_le_succ s
specialize succ_le_succ (b + s)
apply succ_le_succ
exact hsb
have hscale : exists h. h + S (b + s) = C * S (b + s)
specialize le_scaled_nonzero C
specialize le_scaled_nonzero (S (b + s))
apply le_scaled_nonzero
exact hC
have hsbase : exists h. h + S s = C * S (b + s)
specialize le_trans (S s)
specialize le_trans (S (b + s))
specialize le_trans (C * S (b + s))
apply le_trans
exact hss
exact hscale
have hmod : exists h. h + C * S (b + s) = S ((S j) * (C * S (b + s)))
specialize base_le_beta_modulus (C * S (b + s))
specialize base_le_beta_modulus j
exact base_le_beta_modulus
specialize le_trans (S s)
specialize le_trans (C * S (b + s))
specialize le_trans (S ((S j) * (C * S (b + s))))
apply le_trans
exact hsbase
exact hmod
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>751</dd></div>
        <div><dt>Distinct objects</dt><dd>446</dd></div>
        <div><dt>Reused references</dt><dd>41</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>27</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="08fcf3a5d804a316fce0d656a44e4eaeb13cc336a455e351628d2f31ca1387b5">08fcf3a5d804…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for new_value_lt_scaled_base">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib new_value_lt_scaled_base</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5702">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/new_value_lt_scaled_base.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_exclusive_accumulated_product_step"
  data-name="beta_exclusive_accumulated_product_step" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="mul_ne_zero,right_factor_divides_product,beta_modulus_nonzero,le_of_succ_le_succ,le_eq_or_lt,multiple_mul_right,le_succ_self,le_trans,lt_to_le,lt_irrefl_expanded,beta_moduli_pairwise_coprime_bounded,coprime_mul_left"
  data-search="beta_exclusive_accumulated_product_step extend an exclusive beta-modulus product invariant extend the accumulated target-modulus product for an exclusive prefix. forall n c k p. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; (exists h. h + s k = n) -&gt; ~(p = 0) -&gt; (forall i. (exists h. h + s i = k) -&gt; exists q. p = s ((s i) * c) * q) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) -&gt; (~(p * s ((s k) * c) = 0) /\ ((forall i. (exists h. h + s i = s k) -&gt; exists q. p * s ((s k) * c) = s ((s i) * c) * q) /\ forall j. (exists g. g + s k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p * s ((s k) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1)) factorization mul_ne_zero right_factor_divides_product beta_modulus_nonzero le_of_succ_le_succ le_eq_or_lt multiple_mul_right le_succ_self le_trans lt_to_le lt_irrefl_expanded beta_moduli_pairwise_coprime_bounded coprime_mul_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_exclusive_accumulated_product_step</code><span>Extend an exclusive beta-modulus product invariant</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extend the accumulated target-modulus product for an exclusive prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_ne_zero" href="#theorem-mul_ne_zero"><code>mul_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="right_factor_divides_product" href="#theorem-right_factor_divides_product"><code>right_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_mul_right" href="#theorem-multiple_mul_right"><code>multiple_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ_self" href="#theorem-le_succ_self"><code>le_succ_self</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_to_le" href="#theorem-lt_to_le"><code>lt_to_le</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_moduli_pairwise_coprime_bounded" href="#theorem-beta_moduli_pairwise_coprime_bounded"><code>beta_moduli_pairwise_coprime_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mul_left" href="#theorem-coprime_mul_left"><code>coprime_mul_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_invariant_step" href="#theorem-beta_exclusive_recode_invariant_step"><code>beta_exclusive_recode_invariant_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_exclusive_accumulated_product_step">Copy statement</button>
        <pre id="statement-beta_exclusive_accumulated_product_step"><code>forall N c k P. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -&gt; exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S k) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_exclusive_accumulated_product_step">Copy proof</button>
        <pre id="proof-beta_exclusive_accumulated_product_step"><code>pa prove forall N c k P. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -&gt; exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S k) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1))
use mul_ne_zero
use right_factor_divides_product
use beta_modulus_nonzero
use le_of_succ_le_succ
use le_eq_or_lt
use multiple_mul_right
use le_succ_self
use le_trans
use lt_to_le
use lt_irrefl_expanded
use beta_moduli_pairwise_coprime_bounded
use coprime_mul_left
intro N
intro c
intro k
intro P
intro hcm
intro hkN
intro hP
intro hdiv
intro hfuture
have hnew : ~(S ((S k) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero k
exact beta_modulus_nonzero
split
specialize mul_ne_zero P
specialize mul_ne_zero (S ((S k) * c))
intro hzero
apply mul_ne_zero
exact hP
exact hnew
exact hzero
split
intro i
intro hi
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hi
have hsplit : i = k \/ exists r. r + S i = k
specialize le_eq_or_lt i
specialize le_eq_or_lt k
apply le_eq_or_lt
exact hik
cases hsplit
rewrite hsplit_left
specialize right_factor_divides_product P
specialize right_factor_divides_product (S ((S k) * c))
exact right_factor_divides_product
have hiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hsplit_right
specialize multiple_mul_right (S ((S i) * c))
specialize multiple_mul_right P
specialize multiple_mul_right (S ((S k) * c))
apply multiple_mul_right
exact hiP
intro j
intro hSkj
intro hjN
have hkj : exists r. r + k = j
have hkSk : exists r. r + k = S k
specialize le_succ_self k
exact le_succ_self
specialize le_trans k
specialize le_trans (S k)
specialize le_trans j
apply le_trans
exact hkSk
exact hSkj
have hPj : forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
specialize hfuture j
apply hfuture
exact hkj
exact hjN
have hneq : ~(k = j)
intro heq
rewrite &lt;- heq at hSkj
specialize lt_irrefl_expanded k
apply lt_irrefl_expanded
exact hSkj
have hkbound : exists r. r + k = N
specialize lt_to_le k
specialize lt_to_le N
apply lt_to_le
exact hkN
have hpairs : forall i j. ~(i = j) -&gt; (exists hi. hi + i = N) -&gt; (exists hj. hj + j = N) -&gt; forall d. (exists u. S ((S i) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
specialize beta_moduli_pairwise_coprime_bounded N
specialize beta_moduli_pairwise_coprime_bounded c
apply beta_moduli_pairwise_coprime_bounded
exact hcm
have hnewj : forall d. (exists u. S ((S k) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1
specialize hpairs k
specialize hpairs j
apply hpairs
exact hneq
exact hkbound
exact hjN
specialize coprime_mul_left P
specialize coprime_mul_left (S ((S k) * c))
specialize coprime_mul_left (S ((S j) * c))
apply coprime_mul_left
exact hPj
exact hnewj
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>11,222</dd></div>
        <div><dt>Distinct objects</dt><dd>2,345</dd></div>
        <div><dt>Reused references</dt><dd>137</dd></div>
        <div><dt>Depth</dt><dd>70</dd></div>
        <div><dt>Cuts</dt><dd>332</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1833bd103225a199bd1eb410fe3869a3963f49335c33a6b2462f7157f156cd58">1833bd103225…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_exclusive_accumulated_product_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_exclusive_accumulated_product_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5748">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_exclusive_accumulated_product_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_exclusive_recode_congruence_step"
  data-name="beta_exclusive_recode_congruence_step" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_modulus_nonzero,le_refl,lt_to_le,binary_crt_fold_step,beta_at_exists,beta_at_unique,le_of_succ_le_succ,le_eq_or_lt"
  data-search="beta_exclusive_recode_congruence_step extend exclusive cross-base beta congruences add the next source value to a target-base crt code for an exclusive prefix. forall n c b e k p z. (exists h. h + s k = n) -&gt; ~(p = 0) -&gt; (forall i. (exists h. h + s i = k) -&gt; exists q. p = s ((s i) * c) * q) -&gt; (forall i a. (exists h. h + s i = k) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. b = q * s ((s i) * e) + a) -&gt; exists u v. z + s ((s i) * c) * u = a + s ((s i) * c) * v) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. forall i a. (exists h. h + s i = s k) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. b = q * s ((s i) * e) + a) -&gt; exists u v. z2 + s ((s i) * c) * u = a + s ((s i) * c) * v factorization beta_modulus_nonzero le_refl lt_to_le binary_crt_fold_step beta_at_exists beta_at_unique le_of_succ_le_succ le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_exclusive_recode_congruence_step</code><span>Extend exclusive cross-base beta congruences</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Add the next source value to a target-base CRT code for an exclusive prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_to_le" href="#theorem-lt_to_le"><code>lt_to_le</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_fold_step" href="#theorem-binary_crt_fold_step"><code>binary_crt_fold_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_invariant_step" href="#theorem-beta_exclusive_recode_invariant_step"><code>beta_exclusive_recode_invariant_step</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_exclusive_recode_congruence_step">Copy statement</button>
        <pre id="statement-beta_exclusive_recode_congruence_step"><code>forall N c b e k P z. (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. forall i a. (exists h. h + S i = S k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_exclusive_recode_congruence_step">Copy proof</button>
        <pre id="proof-beta_exclusive_recode_congruence_step"><code>pa prove forall N c b e k P z. (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. forall i a. (exists h. h + S i = S k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
use beta_modulus_nonzero
use le_refl
use lt_to_le
use binary_crt_fold_step
use beta_at_exists
use beta_at_unique
use le_of_succ_le_succ
use le_eq_or_lt
intro N
intro c
intro b
intro e
intro k
intro P
intro z
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
have hnew : ~(S ((S k) * c) = 0)
specialize beta_modulus_nonzero c
specialize beta_modulus_nonzero k
exact beta_modulus_nonzero
have hkbound : exists h. h + k = N
specialize lt_to_le k
specialize lt_to_le N
apply lt_to_le
exact hkN
have hcop : forall d. (exists u. P = d * u) -&gt; (exists v. S ((S k) * c) = d * v) -&gt; d = 1
specialize hfuture k
apply hfuture
specialize le_refl k
exact le_refl
exact hkbound
have hvalue : exists a. ((exists h. h + S a = S ((S k) * e)) /\ exists q. b = q * S ((S k) * e) + a)
specialize beta_at_exists b
specialize beta_at_exists e
specialize beta_at_exists k
exact beta_at_exists
cases hvalue
have hfold : exists z2. ((forall m a. (exists q. P = m * q) -&gt; (exists u v. z + m * u = a + m * v) -&gt; exists r s. z2 + m * r = a + m * s) /\ exists q r. z2 + S ((S k) * c) * q = x + S ((S k) * c) * r)
specialize binary_crt_fold_step P
specialize binary_crt_fold_step (S ((S k) * c))
specialize binary_crt_fold_step z
specialize binary_crt_fold_step x
apply binary_crt_fold_step
exact hP
exact hnew
exact hcop
cases hfold
cases hfold_witness
exists x1
intro i
intro a
intro hi
intro hati
have hik : exists r. r + i = k
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ k
apply le_of_succ_le_succ
exact hi
have hsplit : i = k \/ exists r. r + S i = k
specialize le_eq_or_lt i
specialize le_eq_or_lt k
apply le_eq_or_lt
exact hik
cases hsplit
have hati_new : ((exists h. h + S a = S ((S k) * e)) /\ exists q. b = q * S ((S k) * e) + a)
rewrite &lt;- hsplit_left
rewrite &lt;- hsplit_left
exact hati
have haeq : a = x
specialize beta_at_unique b
specialize beta_at_unique e
specialize beta_at_unique k
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
exact hati_new
exact hvalue_witness
rewrite hsplit_left
rewrite hsplit_left
rewrite haeq
exact hfold_witness_right
have hmiP : exists q. P = S ((S i) * c) * q
specialize hdiv i
apply hdiv
exact hsplit_right
have hzold : exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v
specialize hcong i
specialize hcong a
apply hcong
exact hsplit_right
exact hati
specialize hfold_witness_left (S ((S i) * c))
specialize hfold_witness_left a
apply hfold_witness_left
exact hmiP
exact hzold
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7,398</dd></div>
        <div><dt>Distinct objects</dt><dd>2,583</dd></div>
        <div><dt>Reused references</dt><dd>130</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>215</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="282847b6bbbacfe5a6ff683a06c017ee5e7f1b4d77d8d9ae8b28cb35c9d0abd6">282847b6bbba…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_exclusive_recode_congruence_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_exclusive_recode_congruence_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5870">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_exclusive_recode_congruence_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_exclusive_recode_invariant_step"
  data-name="beta_exclusive_recode_invariant_step" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_exclusive_accumulated_product_step,beta_exclusive_recode_congruence_step"
  data-search="beta_exclusive_recode_invariant_step one exclusive beta-recoding invariant step combine modulus-product and cross-base congruence updates for an exclusive prefix. forall n c b e k p z. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; (exists h. h + s k = n) -&gt; ~(p = 0) -&gt; (forall i. (exists h. h + s i = k) -&gt; exists q. p = s ((s i) * c) * q) -&gt; (forall i a. (exists h. h + s i = k) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. b = q * s ((s i) * e) + a) -&gt; exists u v. z + s ((s i) * c) * u = a + s ((s i) * c) * v) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. (~(p * s ((s k) * c) = 0) /\ ((forall i. (exists h. h + s i = s k) -&gt; exists q. p * s ((s k) * c) = s ((s i) * c) * q) /\ ((forall i a. (exists h. h + s i = s k) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. b = q * s ((s i) * e) + a) -&gt; exists u v. z2 + s ((s i) * c) * u = a + s ((s i) * c) * v) /\ forall j. (exists g. g + s k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p * s ((s k) * c) = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1))) factorization beta_exclusive_accumulated_product_step beta_exclusive_recode_congruence_step">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_exclusive_recode_invariant_step</code><span>One exclusive beta-recoding invariant step</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Combine modulus-product and cross-base congruence updates for an exclusive prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_exclusive_accumulated_product_step" href="#theorem-beta_exclusive_accumulated_product_step"><code>beta_exclusive_accumulated_product_step</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_congruence_step" href="#theorem-beta_exclusive_recode_congruence_step"><code>beta_exclusive_recode_congruence_step</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_beta_exclusive_recode_invariant" href="#theorem-bounded_beta_exclusive_recode_invariant"><code>bounded_beta_exclusive_recode_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_exclusive_recode_invariant_step">Copy statement</button>
        <pre id="statement-beta_exclusive_recode_invariant_step"><code>forall N c b e k P z. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -&gt; exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = S k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S k) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_exclusive_recode_invariant_step">Copy proof</button>
        <pre id="proof-beta_exclusive_recode_invariant_step"><code>pa prove forall N c b e k P z. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; (exists h. h + S k = N) -&gt; ~(P = 0) -&gt; (forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) -&gt; (forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) -&gt; (forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1) -&gt; exists z2. (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -&gt; exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = S k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S k) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
use beta_exclusive_accumulated_product_step
use beta_exclusive_recode_congruence_step
intro N
intro c
intro b
intro e
intro k
intro P
intro z
intro hcm
intro hkN
intro hP
intro hdiv
intro hcong
intro hfuture
have hproduct : (~(P * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -&gt; exists q. P * S ((S k) * c) = S ((S i) * c) * q) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P * S ((S k) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1))
specialize beta_exclusive_accumulated_product_step N
specialize beta_exclusive_accumulated_product_step c
specialize beta_exclusive_accumulated_product_step k
specialize beta_exclusive_accumulated_product_step P
apply beta_exclusive_accumulated_product_step
exact hcm
exact hkN
exact hP
exact hdiv
exact hfuture
have hcodes : exists z2. forall i a. (exists h. h + S i = S k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v
specialize beta_exclusive_recode_congruence_step N
specialize beta_exclusive_recode_congruence_step c
specialize beta_exclusive_recode_congruence_step b
specialize beta_exclusive_recode_congruence_step e
specialize beta_exclusive_recode_congruence_step k
specialize beta_exclusive_recode_congruence_step P
specialize beta_exclusive_recode_congruence_step z
apply beta_exclusive_recode_congruence_step
exact hkN
exact hP
exact hdiv
exact hcong
exact hfuture
cases hcodes
cases hproduct
cases hproduct_right
exists x
split
exact hproduct_left
split
exact hproduct_right_left
split
exact hcodes_witness
exact hproduct_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>18,709</dd></div>
        <div><dt>Distinct objects</dt><dd>3,750</dd></div>
        <div><dt>Reused references</dt><dd>188</dd></div>
        <div><dt>Depth</dt><dd>71</dd></div>
        <div><dt>Cuts</dt><dd>549</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1057ae7a6b5e5e24ee9976a188920c7a8f12c002c51a4d1db60c7eb932b97ef1">1057ae7a6b5e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_exclusive_recode_invariant_step">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_exclusive_recode_invariant_step</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L5986">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_exclusive_recode_invariant_step.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_beta_exclusive_recode_invariant"
  data-name="bounded_beta_exclusive_recode_invariant" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="succ_ne_zero,add_eq_zero_right,coprime_one_left,le_succ_self,le_trans,beta_exclusive_recode_invariant_step"
  data-search="bounded_beta_exclusive_recode_invariant bounded exclusive beta-recoding invariant fold an empty-based, exclusive beta prefix into another base with append readiness. forall n c b e. (forall t. (exists h. s t + s h = s n) -&gt; exists q. c = s t * q) -&gt; forall k. (exists h. h + k = n) -&gt; exists p z. (~(p = 0) /\ ((forall i. (exists h. h + s i = k) -&gt; exists q. p = s ((s i) * c) * q) /\ ((forall i a. (exists h. h + s i = k) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. b = q * s ((s i) * e) + a) -&gt; exists u v. z + s ((s i) * c) * u = a + s ((s i) * c) * v) /\ forall j. (exists g. g + k = j) -&gt; (exists h. h + j = n) -&gt; forall d. (exists u. p = d * u) -&gt; (exists v. s ((s j) * c) = d * v) -&gt; d = 1))) factorization succ_ne_zero add_eq_zero_right coprime_one_left le_succ_self le_trans beta_exclusive_recode_invariant_step">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_beta_exclusive_recode_invariant</code><span>Bounded exclusive beta-recoding invariant</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Fold an empty-based, exclusive beta prefix into another base with append readiness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_one_left" href="#theorem-coprime_one_left"><code>coprime_one_left</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ_self" href="#theorem-le_succ_self"><code>le_succ_self</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_exclusive_recode_invariant_step" href="#theorem-beta_exclusive_recode_invariant_step"><code>beta_exclusive_recode_invariant_step</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_beta_exclusive_recode_invariant">Copy statement</button>
        <pre id="statement-bounded_beta_exclusive_recode_invariant"><code>forall N c b e. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; forall k. (exists h. h + k = N) -&gt; exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_beta_exclusive_recode_invariant">Copy proof</button>
        <pre id="proof-bounded_beta_exclusive_recode_invariant"><code>pa prove forall N c b e. (forall t. (exists h. S t + S h = S N) -&gt; exists q. c = S t * q) -&gt; forall k. (exists h. h + k = N) -&gt; exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
use succ_ne_zero
use add_eq_zero_right
use coprime_one_left
use le_succ_self
use le_trans
use beta_exclusive_recode_invariant_step
intro N
intro c
intro b
intro e
intro hcm
induction k
intro hkN
exists 1
exists 0
split
specialize succ_ne_zero 0
exact succ_ne_zero
split
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
split
intro i
intro a
intro hi
intro hati
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
intro j
intro h0j
intro hjN
intro d
intro h1
intro hm
specialize coprime_one_left (S ((S j) * c))
specialize coprime_one_left d
apply coprime_one_left
exact h1
exact hm
intro hkN
have hkprev : exists h. h + k = N
have hkstep : exists h. h + k = S k
specialize le_succ_self k
exact le_succ_self
specialize le_trans k
specialize le_trans (S k)
specialize le_trans N
apply le_trans
exact hkstep
exact hkN
have hprev : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
apply IH
exact hkprev
cases hprev
cases hprev_witness
cases hprev_witness_witness
cases hprev_witness_witness_right
cases hprev_witness_witness_right_right
have hnext : exists z2. (~(x * S ((S k) * c) = 0) /\ ((forall i. (exists h. h + S i = S k) -&gt; exists q. x * S ((S k) * c) = S ((S i) * c) * q) /\ ((forall i a. (exists h. h + S i = S k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z2 + S ((S i) * c) * u = a + S ((S i) * c) * v) /\ forall j. (exists g. g + S k = j) -&gt; (exists h. h + j = N) -&gt; forall d. (exists u. x * S ((S k) * c) = d * u) -&gt; (exists v. S ((S j) * c) = d * v) -&gt; d = 1)))
specialize beta_exclusive_recode_invariant_step N
specialize beta_exclusive_recode_invariant_step c
specialize beta_exclusive_recode_invariant_step b
specialize beta_exclusive_recode_invariant_step e
specialize beta_exclusive_recode_invariant_step k
specialize beta_exclusive_recode_invariant_step x
specialize beta_exclusive_recode_invariant_step x1
apply beta_exclusive_recode_invariant_step
exact hcm
exact hkN
exact hprev_witness_witness_left
exact hprev_witness_witness_right_left
exact hprev_witness_witness_right_right_left
exact hprev_witness_witness_right_right_right
cases hnext
exists x * S ((S k) * c)
exists x2
exact hnext_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>19,155</dd></div>
        <div><dt>Distinct objects</dt><dd>3,873</dd></div>
        <div><dt>Reused references</dt><dd>193</dd></div>
        <div><dt>Depth</dt><dd>77</dd></div>
        <div><dt>Cuts</dt><dd>563</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2c9541dd49fb1a6242210f3062931f5313d4632e445135bcad5e9b06fee01295">2c9541dd49fb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_beta_exclusive_recode_invariant">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_beta_exclusive_recode_invariant</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6059">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_beta_exclusive_recode_invariant.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_extend"
  data-name="beta_prefix_extend" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="bounded_common_multiple_exists,scaled_bounded_common_multiple,bounded_beta_exclusive_recode_invariant,le_refl,beta_modulus_nonzero,binary_crt_fold_step,new_value_lt_scaled_base,beta_value_lt_scaled_base,beta_at_of_mod_eq_bound"
  data-search="beta_prefix_extend recode and append one exact beta-prefix value rebase an arbitrary decoded prefix and append one exact natural value. forall k b e s. exists z c. (((exists h. h + s s = s ((s k) * c)) /\ exists q. z = q * s ((s k) * c) + s) /\ forall i a. (exists h. h + s i = k) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. b = q * s ((s i) * e) + a) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. z = q * s ((s i) * c) + a)) factorization bounded_common_multiple_exists scaled_bounded_common_multiple bounded_beta_exclusive_recode_invariant le_refl beta_modulus_nonzero binary_crt_fold_step new_value_lt_scaled_base beta_value_lt_scaled_base beta_at_of_mod_eq_bound">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_extend</code><span>Recode and append one exact beta-prefix value</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Rebase an arbitrary decoded prefix and append one exact natural value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_common_multiple_exists" href="#theorem-bounded_common_multiple_exists"><code>bounded_common_multiple_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="scaled_bounded_common_multiple" href="#theorem-scaled_bounded_common_multiple"><code>scaled_bounded_common_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_beta_exclusive_recode_invariant" href="#theorem-bounded_beta_exclusive_recode_invariant"><code>bounded_beta_exclusive_recode_invariant</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_modulus_nonzero" href="#theorem-beta_modulus_nonzero"><code>beta_modulus_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="binary_crt_fold_step" href="#theorem-binary_crt_fold_step"><code>binary_crt_fold_step</code></a> <a class="pa-theorem-chip" data-theorem-link="new_value_lt_scaled_base" href="#theorem-new_value_lt_scaled_base"><code>new_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_value_lt_scaled_base" href="#theorem-beta_value_lt_scaled_base"><code>beta_value_lt_scaled_base</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_of_mod_eq_bound" href="#theorem-beta_at_of_mod_eq_bound"><code>beta_at_of_mod_eq_bound</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_append" href="#theorem-beta_product_succ_append"><code>beta_product_succ_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_all_prime" href="#theorem-beta_prefix_extend_all_prime"><code>beta_prefix_extend_all_prime</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_sorted_singleton" href="#theorem-beta_prefix_extend_sorted_singleton"><code>beta_prefix_extend_sorted_singleton</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_sorted_succ" href="#theorem-beta_prefix_extend_sorted_succ"><code>beta_prefix_extend_sorted_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_succ_extend" href="#theorem-beta_repeat_succ_extend"><code>beta_repeat_succ_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_succ_extend" href="#theorem-beta_range_succ_extend"><code>beta_range_succ_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_exists" href="#theorem-beta_prefix_replace_exists"><code>beta_prefix_replace_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_extend">Copy statement</button>
        <pre id="statement-beta_prefix_extend"><code>forall k b e s. exists z c. (((exists h. h + S s = S ((S k) * c)) /\ exists q. z = q * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. z = q * S ((S i) * c) + a))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_extend">Copy proof</button>
        <pre id="proof-beta_prefix_extend"><code>pa prove forall k b e s. exists z c. (((exists h. h + S s = S ((S k) * c)) /\ exists q. z = q * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. z = q * S ((S i) * c) + a))
use bounded_common_multiple_exists
use scaled_bounded_common_multiple
use bounded_beta_exclusive_recode_invariant
use le_refl
use beta_modulus_nonzero
use binary_crt_fold_step
use new_value_lt_scaled_base
use beta_value_lt_scaled_base
use beta_at_of_mod_eq_bound
intro k
intro b
intro e
intro s
have hC : exists C. (~(C = 0) /\ forall t. (exists h. S t + S h = S k) -&gt; exists q. C = S t * q)
specialize bounded_common_multiple_exists k
exact bounded_common_multiple_exists
cases hC
cases hC_witness
have hcm2 : forall t. (exists h. S t + S h = S k) -&gt; exists q. x * S (b + s) = S t * q
specialize scaled_bounded_common_multiple k
specialize scaled_bounded_common_multiple x
specialize scaled_bounded_common_multiple (S (b + s))
apply scaled_bounded_common_multiple
exact hC_witness_right
have hall : forall n. (exists h. h + n = k) -&gt; exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = n) -&gt; exists q. P = S ((S i) * (x * S (b + s))) * q) /\ ((forall i a. (exists h. h + S i = n) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v) /\ forall j. (exists g. g + n = j) -&gt; (exists h. h + j = k) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * (x * S (b + s))) = d * v) -&gt; d = 1)))
specialize bounded_beta_exclusive_recode_invariant k
specialize bounded_beta_exclusive_recode_invariant (x * S (b + s))
specialize bounded_beta_exclusive_recode_invariant b
specialize bounded_beta_exclusive_recode_invariant e
apply bounded_beta_exclusive_recode_invariant
exact hcm2
have hinv : exists P z. (~(P = 0) /\ ((forall i. (exists h. h + S i = k) -&gt; exists q. P = S ((S i) * (x * S (b + s))) * q) /\ ((forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. b = q * S ((S i) * e) + a) -&gt; exists u v. z + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v) /\ forall j. (exists g. g + k = j) -&gt; (exists h. h + j = k) -&gt; forall d. (exists u. P = d * u) -&gt; (exists v. S ((S j) * (x * S (b + s))) = d * v) -&gt; d = 1)))
specialize hall k
apply hall
specialize le_refl k
exact le_refl
cases hinv
cases hinv_witness
cases hinv_witness_witness
cases hinv_witness_witness_right
cases hinv_witness_witness_right_right
have hcop : forall d. (exists u. x1 = d * u) -&gt; (exists v. S ((S k) * (x * S (b + s))) = d * v) -&gt; d = 1
specialize hinv_witness_witness_right_right_right k
apply hinv_witness_witness_right_right_right
specialize le_refl k
exact le_refl
specialize le_refl k
exact le_refl
have hnew0 : ~(S ((S k) * (x * S (b + s))) = 0)
specialize beta_modulus_nonzero (x * S (b + s))
specialize beta_modulus_nonzero k
exact beta_modulus_nonzero
have hfold : exists z2. ((forall m a. (exists q. x1 = m * q) -&gt; (exists u v. x2 + m * u = a + m * v) -&gt; exists r t. z2 + m * r = a + m * t) /\ exists q r. z2 + S ((S k) * (x * S (b + s))) * q = s + S ((S k) * (x * S (b + s))) * r)
specialize binary_crt_fold_step x1
specialize binary_crt_fold_step (S ((S k) * (x * S (b + s))))
specialize binary_crt_fold_step x2
specialize binary_crt_fold_step s
apply binary_crt_fold_step
exact hinv_witness_witness_left
exact hnew0
exact hcop
cases hfold
cases hfold_witness
exists x3
exists x * S (b + s)
split
specialize beta_at_of_mod_eq_bound x3
specialize beta_at_of_mod_eq_bound (x * S (b + s))
specialize beta_at_of_mod_eq_bound k
specialize beta_at_of_mod_eq_bound s
apply beta_at_of_mod_eq_bound
specialize new_value_lt_scaled_base b
specialize new_value_lt_scaled_base s
specialize new_value_lt_scaled_base x
specialize new_value_lt_scaled_base k
apply new_value_lt_scaled_base
exact hC_witness_left
exact hfold_witness_right
intro i
intro a
intro hi
intro hati
have hmi : exists q. x1 = S ((S i) * (x * S (b + s))) * q
specialize hinv_witness_witness_right_left i
apply hinv_witness_witness_right_left
exact hi
have hzold : exists u v. x2 + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v
specialize hinv_witness_witness_right_right_left i
specialize hinv_witness_witness_right_right_left a
apply hinv_witness_witness_right_right_left
exact hi
exact hati
have hznew : exists u v. x3 + S ((S i) * (x * S (b + s))) * u = a + S ((S i) * (x * S (b + s))) * v
specialize hfold_witness_left (S ((S i) * (x * S (b + s))))
specialize hfold_witness_left a
apply hfold_witness_left
exact hmi
exact hzold
specialize beta_at_of_mod_eq_bound x3
specialize beta_at_of_mod_eq_bound (x * S (b + s))
specialize beta_at_of_mod_eq_bound i
specialize beta_at_of_mod_eq_bound a
apply beta_at_of_mod_eq_bound
specialize beta_value_lt_scaled_base b
specialize beta_value_lt_scaled_base e
specialize beta_value_lt_scaled_base i
specialize beta_value_lt_scaled_base a
specialize beta_value_lt_scaled_base x
specialize beta_value_lt_scaled_base s
specialize beta_value_lt_scaled_base i
apply beta_value_lt_scaled_base
exact hati
exact hC_witness_left
exact hznew
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,057</dd></div>
        <div><dt>Distinct objects</dt><dd>4,508</dd></div>
        <div><dt>Reused references</dt><dd>225</dd></div>
        <div><dt>Depth</dt><dd>80</dd></div>
        <div><dt>Cuts</dt><dd>867</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="511d3bde3fc45d7ab2748c39baacb167b9eb05f71d6c43ad1d1eb03fbb23c7f6">511d3bde3fc4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_extend">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_extend</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6176">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_extend.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_product_trace_exists"
  data-name="beta_prefix_product_trace_exists" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_at_self_of_bound,add_eq_zero_right,succ_ne_zero,beta_at_exists,beta_prefix_extend,zero_le,succ_le_succ,le_refl,le_of_succ_le_succ,le_eq_or_lt,one_mul"
  data-search="beta_prefix_product_trace_exists exact beta-coded prefix-product trace exists every decoded beta factor prefix admits a beta-coded exact prefix-product trace. forall b c l. exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s (s i)) * v)) /\ exists q. u = q * s ((s (s i)) * v) + s) /\ s = r * p)))) factorization beta_at_self_of_bound add_eq_zero_right succ_ne_zero beta_at_exists beta_prefix_extend zero_le succ_le_succ le_refl le_of_succ_le_succ le_eq_or_lt one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_product_trace_exists</code><span>Exact beta-coded prefix-product trace exists</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded beta factor prefix admits a beta-coded exact prefix-product trace.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_self_of_bound" href="#theorem-beta_at_self_of_bound"><code>beta_at_self_of_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_le" href="#theorem-zero_le"><code>zero_le</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_le_succ" href="#theorem-succ_le_succ"><code>succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_exists" href="#theorem-beta_product_exists"><code>beta_product_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_product_trace_exists">Copy statement</button>
        <pre id="statement-beta_prefix_product_trace_exists"><code>forall b c l. exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_product_trace_exists">Copy proof</button>
        <pre id="proof-beta_prefix_product_trace_exists"><code>pa prove forall b c l. exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p))))
use beta_at_self_of_bound
use add_eq_zero_right
use succ_ne_zero
use beta_at_exists
use beta_prefix_extend
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
use one_mul
intro b
intro c
induction l
exists 1
exists 1
split
specialize beta_at_self_of_bound 1
specialize beta_at_self_of_bound 0
specialize beta_at_self_of_bound 1
apply beta_at_self_of_bound
specialize one_mul 1
rewrite one_mul
specialize le_refl 2
exact le_refl
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
have htrace : exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p))))
apply IH
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hfactor : exists p. ((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p)
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists l
exact beta_at_exists
cases hfactor
have hlast : exists r. ((exists h. h + S r = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + r)
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hlast
have hext : exists z v. (((exists h. h + S (x3 * x2) = S ((S (S l)) * v)) /\ exists q. z = q * S ((S (S l)) * v) + (x3 * x2)) /\ forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + a) -&gt; ((exists h. h + S a = S ((S i) * v)) /\ exists q. z = q * S ((S i) * v) + a))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend (x3 * x2)
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x4
exists x5
split
specialize hext_witness_witness_right 0
specialize hext_witness_witness_right 1
apply hext_witness_witness_right
have h0 : exists h. h + S 0 = S l
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact h0
exact htrace_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists x2
exists x3
exists x3 * x2
split
rewrite hsplit_left
rewrite hsplit_left
exact hfactor_witness
split
rewrite hsplit_left
rewrite hsplit_left
specialize hext_witness_witness_right l
specialize hext_witness_witness_right x3
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hlast_witness
split
rewrite hsplit_left
rewrite hsplit_left
exact hext_witness_witness_left
refl
have hold : exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + r) /\ (((exists h. h + S s = S ((S (S i)) * x1)) /\ exists q. x = q * S ((S (S i)) * x1) + s) /\ s = r * p)))
specialize htrace_witness_witness_right i
apply htrace_witness_witness_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x6
exists x7
exists x8
split
exact hold_witness_witness_witness_left
split
specialize hext_witness_witness_right i
specialize hext_witness_witness_right x7
apply hext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize hext_witness_witness_right (S i)
specialize hext_witness_witness_right x8
apply hext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,981</dd></div>
        <div><dt>Distinct objects</dt><dd>4,717</dd></div>
        <div><dt>Reused references</dt><dd>235</dd></div>
        <div><dt>Depth</dt><dd>85</dd></div>
        <div><dt>Cuts</dt><dd>899</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0dd19ccc0b06503a99e50627eaed2b9bda46c7a5f2685916bde03e1a17ae1f41">0dd19ccc0b06…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_product_trace_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_product_trace_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6318">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_product_trace_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_exists"
  data-name="beta_product_exists" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_prefix_product_trace_exists,beta_at_exists"
  data-search="beta_product_exists relational finite beta product exists every finite decoded beta prefix has an exact relational product and a coded trace. forall b c l. exists n u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s (s i)) * v)) /\ exists q. u = q * s ((s (s i)) * v) + s) /\ s = r * p))))) factorization beta_prefix_product_trace_exists beta_at_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_exists</code><span>Relational finite beta product exists</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every finite decoded beta prefix has an exact relational product and a coded trace.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_product_trace_exists" href="#theorem-beta_prefix_product_trace_exists"><code>beta_prefix_product_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_exists_unique" href="#theorem-beta_product_exists_unique"><code>beta_product_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_exists" href="#theorem-pow_exists"><code>pow_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_exists" href="#theorem-factorial_exists"><code>factorial_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_exists">Copy statement</button>
        <pre id="statement-beta_product_exists"><code>forall b c l. exists n u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_exists">Copy proof</button>
        <pre id="proof-beta_product_exists"><code>pa prove forall b c l. exists n u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))
use beta_prefix_product_trace_exists
use beta_at_exists
intro b
intro c
intro l
have htrace : exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p))))
specialize beta_prefix_product_trace_exists b
specialize beta_prefix_product_trace_exists c
specialize beta_prefix_product_trace_exists l
exact beta_prefix_product_trace_exists
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hterminal : exists n. ((exists h. h + S n = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + n)
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hterminal
exists x2
exists x
exists x1
split
exact htrace_witness_witness_left
split
exact hterminal_witness
exact htrace_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>30,487</dd></div>
        <div><dt>Distinct objects</dt><dd>4,744</dd></div>
        <div><dt>Reused references</dt><dd>236</dd></div>
        <div><dt>Depth</dt><dd>86</dd></div>
        <div><dt>Cuts</dt><dd>916</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6656c8e6b7f3ea457a7353422f510f6a97b4910fc83b7cbb50bf6a6b5170516f">6656c8e6b7f3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6485">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_functional"
  data-name="beta_product_functional" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_at_unique,le_refl,le_succ,mul_congr"
  data-search="beta_product_functional finite beta product is functional the fully expanded beta-coded product relation is functional in its terminal product. forall b c l n u v m w d. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p))))) -&gt; (((exists h. h + s 1 = s ((s 0) * d)) /\ exists q. w = q * s ((s 0) * d) + 1) /\ (((exists h. h + s m = s ((s l) * d)) /\ exists q. w = q * s ((s l) * d) + m) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * d)) /\ exists q. w = q * s ((s i) * d) + r) /\ (((exists h. h + s s = s ((s s i) * d)) /\ exists q. w = q * s ((s s i) * d) + s) /\ s = r * p))))) -&gt; n = m factorization beta_at_unique le_refl le_succ mul_congr">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_functional</code><span>Finite beta Product is functional</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The fully expanded beta-coded Product relation is functional in its terminal product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_congr" href="#theorem-mul_congr"><code>mul_congr</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_exists_unique" href="#theorem-beta_product_exists_unique"><code>beta_product_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_functional" href="#theorem-pow_functional"><code>pow_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_functional" href="#theorem-factorial_functional"><code>factorial_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_functional">Copy statement</button>
        <pre id="statement-beta_product_functional"><code>forall b c l n u v m w d. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))) -&gt; (((exists h. h + S 1 = S ((S 0) * d)) /\ exists q. w = q * S ((S 0) * d) + 1) /\ (((exists h. h + S m = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + m) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * d)) /\ exists q. w = q * S ((S i) * d) + r) /\ (((exists h. h + S s = S ((S S i) * d)) /\ exists q. w = q * S ((S S i) * d) + s) /\ s = r * p))))) -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_functional">Copy proof</button>
        <pre id="proof-beta_product_functional"><code>pa prove forall b c l n u v m w d. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))) -&gt; (((exists h. h + S 1 = S ((S 0) * d)) /\ exists q. w = q * S ((S 0) * d) + 1) /\ (((exists h. h + S m = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + m) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * d)) /\ exists q. w = q * S ((S i) * d) + r) /\ (((exists h. h + S s = S ((S S i) * d)) /\ exists q. w = q * S ((S S i) * d) + s) /\ s = r * p))))) -&gt; n = m
use beta_at_unique
use le_refl
use le_succ
use mul_congr
intro b
intro c
induction l
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
have hn : n = 1
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 1
apply beta_at_unique
exact h1_right_left
exact h1_left
have hm : m = 1
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique 0
specialize beta_at_unique m
specialize beta_at_unique 1
apply beta_at_unique
exact h2_right_left
exact h2_left
trans 1
exact hn
symm
exact hm
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
have hstep1 : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ (((exists h. h + S s = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + s) /\ s = r * p)))
specialize h1_right_right l
apply h1_right_right
specialize le_refl (S l)
exact le_refl
cases hstep1
cases hstep1_witness
cases hstep1_witness_witness
cases hstep1_witness_witness_witness
cases hstep1_witness_witness_witness_right
cases hstep1_witness_witness_witness_right_right
have hstep2 : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ (((exists h. h + S r = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + r) /\ (((exists h. h + S s = S ((S S l) * d)) /\ exists q. w = q * S ((S S l) * d) + s) /\ s = r * p)))
specialize h2_right_right l
apply h2_right_right
specialize le_refl (S l)
exact le_refl
cases hstep2
cases hstep2_witness
cases hstep2_witness_witness
cases hstep2_witness_witness_witness
cases hstep2_witness_witness_witness_right
cases hstep2_witness_witness_witness_right_right
have hn : n = x2
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x2
apply beta_at_unique
exact h1_right_left
exact hstep1_witness_witness_witness_right_right_left
have hm : m = x5
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique (S l)
specialize beta_at_unique m
specialize beta_at_unique x5
apply beta_at_unique
exact h2_right_left
exact hstep2_witness_witness_witness_right_right_left
have hp : x = x3
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x3
apply beta_at_unique
exact hstep1_witness_witness_witness_left
exact hstep2_witness_witness_witness_left
have hprod1 : (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S x1 = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + x1) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))
split
exact h1_left
split
exact hstep1_witness_witness_witness_right_left
intro i
intro hi
specialize h1_right_right i
apply h1_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
have hprod2 : (((exists h. h + S 1 = S ((S 0) * d)) /\ exists q. w = q * S ((S 0) * d) + 1) /\ (((exists h. h + S x4 = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + x4) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * d)) /\ exists q. w = q * S ((S i) * d) + r) /\ (((exists h. h + S s = S ((S S i) * d)) /\ exists q. w = q * S ((S S i) * d) + s) /\ s = r * p)))))
split
exact h2_left
split
exact hstep2_witness_witness_witness_right_left
intro i
intro hi
specialize h2_right_right i
apply h2_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
have hprev : x1 = x4
specialize IH x1
specialize IH u
specialize IH v
specialize IH x4
specialize IH w
specialize IH d
apply IH
exact hprod1
exact hprod2
have hmul : x1 * x = x4 * x3
specialize mul_congr x1
specialize mul_congr x4
specialize mul_congr x
specialize mul_congr x3
apply mul_congr
exact hprev
exact hp
trans x2
exact hn
trans x1 * x
exact hstep1_witness_witness_witness_right_right_right
trans x4 * x3
exact hmul
trans x5
symm
exact hstep2_witness_witness_witness_right_right_right
symm
exact hm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,382</dd></div>
        <div><dt>Distinct objects</dt><dd>909</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>36</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="12a5727a4593b04b404e2c26eb8a444f4a705305504076c3759078e7fab116d0">12a5727a4593…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_functional">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_functional</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6530">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_functional.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_exists_unique"
  data-name="beta_product_exists_unique" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_product_exists,beta_product_functional"
  data-search="beta_product_exists_unique a unique finite beta product exists every finite decoded beta prefix has exactly one relational product value. forall b c l. exists n. ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) /\ forall m. (exists w d. (((exists h. h + s 1 = s ((s 0) * d)) /\ exists q. w = q * s ((s 0) * d) + 1) /\ (((exists h. h + s m = s ((s l) * d)) /\ exists q. w = q * s ((s l) * d) + m) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * d)) /\ exists q. w = q * s ((s i) * d) + r) /\ (((exists h. h + s s = s ((s s i) * d)) /\ exists q. w = q * s ((s s i) * d) + s) /\ s = r * p)))))) -&gt; n = m) factorization beta_product_exists beta_product_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_exists_unique</code><span>A unique finite beta Product exists</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every finite decoded beta prefix has exactly one relational product value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_exists" href="#theorem-beta_product_exists"><code>beta_product_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_exists_unique">Copy statement</button>
        <pre id="statement-beta_product_exists_unique"><code>forall b c l. exists n. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) /\ forall m. (exists w d. (((exists h. h + S 1 = S ((S 0) * d)) /\ exists q. w = q * S ((S 0) * d) + 1) /\ (((exists h. h + S m = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + m) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * d)) /\ exists q. w = q * S ((S i) * d) + r) /\ (((exists h. h + S s = S ((S S i) * d)) /\ exists q. w = q * S ((S S i) * d) + s) /\ s = r * p)))))) -&gt; n = m)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_exists_unique">Copy proof</button>
        <pre id="proof-beta_product_exists_unique"><code>pa prove forall b c l. exists n. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) /\ forall m. (exists w d. (((exists h. h + S 1 = S ((S 0) * d)) /\ exists q. w = q * S ((S 0) * d) + 1) /\ (((exists h. h + S m = S ((S l) * d)) /\ exists q. w = q * S ((S l) * d) + m) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * d)) /\ exists q. w = q * S ((S i) * d) + r) /\ (((exists h. h + S s = S ((S S i) * d)) /\ exists q. w = q * S ((S S i) * d) + s) /\ s = r * p)))))) -&gt; n = m)
use beta_product_exists
use beta_product_functional
intro b
intro c
intro l
have hex : exists n u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))
specialize beta_product_exists b
specialize beta_product_exists c
specialize beta_product_exists l
exact beta_product_exists
cases hex
cases hex_witness
cases hex_witness_witness
exists x
split
exists x1
exists x2
exact hex_witness_witness_witness
intro m
intro hm
cases hm
cases hm_witness
specialize beta_product_functional b
specialize beta_product_functional c
specialize beta_product_functional l
specialize beta_product_functional x
specialize beta_product_functional x1
specialize beta_product_functional x2
specialize beta_product_functional m
specialize beta_product_functional x3
specialize beta_product_functional x4
apply beta_product_functional
exact hex_witness_witness_witness
exact hm_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>31,908</dd></div>
        <div><dt>Distinct objects</dt><dd>4,979</dd></div>
        <div><dt>Reused references</dt><dd>239</dd></div>
        <div><dt>Depth</dt><dd>87</dd></div>
        <div><dt>Cuts</dt><dd>954</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7a2e26c9d93074adf5eaaf163a6979bc281a988178f7a14f316ff63a72bc5820">7a2e26c9d930…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_exists_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_exists_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6719">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_exists_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_zero"
  data-name="beta_product_zero" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_at_unique"
  data-search="beta_product_zero the empty beta product is one the product of an empty decoded prefix is one. forall b c n. (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + n) /\ forall i. (exists h. h + s i = 0) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; n = 1 factorization beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_zero</code><span>The empty beta Product is one</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The product of an empty decoded prefix is one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_all_prime_product_one_iff_length_zero" href="#theorem-beta_all_prime_product_one_iff_length_zero"><code>beta_all_prime_product_one_iff_length_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_zero" href="#theorem-pow_zero"><code>pow_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_pointwise_mod_congruent" href="#theorem-beta_product_pointwise_mod_congruent"><code>beta_product_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_zero" href="#theorem-factorial_zero"><code>factorial_zero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_zero">Copy statement</button>
        <pre id="statement-beta_product_zero"><code>forall b c n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + n) /\ forall i. (exists h. h + S i = 0) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; n = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_zero">Copy proof</button>
        <pre id="proof-beta_product_zero"><code>pa prove forall b c n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + n) /\ forall i. (exists h. h + S i = 0) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; n = 1
use beta_at_unique
intro b
intro c
intro n
intro hproduct
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 1
apply beta_at_unique
exact hproduct_witness_witness_right_left
exact hproduct_witness_witness_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,171</dd></div>
        <div><dt>Distinct objects</dt><dd>742</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>31</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="63088511aac2ef0c5aa853cedc17a39582c96785bc149a143e3a166732358033">63088511aac2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6777">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_succ_decompose"
  data-name="beta_product_succ_decompose" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_refl,le_succ,beta_at_unique"
  data-search="beta_product_succ_decompose decompose a successor beta product a successor product decomposes into its prefix product and final decoded factor. forall b c l n. (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s l) * v)) /\ exists q. u = q * s ((s s l) * v) + n) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; exists p r. (((exists h. h + s p = s ((s l) * c)) /\ exists q. b = q * s ((s l) * c) + p) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s r = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + r) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) /\ n = r * p)) factorization le_refl le_succ beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_succ_decompose</code><span>Decompose a successor beta Product</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor product decomposes into its prefix product and final decoded factor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_pointwise_mod_congruent" href="#theorem-beta_product_pointwise_mod_congruent"><code>beta_product_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_succ_decompose" href="#theorem-factorial_succ_decompose"><code>factorial_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_swap_last_invariant" href="#theorem-beta_product_swap_last_invariant"><code>beta_product_swap_last_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_succ_decompose">Copy statement</button>
        <pre id="statement-beta_product_succ_decompose"><code>forall b c l n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists p r. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * p))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_succ_decompose">Copy proof</button>
        <pre id="proof-beta_product_succ_decompose"><code>pa prove forall b c l n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists p r. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * p))
use le_refl
use le_succ
use beta_at_unique
intro b
intro c
intro l
intro n
intro hproduct
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
have hstep : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) /\ (((exists h. h + S r = S ((S l) * x1)) /\ exists q. x = q * S ((S l) * x1) + r) /\ (((exists h. h + S s = S ((S S l) * x1)) /\ exists q. x = q * S ((S S l) * x1) + s) /\ s = r * p)))
specialize hproduct_witness_witness_right_right l
apply hproduct_witness_witness_right_right
specialize le_refl (S l)
exact le_refl
cases hstep
cases hstep_witness
cases hstep_witness_witness
cases hstep_witness_witness_witness
cases hstep_witness_witness_witness_right
cases hstep_witness_witness_witness_right_right
have hn : n = x4
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x4
apply beta_at_unique
exact hproduct_witness_witness_right_left
exact hstep_witness_witness_witness_right_right_left
exists x2
exists x3
split
exact hstep_witness_witness_witness_left
split
exists x
exists x1
split
exact hproduct_witness_witness_left
split
exact hstep_witness_witness_witness_right_left
intro i
intro hi
specialize hproduct_witness_witness_right_right i
apply hproduct_witness_witness_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
trans x4
exact hn
exact hstep_witness_witness_witness_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,257</dd></div>
        <div><dt>Distinct objects</dt><dd>784</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>35</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2a5502bdcf7379de0e5682ad43a19c8a55ac4e11adf199ef4675d83f0c848adc">2a5502bdcf73…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_succ_decompose">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_succ_decompose</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6804">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_succ_decompose.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_succ_append"
  data-name="beta_product_succ_append" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_prefix_extend,zero_le,succ_le_succ,le_refl,le_of_succ_le_succ,le_eq_or_lt"
  data-search="beta_product_succ_append append one factor to a beta product append one decoded factor to an existing fully expanded product witness. forall b c l r p. (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s r = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + r) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + s p = s ((s l) * c)) /\ exists q. b = q * s ((s l) * c) + p) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s (r * p) = s ((s s l) * v)) /\ exists q. u = q * s ((s s l) * v) + (r * p)) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) factorization beta_prefix_extend zero_le succ_le_succ le_refl le_of_succ_le_succ le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_succ_append</code><span>Append one factor to a beta Product</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Append one decoded factor to an existing fully expanded Product witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_le" href="#theorem-zero_le"><code>zero_le</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_le_succ" href="#theorem-succ_le_succ"><code>succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_succ_append">Copy statement</button>
        <pre id="statement-beta_product_succ_append"><code>forall b c l r p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_succ_append">Copy proof</button>
        <pre id="proof-beta_product_succ_append"><code>pa prove forall b c l r p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + p) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))))
use beta_prefix_extend
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro l
intro r
intro p
intro hproduct
intro hp
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
have hext : exists z d. (((exists h. h + S (r * p) = S ((S S l) * d)) /\ exists q. z = q * S ((S S l) * d) + (r * p)) /\ forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + a) -&gt; ((exists h. h + S a = S ((S i) * d)) /\ exists q. z = q * S ((S i) * d) + a))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend (r * p)
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x2
exists x3
split
specialize hext_witness_witness_right 0
specialize hext_witness_witness_right 1
apply hext_witness_witness_right
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact hproduct_witness_witness_left
split
exact hext_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
exists r
exists r * p
split
rewrite hsplit_left
rewrite hsplit_left
exact hp
split
rewrite hsplit_left
rewrite hsplit_left
specialize hext_witness_witness_right l
specialize hext_witness_witness_right r
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hproduct_witness_witness_right_left
split
rewrite hsplit_left
rewrite hsplit_left
exact hext_witness_witness_left
refl
have hold : exists p0 r0 s0. (((exists h. h + S p0 = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p0) /\ (((exists h. h + S r0 = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + r0) /\ (((exists h. h + S s0 = S ((S S i) * x1)) /\ exists q. x = q * S ((S S i) * x1) + s0) /\ s0 = r0 * p0)))
specialize hproduct_witness_witness_right_right i
apply hproduct_witness_witness_right_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x4
exists x5
exists x6
split
exact hold_witness_witness_witness_left
split
specialize hext_witness_witness_right i
specialize hext_witness_witness_right x5
apply hext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize hext_witness_witness_right (S i)
specialize hext_witness_witness_right x6
apply hext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,360</dd></div>
        <div><dt>Distinct objects</dt><dd>4,659</dd></div>
        <div><dt>Reused references</dt><dd>229</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>877</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ffa7ace29cd7a66b4fc65956c4a277328a3fe88d277c73ddbe3ed5594ced9bde">ffa7ace29cd7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_succ_append">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_succ_append</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L6878">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_succ_append.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_transport_prefix"
  data-name="beta_product_transport_prefix" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies=""
  data-search="beta_product_transport_prefix transport product across an extensionally preserved factor prefix one-way extensional factor-prefix preservation transports product without changing its trace. forall b c z e l n. (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; (forall i a. (exists h. h + s i = l) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. z = q * s ((s i) * e) + a)) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists q. z = q * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) factorization">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_transport_prefix</code><span>Transport Product across an extensionally preserved factor prefix</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">One-way extensional factor-prefix preservation transports Product without changing its trace.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_functional" href="#theorem-pow_functional"><code>pow_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_functional" href="#theorem-factorial_functional"><code>factorial_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_transport_prefix">Copy statement</button>
        <pre id="statement-beta_product_transport_prefix"><code>forall b c z e l n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + a)) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_transport_prefix">Copy proof</button>
        <pre id="proof-beta_product_transport_prefix"><code>pa prove forall b c z e l n. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + a)) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))))
intro b
intro c
intro z
intro e
intro l
intro n
intro hproduct
intro hpres
cases hproduct
cases hproduct_witness
cases hproduct_witness_witness
cases hproduct_witness_witness_right
exists x
exists x1
split
exact hproduct_witness_witness_left
split
exact hproduct_witness_witness_right_left
intro i
intro hi
have hstep : exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + r) /\ (((exists h. h + S s = S ((S S i) * x1)) /\ exists q. x = q * S ((S S i) * x1) + s) /\ s = r * p)))
specialize hproduct_witness_witness_right_right i
apply hproduct_witness_witness_right_right
exact hi
cases hstep
cases hstep_witness
cases hstep_witness_witness
cases hstep_witness_witness_witness
cases hstep_witness_witness_witness_right
cases hstep_witness_witness_witness_right_right
exists x2
exists x3
exists x4
split
specialize hpres i
specialize hpres x2
apply hpres
exact hi
exact hstep_witness_witness_witness_left
split
exact hstep_witness_witness_witness_right_left
split
exact hstep_witness_witness_witness_right_right_left
exact hstep_witness_witness_witness_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>59</dd></div>
        <div><dt>Distinct objects</dt><dd>59</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4c40f0a22c7a5d071f32faee47106b462be9ba530351493ab9f1a8e5f1a79299">4c40f0a22c7a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_transport_prefix">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_transport_prefix</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7013">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_transport_prefix.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_factor_prefix_product_append"
  data-name="beta_factor_prefix_product_append" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_prefix_extend,beta_product_transport_prefix,zero_le,succ_le_succ,le_refl,le_of_succ_le_succ,le_eq_or_lt"
  data-search="beta_factor_prefix_product_append extend a factor prefix and product together extend a factor prefix by p and simultaneously append p to its exact product. forall b c l r p. (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s r = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + r) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; exists z e. (((exists h. h + s p = s ((s l) * e)) /\ exists q. z = q * s ((s l) * e) + p) /\ ((forall i a. (exists h. h + s i = l) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + a) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists q. z = q * s ((s i) * e) + a)) /\ (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s (r * p) = s ((s s l) * v)) /\ exists q. u = q * s ((s s l) * v) + (r * p)) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists q. z = q * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))))) factorization beta_prefix_extend beta_product_transport_prefix zero_le succ_le_succ le_refl le_of_succ_le_succ le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_factor_prefix_product_append</code><span>Extend a factor prefix and Product together</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extend a factor prefix by p and simultaneously append p to its exact Product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_transport_prefix" href="#theorem-beta_product_transport_prefix"><code>beta_product_transport_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_le" href="#theorem-zero_le"><code>zero_le</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_le_succ" href="#theorem-succ_le_succ"><code>succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_empty" href="#theorem-beta_canonical_append_empty"><code>beta_canonical_append_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_succ" href="#theorem-beta_canonical_append_succ"><code>beta_canonical_append_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_factor_prefix_product_append">Copy statement</button>
        <pre id="statement-beta_factor_prefix_product_append"><code>forall b c l r p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists z e. (((exists h. h + S p = S ((S l) * e)) /\ exists q. z = q * S ((S l) * e) + p) /\ ((forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_factor_prefix_product_append">Copy proof</button>
        <pre id="proof-beta_factor_prefix_product_append"><code>pa prove forall b c l r p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists z e. (((exists h. h + S p = S ((S l) * e)) /\ exists q. z = q * S ((S l) * e) + p) /\ ((forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p))))))))
use beta_prefix_extend
use beta_product_transport_prefix
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro l
intro r
intro p
intro hproduct
have hfactor_ext : exists z e. (((exists h. h + S p = S ((S l) * e)) /\ exists q. z = q * S ((S l) * e) + p) /\ forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists q. z = q * S ((S i) * e) + a))
specialize beta_prefix_extend l
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend p
exact beta_prefix_extend
cases hfactor_ext
cases hfactor_ext_witness
cases hfactor_ext_witness_witness
have htransport : exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))
specialize beta_product_transport_prefix b
specialize beta_product_transport_prefix c
specialize beta_product_transport_prefix x
specialize beta_product_transport_prefix x1
specialize beta_product_transport_prefix l
specialize beta_product_transport_prefix r
apply beta_product_transport_prefix
exact hproduct
exact hfactor_ext_witness_witness_right
cases htransport
cases htransport_witness
cases htransport_witness_witness
cases htransport_witness_witness_right
have htrace_ext : exists u v. (((exists h. h + S (r * p) = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + (r * p)) /\ forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * x3)) /\ exists q. x2 = q * S ((S i) * x3) + a) -&gt; ((exists h. h + S a = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + a))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x2
specialize beta_prefix_extend x3
specialize beta_prefix_extend (r * p)
exact beta_prefix_extend
cases htrace_ext
cases htrace_ext_witness
cases htrace_ext_witness_witness
exists x
exists x1
split
exact hfactor_ext_witness_witness_left
split
exact hfactor_ext_witness_witness_right
exists x4
exists x5
split
specialize htrace_ext_witness_witness_right 0
specialize htrace_ext_witness_witness_right 1
apply htrace_ext_witness_witness_right
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact htransport_witness_witness_left
split
exact htrace_ext_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
exists r
exists r * p
split
rewrite hsplit_left
rewrite hsplit_left
exact hfactor_ext_witness_witness_left
split
rewrite hsplit_left
rewrite hsplit_left
specialize htrace_ext_witness_witness_right l
specialize htrace_ext_witness_witness_right r
apply htrace_ext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact htransport_witness_witness_right_left
split
rewrite hsplit_left
rewrite hsplit_left
exact htrace_ext_witness_witness_left
refl
have hold : exists p0 r0 s0. (((exists h. h + S p0 = S ((S i) * x1)) /\ exists q. x = q * S ((S i) * x1) + p0) /\ (((exists h. h + S r0 = S ((S i) * x3)) /\ exists q. x2 = q * S ((S i) * x3) + r0) /\ (((exists h. h + S s0 = S ((S S i) * x3)) /\ exists q. x2 = q * S ((S S i) * x3) + s0) /\ s0 = r0 * p0)))
specialize htransport_witness_witness_right_right i
apply htransport_witness_witness_right_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x6
exists x7
exists x8
split
exact hold_witness_witness_witness_left
split
specialize htrace_ext_witness_witness_right i
specialize htrace_ext_witness_witness_right x7
apply htrace_ext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize htrace_ext_witness_witness_right (S i)
specialize htrace_ext_witness_witness_right x8
apply htrace_ext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,447</dd></div>
        <div><dt>Distinct objects</dt><dd>4,746</dd></div>
        <div><dt>Reused references</dt><dd>229</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>878</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ee15cbf3907116ded177678a1531f4ebc09d02c1beb71c77b6d662372aa5d318">ee15cbf39071…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_factor_prefix_product_append">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_factor_prefix_product_append</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7081">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_factor_prefix_product_append.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_prime_empty"
  data-name="all_prime_empty" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero"
  data-search="all_prime_empty allprime holds on the empty beta prefix the fully expanded allprime predicate holds vacuously on the empty prefix. forall b c. (forall i. (exists h. h + s i = 0) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) factorization add_eq_zero_right succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_prime_empty</code><span>AllPrime holds on the empty beta prefix</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The fully expanded AllPrime predicate holds vacuously on the empty prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_empty" href="#theorem-beta_canonical_append_empty"><code>beta_canonical_append_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_prime_empty">Copy statement</button>
        <pre id="statement-all_prime_empty"><code>forall b c. (forall i. (exists h. h + S i = 0) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_prime_empty">Copy proof</button>
        <pre id="proof-all_prime_empty"><code>pa prove forall b c. (forall i. (exists h. h + S i = 0) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro i
intro hi
exfalso
cases hi
have hzero : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hzero
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>37</dd></div>
        <div><dt>Distinct objects</dt><dd>37</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="17228ed7fa9b88944d80da4c91f4ab8ce7358d327b9df80175556f5af339f6a2">17228ed7fa9b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_prime_empty">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_prime_empty</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7268">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_prime_empty.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_prime_succ_intro"
  data-name="all_prime_succ_intro" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_eq_or_lt"
  data-search="all_prime_succ_intro extend allprime across one beta entry append one explicitly decoded prime to an allprime prefix. forall b c l p. (forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)) -&gt; (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) factorization le_of_succ_le_succ le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_prime_succ_intro</code><span>Extend AllPrime across one beta entry</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Append one explicitly decoded prime to an AllPrime prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_all_prime" href="#theorem-beta_prefix_extend_all_prime"><code>beta_prefix_extend_all_prime</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_empty" href="#theorem-beta_canonical_append_empty"><code>beta_canonical_append_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_succ" href="#theorem-beta_canonical_append_succ"><code>beta_canonical_append_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_prime_succ_intro">Copy statement</button>
        <pre id="statement-all_prime_succ_intro"><code>forall b c l p. (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)) -&gt; (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_prime_succ_intro">Copy proof</button>
        <pre id="proof-all_prime_succ_intro"><code>pa prove forall b c l p. (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)) -&gt; (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro l
intro p
intro hprev
intro hlast
cases hlast
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
split
rewrite hsplit_left
rewrite hsplit_left
exact hlast_left
exact hlast_right
specialize hprev i
apply hprev
exact hsplit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>150</dd></div>
        <div><dt>Distinct objects</dt><dd>146</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7905f0e448fd961632ad9a07f2c97f8020a19091636f12f749cbb8683587950d">7905f0e448fd…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_prime_succ_intro">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_prime_succ_intro</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7288">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_prime_succ_intro.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_prime_succ_elim_prefix"
  data-name="all_prime_succ_elim_prefix" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_succ"
  data-search="all_prime_succ_elim_prefix project allprime to the previous beta prefix restrict an allprime successor prefix to its old prefix. forall b c l. (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) factorization le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_prime_succ_elim_prefix</code><span>Project AllPrime to the previous beta prefix</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Restrict an AllPrime successor prefix to its old prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_prime_succ_elim_prefix">Copy statement</button>
        <pre id="statement-all_prime_succ_elim_prefix"><code>forall b c l. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_prime_succ_elim_prefix">Copy proof</button>
        <pre id="proof-all_prime_succ_elim_prefix"><code>pa prove forall b c l. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
use le_succ
intro b
intro c
intro l
intro hall
intro i
intro hi
specialize hall i
apply hall
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>64</dd></div>
        <div><dt>Distinct objects</dt><dd>62</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0126509667dcf1b2218ca7f774ef70fee931aa71bedaa95490b4249d52faf54f">0126509667dc…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_prime_succ_elim_prefix">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_prime_succ_elim_prefix</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7328">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_prime_succ_elim_prefix.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_prime_succ_elim_last"
  data-name="all_prime_succ_elim_last" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_refl"
  data-search="all_prime_succ_elim_last extract the last prime from allprime extract the final decoded prime from an allprime successor prefix. forall b c l. (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; exists p. (((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)) factorization le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_prime_succ_elim_last</code><span>Extract the last prime from AllPrime</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extract the final decoded prime from an AllPrime successor prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factor_bound" href="#theorem-beta_canonical_last_factor_bound"><code>beta_canonical_last_factor_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_nonempty_all_prime_product_ne_one" href="#theorem-beta_nonempty_all_prime_product_ne_one"><code>beta_nonempty_all_prime_product_ne_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_prime_succ_elim_last">Copy statement</button>
        <pre id="statement-all_prime_succ_elim_last"><code>forall b c l. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_prime_succ_elim_last">Copy proof</button>
        <pre id="proof-all_prime_succ_elim_last"><code>pa prove forall b c l. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))
use le_refl
intro b
intro c
intro l
intro hall
specialize hall l
apply hall
specialize le_refl (S l)
exact le_refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>41</dd></div>
        <div><dt>Distinct objects</dt><dd>41</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a36af944a5695e57f217c84aeefe22ed58419a90e61ad3803b18a6f88080622b">a36af944a569…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_prime_succ_elim_last">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_prime_succ_elim_last</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7349">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_prime_succ_elim_last.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_prime_transport"
  data-name="all_prime_transport" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies=""
  data-search="all_prime_transport transport allprime across beta recoding transport allprime across pointwise value-preserving beta recoding. forall b c z d l. (forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i p. (exists h. h + s i = l) -&gt; ((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) -&gt; ((exists h. h + s p = s ((s i) * d)) /\ exists w. z = w * s ((s i) * d) + p)) -&gt; (forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * d)) /\ exists w. z = w * s ((s i) * d) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) factorization">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_prime_transport</code><span>Transport AllPrime across beta recoding</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Transport AllPrime across pointwise value-preserving beta recoding.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_all_prime" href="#theorem-beta_prefix_extend_all_prime"><code>beta_prefix_extend_all_prime</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_succ" href="#theorem-beta_canonical_append_succ"><code>beta_canonical_append_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_prime_transport">Copy statement</button>
        <pre id="statement-all_prime_transport"><code>forall b c z d l. (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i p. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_prime_transport">Copy proof</button>
        <pre id="proof-all_prime_transport"><code>pa prove forall b c z d l. (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i p. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
intro b
intro c
intro z
intro d
intro l
intro hall
intro htransport
intro i
intro hi
have hp : exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))
specialize hall i
apply hall
exact hi
cases hp
cases hp_witness
exists x
split
specialize htransport i
specialize htransport x
apply htransport
exact hi
exact hp_witness_left
exact hp_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>26</dd></div>
        <div><dt>Distinct objects</dt><dd>26</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4abed2d820d8c3e1b6c43df9b76beb390e46921981073599ec9ba712b919ebbb">4abed2d820d8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_prime_transport">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_prime_transport</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7365">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_prime_transport.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-sorted_empty"
  data-name="sorted_empty" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_zero,succ_ne_zero"
  data-search="sorted_empty adjacent sorted holds on the empty beta prefix the fully expanded sorted predicate holds vacuously on the empty prefix. forall b c. (forall i. (exists h. h + s (s i) = 0) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) factorization le_zero succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>sorted_empty</code><span>Adjacent Sorted holds on the empty beta prefix</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The fully expanded Sorted predicate holds vacuously on the empty prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-sorted_empty">Copy statement</button>
        <pre id="statement-sorted_empty"><code>forall b c. (forall i. (exists h. h + S (S i) = 0) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-sorted_empty">Copy proof</button>
        <pre id="proof-sorted_empty"><code>pa prove forall b c. (forall i. (exists h. h + S (S i) = 0) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_zero
use succ_ne_zero
intro b
intro c
intro i
intro hi
exfalso
have hzero : S (S i) = 0
specialize le_zero (S (S i))
apply le_zero
exact hi
specialize succ_ne_zero (S i)
apply succ_ne_zero
exact hzero
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>44</dd></div>
        <div><dt>Distinct objects</dt><dd>44</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>14</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a3dc87fe88e5c5244404c842a1cf9fb9520a1259f42f9ec564a2f86c31f8f787">a3dc87fe88e5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for sorted_empty">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib sorted_empty</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7402">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/sorted_empty.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-sorted_singleton"
  data-name="sorted_singleton" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_zero,succ_ne_zero"
  data-search="sorted_singleton adjacent sorted holds on a singleton beta prefix the fully expanded sorted predicate holds vacuously on every singleton prefix. forall b c. (forall i. (exists h. h + s (s i) = 1) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) factorization le_of_succ_le_succ le_zero succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>sorted_singleton</code><span>Adjacent Sorted holds on a singleton beta prefix</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The fully expanded Sorted predicate holds vacuously on every singleton prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_sorted_singleton" href="#theorem-beta_prefix_extend_sorted_singleton"><code>beta_prefix_extend_sorted_singleton</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_empty" href="#theorem-beta_canonical_append_empty"><code>beta_canonical_append_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-sorted_singleton">Copy statement</button>
        <pre id="statement-sorted_singleton"><code>forall b c. (forall i. (exists h. h + S (S i) = 1) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-sorted_singleton">Copy proof</button>
        <pre id="proof-sorted_singleton"><code>pa prove forall b c. (forall i. (exists h. h + S (S i) = 1) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_of_succ_le_succ
use le_zero
use succ_ne_zero
intro b
intro c
intro i
intro hi
exfalso
have hzero_le : exists h. h + S i = 0
specialize le_of_succ_le_succ (S i)
specialize le_of_succ_le_succ 0
apply le_of_succ_le_succ
exact hi
have hzero : S i = 0
specialize le_zero (S i)
apply le_zero
exact hzero_le
specialize succ_ne_zero i
apply succ_ne_zero
exact hzero
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>65</dd></div>
        <div><dt>Distinct objects</dt><dd>65</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="844e77f2d4bb617722d1a7d044e2423a3a597bc49c68e9095eaf03ba59542685">844e77f2d4bb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for sorted_singleton">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib sorted_singleton</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7421">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/sorted_singleton.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-sorted_succ_intro"
  data-name="sorted_succ_intro" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_eq_or_lt,succ_le_succ"
  data-search="sorted_succ_intro extend adjacent sorted across one beta entry append one ordered adjacent pair to a nonempty sorted prefix. forall b c l p q. (forall i. (exists h. h + s (s i) = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) -&gt; ((exists h. h + s q = s ((s s l) * c)) /\ exists w. b = w * s ((s s l) * c) + q) -&gt; (exists h. h + p = q) -&gt; (forall i. (exists h. h + s (s i) = s (s l)) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) factorization le_of_succ_le_succ le_eq_or_lt succ_le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>sorted_succ_intro</code><span>Extend adjacent Sorted across one beta entry</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Append one ordered adjacent pair to a nonempty Sorted prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_le_succ" href="#theorem-succ_le_succ"><code>succ_le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_sorted_succ" href="#theorem-beta_prefix_extend_sorted_succ"><code>beta_prefix_extend_sorted_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_succ" href="#theorem-beta_canonical_append_succ"><code>beta_canonical_append_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-sorted_succ_intro">Copy statement</button>
        <pre id="statement-sorted_succ_intro"><code>forall b c l p q. (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -&gt; ((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) -&gt; (exists h. h + p = q) -&gt; (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-sorted_succ_intro">Copy proof</button>
        <pre id="proof-sorted_succ_intro"><code>pa prove forall b c l p q. (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -&gt; ((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) -&gt; (exists h. h + p = q) -&gt; (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_of_succ_le_succ
use le_eq_or_lt
use succ_le_succ
intro b
intro c
intro l
intro p
intro q
intro hprev
intro hp
intro hq
intro hpq
intro i
intro hi
have hisl : exists h. h + S i = S l
specialize le_of_succ_le_succ (S i)
specialize le_of_succ_le_succ (S l)
apply le_of_succ_le_succ
exact hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hisl
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists p
exists q
split
rewrite hsplit_left
rewrite hsplit_left
exact hp
split
rewrite hsplit_left
rewrite hsplit_left
exact hq
exact hpq
specialize hprev i
apply hprev
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>182</dd></div>
        <div><dt>Distinct objects</dt><dd>178</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>23</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8c5d249ae99aa2c761c10b10d8cebbba67efb14d2cccdff151244f57aada1faf">8c5d249ae99a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for sorted_succ_intro">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib sorted_succ_intro</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7446">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/sorted_succ_intro.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-sorted_succ_elim_prefix"
  data-name="sorted_succ_elim_prefix" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_succ"
  data-search="sorted_succ_elim_prefix project adjacent sorted to the previous beta prefix restrict a sorted successor prefix to its old prefix. forall b c l. (forall i. (exists h. h + s (s i) = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (forall i. (exists h. h + s (s i) = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) factorization le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>sorted_succ_elim_prefix</code><span>Project adjacent Sorted to the previous beta prefix</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Restrict a Sorted successor prefix to its old prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-sorted_succ_elim_prefix">Copy statement</button>
        <pre id="statement-sorted_succ_elim_prefix"><code>forall b c l. (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-sorted_succ_elim_prefix">Copy proof</button>
        <pre id="proof-sorted_succ_elim_prefix"><code>pa prove forall b c l. (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
use le_succ
intro b
intro c
intro l
intro hsorted
intro i
intro hi
specialize hsorted i
apply hsorted
specialize le_succ (S (S i))
specialize le_succ l
apply le_succ
exact hi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>64</dd></div>
        <div><dt>Distinct objects</dt><dd>62</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1fe322c40f9f5b3b64403b883ed548a1f05663fe56ba0542f439d32bac490570">1fe322c40f9f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for sorted_succ_elim_prefix">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib sorted_succ_elim_prefix</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7503">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/sorted_succ_elim_prefix.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-sorted_succ_elim_last"
  data-name="sorted_succ_elim_last" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_refl"
  data-search="sorted_succ_elim_last extract the last adjacent order witness extract the final adjacent ordered pair from a sorted prefix of length at least two. forall b c l. (forall i. (exists h. h + s (s i) = s (s l)) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; exists p q. (((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) /\ (((exists h. h + s q = s ((s s l) * c)) /\ exists w. b = w * s ((s s l) * c) + q) /\ (exists h. h + p = q))) factorization le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>sorted_succ_elim_last</code><span>Extract the last adjacent order witness</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Extract the final adjacent ordered pair from a Sorted prefix of length at least two.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-sorted_succ_elim_last">Copy statement</button>
        <pre id="statement-sorted_succ_elim_last"><code>forall b c l. (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; exists p q. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) /\ (exists h. h + p = q)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-sorted_succ_elim_last">Copy proof</button>
        <pre id="proof-sorted_succ_elim_last"><code>pa prove forall b c l. (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; exists p q. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S q = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + q) /\ (exists h. h + p = q)))
use le_refl
intro b
intro c
intro l
intro hsorted
specialize hsorted l
apply hsorted
specialize le_refl (S (S l))
exact le_refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>41</dd></div>
        <div><dt>Distinct objects</dt><dd>41</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>11</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="96d1e00a0d95382324cc33d03f3c4453f17529efd75d7aa0f2a633b887795665">96d1e00a0d95…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for sorted_succ_elim_last">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib sorted_succ_elim_last</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7526">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/sorted_succ_elim_last.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-sorted_transport"
  data-name="sorted_transport" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="lt_to_le"
  data-search="sorted_transport transport adjacent sorted across beta recoding transport sorted across pointwise value-preserving beta recoding. forall b c z d l. (forall i. (exists h. h + s (s i) = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (forall i p. (exists h. h + s i = l) -&gt; ((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) -&gt; ((exists h. h + s p = s ((s i) * d)) /\ exists w. z = w * s ((s i) * d) + p)) -&gt; (forall i. (exists h. h + s (s i) = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * d)) /\ exists w. z = w * s ((s i) * d) + p) /\ (((exists h. h + s q = s ((s s i) * d)) /\ exists w. z = w * s ((s s i) * d) + q) /\ (exists h. h + p = q)))) factorization lt_to_le">
  <details>
    <summary>
      <span class="pa-card-title"><code>sorted_transport</code><span>Transport adjacent Sorted across beta recoding</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Transport Sorted across pointwise value-preserving beta recoding.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_to_le" href="#theorem-lt_to_le"><code>lt_to_le</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend_sorted_succ" href="#theorem-beta_prefix_extend_sorted_succ"><code>beta_prefix_extend_sorted_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_succ" href="#theorem-beta_canonical_append_succ"><code>beta_canonical_append_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-sorted_transport">Copy statement</button>
        <pre id="statement-sorted_transport"><code>forall b c z d l. (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (forall i p. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -&gt; (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (((exists h. h + S q = S ((S S i) * d)) /\ exists w. z = w * S ((S S i) * d) + q) /\ (exists h. h + p = q))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-sorted_transport">Copy proof</button>
        <pre id="proof-sorted_transport"><code>pa prove forall b c z d l. (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (forall i p. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p)) -&gt; (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * d)) /\ exists w. z = w * S ((S i) * d) + p) /\ (((exists h. h + S q = S ((S S i) * d)) /\ exists w. z = w * S ((S S i) * d) + q) /\ (exists h. h + p = q))))
use lt_to_le
intro b
intro c
intro z
intro d
intro l
intro hsorted
intro htransport
intro i
intro hi
have hpq : exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))
specialize hsorted i
apply hsorted
exact hi
cases hpq
cases hpq_witness
cases hpq_witness_witness
cases hpq_witness_witness_right
have hii : exists h. h + S i = l
specialize lt_to_le (S i)
specialize lt_to_le l
apply lt_to_le
exact hi
exists x
exists x1
split
specialize htransport i
specialize htransport x
apply htransport
exact hii
exact hpq_witness_witness_left
split
specialize htransport (S i)
specialize htransport x1
apply htransport
exact hi
exact hpq_witness_witness_right_left
exact hpq_witness_witness_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>89</dd></div>
        <div><dt>Distinct objects</dt><dd>87</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a9cf8c461f4ff4467f065dc3bb802063e738035814ca95cb62821f9daa7b67e4">a9cf8c461f4f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for sorted_transport">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib sorted_transport</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7545">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/sorted_transport.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_extend_all_prime"
  data-name="beta_prefix_extend_all_prime" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_prefix_extend,all_prime_transport,all_prime_succ_intro"
  data-search="beta_prefix_extend_all_prime recode a beta prefix and preserve allprime recode a beta prefix, preserve all old primes, and append one exact prime. forall k b e s. (forall i. (exists h. h + s i = k) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. b = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; exists z c. ((((exists h. h + s s = s ((s k) * c)) /\ exists w. z = w * s ((s k) * c) + s) /\ forall i a. (exists h. h + s i = k) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists w. b = w * s ((s i) * e) + a) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists w. z = w * s ((s i) * c) + a)) /\ (forall i. (exists h. h + s i = s k) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. z = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))) factorization beta_prefix_extend all_prime_transport all_prime_succ_intro">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_extend_all_prime</code><span>Recode a beta prefix and preserve AllPrime</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Recode a beta prefix, preserve all old primes, and append one exact prime.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_transport" href="#theorem-all_prime_transport"><code>all_prime_transport</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_intro" href="#theorem-all_prime_succ_intro"><code>all_prime_succ_intro</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_extend_all_prime">Copy statement</button>
        <pre id="statement-beta_prefix_extend_all_prime"><code>forall k b e s. (forall i. (exists h. h + S i = k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; exists z c. ((((exists h. h + S s = S ((S k) * c)) /\ exists w. z = w * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S i = S k) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_extend_all_prime">Copy proof</button>
        <pre id="proof-beta_prefix_extend_all_prime"><code>pa prove forall k b e s. (forall i. (exists h. h + S i = k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; exists z c. ((((exists h. h + S s = S ((S k) * c)) /\ exists w. z = w * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S i = S k) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))))
use beta_prefix_extend
use all_prime_transport
use all_prime_succ_intro
intro k
intro b
intro e
intro s
intro hall
intro hs
have hext : exists z c. (((exists h. h + S s = S ((S k) * c)) /\ exists w. z = w * S ((S k) * c) + s) /\ forall i a. (exists h. h + S i = k) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a))
specialize beta_prefix_extend k
specialize beta_prefix_extend b
specialize beta_prefix_extend e
specialize beta_prefix_extend s
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
have hnew : (forall i. (exists h. h + S i = k) -&gt; exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_transport b
specialize all_prime_transport e
specialize all_prime_transport x
specialize all_prime_transport x1
specialize all_prime_transport k
apply all_prime_transport
exact hall
exact hext_witness_witness_right
exists x
exists x1
split
split
exact hext_witness_witness_left
exact hext_witness_witness_right
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro k
specialize all_prime_succ_intro s
apply all_prime_succ_intro
exact hnew
split
exact hext_witness_witness_left
exact hs
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,280</dd></div>
        <div><dt>Distinct objects</dt><dd>4,617</dd></div>
        <div><dt>Reused references</dt><dd>227</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>875</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c99644a6fbf84262572c49be2120960cf7e03735b0378794c5b547a606a8277a">c99644a6fbf8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_extend_all_prime">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_extend_all_prime</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7597">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_extend_all_prime.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_extend_sorted_singleton"
  data-name="beta_prefix_extend_sorted_singleton" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_prefix_extend,sorted_singleton"
  data-search="beta_prefix_extend_sorted_singleton recode an empty prefix into a sorted singleton append the first value to an empty code; the resulting singleton is sorted. forall b e s. exists z c. ((((exists h. h + s s = s ((s 0) * c)) /\ exists w. z = w * s ((s 0) * c) + s) /\ forall i a. (exists h. h + s i = 0) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists w. b = w * s ((s i) * e) + a) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists w. z = w * s ((s i) * c) + a)) /\ (forall i. (exists h. h + s (s i) = 1) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. z = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. z = w * s ((s s i) * c) + q) /\ (exists h. h + p = q))))) factorization beta_prefix_extend sorted_singleton">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_extend_sorted_singleton</code><span>Recode an empty prefix into a sorted singleton</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Append the first value to an empty code; the resulting singleton is Sorted.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_singleton" href="#theorem-sorted_singleton"><code>sorted_singleton</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_extend_sorted_singleton">Copy statement</button>
        <pre id="statement-beta_prefix_extend_sorted_singleton"><code>forall b e s. exists z c. ((((exists h. h + S s = S ((S 0) * c)) /\ exists w. z = w * S ((S 0) * c) + s) /\ forall i a. (exists h. h + S i = 0) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = 1) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_extend_sorted_singleton">Copy proof</button>
        <pre id="proof-beta_prefix_extend_sorted_singleton"><code>pa prove forall b e s. exists z c. ((((exists h. h + S s = S ((S 0) * c)) /\ exists w. z = w * S ((S 0) * c) + s) /\ forall i a. (exists h. h + S i = 0) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = 1) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))
use beta_prefix_extend
use sorted_singleton
intro b
intro e
intro s
have hext : exists z c. (((exists h. h + S s = S ((S 0) * c)) /\ exists w. z = w * S ((S 0) * c) + s) /\ forall i a. (exists h. h + S i = 0) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a))
specialize beta_prefix_extend 0
specialize beta_prefix_extend b
specialize beta_prefix_extend e
specialize beta_prefix_extend s
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x
exists x1
split
split
exact hext_witness_witness_left
exact hext_witness_witness_right
specialize sorted_singleton x
specialize sorted_singleton x1
exact sorted_singleton
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,146</dd></div>
        <div><dt>Distinct objects</dt><dd>4,551</dd></div>
        <div><dt>Reused references</dt><dd>228</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>873</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5750ecab9c2a299e23b9008664cf0f4886f46d1c14d9d8e43cfbfac325b59cce">5750ecab9c2a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_extend_sorted_singleton">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_extend_sorted_singleton</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7656">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_extend_sorted_singleton.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_extend_sorted_succ"
  data-name="beta_prefix_extend_sorted_succ" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_prefix_extend,sorted_transport,sorted_succ_intro,le_refl"
  data-search="beta_prefix_extend_sorted_succ recode a nonempty prefix and preserve adjacent sorted recode a nonempty sorted prefix and append a value above its former last value. forall l b e s p. (forall i. (exists h. h + s (s i) = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. b = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. b = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + s p = s ((s l) * e)) /\ exists w. b = w * s ((s l) * e) + p) -&gt; (exists h. h + p = s) -&gt; exists z c. ((((exists h. h + s s = s ((s s l) * c)) /\ exists w. z = w * s ((s s l) * c) + s) /\ forall i a. (exists h. h + s i = s l) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists w. b = w * s ((s i) * e) + a) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists w. z = w * s ((s i) * c) + a)) /\ (forall i. (exists h. h + s (s i) = s (s l)) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. z = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. z = w * s ((s s i) * c) + q) /\ (exists h. h + p = q))))) factorization beta_prefix_extend sorted_transport sorted_succ_intro le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_extend_sorted_succ</code><span>Recode a nonempty prefix and preserve adjacent Sorted</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Recode a nonempty Sorted prefix and append a value above its former last value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_transport" href="#theorem-sorted_transport"><code>sorted_transport</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_intro" href="#theorem-sorted_succ_intro"><code>sorted_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_extend_sorted_succ">Copy statement</button>
        <pre id="statement-beta_prefix_extend_sorted_succ"><code>forall l b e s p. (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. b = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + S p = S ((S l) * e)) /\ exists w. b = w * S ((S l) * e) + p) -&gt; (exists h. h + p = s) -&gt; exists z c. ((((exists h. h + S s = S ((S S l) * c)) /\ exists w. z = w * S ((S S l) * c) + s) /\ forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_extend_sorted_succ">Copy proof</button>
        <pre id="proof-beta_prefix_extend_sorted_succ"><code>pa prove forall l b e s p. (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. b = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + S p = S ((S l) * e)) /\ exists w. b = w * S ((S l) * e) + p) -&gt; (exists h. h + p = s) -&gt; exists z c. ((((exists h. h + S s = S ((S S l) * c)) /\ exists w. z = w * S ((S S l) * c) + s) /\ forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a)) /\ (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. z = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))
use beta_prefix_extend
use sorted_transport
use sorted_succ_intro
use le_refl
intro l
intro b
intro e
intro s
intro p
intro hsorted
intro hp
intro hps
have hext : exists z c. (((exists h. h + S s = S ((S S l) * c)) /\ exists w. z = w * S ((S S l) * c) + s) /\ forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. b = w * S ((S i) * e) + a) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. z = w * S ((S i) * c) + a))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend b
specialize beta_prefix_extend e
specialize beta_prefix_extend s
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
have hnewsorted : (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_transport b
specialize sorted_transport e
specialize sorted_transport x
specialize sorted_transport x1
specialize sorted_transport (S l)
apply sorted_transport
exact hsorted
exact hext_witness_witness_right
have hnewp : ((exists h. h + S p = S ((S l) * x1)) /\ exists w. x = w * S ((S l) * x1) + p)
specialize hext_witness_witness_right l
specialize hext_witness_witness_right p
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hp
exists x
exists x1
split
split
exact hext_witness_witness_left
exact hext_witness_witness_right
specialize sorted_succ_intro x
specialize sorted_succ_intro x1
specialize sorted_succ_intro l
specialize sorted_succ_intro p
specialize sorted_succ_intro s
apply sorted_succ_intro
exact hnewsorted
exact hnewp
exact hext_witness_witness_left
exact hps
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,414</dd></div>
        <div><dt>Distinct objects</dt><dd>4,669</dd></div>
        <div><dt>Reused references</dt><dd>230</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>880</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="eb120eb89de0ed2f5be2d37f3f625be6717050ee1da4abc0f5b9ee86b23a80b4">eb120eb89de0…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_extend_sorted_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_extend_sorted_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7692">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_extend_sorted_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_canonical_append_empty"
  data-name="beta_canonical_append_empty" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_factor_prefix_product_append,all_prime_empty,all_prime_succ_intro,sorted_singleton,one_mul"
  data-search="beta_canonical_append_empty canonical first-prime append append the first prime using the canonical shared-code factor/product append helper. forall b c s. (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ forall i. (exists h. h + s i = 0) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; exists z e. (((exists h. h + s s = s ((s 0) * e)) /\ exists w. z = w * s ((s 0) * e) + s) /\ ((forall i a. (exists h. h + s i = 0) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + a) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + a)) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s s = s ((s 1) * v)) /\ exists w. u = w * s ((s 1) * v) + s) /\ forall i. (exists h. h + s i = 1) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = 1) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s (s i) = 1) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. z = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))))))) factorization beta_factor_prefix_product_append all_prime_empty all_prime_succ_intro sorted_singleton one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_canonical_append_empty</code><span>Canonical first-prime append</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Append the first prime using the canonical shared-code factor/Product append helper.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_empty" href="#theorem-all_prime_empty"><code>all_prime_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_intro" href="#theorem-all_prime_succ_intro"><code>all_prime_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_singleton" href="#theorem-sorted_singleton"><code>sorted_singleton</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_canonical_append_empty">Copy statement</button>
        <pre id="statement-beta_canonical_append_empty"><code>forall b c s. (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = 0) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists z e. (((exists h. h + S s = S ((S 0) * e)) /\ exists w. z = w * S ((S 0) * e) + s) /\ ((forall i a. (exists h. h + S i = 0) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + s) /\ forall i. (exists h. h + S i = 1) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = 1) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = 1) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_canonical_append_empty">Copy proof</button>
        <pre id="proof-beta_canonical_append_empty"><code>pa prove forall b c s. (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ forall i. (exists h. h + S i = 0) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists z e. (((exists h. h + S s = S ((S 0) * e)) /\ exists w. z = w * S ((S 0) * e) + s) /\ ((forall i a. (exists h. h + S i = 0) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + s) /\ forall i. (exists h. h + S i = 1) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = 1) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = 1) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
use beta_factor_prefix_product_append
use all_prime_empty
use all_prime_succ_intro
use sorted_singleton
use one_mul
intro b
intro c
intro s
intro hs
intro hproduct
have hext : exists z e. (((exists h. h + S s = S ((S 0) * e)) /\ exists w. z = w * S ((S 0) * e) + s) /\ ((forall i a. (exists h. h + S i = 0) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (1 * s) = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + (1 * s)) /\ forall i. (exists h. h + S i = 1) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))))
specialize beta_factor_prefix_product_append b
specialize beta_factor_prefix_product_append c
specialize beta_factor_prefix_product_append 0
specialize beta_factor_prefix_product_append 1
specialize beta_factor_prefix_product_append s
apply beta_factor_prefix_product_append
exact hproduct
cases hext
cases hext_witness
cases hext_witness_witness
cases hext_witness_witness_right
have hproduct_s : exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S 1) * v)) /\ exists w. u = w * S ((S 1) * v) + s) /\ forall i. (exists h. h + S i = 1) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))
specialize one_mul s
rewrite one_mul at hext_witness_witness_right_right
rewrite one_mul at hext_witness_witness_right_right
exact hext_witness_witness_right_right
have hall : (forall i. (exists h. h + S i = 1) -&gt; exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro 0
specialize all_prime_succ_intro s
apply all_prime_succ_intro
specialize all_prime_empty x
specialize all_prime_empty x1
exact all_prime_empty
split
exact hext_witness_witness_left
exact hs
exists x
exists x1
split
exact hext_witness_witness_left
split
exact hext_witness_witness_right_left
split
exact hproduct_s
split
exact hall
specialize sorted_singleton x
specialize sorted_singleton x1
exact sorted_singleton
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,783</dd></div>
        <div><dt>Distinct objects</dt><dd>4,876</dd></div>
        <div><dt>Reused references</dt><dd>237</dd></div>
        <div><dt>Depth</dt><dd>82</dd></div>
        <div><dt>Cuts</dt><dd>894</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e89975bab8dbdd4e9bfc37fb4f2978fb4c380950b86be642921f53703a0e0449">e89975bab8db…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_canonical_append_empty">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_canonical_append_empty</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7773">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_canonical_append_empty.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_canonical_append_succ"
  data-name="beta_canonical_append_succ" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_factor_prefix_product_append,all_prime_transport,all_prime_succ_intro,sorted_transport,sorted_succ_intro,le_refl"
  data-search="beta_canonical_append_succ canonical ordered-prime append append one ordered prime using the canonical shared-code factor/product append helper. forall l b c n s p. (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s l) * v)) /\ exists w. u = w * s ((s s l) * v) + n) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + s (s i) = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) -&gt; (exists h. h + p = s) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; exists z e. (((exists h. h + s s = s ((s s l) * e)) /\ exists w. z = w * s ((s s l) * e) + s) /\ ((forall i a. (exists h. h + s i = s l) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + a) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + a)) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s (n * s) = s ((s s (s l)) * v)) /\ exists w. u = w * s ((s s (s l)) * v) + (n * s)) /\ forall i. (exists h. h + s i = s (s l)) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = s (s l)) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s (s i) = s (s l)) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. z = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))))))) factorization beta_factor_prefix_product_append all_prime_transport all_prime_succ_intro sorted_transport sorted_succ_intro le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_canonical_append_succ</code><span>Canonical ordered-prime append</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Append one ordered prime using the canonical shared-code factor/Product append helper.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_transport" href="#theorem-all_prime_transport"><code>all_prime_transport</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_intro" href="#theorem-all_prime_succ_intro"><code>all_prime_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_transport" href="#theorem-sorted_transport"><code>sorted_transport</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_intro" href="#theorem-sorted_succ_intro"><code>sorted_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_canonical_append_succ">Copy statement</button>
        <pre id="statement-beta_canonical_append_succ"><code>forall l b c n s p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -&gt; (exists h. h + p = s) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; exists z e. (((exists h. h + S s = S ((S S l) * e)) /\ exists w. z = w * S ((S S l) * e) + s) /\ ((forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S (S l)) * v)) /\ exists w. u = w * S ((S S (S l)) * v) + (n * s)) /\ forall i. (exists h. h + S i = S (S l)) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S (S l)) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_canonical_append_succ">Copy proof</button>
        <pre id="proof-beta_canonical_append_succ"><code>pa prove forall l b c n s p. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -&gt; (exists h. h + p = s) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; exists z e. (((exists h. h + S s = S ((S S l) * e)) /\ exists w. z = w * S ((S S l) * e) + s) /\ ((forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S (S l)) * v)) /\ exists w. u = w * S ((S S (S l)) * v) + (n * s)) /\ forall i. (exists h. h + S i = S (S l)) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S (S l)) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
use beta_factor_prefix_product_append
use all_prime_transport
use all_prime_succ_intro
use sorted_transport
use sorted_succ_intro
use le_refl
intro l
intro b
intro c
intro n
intro s
intro p
intro hproduct
intro hall
intro hsorted
intro hp
intro hps
intro hs
have hext : exists z e. (((exists h. h + S s = S ((S S l) * e)) /\ exists w. z = w * S ((S S l) * e) + s) /\ ((forall i a. (exists h. h + S i = S l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S (S l)) * v)) /\ exists w. u = w * S ((S S (S l)) * v) + (n * s)) /\ forall i. (exists h. h + S i = S (S l)) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))))
specialize beta_factor_prefix_product_append b
specialize beta_factor_prefix_product_append c
specialize beta_factor_prefix_product_append (S l)
specialize beta_factor_prefix_product_append n
specialize beta_factor_prefix_product_append s
apply beta_factor_prefix_product_append
exact hproduct
cases hext
cases hext_witness
cases hext_witness_witness
cases hext_witness_witness_right
have hnew_all_prefix : (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_transport b
specialize all_prime_transport c
specialize all_prime_transport x
specialize all_prime_transport x1
specialize all_prime_transport (S l)
apply all_prime_transport
exact hall
exact hext_witness_witness_right_left
have hnew_all : (forall i. (exists h. h + S i = S (S l)) -&gt; exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro (S l)
specialize all_prime_succ_intro s
apply all_prime_succ_intro
exact hnew_all_prefix
split
exact hext_witness_witness_left
exact hs
have hnew_sorted_prefix : (forall i. (exists h. h + S (S i) = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_transport b
specialize sorted_transport c
specialize sorted_transport x
specialize sorted_transport x1
specialize sorted_transport (S l)
apply sorted_transport
exact hsorted
exact hext_witness_witness_right_left
have hnewp : ((exists h. h + S p = S ((S l) * x1)) /\ exists w. x = w * S ((S l) * x1) + p)
specialize hext_witness_witness_right_left l
specialize hext_witness_witness_right_left p
apply hext_witness_witness_right_left
specialize le_refl (S l)
exact le_refl
exact hp
have hnew_sorted : (forall i. (exists h. h + S (S i) = S (S l)) -&gt; exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_intro x
specialize sorted_succ_intro x1
specialize sorted_succ_intro l
specialize sorted_succ_intro p
specialize sorted_succ_intro s
apply sorted_succ_intro
exact hnew_sorted_prefix
exact hnewp
exact hext_witness_witness_left
exact hps
exists x
exists x1
split
exact hext_witness_witness_left
split
exact hext_witness_witness_right_left
split
exact hext_witness_witness_right_right
split
exact hnew_all
exact hnew_sorted
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>30,020</dd></div>
        <div><dt>Distinct objects</dt><dd>5,009</dd></div>
        <div><dt>Reused references</dt><dd>236</dd></div>
        <div><dt>Depth</dt><dd>82</dd></div>
        <div><dt>Cuts</dt><dd>898</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="618288aae5fa540d12b201cca09dfab3f02e631fffac385eb38f631b35d002f6">618288aae5fa…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_canonical_append_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_canonical_append_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L7872">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_canonical_append_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_divides_decidable"
  data-name="prime_divides_decidable" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="prime_decidable,multiple_decidable"
  data-search="prime_divides_decidable prime divisibility is constructively decidable the concrete property of being a prime divisor is constructively decidable. forall p n. ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) \/ ~(((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k))) factorization prime_decidable multiple_decidable">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_divides_decidable</code><span>Prime divisibility is constructively decidable</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The concrete property of being a prime divisor is constructively decidable.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_decidable" href="#theorem-prime_decidable"><code>prime_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_decidable" href="#theorem-multiple_decidable"><code>multiple_decidable</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_divides_decidable">Copy statement</button>
        <pre id="statement-prime_divides_decidable"><code>forall p n. ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) \/ ~(((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_divides_decidable">Copy proof</button>
        <pre id="proof-prime_divides_decidable"><code>pa prove forall p n. ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) \/ ~(((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)))
use prime_decidable
use multiple_decidable
intro p
intro n
have hp : (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) \/ ~((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))
specialize prime_decidable p
exact prime_decidable
cases hp
have hd : (exists k. n = p * k) \/ ~((exists k. n = p * k))
specialize multiple_decidable p
specialize multiple_decidable n
exact multiple_decidable
cases hd
left
split
exact hp_left
exact hd_left
right
intro hpd
cases hpd
apply hd_right
exact hpd_right
right
intro hpd
cases hpd
apply hp_right
exact hpd_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,573</dd></div>
        <div><dt>Distinct objects</dt><dd>1,539</dd></div>
        <div><dt>Reused references</dt><dd>66</dd></div>
        <div><dt>Depth</dt><dd>74</dd></div>
        <div><dt>Cuts</dt><dd>101</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="44c96dfc214fa323ad039990374f1cd246c07282216ab167d54c5372c89e11bb">44c96dfc214f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_divides_decidable">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_divides_decidable</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8021">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_divides_decidable.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-greatest_prime_divisor_search"
  data-name="greatest_prime_divisor_search" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="prime_nonzero,le_zero,prime_divides_decidable,le_refl,le_eq_or_lt,le_of_succ_le_succ,le_succ"
  data-search="greatest_prime_divisor_search bounded greatest-prime-divisor search bounded search either excludes all prime divisors or returns a greatest one in the bound. forall b n. ((forall r. (exists h. h + r = b) -&gt; ~(((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = b) /\ ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = b) -&gt; ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p))) factorization prime_nonzero le_zero prime_divides_decidable le_refl le_eq_or_lt le_of_succ_le_succ le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>greatest_prime_divisor_search</code><span>Bounded greatest-prime-divisor search</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Bounded search either excludes all prime divisors or returns a greatest one in the bound.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divides_decidable" href="#theorem-prime_divides_decidable"><code>prime_divides_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_exists" href="#theorem-greatest_prime_divisor_exists"><code>greatest_prime_divisor_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-greatest_prime_divisor_search">Copy statement</button>
        <pre id="statement-greatest_prime_divisor_search"><code>forall B n. ((forall r. (exists h. h + r = B) -&gt; ~(((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = B) /\ ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = B) -&gt; ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-greatest_prime_divisor_search">Copy proof</button>
        <pre id="proof-greatest_prime_divisor_search"><code>pa prove forall B n. ((forall r. (exists h. h + r = B) -&gt; ~(((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = B) /\ ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = B) -&gt; ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)))
use prime_nonzero
use le_zero
use prime_divides_decidable
use le_refl
use le_eq_or_lt
use le_of_succ_le_succ
use le_succ
induction B
intro n
left
intro r
intro hr
intro hpd
cases hpd
have hr0 : r = 0
specialize le_zero r
apply le_zero
exact hr
specialize prime_nonzero r
apply prime_nonzero
exact hpd_left
exact hr0
intro n
have hboundary : ((~(S B = 1) /\ forall a d. S B = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = S B * k)) \/ ~(((~(S B = 1) /\ forall a d. S B = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = S B * k)))
specialize prime_divides_decidable (S B)
specialize prime_divides_decidable n
exact prime_divides_decidable
cases hboundary
right
exists S B
split
split
specialize le_refl (S B)
exact le_refl
exact hboundary_left
intro r
intro hr
intro hpd
exact hr
have hprev : ((forall r. (exists h. h + r = B) -&gt; ~(((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = B) /\ ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = B) -&gt; ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)))
specialize IH n
exact IH
cases hprev
left
intro r
intro hr
intro hpd
have hsplit : r = S B \/ exists h. h + S r = S B
specialize le_eq_or_lt r
specialize le_eq_or_lt (S B)
apply le_eq_or_lt
exact hr
cases hsplit
apply hboundary_right
rewrite hsplit_left at hpd
rewrite hsplit_left at hpd
rewrite hsplit_left at hpd
exact hpd
specialize hprev_left r
apply hprev_left
specialize le_of_succ_le_succ r
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hsplit_right
exact hpd
right
cases hprev_right
cases hprev_right_witness
cases hprev_right_witness_left
exists x
split
split
specialize le_succ x
specialize le_succ B
apply le_succ
exact hprev_right_witness_left_left
exact hprev_right_witness_left_right
intro r
intro hr
intro hpd
have hsplit2 : r = S B \/ exists h. h + S r = S B
specialize le_eq_or_lt r
specialize le_eq_or_lt (S B)
apply le_eq_or_lt
exact hr
cases hsplit2
exfalso
apply hboundary_right
rewrite hsplit2_left at hpd
rewrite hsplit2_left at hpd
rewrite hsplit2_left at hpd
exact hpd
specialize hprev_right_witness_right r
apply hprev_right_witness_right
specialize le_of_succ_le_succ r
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hsplit2_right
exact hpd
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,949</dd></div>
        <div><dt>Distinct objects</dt><dd>1,658</dd></div>
        <div><dt>Reused references</dt><dd>72</dd></div>
        <div><dt>Depth</dt><dd>77</dd></div>
        <div><dt>Cuts</dt><dd>116</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6ea4e68703508591a9384dfe483a9657359f48efd68930d4ab5b2e4b30bd7de7">6ea4e6870350…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for greatest_prime_divisor_search">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib greatest_prime_divisor_search</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8053">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/greatest_prime_divisor_search.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-greatest_prime_divisor_exists"
  data-name="greatest_prime_divisor_exists" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="prime_divisor_exists,divisor_le_nonzero,greatest_prime_divisor_search"
  data-search="greatest_prime_divisor_exists a greatest prime divisor exists every nonzero nonunit has a greatest prime divisor in the ordinary natural order. forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)) factorization prime_divisor_exists divisor_le_nonzero greatest_prime_divisor_search">
  <details>
    <summary>
      <span class="pa-card-title"><code>greatest_prime_divisor_exists</code><span>A greatest prime divisor exists</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every nonzero nonunit has a greatest prime divisor in the ordinary natural order.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divisor_exists" href="#theorem-prime_divisor_exists"><code>prime_divisor_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_le_nonzero" href="#theorem-divisor_le_nonzero"><code>divisor_le_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_search" href="#theorem-greatest_prime_divisor_search"><code>greatest_prime_divisor_search</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_descent" href="#theorem-greatest_prime_divisor_descent"><code>greatest_prime_divisor_descent</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-greatest_prime_divisor_exists">Copy statement</button>
        <pre id="statement-greatest_prime_divisor_exists"><code>forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-greatest_prime_divisor_exists">Copy proof</button>
        <pre id="proof-greatest_prime_divisor_exists"><code>pa prove forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p))
use prime_divisor_exists
use divisor_le_nonzero
use greatest_prime_divisor_search
intro n
intro hn0
intro hn1
have hsome : exists p. ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k))
specialize prime_divisor_exists n
apply prime_divisor_exists
exact hn0
exact hn1
cases hsome
cases hsome_witness
have hxle : (exists h. h + x = n)
specialize divisor_le_nonzero x
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn0
exact hsome_witness_right
have hsearch : ((forall r. (exists h. h + r = n) -&gt; ~(((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)))) \/ exists p. (((exists h. h + p = n) /\ ((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k))) /\ forall r. (exists h. h + r = n) -&gt; ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)))
specialize greatest_prime_divisor_search n
specialize greatest_prime_divisor_search n
exact greatest_prime_divisor_search
cases hsearch
exfalso
specialize hsearch_left x
apply hsearch_left
exact hxle
split
exact hsome_witness_left
exact hsome_witness_right
cases hsearch_right
cases hsearch_right_witness
cases hsearch_right_witness_left
exists x1
split
exact hsearch_right_witness_left_right
intro r
intro hrpd
cases hrpd
specialize hsearch_right_witness_right r
apply hsearch_right_witness_right
specialize divisor_le_nonzero r
specialize divisor_le_nonzero n
apply divisor_le_nonzero
exact hn0
exact hrpd_right
split
exact hrpd_left
exact hrpd_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7,052</dd></div>
        <div><dt>Distinct objects</dt><dd>2,015</dd></div>
        <div><dt>Reused references</dt><dd>92</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>214</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4ee7dca9d7ad5fdb5315da2a2900c55728b30b9cc8e9b542a68d927394041ae9">4ee7dca9d7ad…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for greatest_prime_divisor_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib greatest_prime_divisor_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8168">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/greatest_prime_divisor_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-greatest_prime_divisor_quotient_bound"
  data-name="greatest_prime_divisor_quotient_bound" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="mul_comm,multiple_trans"
  data-search="greatest_prime_divisor_quotient_bound prime divisors of the quotient are bounded every prime divisor of the quotient by a greatest prime divisor is bounded by that divisor. forall n p q. n = p * q -&gt; (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)) -&gt; forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. q = r * k) -&gt; (exists h. h + r = p) factorization mul_comm multiple_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>greatest_prime_divisor_quotient_bound</code><span>Prime divisors of the quotient are bounded</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every prime divisor of the quotient by a greatest prime divisor is bounded by that divisor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_trans" href="#theorem-multiple_trans"><code>multiple_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_descent" href="#theorem-greatest_prime_divisor_descent"><code>greatest_prime_divisor_descent</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-greatest_prime_divisor_quotient_bound">Copy statement</button>
        <pre id="statement-greatest_prime_divisor_quotient_bound"><code>forall n p q. n = p * q -&gt; (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)) -&gt; forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. q = r * k) -&gt; (exists h. h + r = p)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-greatest_prime_divisor_quotient_bound">Copy proof</button>
        <pre id="proof-greatest_prime_divisor_quotient_bound"><code>pa prove forall n p q. n = p * q -&gt; (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p)) -&gt; forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. q = r * k) -&gt; (exists h. h + r = p)
use mul_comm
use multiple_trans
intro n
intro p
intro q
intro hfactor
intro hgreat
intro r
intro hrprime
intro hrdq
cases hgreat
have hqdn : (exists k. n = q * k)
exists p
trans p * q
exact hfactor
apply mul_comm
have hrdn : (exists k. n = r * k)
specialize multiple_trans q
specialize multiple_trans r
specialize multiple_trans n
apply multiple_trans
exact hqdn
exact hrdq
specialize hgreat_right r
apply hgreat_right
split
exact hrprime
exact hrdn
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>388</dd></div>
        <div><dt>Distinct objects</dt><dd>322</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>11</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3c331ed30837f1823efa22ae60505a660e04c033392dc70466ec1c6f743ccba4">3c331ed30837…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for greatest_prime_divisor_quotient_bound">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib greatest_prime_divisor_quotient_bound</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8231">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/greatest_prime_divisor_quotient_bound.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-greatest_prime_divisor_descent"
  data-name="greatest_prime_divisor_descent" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="greatest_prime_divisor_exists,mul_comm,factor_nonzero_left,proper_factor_lt,greatest_prime_divisor_quotient_bound"
  data-search="greatest_prime_divisor_descent greatest-prime-divisor quotient descent choose a greatest prime factor with a nonzero strict quotient and the exact append-order bound. forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p q. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ n = p * q) /\ (~(q = 0) /\ ((exists h. h + s q = n) /\ forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. q = r * k) -&gt; (exists h. h + r = p)))) factorization greatest_prime_divisor_exists mul_comm factor_nonzero_left proper_factor_lt greatest_prime_divisor_quotient_bound">
  <details>
    <summary>
      <span class="pa-card-title"><code>greatest_prime_divisor_descent</code><span>Greatest-prime-divisor quotient descent</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Choose a greatest prime factor with a nonzero strict quotient and the exact append-order bound.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_exists" href="#theorem-greatest_prime_divisor_exists"><code>greatest_prime_divisor_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_nonzero_left" href="#theorem-factor_nonzero_left"><code>factor_nonzero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="proper_factor_lt" href="#theorem-proper_factor_lt"><code>proper_factor_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_quotient_bound" href="#theorem-greatest_prime_divisor_quotient_bound"><code>greatest_prime_divisor_quotient_bound</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-greatest_prime_divisor_descent">Copy statement</button>
        <pre id="statement-greatest_prime_divisor_descent"><code>forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p q. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ n = p * q) /\ (~(q = 0) /\ ((exists h. h + S q = n) /\ forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. q = r * k) -&gt; (exists h. h + r = p))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-greatest_prime_divisor_descent">Copy proof</button>
        <pre id="proof-greatest_prime_divisor_descent"><code>pa prove forall n. ~(n = 0) -&gt; ~(n = 1) -&gt; exists p q. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ n = p * q) /\ (~(q = 0) /\ ((exists h. h + S q = n) /\ forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. q = r * k) -&gt; (exists h. h + r = p))))
use greatest_prime_divisor_exists
use mul_comm
use factor_nonzero_left
use proper_factor_lt
use greatest_prime_divisor_quotient_bound
intro n
intro hn0
intro hn1
have hgreat : exists p. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = p * k)) /\ forall r. ((~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) /\ (exists k. n = r * k)) -&gt; (exists h. h + r = p))
specialize greatest_prime_divisor_exists n
apply greatest_prime_divisor_exists
exact hn0
exact hn1
cases hgreat
cases hgreat_witness
cases hgreat_witness_left
cases hgreat_witness_left_left
cases hgreat_witness_left_right
have hqp : n = x1 * x
trans x * x1
exact hgreat_witness_left_right_witness
apply mul_comm
have hq0 : ~(x1 = 0)
intro hx10
specialize factor_nonzero_left n
specialize factor_nonzero_left x1
specialize factor_nonzero_left x
apply factor_nonzero_left
exact hn0
exact hqp
exact hx10
have hqlt : (exists h. h + S x1 = n)
specialize proper_factor_lt n
specialize proper_factor_lt x1
specialize proper_factor_lt x
apply proper_factor_lt
exact hn0
exact hqp
exact hgreat_witness_left_left_left
have hbound : forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. x1 = r * k) -&gt; (exists h. h + r = x)
specialize greatest_prime_divisor_quotient_bound n
specialize greatest_prime_divisor_quotient_bound x
specialize greatest_prime_divisor_quotient_bound x1
apply greatest_prime_divisor_quotient_bound
exact hgreat_witness_left_right_witness
split
split
split
exact hgreat_witness_left_left_left
exact hgreat_witness_left_left_right
exists x1
exact hgreat_witness_left_right_witness
exact hgreat_witness_right
exists x
exists x1
split
split
split
exact hgreat_witness_left_left_left
exact hgreat_witness_left_left_right
exact hgreat_witness_left_right_witness
split
exact hq0
split
exact hqlt
exact hbound
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>8,256</dd></div>
        <div><dt>Distinct objects</dt><dd>2,234</dd></div>
        <div><dt>Reused references</dt><dd>109</dd></div>
        <div><dt>Depth</dt><dd>82</dd></div>
        <div><dt>Cuts</dt><dd>253</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="136a861b3f30fdca9822ff3689d79d6bcbc378c9f25bc8d6b5fc09a53cb99400">136a861b3f30…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for greatest_prime_divisor_descent">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib greatest_prime_divisor_descent</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8266">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/greatest_prime_divisor_descent.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_factor_divides_product"
  data-name="beta_factor_divides_product" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero,beta_product_succ_decompose,le_of_succ_le_succ,le_eq_or_lt,beta_at_unique,mul_comm,multiple_mul_right"
  data-search="beta_factor_divides_product every decoded factor divides its product every decoded factor inside an exact beta product divides its terminal product. forall b c l n i p. (exists h. h + s i = l) -&gt; ((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; exists q. n = p * q factorization add_eq_zero_right succ_ne_zero beta_product_succ_decompose le_of_succ_le_succ le_eq_or_lt beta_at_unique mul_comm multiple_mul_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_factor_divides_product</code><span>Every decoded factor divides its Product</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded factor inside an exact beta Product divides its terminal product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="multiple_mul_right" href="#theorem-multiple_mul_right"><code>multiple_mul_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factor_bound" href="#theorem-beta_canonical_last_factor_bound"><code>beta_canonical_last_factor_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_nonempty_all_prime_product_ne_one" href="#theorem-beta_nonempty_all_prime_product_ne_one"><code>beta_nonempty_all_prime_product_ne_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_factor_divides_product">Copy statement</button>
        <pre id="statement-beta_factor_divides_product"><code>forall b c l n i p. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists q. n = p * q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_factor_divides_product">Copy proof</button>
        <pre id="proof-beta_factor_divides_product"><code>pa prove forall b c l n i p. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists q. n = p * q
use add_eq_zero_right
use succ_ne_zero
use beta_product_succ_decompose
use le_of_succ_le_succ
use le_eq_or_lt
use beta_at_unique
use mul_comm
use multiple_mul_right
intro b
intro c
induction l
intro n
intro i
intro p
intro hi
intro hp
intro hproduct
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
intro n
intro i
intro p
intro hi
intro hp
intro hproduct
have hdecomp : exists a r. (((exists h. h + S a = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + a) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * a))
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hproduct
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
have hpa : p = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique p
specialize beta_at_unique x
apply beta_at_unique
rewrite hsplit_left at hp
rewrite hsplit_left at hp
exact hp
exact hdecomp_witness_witness_left
exists x1
trans x1 * x
exact hdecomp_witness_witness_right_right
rewrite hpa
apply mul_comm
have hidiv : exists q. x1 = p * q
specialize IH x1
specialize IH i
specialize IH p
apply IH
exact hsplit_right
exact hp
exact hdecomp_witness_witness_right_left
have hmul : exists q. x1 * x = p * q
specialize multiple_mul_right p
specialize multiple_mul_right x1
specialize multiple_mul_right x
apply multiple_mul_right
exact hidiv
cases hmul
exists x2
trans x1 * x
exact hdecomp_witness_witness_right_right
exact hmul_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,970</dd></div>
        <div><dt>Distinct objects</dt><dd>1,020</dd></div>
        <div><dt>Reused references</dt><dd>50</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>85</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1584e62c8f359db09dcd5672c1dd53112dc894f8faac24fc105eb8e78ecf3429">1584e62c8f35…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_factor_divides_product">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_factor_divides_product</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8346">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_factor_divides_product.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_canonical_append_general"
  data-name="beta_canonical_append_general" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_factor_prefix_product_append,all_prime_transport,all_prime_succ_intro,zero_or_succ,sorted_singleton,sorted_transport,all_prime_succ_elim_last,beta_factor_divides_product,le_refl,sorted_succ_intro"
  data-search="beta_canonical_append_general append one prime to any canonical beta prefix append one prime to any canonical prefix using one shared beta append certificate. forall l b c n s. (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + s s i = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; (forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. n = r * k) -&gt; (exists h. h + r = s)) -&gt; exists z e. (((exists h. h + s s = s ((s l) * e)) /\ exists w. z = w * s ((s l) * e) + s) /\ ((forall i a. (exists h. h + s i = l) -&gt; ((exists h. h + s a = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + a) -&gt; ((exists h. h + s a = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + a)) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s (n * s) = s ((s s l) * v)) /\ exists w. u = w * s ((s s l) * v) + (n * s)) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s s i = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. z = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))))))) factorization beta_factor_prefix_product_append all_prime_transport all_prime_succ_intro zero_or_succ sorted_singleton sorted_transport all_prime_succ_elim_last beta_factor_divides_product le_refl sorted_succ_intro">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_canonical_append_general</code><span>Append one prime to any canonical beta prefix</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Append one prime to any canonical prefix using one shared beta append certificate.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_factor_prefix_product_append" href="#theorem-beta_factor_prefix_product_append"><code>beta_factor_prefix_product_append</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_transport" href="#theorem-all_prime_transport"><code>all_prime_transport</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_intro" href="#theorem-all_prime_succ_intro"><code>all_prime_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_singleton" href="#theorem-sorted_singleton"><code>sorted_singleton</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_transport" href="#theorem-sorted_transport"><code>sorted_transport</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_last" href="#theorem-all_prime_succ_elim_last"><code>all_prime_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_intro" href="#theorem-sorted_succ_intro"><code>sorted_succ_intro</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_canonical_append_general">Copy statement</button>
        <pre id="statement-beta_canonical_append_general"><code>forall l b c n s. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; (forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. n = r * k) -&gt; (exists h. h + r = s)) -&gt; exists z e. (((exists h. h + S s = S ((S l) * e)) /\ exists w. z = w * S ((S l) * e) + s) /\ ((forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + (n * s)) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_canonical_append_general">Copy proof</button>
        <pre id="proof-beta_canonical_append_general"><code>pa prove forall l b c n s. (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (~(s = 1) /\ forall a d. s = a * d -&gt; a = 1 \/ d = 1) -&gt; (forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. n = r * k) -&gt; (exists h. h + r = s)) -&gt; exists z e. (((exists h. h + S s = S ((S l) * e)) /\ exists w. z = w * S ((S l) * e) + s) /\ ((forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + (n * s)) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
use beta_factor_prefix_product_append
use all_prime_transport
use all_prime_succ_intro
use zero_or_succ
use sorted_singleton
use sorted_transport
use all_prime_succ_elim_last
use beta_factor_divides_product
use le_refl
use sorted_succ_intro
intro l
intro b
intro c
intro n
intro s
intro hproduct
intro hall
intro hsorted
intro hs
intro hbound
have hext : exists z e. (((exists h. h + S s = S ((S l) * e)) /\ exists w. z = w * S ((S l) * e) + s) /\ ((forall i a. (exists h. h + S i = l) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (n * s) = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + (n * s)) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))))
specialize beta_factor_prefix_product_append b
specialize beta_factor_prefix_product_append c
specialize beta_factor_prefix_product_append l
specialize beta_factor_prefix_product_append n
specialize beta_factor_prefix_product_append s
apply beta_factor_prefix_product_append
exact hproduct
cases hext
cases hext_witness
cases hext_witness_witness
cases hext_witness_witness_right
have hnew_all_prefix : (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_transport b
specialize all_prime_transport c
specialize all_prime_transport x
specialize all_prime_transport x1
specialize all_prime_transport l
apply all_prime_transport
exact hall
exact hext_witness_witness_right_left
have hnew_all : (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_succ_intro x
specialize all_prime_succ_intro x1
specialize all_prime_succ_intro l
specialize all_prime_succ_intro s
apply all_prime_succ_intro
exact hnew_all_prefix
split
exact hext_witness_witness_left
exact hs
have hnew_sorted_prefix : (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
specialize sorted_transport b
specialize sorted_transport c
specialize sorted_transport x
specialize sorted_transport x1
specialize sorted_transport l
apply sorted_transport
exact hsorted
exact hext_witness_witness_right_left
have hlen : l = 0 \/ exists k. l = S k
specialize zero_or_succ l
exact zero_or_succ
have hnew_sorted : (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * x1)) /\ exists w. x = w * S ((S i) * x1) + p) /\ (((exists h. h + S q = S ((S S i) * x1)) /\ exists w. x = w * S ((S S i) * x1) + q) /\ (exists h. h + p = q))))
cases hlen
rewrite hlen_left
specialize sorted_singleton x
specialize sorted_singleton x1
exact sorted_singleton
cases hlen_right
rewrite hlen_right_witness
rewrite hlen_right_witness at hall
rewrite hlen_right_witness at hnew_sorted_prefix
rewrite hlen_right_witness at hproduct
rewrite hlen_right_witness at hproduct
rewrite hlen_right_witness at hproduct
have hlast : exists r. (((exists h. h + S r = S ((S x2) * c)) /\ exists w. b = w * S ((S x2) * c) + r) /\ (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last x2
apply all_prime_succ_elim_last
exact hall
cases hlast
cases hlast_witness
have hrdiv : (exists k. n = x3 * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S x2)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product x2
specialize beta_factor_divides_product x3
apply beta_factor_divides_product
specialize le_refl (S x2)
exact le_refl
exact hlast_witness_left
exact hproduct
have hrs : (exists h. h + x3 = s)
specialize hbound x3
apply hbound
exact hlast_witness_right
exact hrdiv
have hklt : (exists h. h + S x2 = l)
rewrite hlen_right_witness
specialize le_refl (S x2)
exact le_refl
have hnew_last : ((exists h. h + S x3 = S ((S x2) * x1)) /\ exists w. x = w * S ((S x2) * x1) + x3)
specialize hext_witness_witness_right_left x2
specialize hext_witness_witness_right_left x3
apply hext_witness_witness_right_left
exact hklt
exact hlast_witness_left
have hnew_append : ((exists h. h + S s = S ((S S x2) * x1)) /\ exists w. x = w * S ((S S x2) * x1) + s)
rewrite &lt;- hlen_right_witness
rewrite &lt;- hlen_right_witness
exact hext_witness_witness_left
specialize sorted_succ_intro x
specialize sorted_succ_intro x1
specialize sorted_succ_intro x2
specialize sorted_succ_intro x3
specialize sorted_succ_intro s
apply sorted_succ_intro
exact hnew_sorted_prefix
exact hnew_last
exact hnew_append
exact hrs
exists x
exists x1
split
exact hext_witness_witness_left
split
exact hext_witness_witness_right_left
split
exact hext_witness_witness_right_right
split
exact hnew_all
exact hnew_sorted
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>33,165</dd></div>
        <div><dt>Distinct objects</dt><dd>5,281</dd></div>
        <div><dt>Reused references</dt><dd>251</dd></div>
        <div><dt>Depth</dt><dd>82</dd></div>
        <div><dt>Cuts</dt><dd>993</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="72e9862443acb69a36356cedf98587f23b817c84e38c6cfeeaa751c37ea461e9">72e9862443ac…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_canonical_append_general">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_canonical_append_general</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8520">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_canonical_append_general.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_canonical_last_factor_bound"
  data-name="beta_canonical_last_factor_bound" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="all_prime_succ_elim_last,beta_factor_divides_product,le_refl"
  data-search="beta_canonical_last_factor_bound the last canonical factor obeys prime-divisor bounds the last factor of a nonempty allprime product obeys any bound on prime divisors of the product. forall b c l n s. (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s l) * v)) /\ exists q. u = q * s ((s s l) * v) + n) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists q. u = q * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; (forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. n = r * k) -&gt; (exists h. h + r = s)) -&gt; exists p. (((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) /\ (exists h. h + p = s)) factorization all_prime_succ_elim_last beta_factor_divides_product le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_canonical_last_factor_bound</code><span>The last canonical factor obeys prime-divisor bounds</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The last factor of a nonempty AllPrime Product obeys any bound on prime divisors of the product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_last" href="#theorem-all_prime_succ_elim_last"><code>all_prime_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_canonical_last_factor_bound">Copy statement</button>
        <pre id="statement-beta_canonical_last_factor_bound"><code>forall b c l n s. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. n = r * k) -&gt; (exists h. h + r = s)) -&gt; exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (exists h. h + p = s))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_canonical_last_factor_bound">Copy proof</button>
        <pre id="proof-beta_canonical_last_factor_bound"><code>pa prove forall b c l n s. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists q. u = q * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists q. u = q * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. n = r * k) -&gt; (exists h. h + r = s)) -&gt; exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (exists h. h + p = s))
use all_prime_succ_elim_last
use beta_factor_divides_product
use le_refl
intro b
intro c
intro l
intro n
intro s
intro hall
intro hproduct
intro hbound
have hlast : exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall
cases hlast
cases hlast_witness
have hpdiv : (exists k. n = x * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S l)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product l
specialize beta_factor_divides_product x
apply beta_factor_divides_product
specialize le_refl (S l)
exact le_refl
exact hlast_witness_left
exact hproduct
have hps : (exists h. h + x = s)
specialize hbound x
apply hbound
exact hlast_witness_right
exact hpdiv
exists x
split
exact hlast_witness_left
exact hps
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,079</dd></div>
        <div><dt>Distinct objects</dt><dd>1,079</dd></div>
        <div><dt>Reused references</dt><dd>52</dd></div>
        <div><dt>Depth</dt><dd>67</dd></div>
        <div><dt>Cuts</dt><dd>91</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0c23f5d9bd89ef74b0d6e23f3919b7683edf7e43fbfaf2d5eaf0ee1d3eef447a">0c23f5d9bd89…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_canonical_last_factor_bound">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_canonical_last_factor_bound</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8459">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_canonical_last_factor_bound.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_factorization_exists_up_to"
  data-name="prime_factorization_exists_up_to" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_zero,le_eq_or_lt,le_of_succ_le_succ,eq_decidable,succ_ne_zero,beta_at_exists,beta_at_self_of_bound,beta_at_unique,one_mul,le_refl,add_eq_zero_right,all_prime_empty,sorted_empty,greatest_prime_divisor_descent,beta_canonical_append_general,mul_comm"
  data-search="prime_factorization_exists_up_to bounded prime-factorization existence bounded induction with one consolidated canonical append dependency. forall b n. (exists h. h + n = b) -&gt; ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s s i = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))))) factorization le_zero le_eq_or_lt le_of_succ_le_succ eq_decidable succ_ne_zero beta_at_exists beta_at_self_of_bound beta_at_unique one_mul le_refl add_eq_zero_right all_prime_empty sorted_empty greatest_prime_divisor_descent beta_canonical_append_general mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_factorization_exists_up_to</code><span>Bounded prime-factorization existence</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Bounded induction with one consolidated canonical append dependency.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_self_of_bound" href="#theorem-beta_at_self_of_bound"><code>beta_at_self_of_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_empty" href="#theorem-all_prime_empty"><code>all_prime_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_empty" href="#theorem-sorted_empty"><code>sorted_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="greatest_prime_divisor_descent" href="#theorem-greatest_prime_divisor_descent"><code>greatest_prime_divisor_descent</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_append_general" href="#theorem-beta_canonical_append_general"><code>beta_canonical_append_general</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_existence" href="#theorem-prime_factorization_existence"><code>prime_factorization_existence</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_factorization_exists_up_to">Copy statement</button>
        <pre id="statement-prime_factorization_exists_up_to"><code>forall B n. (exists h. h + n = B) -&gt; ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_factorization_exists_up_to">Copy proof</button>
        <pre id="proof-prime_factorization_exists_up_to"><code>pa prove forall B n. (exists h. h + n = B) -&gt; ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
use le_zero
use le_eq_or_lt
use le_of_succ_le_succ
use eq_decidable
use succ_ne_zero
use beta_at_exists
use beta_at_self_of_bound
use beta_at_unique
use one_mul
use le_refl
use add_eq_zero_right
use all_prime_empty
use sorted_empty
use greatest_prime_divisor_descent
use beta_canonical_append_general
use mul_comm
induction B
intro n
intro hnB
intro hn0
exfalso
apply hn0
specialize le_zero n
apply le_zero
exact hnB
intro n
intro hnB
intro hn0
have hsplit : n = S B \/ exists h. h + S n = S B
specialize le_eq_or_lt n
specialize le_eq_or_lt (S B)
apply le_eq_or_lt
exact hnB
cases hsplit
rewrite hsplit_left
rewrite hsplit_left
have honecase : S B = 1 \/ ~(S B = 1)
specialize eq_decidable (S B)
specialize eq_decidable 1
apply eq_decidable
cases honecase
rewrite honecase_left
rewrite honecase_left
have hsome : exists x. ((exists h. h + S x = S ((S 0) * 1)) /\ exists w. 1 = w * S ((S 0) * 1) + x)
specialize beta_at_exists 1
specialize beta_at_exists 1
specialize beta_at_exists 0
exact beta_at_exists
cases hsome
have hone : ((exists h. h + S 1 = S ((S 0) * 1)) /\ exists w. 1 = w * S ((S 0) * 1) + 1)
specialize beta_at_self_of_bound 1
specialize beta_at_self_of_bound 0
specialize beta_at_self_of_bound 1
apply beta_at_self_of_bound
specialize one_mul 1
rewrite one_mul
specialize le_refl 2
exact le_refl
have hx1 : x = 1
specialize beta_at_unique 1
specialize beta_at_unique 1
specialize beta_at_unique 0
specialize beta_at_unique x
specialize beta_at_unique 1
apply beta_at_unique
exact hsome_witness
exact hone
rewrite hx1 at hsome_witness
rewrite hx1 at hsome_witness
exists 0
exists 0
exists 0
split
exists 1
exists 1
split
exact hsome_witness
split
exact hsome_witness
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
split
specialize all_prime_empty 0
specialize all_prime_empty 0
exact all_prime_empty
specialize sorted_empty 0
specialize sorted_empty 0
exact sorted_empty
have hdesc : exists p q. (((~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) /\ S B = p * q) /\ (~(q = 0) /\ ((exists h. h + S q = S B) /\ forall r. (~(r = 1) /\ forall a d. r = a * d -&gt; a = 1 \/ d = 1) -&gt; (exists k. q = r * k) -&gt; (exists h. h + r = p))))
specialize greatest_prime_divisor_descent (S B)
apply greatest_prime_divisor_descent
specialize succ_ne_zero B
exact succ_ne_zero
exact honecase_right
cases hdesc
cases hdesc_witness
cases hdesc_witness_witness
cases hdesc_witness_witness_left
cases hdesc_witness_witness_right
cases hdesc_witness_witness_right_right
have hqB : exists h. h + x1 = B
specialize le_of_succ_le_succ x1
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hdesc_witness_witness_right_right_left
have hqfac : exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x1 = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + x1) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
specialize IH x1
apply IH
exact hqB
exact hdesc_witness_witness_right_left
cases hqfac
cases hqfac_witness
cases hqfac_witness_witness
cases hqfac_witness_witness_witness
cases hqfac_witness_witness_witness_right
have happend : exists z e. (((exists h. h + S x = S ((S x2) * e)) /\ exists w. z = w * S ((S x2) * e) + x) /\ ((forall i a. (exists h. h + S i = x2) -&gt; ((exists h. h + S a = S ((S i) * x4)) /\ exists w. x3 = w * S ((S i) * x4) + a) -&gt; ((exists h. h + S a = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + a)) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (x1 * x) = S ((S S x2) * v)) /\ exists w. u = w * S ((S S x2) * v) + (x1 * x)) /\ forall i. (exists h. h + S i = S x2) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = S x2) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = S x2) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))))
specialize beta_canonical_append_general x2
specialize beta_canonical_append_general x3
specialize beta_canonical_append_general x4
specialize beta_canonical_append_general x1
specialize beta_canonical_append_general x
apply beta_canonical_append_general
exact hqfac_witness_witness_witness_left
exact hqfac_witness_witness_witness_right_left
exact hqfac_witness_witness_witness_right_right
exact hdesc_witness_witness_left_left
exact hdesc_witness_witness_right_right_right
cases happend
cases happend_witness
cases happend_witness_witness
cases happend_witness_witness_right
cases happend_witness_witness_right_right
cases happend_witness_witness_right_right_right
have hmul : x1 * x = S B
trans x * x1
apply mul_comm
symm
exact hdesc_witness_witness_left_right
have hcap : exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S (x1 * x) = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + (x1 * x)) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
exists S x2
exists x5
exists x6
split
exact happend_witness_witness_right_right_left
split
exact happend_witness_witness_right_right_right_left
exact happend_witness_witness_right_right_right_right
rewrite hmul at hcap
rewrite hmul at hcap
exact hcap
have hnB0 : exists h. h + n = B
specialize le_of_succ_le_succ n
specialize le_of_succ_le_succ B
apply le_of_succ_le_succ
exact hsplit_right
specialize IH n
apply IH
exact hnB0
exact hn0
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>43,927</dd></div>
        <div><dt>Distinct objects</dt><dd>6,780</dd></div>
        <div><dt>Reused references</dt><dd>319</dd></div>
        <div><dt>Depth</dt><dd>97</dd></div>
        <div><dt>Cuts</dt><dd>1,325</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ba5730d9fb3ed6ebe42130962563fcb56cd16f806c9d8d0f1ea3fa0e298c5370">ba5730d9fb3e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_factorization_exists_up_to">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_factorization_exists_up_to</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8721">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_factorization_exists_up_to.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_factorization_existence"
  data-name="prime_factorization_existence" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="prime_factorization_exists_up_to,le_refl"
  data-search="prime_factorization_existence existence of a finite prime factorization every nonzero natural has a canonical factorization using consolidated append. forall n. ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s s i = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))))) factorization prime_factorization_exists_up_to le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_factorization_existence</code><span>Existence of a finite prime factorization</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every nonzero natural has a canonical factorization using consolidated append.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_exists_up_to" href="#theorem-prime_factorization_exists_up_to"><code>prime_factorization_exists_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="fundamental_theorem_of_arithmetic" href="#theorem-fundamental_theorem_of_arithmetic"><code>fundamental_theorem_of_arithmetic</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_factorization_existence">Copy statement</button>
        <pre id="statement-prime_factorization_existence"><code>forall n. ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_factorization_existence">Copy proof</button>
        <pre id="proof-prime_factorization_existence"><code>pa prove forall n. ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
use prime_factorization_exists_up_to
use le_refl
intro n
intro hn0
specialize prime_factorization_exists_up_to n
specialize prime_factorization_exists_up_to n
apply prime_factorization_exists_up_to
specialize le_refl n
exact le_refl
exact hn0
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>43,973</dd></div>
        <div><dt>Distinct objects</dt><dd>6,801</dd></div>
        <div><dt>Reused references</dt><dd>320</dd></div>
        <div><dt>Depth</dt><dd>98</dd></div>
        <div><dt>Cuts</dt><dd>1,328</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f25aa6adb2b3043fd363f25a25972854dd78b3065c96524990efb45321f9126e">f25aa6adb2b3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_factorization_existence">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_factorization_existence</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L8954">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_factorization_existence.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prime_divisor_product_member"
  data-name="beta_prime_divisor_product_member" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_product_zero,divisor_one,beta_product_succ_decompose,all_prime_succ_elim_prefix,all_prime_succ_elim_last,euclid_prime_dvd_product,prime_divisor_eq_one_or_self,beta_at_unique,le_succ,le_refl"
  data-search="beta_prime_divisor_product_member a prime divisor of an allprime beta product occurs as a factor a prime divisor of an allprime beta product occurs as one of its decoded factors. forall b c l n p. (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) -&gt; (forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; (exists k. n = p * k) -&gt; exists i. ((exists h. h + s i = l) /\ ((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p)) factorization beta_product_zero divisor_one beta_product_succ_decompose all_prime_succ_elim_prefix all_prime_succ_elim_last euclid_prime_dvd_product prime_divisor_eq_one_or_self beta_at_unique le_succ le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prime_divisor_product_member</code><span>A prime divisor of an AllPrime beta Product occurs as a factor</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A prime divisor of an AllPrime beta Product occurs as one of its decoded factors.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_zero" href="#theorem-beta_product_zero"><code>beta_product_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_prefix" href="#theorem-all_prime_succ_elim_prefix"><code>all_prime_succ_elim_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_last" href="#theorem-all_prime_succ_elim_last"><code>all_prime_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="euclid_prime_dvd_product" href="#theorem-euclid_prime_dvd_product"><code>euclid_prime_dvd_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_eq_one_or_self" href="#theorem-prime_divisor_eq_one_or_self"><code>prime_divisor_eq_one_or_self</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prime_divisor_product_member">Copy statement</button>
        <pre id="statement-beta_prime_divisor_product_member"><code>forall b c l n p. (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (exists k. n = p * k) -&gt; exists i. ((exists h. h + S i = l) /\ ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prime_divisor_product_member">Copy proof</button>
        <pre id="proof-beta_prime_divisor_product_member"><code>pa prove forall b c l n p. (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1) -&gt; (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (exists k. n = p * k) -&gt; exists i. ((exists h. h + S i = l) /\ ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p))
use beta_product_zero
use divisor_one
use beta_product_succ_decompose
use all_prime_succ_elim_prefix
use all_prime_succ_elim_last
use euclid_prime_dvd_product
use prime_divisor_eq_one_or_self
use beta_at_unique
use le_succ
use le_refl
intro b
intro c
induction l
intro n
intro p
intro hpprime
intro hall
intro hproduct
intro hpdiv
have hn1 : n = 1
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hproduct
cases hpprime
exfalso
apply hpprime_left
have hp1 : p = 1
specialize divisor_one p
apply divisor_one
rewrite hn1 at hpdiv
exact hpdiv
exact hp1
intro n
intro p
intro hpprime
intro hall
intro hproduct
intro hpdiv
have hdecomp : exists a r. (((exists h. h + S a = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + a) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * a))
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hproduct
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hprefix : (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_succ_elim_prefix b
specialize all_prime_succ_elim_prefix c
specialize all_prime_succ_elim_prefix l
apply all_prime_succ_elim_prefix
exact hall
have hlast : exists t. (((exists h. h + S t = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + t) /\ (~(t = 1) /\ forall a d. t = a * d -&gt; a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall
have hpd : (exists k. x1 * x = p * k)
rewrite hdecomp_witness_witness_right_right at hpdiv
exact hpdiv
have hsplit : (exists k. x1 = p * k) \/ (exists k. x = p * k)
specialize euclid_prime_dvd_product p
specialize euclid_prime_dvd_product x1
specialize euclid_prime_dvd_product x
apply euclid_prime_dvd_product
exact hpprime
exact hpd
cases hsplit
have hmember : exists i. ((exists h. h + S i = l) /\ ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p))
specialize IH x1
specialize IH p
apply IH
exact hpprime
exact hprefix
exact hdecomp_witness_witness_right_left
exact hsplit_left
cases hmember
cases hmember_witness
exists x2
split
specialize le_succ (S x2)
specialize le_succ l
apply le_succ
exact hmember_witness_left
exact hmember_witness_right
cases hlast
cases hlast_witness
have hlast_eq : x = x2
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x2
apply beta_at_unique
exact hdecomp_witness_witness_left
exact hlast_witness_left
have hxprime : (~(x = 1) /\ forall a d. x = a * d -&gt; a = 1 \/ d = 1)
rewrite hlast_eq
rewrite hlast_eq
exact hlast_witness_right
have hpone_or_eq : p = 1 \/ x = p
specialize prime_divisor_eq_one_or_self x
specialize prime_divisor_eq_one_or_self p
apply prime_divisor_eq_one_or_self
exact hxprime
exact hsplit_right
cases hpone_or_eq
exfalso
cases hpprime
apply hpprime_left
exact hpone_or_eq_left
exists l
split
specialize le_refl (S l)
exact le_refl
rewrite hpone_or_eq_right at hdecomp_witness_witness_left
rewrite hpone_or_eq_right at hdecomp_witness_witness_left
exact hdecomp_witness_witness_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9,499</dd></div>
        <div><dt>Distinct objects</dt><dd>2,538</dd></div>
        <div><dt>Reused references</dt><dd>135</dd></div>
        <div><dt>Depth</dt><dd>67</dd></div>
        <div><dt>Cuts</dt><dd>277</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7723a9186a8afca0b69b239c65b8f9421cf7be5fda34816d0d384d5bbc446df4">7723a9186a8a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prime_divisor_product_member">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prime_divisor_product_member</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9611">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prime_divisor_product_member.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sorted_factor_le_last"
  data-name="beta_sorted_factor_le_last" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_zero,beta_at_unique,le_refl,le_eq_or_lt,sorted_succ_elim_prefix,sorted_succ_elim_last,le_trans"
  data-search="beta_sorted_factor_le_last every sorted factor is bounded by the last factor every factor in a nonempty adjacent-sorted beta prefix is at most its last factor. forall b c l i p q. (exists h. h + s i = s l) -&gt; ((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) -&gt; ((exists h. h + s q = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + q) -&gt; (forall i. (exists h. h + s s i = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists h. h + p = q) factorization le_of_succ_le_succ le_zero beta_at_unique le_refl le_eq_or_lt sorted_succ_elim_prefix sorted_succ_elim_last le_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sorted_factor_le_last</code><span>Every sorted factor is bounded by the last factor</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every factor in a nonempty adjacent-sorted beta prefix is at most its last factor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_elim_prefix" href="#theorem-sorted_succ_elim_prefix"><code>sorted_succ_elim_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_elim_last" href="#theorem-sorted_succ_elim_last"><code>sorted_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="le_trans" href="#theorem-le_trans"><code>le_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sorted_factor_le_last">Copy statement</button>
        <pre id="statement-beta_sorted_factor_le_last"><code>forall b c l i p q. (exists h. h + S i = S l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S q = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + q) -&gt; (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists h. h + p = q)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sorted_factor_le_last">Copy proof</button>
        <pre id="proof-beta_sorted_factor_le_last"><code>pa prove forall b c l i p q. (exists h. h + S i = S l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S q = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + q) -&gt; (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists h. h + p = q)
use le_of_succ_le_succ
use le_zero
use beta_at_unique
use le_refl
use le_eq_or_lt
use sorted_succ_elim_prefix
use sorted_succ_elim_last
use le_trans
intro b
intro c
induction l
intro i
intro p
intro q
intro hi
intro hip
intro hql
intro hsorted
have hile0 : (exists h. h + i = 0)
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ 0
apply le_of_succ_le_succ
exact hi
have hi0 : i = 0
specialize le_zero i
apply le_zero
exact hile0
have hpq : p = q
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique 0
specialize beta_at_unique p
specialize beta_at_unique q
apply beta_at_unique
rewrite hi0 at hip
rewrite hi0 at hip
exact hip
exact hql
rewrite hpq
specialize le_refl q
exact le_refl
intro i
intro p
intro q
intro hi
intro hip
intro hql
intro hsorted
have hile : (exists h. h + i = S l)
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ (S l)
apply le_of_succ_le_succ
exact hi
have hsplit : i = S l \/ (exists h. h + S i = S l)
specialize le_eq_or_lt i
specialize le_eq_or_lt (S l)
apply le_eq_or_lt
exact hile
cases hsplit
have hpq : p = q
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique (S l)
specialize beta_at_unique p
specialize beta_at_unique q
apply beta_at_unique
rewrite hsplit_left at hip
rewrite hsplit_left at hip
exact hip
exact hql
rewrite hpq
specialize le_refl q
exact le_refl
have hprefix : (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_elim_prefix b
specialize sorted_succ_elim_prefix c
specialize sorted_succ_elim_prefix (S l)
apply sorted_succ_elim_prefix
exact hsorted
have hadj : exists a d. (((exists h. h + S a = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + a) /\ (((exists h. h + S d = S ((S S l) * c)) /\ exists w. b = w * S ((S S l) * c) + d) /\ (exists h. h + a = d)))
specialize sorted_succ_elim_last b
specialize sorted_succ_elim_last c
specialize sorted_succ_elim_last l
apply sorted_succ_elim_last
exact hsorted
cases hadj
cases hadj_witness
cases hadj_witness_witness
cases hadj_witness_witness_right
have hdq : x1 = q
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique (S l)
specialize beta_at_unique x1
specialize beta_at_unique q
apply beta_at_unique
exact hadj_witness_witness_right_left
exact hql
have hpa : (exists h. h + p = x)
specialize IH i
specialize IH p
specialize IH x
apply IH
exact hsplit_right
exact hip
exact hadj_witness_witness_left
exact hprefix
specialize le_trans p
specialize le_trans x
specialize le_trans q
apply le_trans
exact hpa
rewrite hdq at hadj_witness_witness_right_right
exact hadj_witness_witness_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,587</dd></div>
        <div><dt>Distinct objects</dt><dd>1,004</dd></div>
        <div><dt>Reused references</dt><dd>44</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>48</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="02ee4e476daec327158f31db69f3a6b3440dd696c32e21a90d52bb229d613a41">02ee4e476dae…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sorted_factor_le_last">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sorted_factor_le_last</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9764">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sorted_factor_le_last.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_nonempty_all_prime_product_ne_one"
  data-name="beta_nonempty_all_prime_product_ne_one" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="all_prime_succ_elim_last,beta_factor_divides_product,le_refl,divisor_one"
  data-search="beta_nonempty_all_prime_product_ne_one a nonempty allprime beta product is not one a nonempty product of prime decoded factors cannot have terminal value one. forall b c l n. (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s l) * v)) /\ exists w. u = w * s ((s s l) * v) + n) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; ~(n = 1) factorization all_prime_succ_elim_last beta_factor_divides_product le_refl divisor_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_nonempty_all_prime_product_ne_one</code><span>A nonempty AllPrime beta Product is not one</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonempty product of prime decoded factors cannot have terminal value one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_last" href="#theorem-all_prime_succ_elim_last"><code>all_prime_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_all_prime_product_one_iff_length_zero" href="#theorem-beta_all_prime_product_one_iff_length_zero"><code>beta_all_prime_product_one_iff_length_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_nonempty_all_prime_product_ne_one">Copy statement</button>
        <pre id="statement-beta_nonempty_all_prime_product_ne_one"><code>forall b c l n. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ~(n = 1)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_nonempty_all_prime_product_ne_one">Copy proof</button>
        <pre id="proof-beta_nonempty_all_prime_product_ne_one"><code>pa prove forall b c l n. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ~(n = 1)
use all_prime_succ_elim_last
use beta_factor_divides_product
use le_refl
use divisor_one
intro b
intro c
intro l
intro n
intro hall
intro hproduct
intro hn1
have hlast : exists p. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall
cases hlast
cases hlast_witness
have hpdiv : (exists k. n = x * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S l)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product l
specialize beta_factor_divides_product x
apply beta_factor_divides_product
specialize le_refl (S l)
exact le_refl
exact hlast_witness_left
exact hproduct
have hp1 : x = 1
specialize divisor_one x
apply divisor_one
rewrite hn1 at hpdiv
exact hpdiv
cases hlast_witness_right
apply hlast_witness_right_left
exact hp1
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,266</dd></div>
        <div><dt>Distinct objects</dt><dd>1,213</dd></div>
        <div><dt>Reused references</dt><dd>67</dd></div>
        <div><dt>Depth</dt><dd>67</dd></div>
        <div><dt>Cuts</dt><dd>96</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9cde473a6b8fdb8a1f41f83f2fb3097a4fd9310964caab1693a3ea5592425273">9cde473a6b8f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_nonempty_all_prime_product_ne_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_nonempty_all_prime_product_ne_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9893">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_nonempty_all_prime_product_ne_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_all_prime_product_one_iff_length_zero"
  data-name="beta_all_prime_product_one_iff_length_zero" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_product_zero,beta_nonempty_all_prime_product_ne_one,succ_ne_zero"
  data-search="beta_all_prime_product_one_iff_length_zero an allprime beta product is one exactly at length zero under allprime, a beta product is one exactly when its encoded factor length is zero. forall b c l n. (forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; ((n = 1 -&gt; l = 0) /\ (l = 0 -&gt; n = 1)) factorization beta_product_zero beta_nonempty_all_prime_product_ne_one succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_all_prime_product_one_iff_length_zero</code><span>An AllPrime beta Product is one exactly at length zero</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Under AllPrime, a beta Product is one exactly when its encoded factor length is zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_zero" href="#theorem-beta_product_zero"><code>beta_product_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_nonempty_all_prime_product_ne_one" href="#theorem-beta_nonempty_all_prime_product_ne_one"><code>beta_nonempty_all_prime_product_ne_one</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_all_prime_product_one_iff_length_zero">Copy statement</button>
        <pre id="statement-beta_all_prime_product_one_iff_length_zero"><code>forall b c l n. (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((n = 1 -&gt; l = 0) /\ (l = 0 -&gt; n = 1))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_all_prime_product_one_iff_length_zero">Copy proof</button>
        <pre id="proof-beta_all_prime_product_one_iff_length_zero"><code>pa prove forall b c l n. (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((n = 1 -&gt; l = 0) /\ (l = 0 -&gt; n = 1))
use beta_product_zero
use beta_nonempty_all_prime_product_ne_one
use succ_ne_zero
intro b
intro c
induction l
intro n
intro hall
intro hproduct
split
intro hn1
refl
intro hl0
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hproduct
intro n
intro hall
intro hproduct
split
intro hn1
exfalso
specialize beta_nonempty_all_prime_product_ne_one b
specialize beta_nonempty_all_prime_product_ne_one c
specialize beta_nonempty_all_prime_product_ne_one l
specialize beta_nonempty_all_prime_product_ne_one n
apply beta_nonempty_all_prime_product_ne_one
exact hall
exact hproduct
exact hn1
intro hl0
exfalso
specialize succ_ne_zero l
apply succ_ne_zero
exact hl0
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,506</dd></div>
        <div><dt>Distinct objects</dt><dd>1,331</dd></div>
        <div><dt>Reused references</dt><dd>69</dd></div>
        <div><dt>Depth</dt><dd>69</dd></div>
        <div><dt>Cuts</dt><dd>130</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6edf708691c668af3b2c719f3c9ae4913f16a3100260ee5372ddaebca7d0495a">6edf708691c6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_all_prime_product_one_iff_length_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_all_prime_product_one_iff_length_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9946">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_all_prime_product_one_iff_length_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_canonical_last_factors_equal"
  data-name="beta_canonical_last_factors_equal" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="all_prime_succ_elim_last,beta_at_unique,beta_factor_divides_product,le_refl,beta_prime_divisor_product_member,beta_sorted_factor_le_last,le_antisymm"
  data-search="beta_canonical_last_factors_equal canonical factorizations have equal last factors two nonempty sorted allprime products of the same number have equal last factors. forall b c z e l k n p q. (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + s s i = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s l) * v)) /\ exists w. u = w * s ((s s l) * v) + n) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) -&gt; (forall i. (exists h. h + s i = s k) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + s s i = s k) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. z = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s k) * v)) /\ exists w. u = w * s ((s s k) * v) + n) /\ forall i. (exists h. h + s i = s k) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + s q = s ((s k) * e)) /\ exists w. z = w * s ((s k) * e) + q) -&gt; p = q factorization all_prime_succ_elim_last beta_at_unique beta_factor_divides_product le_refl beta_prime_divisor_product_member beta_sorted_factor_le_last le_antisymm">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_canonical_last_factors_equal</code><span>Canonical factorizations have equal last factors</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two nonempty sorted AllPrime Products of the same number have equal last factors.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_last" href="#theorem-all_prime_succ_elim_last"><code>all_prime_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_factor_divides_product" href="#theorem-beta_factor_divides_product"><code>beta_factor_divides_product</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prime_divisor_product_member" href="#theorem-beta_prime_divisor_product_member"><code>beta_prime_divisor_product_member</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sorted_factor_le_last" href="#theorem-beta_sorted_factor_le_last"><code>beta_sorted_factor_le_last</code></a> <a class="pa-theorem-chip" data-theorem-link="le_antisymm" href="#theorem-le_antisymm"><code>le_antisymm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_canonical_last_factors_equal">Copy statement</button>
        <pre id="statement-beta_canonical_last_factors_equal"><code>forall b c z e l k n p q. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -&gt; (forall i. (exists h. h + S i = S k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S k) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + S q = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + q) -&gt; p = q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_canonical_last_factors_equal">Copy proof</button>
        <pre id="proof-beta_canonical_last_factors_equal"><code>pa prove forall b c z e l k n p q. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) -&gt; (forall i. (exists h. h + S i = S k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S k) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; ((exists h. h + S q = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + q) -&gt; p = q
use all_prime_succ_elim_last
use beta_at_unique
use beta_factor_divides_product
use le_refl
use beta_prime_divisor_product_member
use beta_sorted_factor_le_last
use le_antisymm
intro b
intro c
intro z
intro e
intro l
intro k
intro n
intro p
intro q
intro hall1
intro hsort1
intro hprod1
intro hat1
intro hall2
intro hsort2
intro hprod2
intro hat2
have hlast1 : exists t. (((exists h. h + S t = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + t) /\ (~(t = 1) /\ forall a d. t = a * d -&gt; a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall1
cases hlast1
cases hlast1_witness
have hpeq1 : p = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique p
specialize beta_at_unique x
apply beta_at_unique
exact hat1
exact hlast1_witness_left
have hpprime : (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)
rewrite hpeq1
rewrite hpeq1
exact hlast1_witness_right
have hlast2 : exists t. (((exists h. h + S t = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + t) /\ (~(t = 1) /\ forall a d. t = a * d -&gt; a = 1 \/ d = 1))
specialize all_prime_succ_elim_last z
specialize all_prime_succ_elim_last e
specialize all_prime_succ_elim_last k
apply all_prime_succ_elim_last
exact hall2
cases hlast2
cases hlast2_witness
have hqeq2 : q = x1
specialize beta_at_unique z
specialize beta_at_unique e
specialize beta_at_unique k
specialize beta_at_unique q
specialize beta_at_unique x1
apply beta_at_unique
exact hat2
exact hlast2_witness_left
have hqprime : (~(q = 1) /\ forall a d. q = a * d -&gt; a = 1 \/ d = 1)
rewrite hqeq2
rewrite hqeq2
exact hlast2_witness_right
have hpdiv : (exists k. n = p * k)
specialize beta_factor_divides_product b
specialize beta_factor_divides_product c
specialize beta_factor_divides_product (S l)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product l
specialize beta_factor_divides_product p
apply beta_factor_divides_product
specialize le_refl (S l)
exact le_refl
exact hat1
exact hprod1
have hqdiv : (exists k. n = q * k)
specialize beta_factor_divides_product z
specialize beta_factor_divides_product e
specialize beta_factor_divides_product (S k)
specialize beta_factor_divides_product n
specialize beta_factor_divides_product k
specialize beta_factor_divides_product q
apply beta_factor_divides_product
specialize le_refl (S k)
exact le_refl
exact hat2
exact hprod2
have hpmember2 : exists i. ((exists h. h + S i = S k) /\ ((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p))
specialize beta_prime_divisor_product_member z
specialize beta_prime_divisor_product_member e
specialize beta_prime_divisor_product_member (S k)
specialize beta_prime_divisor_product_member n
specialize beta_prime_divisor_product_member p
apply beta_prime_divisor_product_member
exact hpprime
exact hall2
exact hprod2
exact hpdiv
cases hpmember2
cases hpmember2_witness
have hpq : (exists h. h + p = q)
specialize beta_sorted_factor_le_last z
specialize beta_sorted_factor_le_last e
specialize beta_sorted_factor_le_last k
specialize beta_sorted_factor_le_last x2
specialize beta_sorted_factor_le_last p
specialize beta_sorted_factor_le_last q
apply beta_sorted_factor_le_last
exact hpmember2_witness_left
exact hpmember2_witness_right
exact hat2
exact hsort2
have hqmember1 : exists i. ((exists h. h + S i = S l) /\ ((exists h. h + S q = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + q))
specialize beta_prime_divisor_product_member b
specialize beta_prime_divisor_product_member c
specialize beta_prime_divisor_product_member (S l)
specialize beta_prime_divisor_product_member n
specialize beta_prime_divisor_product_member q
apply beta_prime_divisor_product_member
exact hqprime
exact hall1
exact hprod1
exact hqdiv
cases hqmember1
cases hqmember1_witness
have hqp : (exists h. h + q = p)
specialize beta_sorted_factor_le_last b
specialize beta_sorted_factor_le_last c
specialize beta_sorted_factor_le_last l
specialize beta_sorted_factor_le_last x3
specialize beta_sorted_factor_le_last q
specialize beta_sorted_factor_le_last p
apply beta_sorted_factor_le_last
exact hqmember1_witness_left
exact hqmember1_witness_right
exact hat1
exact hsort1
specialize le_antisymm p
specialize le_antisymm q
apply le_antisymm
exact hpq
exact hqp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>15,648</dd></div>
        <div><dt>Distinct objects</dt><dd>3,187</dd></div>
        <div><dt>Reused references</dt><dd>156</dd></div>
        <div><dt>Depth</dt><dd>72</dd></div>
        <div><dt>Cuts</dt><dd>456</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="930f4810f83f9333f4f2e5685025a1244d2887d0315442969471aee366aa0dc2">930f4810f83f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_canonical_last_factors_equal">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_canonical_last_factors_equal</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9997">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_canonical_last_factors_equal.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_canonical_product_cancel_last"
  data-name="beta_canonical_product_cancel_last" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_product_succ_decompose,beta_canonical_last_factors_equal,all_prime_succ_elim_last,beta_at_unique,prime_nonzero,mul_right_cancel_nonzero,all_prime_succ_elim_prefix,sorted_succ_elim_prefix"
  data-search="beta_canonical_product_cancel_last cancel the common last factor of canonical products cancel the common last prime from two nonempty canonical beta products and return canonical prefixes. forall b c z e l k n. (forall i. (exists h. h + s i = s l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + s s i = s l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s l) * v)) /\ exists w. u = w * s ((s s l) * v) + n) /\ forall i. (exists h. h + s i = s l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + s i = s k) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + s s i = s k) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. z = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s s k) * v)) /\ exists w. u = w * s ((s s k) * v) + n) /\ forall i. (exists h. h + s i = s k) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) -&gt; exists p r s. (((exists h. h + s p = s ((s l) * c)) /\ exists w. b = w * s ((s l) * c) + p) /\ (((exists h. h + s p = s ((s k) * e)) /\ exists w. z = w * s ((s k) * e) + p) /\ ((forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + s s i = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s r = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + r) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = k) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + s s i = k) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. z = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s s = s ((s k) * v)) /\ exists w. u = w * s ((s k) * v) + s) /\ forall i. (exists h. h + s i = k) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. z = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ (n = r * p /\ (n = s * p /\ r = s)))))))))) factorization beta_product_succ_decompose beta_canonical_last_factors_equal all_prime_succ_elim_last beta_at_unique prime_nonzero mul_right_cancel_nonzero all_prime_succ_elim_prefix sorted_succ_elim_prefix">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_canonical_product_cancel_last</code><span>Cancel the common last factor of canonical Products</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Cancel the common last prime from two nonempty canonical beta Products and return canonical prefixes.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_last_factors_equal" href="#theorem-beta_canonical_last_factors_equal"><code>beta_canonical_last_factors_equal</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_last" href="#theorem-all_prime_succ_elim_last"><code>all_prime_succ_elim_last</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_right_cancel_nonzero" href="#theorem-mul_right_cancel_nonzero"><code>mul_right_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="all_prime_succ_elim_prefix" href="#theorem-all_prime_succ_elim_prefix"><code>all_prime_succ_elim_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="sorted_succ_elim_prefix" href="#theorem-sorted_succ_elim_prefix"><code>sorted_succ_elim_prefix</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_canonical_product_cancel_last">Copy statement</button>
        <pre id="statement-beta_canonical_product_cancel_last"><code>forall b c z e l k n. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + S i = S k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S k) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S p = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + p) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = k) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S k) * v)) /\ exists w. u = w * S ((S k) * v) + s) /\ forall i. (exists h. h + S i = k) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ (n = r * p /\ (n = s * p /\ r = s))))))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_canonical_product_cancel_last">Copy proof</button>
        <pre id="proof-beta_canonical_product_cancel_last"><code>pa prove forall b c z e l k n. (forall i. (exists h. h + S i = S l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S l) * v)) /\ exists w. u = w * S ((S S l) * v) + n) /\ forall i. (exists h. h + S i = S l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; (forall i. (exists h. h + S i = S k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) -&gt; (forall i. (exists h. h + S S i = S k) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) -&gt; (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S S k) * v)) /\ exists w. u = w * S ((S S k) * v) + n) /\ forall i. (exists h. h + S i = S k) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) -&gt; exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S p = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + p) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = k) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S k) * v)) /\ exists w. u = w * S ((S k) * v) + s) /\ forall i. (exists h. h + S i = k) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ (n = r * p /\ (n = s * p /\ r = s))))))))))
use beta_product_succ_decompose
use beta_canonical_last_factors_equal
use all_prime_succ_elim_last
use beta_at_unique
use prime_nonzero
use mul_right_cancel_nonzero
use all_prime_succ_elim_prefix
use sorted_succ_elim_prefix
intro b
intro c
intro z
intro e
intro l
intro k
intro n
intro hall1
intro hsort1
intro hprod1
intro hall2
intro hsort2
intro hprod2
have hdec1 : exists p r. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = r * p))
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hprod1
cases hdec1
cases hdec1_witness
cases hdec1_witness_witness
cases hdec1_witness_witness_right
have hdec2 : exists p s. (((exists h. h + S p = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + p) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S k) * v)) /\ exists w. u = w * S ((S k) * v) + s) /\ forall i. (exists h. h + S i = k) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ n = s * p))
specialize beta_product_succ_decompose z
specialize beta_product_succ_decompose e
specialize beta_product_succ_decompose k
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hprod2
cases hdec2
cases hdec2_witness
cases hdec2_witness_witness
cases hdec2_witness_witness_right
have hfactor_eq : x = x2
specialize beta_canonical_last_factors_equal b
specialize beta_canonical_last_factors_equal c
specialize beta_canonical_last_factors_equal z
specialize beta_canonical_last_factors_equal e
specialize beta_canonical_last_factors_equal l
specialize beta_canonical_last_factors_equal k
specialize beta_canonical_last_factors_equal n
specialize beta_canonical_last_factors_equal x
specialize beta_canonical_last_factors_equal x2
apply beta_canonical_last_factors_equal
exact hall1
exact hsort1
exact hprod1
exact hdec1_witness_witness_left
exact hall2
exact hsort2
exact hprod2
exact hdec2_witness_witness_left
have hshared_at2 : ((exists h. h + S x = S ((S k) * e)) /\ exists w. z = w * S ((S k) * e) + x)
rewrite hfactor_eq
rewrite hfactor_eq
exact hdec2_witness_witness_left
have hshared_prod2 : n = x3 * x
rewrite hfactor_eq
exact hdec2_witness_witness_right_right
have hlastprime : exists t. (((exists h. h + S t = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + t) /\ (~(t = 1) /\ forall a d. t = a * d -&gt; a = 1 \/ d = 1))
specialize all_prime_succ_elim_last b
specialize all_prime_succ_elim_last c
specialize all_prime_succ_elim_last l
apply all_prime_succ_elim_last
exact hall1
cases hlastprime
cases hlastprime_witness
have hfactor_last : x = x4
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x4
apply beta_at_unique
exact hdec1_witness_witness_left
exact hlastprime_witness_left
have hprime : (~(x = 1) /\ forall a d. x = a * d -&gt; a = 1 \/ d = 1)
rewrite hfactor_last
rewrite hfactor_last
exact hlastprime_witness_right
have hnonzero : ~(x = 0)
intro hxzero
specialize prime_nonzero x
apply prime_nonzero
exact hprime
exact hxzero
have hmuleq : x1 * x = x3 * x
trans n
symm
exact hdec1_witness_witness_right_right
exact hshared_prod2
have hprefix_eq : x1 = x3
specialize mul_right_cancel_nonzero x1
specialize mul_right_cancel_nonzero x3
specialize mul_right_cancel_nonzero x
apply mul_right_cancel_nonzero
exact hnonzero
exact hmuleq
have hallprefix1 : (forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_succ_elim_prefix b
specialize all_prime_succ_elim_prefix c
specialize all_prime_succ_elim_prefix l
apply all_prime_succ_elim_prefix
exact hall1
have hsortprefix1 : (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_elim_prefix b
specialize sorted_succ_elim_prefix c
specialize sorted_succ_elim_prefix l
apply sorted_succ_elim_prefix
exact hsort1
have hallprefix2 : (forall i. (exists h. h + S i = k) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1)))
specialize all_prime_succ_elim_prefix z
specialize all_prime_succ_elim_prefix e
specialize all_prime_succ_elim_prefix k
apply all_prime_succ_elim_prefix
exact hall2
have hsortprefix2 : (forall i. (exists h. h + S S i = k) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. z = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. z = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))
specialize sorted_succ_elim_prefix z
specialize sorted_succ_elim_prefix e
specialize sorted_succ_elim_prefix k
apply sorted_succ_elim_prefix
exact hsort2
exists x
exists x1
exists x3
split
exact hdec1_witness_witness_left
split
exact hshared_at2
split
exact hallprefix1
split
exact hsortprefix1
split
exact hdec1_witness_witness_right_left
split
exact hallprefix2
split
exact hsortprefix2
split
exact hdec2_witness_witness_right_left
split
exact hdec1_witness_witness_right_right
split
exact hshared_prod2
exact hprefix_eq
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>18,993</dd></div>
        <div><dt>Distinct objects</dt><dd>3,633</dd></div>
        <div><dt>Reused references</dt><dd>168</dd></div>
        <div><dt>Depth</dt><dd>74</dd></div>
        <div><dt>Cuts</dt><dd>552</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7670e0b1e59f1fd3eed1faddee381e267fb259aa9e31c54dc362d7c71517c4d7">7670e0b1e59f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_canonical_product_cancel_last">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_canonical_product_cancel_last</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L10180">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_canonical_product_cancel_last.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_factorization_uniqueness_by_length"
  data-name="prime_factorization_uniqueness_by_length" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="beta_product_zero,beta_all_prime_product_one_iff_length_zero,add_eq_zero_right,succ_ne_zero,beta_nonempty_all_prime_product_ne_one,nonzero_is_succ,beta_canonical_product_cancel_last,succ_congr,le_of_succ_le_succ,le_eq_or_lt,beta_at_unique"
  data-search="prime_factorization_uniqueness_by_length prime-factorization uniqueness by length strengthened induction on the first canonical factorization length. forall l n b c m d e. ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s s i = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))))) -&gt; ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s m) * v)) /\ exists w. u = w * s ((s m) * v) + n) /\ forall i. (exists h. h + s i = m) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = m) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s s i = m) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. d = w * s ((s s i) * e) + q) /\ (exists h. h + p = q)))))) -&gt; (l = m /\ forall i p q. (exists h. h + s i = l) -&gt; ((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) -&gt; ((exists h. h + s q = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + q) -&gt; p = q) factorization beta_product_zero beta_all_prime_product_one_iff_length_zero add_eq_zero_right succ_ne_zero beta_nonempty_all_prime_product_ne_one nonzero_is_succ beta_canonical_product_cancel_last succ_congr le_of_succ_le_succ le_eq_or_lt beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_factorization_uniqueness_by_length</code><span>Prime-factorization uniqueness by length</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Strengthened induction on the first canonical factorization length.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_zero" href="#theorem-beta_product_zero"><code>beta_product_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_all_prime_product_one_iff_length_zero" href="#theorem-beta_all_prime_product_one_iff_length_zero"><code>beta_all_prime_product_one_iff_length_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_nonempty_all_prime_product_ne_one" href="#theorem-beta_nonempty_all_prime_product_ne_one"><code>beta_nonempty_all_prime_product_ne_one</code></a> <a class="pa-theorem-chip" data-theorem-link="nonzero_is_succ" href="#theorem-nonzero_is_succ"><code>nonzero_is_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_canonical_product_cancel_last" href="#theorem-beta_canonical_product_cancel_last"><code>beta_canonical_product_cancel_last</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_congr" href="#theorem-succ_congr"><code>succ_congr</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness" href="#theorem-prime_factorization_uniqueness"><code>prime_factorization_uniqueness</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_factorization_uniqueness_by_length">Copy statement</button>
        <pre id="statement-prime_factorization_uniqueness_by_length"><code>forall l n b c m d e. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) -&gt; ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))))) -&gt; (l = m /\ forall i p q. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -&gt; p = q)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_factorization_uniqueness_by_length">Copy proof</button>
        <pre id="proof-prime_factorization_uniqueness_by_length"><code>pa prove forall l n b c m d e. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) -&gt; ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))))) -&gt; (l = m /\ forall i p q. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -&gt; p = q)
use beta_product_zero
use beta_all_prime_product_one_iff_length_zero
use add_eq_zero_right
use succ_ne_zero
use beta_nonempty_all_prime_product_ne_one
use nonzero_is_succ
use beta_canonical_product_cancel_last
use succ_congr
use le_of_succ_le_succ
use le_eq_or_lt
use beta_at_unique
induction l
intro n
intro b
intro c
intro m
intro d
intro e
intro hcan1
intro hcan2
cases hcan1
cases hcan1_right
cases hcan2
cases hcan2_right
have hn1 : n = 1
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hcan1_left
have hiff2 : ((n = 1 -&gt; m = 0) /\ (m = 0 -&gt; n = 1))
specialize beta_all_prime_product_one_iff_length_zero d
specialize beta_all_prime_product_one_iff_length_zero e
specialize beta_all_prime_product_one_iff_length_zero m
specialize beta_all_prime_product_one_iff_length_zero n
apply beta_all_prime_product_one_iff_length_zero
exact hcan2_right_left
exact hcan2_left
cases hiff2
have hm0 : m = 0
apply hiff2_left
exact hn1
split
symm
exact hm0
intro i
intro p
intro q
intro hi
intro hat1
intro hat2
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
intro n
intro b
intro c
intro m
intro d
intro e
intro hcan1
intro hcan2
cases hcan1
cases hcan1_right
cases hcan2
cases hcan2_right
have hiff2 : ((n = 1 -&gt; m = 0) /\ (m = 0 -&gt; n = 1))
specialize beta_all_prime_product_one_iff_length_zero d
specialize beta_all_prime_product_one_iff_length_zero e
specialize beta_all_prime_product_one_iff_length_zero m
specialize beta_all_prime_product_one_iff_length_zero n
apply beta_all_prime_product_one_iff_length_zero
exact hcan2_right_left
exact hcan2_left
cases hiff2
have hmne : ~(m = 0)
intro hm0
have hn1 : n = 1
apply hiff2_right
exact hm0
specialize beta_nonempty_all_prime_product_ne_one b
specialize beta_nonempty_all_prime_product_ne_one c
specialize beta_nonempty_all_prime_product_ne_one l
specialize beta_nonempty_all_prime_product_ne_one n
apply beta_nonempty_all_prime_product_ne_one
exact hcan1_right_left
exact hcan1_left
exact hn1
have hmsucc : exists k. m = S k
specialize nonzero_is_succ m
apply nonzero_is_succ
exact hmne
cases hmsucc
rewrite hmsucc_witness at hcan2_right_left
rewrite hmsucc_witness at hcan2_right_right
rewrite hmsucc_witness at hcan2_left
rewrite hmsucc_witness at hcan2_left
rewrite hmsucc_witness at hcan2_left
have hcancel : exists p r s. (((exists h. h + S p = S ((S l) * c)) /\ exists w. b = w * S ((S l) * c) + p) /\ (((exists h. h + S p = S ((S x) * e)) /\ exists w. d = w * S ((S x) * e) + p) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S r = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + r) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = x) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ ((forall i. (exists h. h + S S i = x) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q)))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S s = S ((S x) * v)) /\ exists w. u = w * S ((S x) * v) + s) /\ forall i. (exists h. h + S i = x) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ (n = r * p /\ (n = s * p /\ r = s))))))))))
specialize beta_canonical_product_cancel_last b
specialize beta_canonical_product_cancel_last c
specialize beta_canonical_product_cancel_last d
specialize beta_canonical_product_cancel_last e
specialize beta_canonical_product_cancel_last l
specialize beta_canonical_product_cancel_last x
specialize beta_canonical_product_cancel_last n
apply beta_canonical_product_cancel_last
exact hcan1_right_left
exact hcan1_right_right
exact hcan1_left
exact hcan2_right_left
exact hcan2_right_right
exact hcan2_left
cases hcancel
cases hcancel_witness
cases hcancel_witness_witness
cases hcancel_witness_witness_witness
cases hcancel_witness_witness_witness_right
cases hcancel_witness_witness_witness_right_right
cases hcancel_witness_witness_witness_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right_right_right
cases hcancel_witness_witness_witness_right_right_right_right_right_right_right_right_right
have hprod2prefix_same : (exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x2 = S ((S x) * v)) /\ exists w. u = w * S ((S x) * v) + x2) /\ forall i. (exists h. h + S i = x) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p))))))
rewrite hcancel_witness_witness_witness_right_right_right_right_right_right_right_right_right_right
rewrite hcancel_witness_witness_witness_right_right_right_right_right_right_right_right_right_right
exact hcancel_witness_witness_witness_right_right_right_right_right_right_right_left
have hprefixcan1 : ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x2 = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + x2) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q))))))
split
exact hcancel_witness_witness_witness_right_right_right_right_left
split
exact hcancel_witness_witness_witness_right_right_left
exact hcancel_witness_witness_witness_right_right_right_left
have hprefixcan2 : ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S x2 = S ((S x) * v)) /\ exists w. u = w * S ((S x) * v) + x2) /\ forall i. (exists h. h + S i = x) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = x) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = x) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))
split
exact hprod2prefix_same
split
exact hcancel_witness_witness_witness_right_right_right_right_right_left
exact hcancel_witness_witness_witness_right_right_right_right_right_right_left
have hrec : (l = x /\ forall i p q. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -&gt; p = q)
specialize IH x2
specialize IH b
specialize IH c
specialize IH x
specialize IH d
specialize IH e
apply IH
exact hprefixcan1
exact hprefixcan2
cases hrec
split
have hslen : S l = S x
specialize succ_congr l
specialize succ_congr x
apply succ_congr
exact hrec_left
trans S x
exact hslen
symm
exact hmsucc_witness
intro i
intro p
intro q
intro hi
intro hat1
intro hat2
have hile : (exists h. h + i = l)
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ (exists h. h + S i = l)
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hile
cases hsplit
have hp_last : p = x1
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique p
specialize beta_at_unique x1
apply beta_at_unique
rewrite hsplit_left at hat1
rewrite hsplit_left at hat1
exact hat1
exact hcancel_witness_witness_witness_left
have hq_last : q = x1
specialize beta_at_unique d
specialize beta_at_unique e
specialize beta_at_unique x
specialize beta_at_unique q
specialize beta_at_unique x1
apply beta_at_unique
rewrite hsplit_left at hat2
rewrite hsplit_left at hat2
rewrite hrec_left at hat2
rewrite hrec_left at hat2
exact hat2
exact hcancel_witness_witness_witness_right_left
trans x1
exact hp_last
symm
exact hq_last
specialize hrec_right i
specialize hrec_right p
specialize hrec_right q
apply hrec_right
exact hsplit_right
exact hat1
exact hat2
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,739</dd></div>
        <div><dt>Distinct objects</dt><dd>4,291</dd></div>
        <div><dt>Reused references</dt><dd>181</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>853</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c12e77244e859e98e1b09e1e2401e0a3b6652cec9700a189165524c4a70559d3">c12e77244e85…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_factorization_uniqueness_by_length">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_factorization_uniqueness_by_length</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L10426">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_factorization_uniqueness_by_length.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_factorization_uniqueness"
  data-name="prime_factorization_uniqueness" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="prime_factorization_uniqueness_by_length"
  data-search="prime_factorization_uniqueness uniqueness of finite prime factorization exact catalog finite prime-factorization uniqueness target. forall n l b c m d e. (((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists w. u = w * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s s i = l) -&gt; exists p q. (((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) /\ (((exists h. h + s q = s ((s s i) * c)) /\ exists w. b = w * s ((s s i) * c) + q) /\ (exists h. h + p = q)))))) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists w. u = w * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s m) * v)) /\ exists w. u = w * s ((s m) * v) + n) /\ forall i. (exists h. h + s i = m) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists w. u = w * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s s i) * v)) /\ exists w. u = w * s ((s s i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = m) -&gt; exists p. (((exists h. h + s p = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s s i = m) -&gt; exists p q. (((exists h. h + s p = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + p) /\ (((exists h. h + s q = s ((s s i) * e)) /\ exists w. d = w * s ((s s i) * e) + q) /\ (exists h. h + p = q))))))) -&gt; (l = m /\ forall i p q. (exists h. h + s i = l) -&gt; ((exists h. h + s p = s ((s i) * c)) /\ exists w. b = w * s ((s i) * c) + p) -&gt; ((exists h. h + s q = s ((s i) * e)) /\ exists w. d = w * s ((s i) * e) + q) -&gt; p = q) factorization prime_factorization_uniqueness_by_length">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_factorization_uniqueness</code><span>Uniqueness of finite prime factorization</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Exact catalog finite prime-factorization uniqueness target.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness_by_length" href="#theorem-prime_factorization_uniqueness_by_length"><code>prime_factorization_uniqueness_by_length</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="fundamental_theorem_of_arithmetic" href="#theorem-fundamental_theorem_of_arithmetic"><code>fundamental_theorem_of_arithmetic</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_factorization_uniqueness">Copy statement</button>
        <pre id="statement-prime_factorization_uniqueness"><code>forall n l b c m d e. (((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))) -&gt; (l = m /\ forall i p q. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -&gt; p = q)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_factorization_uniqueness">Copy proof</button>
        <pre id="proof-prime_factorization_uniqueness"><code>pa prove forall n l b c m d e. (((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists w. u = w * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = l) -&gt; exists p q. (((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) /\ (((exists h. h + S q = S ((S S i) * c)) /\ exists w. b = w * S ((S S i) * c) + q) /\ (exists h. h + p = q)))))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists w. u = w * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists w. u = w * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists w. u = w * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S S i) * v)) /\ exists w. u = w * S ((S S i) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -&gt; exists p. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S S i = m) -&gt; exists p q. (((exists h. h + S p = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + p) /\ (((exists h. h + S q = S ((S S i) * e)) /\ exists w. d = w * S ((S S i) * e) + q) /\ (exists h. h + p = q))))))) -&gt; (l = m /\ forall i p q. (exists h. h + S i = l) -&gt; ((exists h. h + S p = S ((S i) * c)) /\ exists w. b = w * S ((S i) * c) + p) -&gt; ((exists h. h + S q = S ((S i) * e)) /\ exists w. d = w * S ((S i) * e) + q) -&gt; p = q)
use prime_factorization_uniqueness_by_length
intro n
intro l
intro b
intro c
intro m
intro d
intro e
intro hboth
cases hboth
specialize prime_factorization_uniqueness_by_length l
specialize prime_factorization_uniqueness_by_length n
specialize prime_factorization_uniqueness_by_length b
specialize prime_factorization_uniqueness_by_length c
specialize prime_factorization_uniqueness_by_length m
specialize prime_factorization_uniqueness_by_length d
specialize prime_factorization_uniqueness_by_length e
apply prime_factorization_uniqueness_by_length
exact hboth_left
exact hboth_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,789</dd></div>
        <div><dt>Distinct objects</dt><dd>4,341</dd></div>
        <div><dt>Reused references</dt><dd>181</dd></div>
        <div><dt>Depth</dt><dd>82</dd></div>
        <div><dt>Cuts</dt><dd>854</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2d7a7156431d5a3889af82cfb66b9d48c30b01b9ed191372317b3e8ae46ac401">2d7a7156431d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_factorization_uniqueness">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_factorization_uniqueness</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L10749">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_factorization_uniqueness.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-fundamental_theorem_of_arithmetic"
  data-name="fundamental_theorem_of_arithmetic" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="prime_factorization_existence,prime_factorization_uniqueness"
  data-search="fundamental_theorem_of_arithmetic fundamental theorem of arithmetic native beta-coded prime-factorization existence and uniqueness in first-order pa; no conventional list primitive and no dne. (forall n. ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s (s i)) * v)) /\ exists q. u = q * s ((s (s i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s (p) = s ((s (i)) * c)) /\ exists w. b = w * s ((s (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s (s i) = l) -&gt; exists p q. (((exists h. h + s (p) = s ((s (i)) * c)) /\ exists w. b = w * s ((s (i)) * c) + p) /\ (((exists h. h + s (q) = s ((s (s i)) * c)) /\ exists w. b = w * s ((s (s i)) * c) + q) /\ exists h. h + p = q)))))) /\ (forall n l b c m d e. (((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s l) * v)) /\ exists q. u = q * s ((s l) * v) + n) /\ forall i. (exists h. h + s i = l) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * c)) /\ exists q. b = q * s ((s i) * c) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s (s i)) * v)) /\ exists q. u = q * s ((s (s i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = l) -&gt; exists p. (((exists h. h + s (p) = s ((s (i)) * c)) /\ exists w. b = w * s ((s (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s (s i) = l) -&gt; exists p q. (((exists h. h + s (p) = s ((s (i)) * c)) /\ exists w. b = w * s ((s (i)) * c) + p) /\ (((exists h. h + s (q) = s ((s (s i)) * c)) /\ exists w. b = w * s ((s (s i)) * c) + q) /\ exists h. h + p = q))))) /\ ((exists u v. (((exists h. h + s 1 = s ((s 0) * v)) /\ exists q. u = q * s ((s 0) * v) + 1) /\ (((exists h. h + s n = s ((s m) * v)) /\ exists q. u = q * s ((s m) * v) + n) /\ forall i. (exists h. h + s i = m) -&gt; exists p r s. (((exists h. h + s p = s ((s i) * e)) /\ exists q. d = q * s ((s i) * e) + p) /\ (((exists h. h + s r = s ((s i) * v)) /\ exists q. u = q * s ((s i) * v) + r) /\ (((exists h. h + s s = s ((s (s i)) * v)) /\ exists q. u = q * s ((s (s i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + s i = m) -&gt; exists p. (((exists h. h + s (p) = s ((s (i)) * e)) /\ exists w. d = w * s ((s (i)) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + s (s i) = m) -&gt; exists p q. (((exists h. h + s (p) = s ((s (i)) * e)) /\ exists w. d = w * s ((s (i)) * e) + p) /\ (((exists h. h + s (q) = s ((s (s i)) * e)) /\ exists w. d = w * s ((s (s i)) * e) + q) /\ exists h. h + p = q)))))) -&gt; (l = m /\ forall i p q. (exists h. h + s i = l) -&gt; ((exists h. h + s (p) = s ((s (i)) * c)) /\ exists w. b = w * s ((s (i)) * c) + p) -&gt; ((exists h. h + s (q) = s ((s (i)) * e)) /\ exists w. d = w * s ((s (i)) * e) + q) -&gt; p = q)) factorization prime_factorization_existence prime_factorization_uniqueness">
  <details>
    <summary>
      <span class="pa-card-title"><code>fundamental_theorem_of_arithmetic</code><span>Fundamental theorem of arithmetic</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Native beta-coded prime-factorization existence and uniqueness in first-order PA; no conventional list primitive and no DNE.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_factorization_existence" href="#theorem-prime_factorization_existence"><code>prime_factorization_existence</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_factorization_uniqueness" href="#theorem-prime_factorization_uniqueness"><code>prime_factorization_uniqueness</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-fundamental_theorem_of_arithmetic">Copy statement</button>
        <pre id="statement-fundamental_theorem_of_arithmetic"><code>(forall n. ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q)))))) /\ (forall n l b c m d e. (((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q))))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists q. u = q * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. d = q * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -&gt; exists p. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = m) -&gt; exists p q. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * e)) /\ exists w. d = w * S ((S (S i)) * e) + q) /\ exists h. h + p = q)))))) -&gt; (l = m /\ forall i p q. (exists h. h + S i = l) -&gt; ((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) -&gt; ((exists h. h + S (q) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + q) -&gt; p = q))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-fundamental_theorem_of_arithmetic">Copy proof</button>
        <pre id="proof-fundamental_theorem_of_arithmetic"><code>pa prove (forall n. ~(n = 0) -&gt; exists l b c. ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q)))))) /\ (forall n l b c m d e. (((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S l) * v)) /\ exists q. u = q * S ((S l) * v) + n) /\ forall i. (exists h. h + S i = l) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = l) -&gt; exists p. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = l) -&gt; exists p q. (((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * c)) /\ exists w. b = w * S ((S (S i)) * c) + q) /\ exists h. h + p = q))))) /\ ((exists u v. (((exists h. h + S 1 = S ((S 0) * v)) /\ exists q. u = q * S ((S 0) * v) + 1) /\ (((exists h. h + S n = S ((S m) * v)) /\ exists q. u = q * S ((S m) * v) + n) /\ forall i. (exists h. h + S i = m) -&gt; exists p r s. (((exists h. h + S p = S ((S i) * e)) /\ exists q. d = q * S ((S i) * e) + p) /\ (((exists h. h + S r = S ((S i) * v)) /\ exists q. u = q * S ((S i) * v) + r) /\ (((exists h. h + S s = S ((S (S i)) * v)) /\ exists q. u = q * S ((S (S i)) * v) + s) /\ s = r * p)))))) /\ ((forall i. (exists h. h + S i = m) -&gt; exists p. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (~(p = 1) /\ forall a d. p = a * d -&gt; a = 1 \/ d = 1))) /\ (forall i. (exists h. h + S (S i) = m) -&gt; exists p q. (((exists h. h + S (p) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + p) /\ (((exists h. h + S (q) = S ((S (S i)) * e)) /\ exists w. d = w * S ((S (S i)) * e) + q) /\ exists h. h + p = q)))))) -&gt; (l = m /\ forall i p q. (exists h. h + S i = l) -&gt; ((exists h. h + S (p) = S ((S (i)) * c)) /\ exists w. b = w * S ((S (i)) * c) + p) -&gt; ((exists h. h + S (q) = S ((S (i)) * e)) /\ exists w. d = w * S ((S (i)) * e) + q) -&gt; p = q))
use prime_factorization_existence
use prime_factorization_uniqueness
split
exact prime_factorization_existence
exact prime_factorization_uniqueness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>73,767</dd></div>
        <div><dt>Distinct objects</dt><dd>8,701</dd></div>
        <div><dt>Reused references</dt><dd>377</dd></div>
        <div><dt>Depth</dt><dd>99</dd></div>
        <div><dt>Cuts</dt><dd>2,184</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fd978f59bf3b0aa7b6c9ec1bc92ab5e7bbf949c25309173e098bd8f3b8de0958">fd978f59bf3b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for fundamental_theorem_of_arithmetic">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib fundamental_theorem_of_arithmetic</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L10804">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/fundamental_theorem_of_arithmetic.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_three"
  data-name="prime_three" data-domain="primes"
  data-status="checked_m20"
  data-dependencies="mul_succ_left,mul_eq_one_components,add_eq_zero_left,mul_eq_zero,mul_zero_left,zero_or_succ"
  data-search="prime_three three is prime three is prime in the expanded first-order prime predicate. ~(3 = 1) /\ forall a b. 3 = a * b -&gt; a = 1 \/ b = 1 primes mul_succ_left mul_eq_one_components add_eq_zero_left mul_eq_zero mul_zero_left zero_or_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_three</code><span>Three is prime</span></span>
      <span class="pa-badge pa-domain-primes">Primes</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Three is prime in the expanded first-order prime predicate.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_eq_one_components" href="#theorem-mul_eq_one_components"><code>mul_eq_one_components</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_left" href="#theorem-add_eq_zero_left"><code>add_eq_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_eq_zero" href="#theorem-mul_eq_zero"><code>mul_eq_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_or_succ" href="#theorem-zero_or_succ"><code>zero_or_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_three">Copy statement</button>
        <pre id="statement-prime_three"><code>~(3 = 1) /\ forall a b. 3 = a * b -&gt; a = 1 \/ b = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_three">Copy proof</button>
        <pre id="proof-prime_three"><code>pa prove ~(3 = 1) /\ forall a b. 3 = a * b -&gt; a = 1 \/ b = 1
use mul_succ_left
use mul_eq_one_components
use add_eq_zero_left
use mul_eq_zero
use mul_zero_left
use zero_or_succ
have hlarge : forall x y. ~(3 = S (S x) * S (S y))
intro x
intro y
intro hlarge_eq
specialize mul_succ_left (S x)
specialize mul_succ_left (S (S y))
rewrite mul_succ_left at hlarge_eq
rewrite PA4 at hlarge_eq
rewrite PA4 at hlarge_eq
have hone : 1 = S x * S (S y) + y
apply PA2
apply PA2
exact hlarge_eq
have hysplit : y = 0 \/ exists z. y = S z
specialize zero_or_succ y
exact zero_or_succ
cases hysplit
rewrite hysplit_left at hone
rewrite hysplit_left at hone
rewrite PA3 at hone
have hprod_one : S x * S (S 0) = 1
symm
exact hone
have hcomponents : S x = 1 /\ S (S 0) = 1
specialize mul_eq_one_components (S x)
specialize mul_eq_one_components (S (S 0))
apply mul_eq_one_components
exact hprod_one
cases hcomponents
have h10 : 1 = 0
apply PA2
exact hcomponents_right
apply PA1
exact h10
cases hysplit_right
rewrite hysplit_right_witness at hone
rewrite hysplit_right_witness at hone
rewrite PA4 at hone
have hzero : 0 = S x * S (S (S x1)) + x1
apply PA2
exact hone
have hsumzero : S x * S (S (S x1)) + x1 = 0
symm
exact hzero
have hprodzero : S x * S (S (S x1)) = 0
specialize add_eq_zero_left (S x * S (S (S x1)))
specialize add_eq_zero_left x1
apply add_eq_zero_left
exact hsumzero
have hfactors : S x = 0 \/ S (S (S x1)) = 0
specialize mul_eq_zero (S x)
specialize mul_eq_zero (S (S (S x1)))
apply mul_eq_zero
exact hprodzero
cases hfactors
apply PA1
exact hfactors_left
apply PA1
exact hfactors_right
split
intro h31
have h20 : 2 = 0
apply PA2
exact h31
apply PA1
exact h20
intro a
induction b
intro hab
rewrite PA5 at hab
exfalso
apply PA1
exact hab
induction b
intro hab
right
refl
induction a
intro hab
specialize mul_zero_left (S (S b))
rewrite mul_zero_left at hab
exfalso
apply PA1
exact hab
induction a
intro hab
left
refl
intro hab
exfalso
specialize hlarge a
specialize hlarge b
apply hlarge
exact hab
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>691</dd></div>
        <div><dt>Distinct objects</dt><dd>522</dd></div>
        <div><dt>Reused references</dt><dd>41</dd></div>
        <div><dt>Depth</dt><dd>43</dd></div>
        <div><dt>Cuts</dt><dd>18</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e6386e0d41a9ef03996570cc1e545b967ae86e740b582e5dbcb83321e7d4e819">e6386e0d41a9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_three">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_three</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L10857">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_three.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-primes">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-two_prime_product_uniqueness"
  data-name="two_prime_product_uniqueness" data-domain="factorization"
  data-status="checked_m20"
  data-dependencies="euclid_prime_dvd_product,prime_divisor_eq_one_or_self,prime_nonzero,mul_left_cancel_nonzero,mul_comm"
  data-search="two_prime_product_uniqueness a product of two primes is unique up to order a product of two primes determines its factors up to swapping them. forall p q r s. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; (~(q = 1) /\ forall c d. q = c * d -&gt; c = 1 \/ d = 1) -&gt; (~(r = 1) /\ forall e f. r = e * f -&gt; e = 1 \/ f = 1) -&gt; (~(s = 1) /\ forall g h. s = g * h -&gt; g = 1 \/ h = 1) -&gt; p * q = r * s -&gt; (p = r /\ q = s) \/ (p = s /\ q = r) factorization euclid_prime_dvd_product prime_divisor_eq_one_or_self prime_nonzero mul_left_cancel_nonzero mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>two_prime_product_uniqueness</code><span>A product of two primes is unique up to order</span></span>
      <span class="pa-badge pa-domain-factorization">β sequences, products &amp; FTA</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A product of two primes determines its factors up to swapping them.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="euclid_prime_dvd_product" href="#theorem-euclid_prime_dvd_product"><code>euclid_prime_dvd_product</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_eq_one_or_self" href="#theorem-prime_divisor_eq_one_or_self"><code>prime_divisor_eq_one_or_self</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-two_prime_product_uniqueness">Copy statement</button>
        <pre id="statement-two_prime_product_uniqueness"><code>forall p q r s. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; (~(q = 1) /\ forall c d. q = c * d -&gt; c = 1 \/ d = 1) -&gt; (~(r = 1) /\ forall e f. r = e * f -&gt; e = 1 \/ f = 1) -&gt; (~(s = 1) /\ forall g h. s = g * h -&gt; g = 1 \/ h = 1) -&gt; p * q = r * s -&gt; (p = r /\ q = s) \/ (p = s /\ q = r)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-two_prime_product_uniqueness">Copy proof</button>
        <pre id="proof-two_prime_product_uniqueness"><code>pa prove forall p q r s. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; (~(q = 1) /\ forall c d. q = c * d -&gt; c = 1 \/ d = 1) -&gt; (~(r = 1) /\ forall e f. r = e * f -&gt; e = 1 \/ f = 1) -&gt; (~(s = 1) /\ forall g h. s = g * h -&gt; g = 1 \/ h = 1) -&gt; p * q = r * s -&gt; (p = r /\ q = s) \/ (p = s /\ q = r)
use euclid_prime_dvd_product
use prime_divisor_eq_one_or_self
use prime_nonzero
use mul_left_cancel_nonzero
use mul_comm
intro p
intro q
intro r
intro s
intro hp
cases hp
intro hq
intro hr
intro hs
intro hproduct
have hpdiv : exists k. r * s = p * k
exists q
symm
exact hproduct
have hcases : (exists u. r = p * u) \/ exists v. s = p * v
specialize euclid_prime_dvd_product p
specialize euclid_prime_dvd_product r
specialize euclid_prime_dvd_product s
apply euclid_prime_dvd_product
split
exact hp_left
exact hp_right
exact hpdiv
cases hcases
have hpr : p = 1 \/ r = p
specialize prime_divisor_eq_one_or_self r
specialize prime_divisor_eq_one_or_self p
apply prime_divisor_eq_one_or_self
exact hr
exact hcases_left
cases hpr
exfalso
apply hp_left
exact hpr_left
left
split
symm
exact hpr_right
specialize mul_left_cancel_nonzero r
specialize mul_left_cancel_nonzero q
specialize mul_left_cancel_nonzero s
apply mul_left_cancel_nonzero
intro hrzero
specialize prime_nonzero r
apply prime_nonzero
exact hr
exact hrzero
rewrite &lt;- hpr_right at hproduct
exact hproduct
have hps : p = 1 \/ s = p
specialize prime_divisor_eq_one_or_self s
specialize prime_divisor_eq_one_or_self p
apply prime_divisor_eq_one_or_self
exact hs
exact hcases_right
cases hps
exfalso
apply hp_left
exact hps_left
right
split
symm
exact hps_right
specialize mul_left_cancel_nonzero s
specialize mul_left_cancel_nonzero q
specialize mul_left_cancel_nonzero r
apply mul_left_cancel_nonzero
intro hszero
specialize prime_nonzero s
apply prime_nonzero
exact hs
exact hszero
rewrite &lt;- hps_right at hproduct
specialize mul_comm r
specialize mul_comm s
rewrite mul_comm at hproduct
exact hproduct
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,035</dd></div>
        <div><dt>Distinct objects</dt><dd>2,051</dd></div>
        <div><dt>Reused references</dt><dd>120</dd></div>
        <div><dt>Depth</dt><dd>56</dd></div>
        <div><dt>Cuts</dt><dd>181</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="bb1cd0a1af5d4c71f9287fe2fcd686c1633c0cda5dd67999486167bfb3b9cf02">bb1cd0a1af5d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for two_prime_product_uniqueness">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib two_prime_product_uniqueness</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L10960">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/two_prime_product_uniqueness.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-factorization">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-fourth_power_regroup"
  data-name="fourth_power_regroup" data-domain="multiplication"
  data-status="checked_m20"
  data-dependencies="mul_assoc"
  data-search="fourth_power_regroup regroup a fourth power as a square of a square regroup a fourth power as the square of a square. forall n. n * n * n * n = (n * n) * (n * n) multiplication mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>fourth_power_regroup</code><span>Regroup a fourth power as a square of a square</span></span>
      <span class="pa-badge pa-domain-multiplication">Multiplication</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Regroup a fourth power as the square of a square.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-fourth_power_regroup">Copy statement</button>
        <pre id="statement-fourth_power_regroup"><code>forall n. n * n * n * n = (n * n) * (n * n)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-fourth_power_regroup">Copy proof</button>
        <pre id="proof-fourth_power_regroup"><code>pa prove forall n. n * n * n * n = (n * n) * (n * n)
use mul_assoc
intro n
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>122</dd></div>
        <div><dt>Distinct objects</dt><dd>110</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d49403a5bc73cd0b800985aa89214f3c48eaf210e4163caa551f5b3c095fc213">d49403a5bc73…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for fourth_power_regroup">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib fourth_power_regroup</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9283">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/fourth_power_regroup.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="../peano/induction-ladder.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_residue_complete"
  data-name="mod5_residue_complete" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies=""
  data-search="mod5_residue_complete every natural has one of five residues modulo five every natural number has one of the five canonical residues modulo five. forall n. exists q. n = 5 * q \/ n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4 congruence">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_residue_complete</code><span>Every natural has one of five residues modulo five</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural number has one of the five canonical residues modulo five.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_nonzero_residue_cases" href="#theorem-mod5_nonzero_residue_cases"><code>mod5_nonzero_residue_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_one" href="#theorem-mod5_fourth_power_one"><code>mod5_fourth_power_one</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_residue_complete">Copy statement</button>
        <pre id="statement-mod5_residue_complete"><code>forall n. exists q. n = 5 * q \/ n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_residue_complete">Copy proof</button>
        <pre id="proof-mod5_residue_complete"><code>pa prove forall n. exists q. n = 5 * q \/ n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4
induction n
exists 0
left
left
left
left
norm_num
cases IH
cases IH_witness
cases IH_witness_left
cases IH_witness_left_left
cases IH_witness_left_left_left
exists x
left
left
left
right
rewrite IH_witness_left_left_left_left
simp
exists x
left
left
right
rewrite IH_witness_left_left_left_right
simp
exists x
left
right
rewrite IH_witness_left_left_right
simp
exists x
right
rewrite IH_witness_left_right
simp
exists x + 1
left
left
left
left
rewrite IH_witness_right
simp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>248</dd></div>
        <div><dt>Distinct objects</dt><dd>214</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>28</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f89dfde45b608505e6692fab7dda1f6c0254337ba790ad400b3125c45f0ab276">f89dfde45b60…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_residue_complete">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_residue_complete</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9291">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_residue_complete.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_nonzero_residue_cases"
  data-name="mod5_nonzero_residue_cases" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod5_residue_complete"
  data-search="mod5_nonzero_residue_cases a nonmultiple of five has a nonzero residue a nonmultiple of five lies in one of the four nonzero residue classes. forall n. ~(exists q. n = 5 * q) -&gt; exists q. n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4 congruence mod5_residue_complete">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_nonzero_residue_cases</code><span>A nonmultiple of five has a nonzero residue</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonmultiple of five lies in one of the four nonzero residue classes.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_residue_complete" href="#theorem-mod5_residue_complete"><code>mod5_residue_complete</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_nonzero_residue_cases">Copy statement</button>
        <pre id="statement-mod5_nonzero_residue_cases"><code>forall n. ~(exists q. n = 5 * q) -&gt; exists q. n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_nonzero_residue_cases">Copy proof</button>
        <pre id="proof-mod5_nonzero_residue_cases"><code>pa prove forall n. ~(exists q. n = 5 * q) -&gt; exists q. n = 5 * q + 1 \/ n = 5 * q + 2 \/ n = 5 * q + 3 \/ n = 5 * q + 4
use mod5_residue_complete
intro n
intro h
specialize mod5_residue_complete n
cases mod5_residue_complete
cases mod5_residue_complete_witness
cases mod5_residue_complete_witness_left
cases mod5_residue_complete_witness_left_left
cases mod5_residue_complete_witness_left_left_left
exfalso
apply h
exists x
exact mod5_residue_complete_witness_left_left_left_left
exists x
left
left
left
exact mod5_residue_complete_witness_left_left_left_right
exists x
left
left
right
exact mod5_residue_complete_witness_left_left_right
exists x
left
right
exact mod5_residue_complete_witness_left_right
exists x
right
exact mod5_residue_complete_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>287</dd></div>
        <div><dt>Distinct objects</dt><dd>253</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b9e7df484004170fc4f701bb298c36d4a65a41462a3625aba81d448b4aeae441">b9e7df484004…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_nonzero_residue_cases">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_nonzero_residue_cases</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9341">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_nonzero_residue_cases.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_square_residue_one"
  data-name="mod5_square_residue_one" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_assoc,mul_add,mul_assoc,mul_succ_left"
  data-search="mod5_square_residue_one squaring residue one modulo five preserves residue one squaring residue one modulo five preserves residue one. forall z q. z = 5 * q + 1 -&gt; z * z = 5 * (q * z + q) + 1 congruence add_assoc mul_add mul_assoc mul_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_square_residue_one</code><span>Squaring residue one modulo five preserves residue one</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Squaring residue one modulo five preserves residue one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_one" href="#theorem-mod5_fourth_power_residue_one"><code>mod5_fourth_power_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_four" href="#theorem-mod5_fourth_power_residue_four"><code>mod5_fourth_power_residue_four</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_square_residue_one">Copy statement</button>
        <pre id="statement-mod5_square_residue_one"><code>forall z q. z = 5 * q + 1 -&gt; z * z = 5 * (q * z + q) + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_square_residue_one">Copy proof</button>
        <pre id="proof-mod5_square_residue_one"><code>pa prove forall z q. z = 5 * q + 1 -&gt; z * z = 5 * (q * z + q) + 1
use add_assoc
use mul_add
use mul_assoc
use mul_succ_left
intro z
intro q
intro hz
trans (5 * q + 1) * z
congr
exact hz
refl
trans S(5 * q) * z
congr
simp
refl
trans (5 * q) * z + z
apply mul_succ_left
trans 5 * (q * z) + z
congr
apply mul_assoc
refl
trans 5 * (q * z) + (5 * q + 1)
congr
refl
exact hz
trans (5 * (q * z) + 5 * q) + 1
symm
apply add_assoc
congr
symm
apply mul_add
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>450</dd></div>
        <div><dt>Distinct objects</dt><dd>277</dd></div>
        <div><dt>Reused references</dt><dd>33</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>11</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f84410e6ab5130aa33158db03aa0f797770bc40169e5f2b611241c448ce2e0a7">f84410e6ab51…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_square_residue_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_square_residue_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9378">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_square_residue_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_square_residue_two"
  data-name="mod5_square_residue_two" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_comm,add_assoc,mul_add,mul_assoc,mul_succ_left"
  data-search="mod5_square_residue_two squaring residue two modulo five gives residue four squaring residue two modulo five gives residue four. forall z q. z = 5 * q + 2 -&gt; z * z = 5 * ((q * z + q) + q) + 4 congruence add_comm add_assoc mul_add mul_assoc mul_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_square_residue_two</code><span>Squaring residue two modulo five gives residue four</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Squaring residue two modulo five gives residue four.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_two" href="#theorem-mod5_fourth_power_residue_two"><code>mod5_fourth_power_residue_two</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_square_residue_two">Copy statement</button>
        <pre id="statement-mod5_square_residue_two"><code>forall z q. z = 5 * q + 2 -&gt; z * z = 5 * ((q * z + q) + q) + 4</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_square_residue_two">Copy proof</button>
        <pre id="proof-mod5_square_residue_two"><code>pa prove forall z q. z = 5 * q + 2 -&gt; z * z = 5 * ((q * z + q) + q) + 4
use add_comm
use add_assoc
use mul_add
use mul_assoc
use mul_succ_left
intro z
intro q
intro hz
trans (5 * q + 2) * z
congr
exact hz
refl
trans S(S(5 * q)) * z
congr
simp
refl
trans S(5 * q) * z + z
apply mul_succ_left
trans ((5 * q) * z + z) + z
congr
apply mul_succ_left
refl
trans (5 * (q * z) + z) + z
congr
congr
apply mul_assoc
refl
refl
trans (5 * (q * z) + (5 * q + 2)) + (5 * q + 2)
congr
congr
refl
exact hz
exact hz
simp [add_comm, add_assoc, mul_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>641</dd></div>
        <div><dt>Distinct objects</dt><dd>373</dd></div>
        <div><dt>Reused references</dt><dd>56</dd></div>
        <div><dt>Depth</dt><dd>42</dd></div>
        <div><dt>Cuts</dt><dd>14</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5e6df4f87532d0a9145f97fdc77bf9e72827593a2911c3bea3d1d0441d383235">5e6df4f87532…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_square_residue_two">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_square_residue_two</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9413">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_square_residue_two.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_square_residue_three"
  data-name="mod5_square_residue_three" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="square_residue_lift"
  data-search="mod5_square_residue_three squaring residue three modulo five gives residue four squaring residue three modulo five gives residue four. forall z q. z = 5 * q + 3 -&gt; z * z = 5 * ((q * z + 3 * q) + 1) + 4 congruence square_residue_lift">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_square_residue_three</code><span>Squaring residue three modulo five gives residue four</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Squaring residue three modulo five gives residue four.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="square_residue_lift" href="#theorem-square_residue_lift"><code>square_residue_lift</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_three" href="#theorem-mod5_fourth_power_residue_three"><code>mod5_fourth_power_residue_three</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_square_residue_three">Copy statement</button>
        <pre id="statement-mod5_square_residue_three"><code>forall z q. z = 5 * q + 3 -&gt; z * z = 5 * ((q * z + 3 * q) + 1) + 4</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_square_residue_three">Copy proof</button>
        <pre id="proof-mod5_square_residue_three"><code>pa prove forall z q. z = 5 * q + 3 -&gt; z * z = 5 * ((q * z + 3 * q) + 1) + 4
use square_residue_lift
intro z
intro q
intro hz
apply square_residue_lift
exact hz
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,185</dd></div>
        <div><dt>Distinct objects</dt><dd>598</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>29</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a427916ee3e78744eb61bd92588e2cee48a439d0f4110cd2c70e9bdc0efc903f">a427916ee3e7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_square_residue_three">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_square_residue_three</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9450">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_square_residue_three.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_square_residue_four"
  data-name="mod5_square_residue_four" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="square_residue_lift"
  data-search="mod5_square_residue_four squaring residue four modulo five gives residue one squaring residue four modulo five gives residue one. forall z q. z = 5 * q + 4 -&gt; z * z = 5 * ((q * z + 4 * q) + 3) + 1 congruence square_residue_lift">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_square_residue_four</code><span>Squaring residue four modulo five gives residue one</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Squaring residue four modulo five gives residue one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="square_residue_lift" href="#theorem-square_residue_lift"><code>square_residue_lift</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_two" href="#theorem-mod5_fourth_power_residue_two"><code>mod5_fourth_power_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_three" href="#theorem-mod5_fourth_power_residue_three"><code>mod5_fourth_power_residue_three</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_fourth_power_residue_four" href="#theorem-mod5_fourth_power_residue_four"><code>mod5_fourth_power_residue_four</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_square_residue_four">Copy statement</button>
        <pre id="statement-mod5_square_residue_four"><code>forall z q. z = 5 * q + 4 -&gt; z * z = 5 * ((q * z + 4 * q) + 3) + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_square_residue_four">Copy proof</button>
        <pre id="proof-mod5_square_residue_four"><code>pa prove forall z q. z = 5 * q + 4 -&gt; z * z = 5 * ((q * z + 4 * q) + 3) + 1
use square_residue_lift
intro z
intro q
intro hz
apply square_residue_lift
exact hz
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,283</dd></div>
        <div><dt>Distinct objects</dt><dd>696</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>29</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="271a2d490759e7d49a587cbdb7766aec256b9348ef250d38f3e76532b18ca265">271a2d490759…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_square_residue_four">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_square_residue_four</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9463">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_square_residue_four.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_fourth_power_residue_one"
  data-name="mod5_fourth_power_residue_one" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod5_square_residue_one,mul_assoc"
  data-search="mod5_fourth_power_residue_one fourth powers preserve residue one modulo five a number congruent to one modulo five has fourth power congruent to one. forall q. exists w. (5 * q + 1) * (5 * q + 1) * (5 * q + 1) * (5 * q + 1) = 5 * w + 1 congruence mod5_square_residue_one mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_fourth_power_residue_one</code><span>Fourth powers preserve residue one modulo five</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A number congruent to one modulo five has fourth power congruent to one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_one" href="#theorem-mod5_square_residue_one"><code>mod5_square_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_fourth_power_residue_one">Copy statement</button>
        <pre id="statement-mod5_fourth_power_residue_one"><code>forall q. exists w. (5 * q + 1) * (5 * q + 1) * (5 * q + 1) * (5 * q + 1) = 5 * w + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_fourth_power_residue_one">Copy proof</button>
        <pre id="proof-mod5_fourth_power_residue_one"><code>pa prove forall q. exists w. (5 * q + 1) * (5 * q + 1) * (5 * q + 1) * (5 * q + 1) = 5 * w + 1
use mod5_square_residue_one
use mul_assoc
intro q
exists (q * (5 * q + 1) + q) * ((5 * q + 1) * (5 * q + 1)) + (q * (5 * q + 1) + q)
trans ((5 * q + 1) * (5 * q + 1)) * ((5 * q + 1) * (5 * q + 1))
apply mul_assoc
apply mod5_square_residue_one
apply mod5_square_residue_one
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>584</dd></div>
        <div><dt>Distinct objects</dt><dd>295</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>15</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="bdde252c1412cf40c82b4668c44cfb743ace4b767650c5c138cfb8a73bf394ea">bdde252c1412…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_fourth_power_residue_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_fourth_power_residue_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9476">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_fourth_power_residue_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_fourth_power_residue_two"
  data-name="mod5_fourth_power_residue_two" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod5_square_residue_two,mod5_square_residue_four,mul_assoc"
  data-search="mod5_fourth_power_residue_two fourth powers of residue two are one modulo five a number congruent to two modulo five has fourth power congruent to one. forall q. exists w. (5 * q + 2) * (5 * q + 2) * (5 * q + 2) * (5 * q + 2) = 5 * w + 1 congruence mod5_square_residue_two mod5_square_residue_four mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_fourth_power_residue_two</code><span>Fourth powers of residue two are one modulo five</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A number congruent to two modulo five has fourth power congruent to one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_two" href="#theorem-mod5_square_residue_two"><code>mod5_square_residue_two</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_four" href="#theorem-mod5_square_residue_four"><code>mod5_square_residue_four</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_fourth_power_residue_two">Copy statement</button>
        <pre id="statement-mod5_fourth_power_residue_two"><code>forall q. exists w. (5 * q + 2) * (5 * q + 2) * (5 * q + 2) * (5 * q + 2) = 5 * w + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_fourth_power_residue_two">Copy proof</button>
        <pre id="proof-mod5_fourth_power_residue_two"><code>pa prove forall q. exists w. (5 * q + 2) * (5 * q + 2) * (5 * q + 2) * (5 * q + 2) = 5 * w + 1
use mod5_square_residue_two
use mod5_square_residue_four
use mul_assoc
intro q
exists ((((q * (5 * q + 2) + q) + q) * ((5 * q + 2) * (5 * q + 2)) + 4 * ((q * (5 * q + 2) + q) + q)) + 3)
trans ((5 * q + 2) * (5 * q + 2)) * ((5 * q + 2) * (5 * q + 2))
apply mul_assoc
apply mod5_square_residue_four
apply mod5_square_residue_two
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,059</dd></div>
        <div><dt>Distinct objects</dt><dd>861</dd></div>
        <div><dt>Reused references</dt><dd>72</dd></div>
        <div><dt>Depth</dt><dd>43</dd></div>
        <div><dt>Cuts</dt><dd>48</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3ec61a64b9558948697f8ee02c3c51beda4ab042f84a5e1231c955c121e064ba">3ec61a64b955…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_fourth_power_residue_two">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_fourth_power_residue_two</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9493">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_fourth_power_residue_two.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_fourth_power_residue_three"
  data-name="mod5_fourth_power_residue_three" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod5_square_residue_three,mod5_square_residue_four,mul_assoc"
  data-search="mod5_fourth_power_residue_three fourth powers of residue three are one modulo five a number congruent to three modulo five has fourth power congruent to one. forall q. exists w. (5 * q + 3) * (5 * q + 3) * (5 * q + 3) * (5 * q + 3) = 5 * w + 1 congruence mod5_square_residue_three mod5_square_residue_four mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_fourth_power_residue_three</code><span>Fourth powers of residue three are one modulo five</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A number congruent to three modulo five has fourth power congruent to one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_three" href="#theorem-mod5_square_residue_three"><code>mod5_square_residue_three</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_four" href="#theorem-mod5_square_residue_four"><code>mod5_square_residue_four</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_fourth_power_residue_three">Copy statement</button>
        <pre id="statement-mod5_fourth_power_residue_three"><code>forall q. exists w. (5 * q + 3) * (5 * q + 3) * (5 * q + 3) * (5 * q + 3) = 5 * w + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_fourth_power_residue_three">Copy proof</button>
        <pre id="proof-mod5_fourth_power_residue_three"><code>pa prove forall q. exists w. (5 * q + 3) * (5 * q + 3) * (5 * q + 3) * (5 * q + 3) = 5 * w + 1
use mod5_square_residue_three
use mod5_square_residue_four
use mul_assoc
intro q
exists (((((q * (5 * q + 3) + 3 * q) + 1) * ((5 * q + 3) * (5 * q + 3)) + 4 * ((q * (5 * q + 3) + 3 * q) + 1)) + 3))
trans ((5 * q + 3) * (5 * q + 3)) * ((5 * q + 3) * (5 * q + 3))
apply mul_assoc
apply mod5_square_residue_four
apply mod5_square_residue_three
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,603</dd></div>
        <div><dt>Distinct objects</dt><dd>892</dd></div>
        <div><dt>Reused references</dt><dd>44</dd></div>
        <div><dt>Depth</dt><dd>33</dd></div>
        <div><dt>Cuts</dt><dd>63</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d070cbf4af5a067e74013194240dd81e3124073cdb0f2e86a14411e927256735">d070cbf4af5a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_fourth_power_residue_three">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_fourth_power_residue_three</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9510">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_fourth_power_residue_three.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_fourth_power_residue_four"
  data-name="mod5_fourth_power_residue_four" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod5_square_residue_four,mod5_square_residue_one,mul_assoc"
  data-search="mod5_fourth_power_residue_four fourth powers of residue four are one modulo five a number congruent to four modulo five has fourth power congruent to one. forall q. exists w. (5 * q + 4) * (5 * q + 4) * (5 * q + 4) * (5 * q + 4) = 5 * w + 1 congruence mod5_square_residue_four mod5_square_residue_one mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_fourth_power_residue_four</code><span>Fourth powers of residue four are one modulo five</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A number congruent to four modulo five has fourth power congruent to one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_four" href="#theorem-mod5_square_residue_four"><code>mod5_square_residue_four</code></a> <a class="pa-theorem-chip" data-theorem-link="mod5_square_residue_one" href="#theorem-mod5_square_residue_one"><code>mod5_square_residue_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_fourth_power_residue_four">Copy statement</button>
        <pre id="statement-mod5_fourth_power_residue_four"><code>forall q. exists w. (5 * q + 4) * (5 * q + 4) * (5 * q + 4) * (5 * q + 4) = 5 * w + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_fourth_power_residue_four">Copy proof</button>
        <pre id="proof-mod5_fourth_power_residue_four"><code>pa prove forall q. exists w. (5 * q + 4) * (5 * q + 4) * (5 * q + 4) * (5 * q + 4) = 5 * w + 1
use mod5_square_residue_four
use mod5_square_residue_one
use mul_assoc
intro q
exists ((q * (5 * q + 4) + 4 * q) + 3) * ((5 * q + 4) * (5 * q + 4)) + ((q * (5 * q + 4) + 4 * q) + 3)
trans ((5 * q + 4) * (5 * q + 4)) * ((5 * q + 4) * (5 * q + 4))
apply mul_assoc
apply mod5_square_residue_one
apply mod5_square_residue_four
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,868</dd></div>
        <div><dt>Distinct objects</dt><dd>765</dd></div>
        <div><dt>Reused references</dt><dd>49</dd></div>
        <div><dt>Depth</dt><dd>32</dd></div>
        <div><dt>Cuts</dt><dd>45</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9b506838edf8e69ce9e517c77c9d1cc985639ccfa86047f1aaaf5f9cdb4e3934">9b506838edf8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_fourth_power_residue_four">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_fourth_power_residue_four</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9527">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_fourth_power_residue_four.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod5_fourth_power_one"
  data-name="mod5_fourth_power_one" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod5_residue_complete,square_residue_lift,mul_assoc"
  data-search="mod5_fourth_power_one a nonmultiple of five has fourth power one modulo five a fourth power of a nonmultiple of five is one modulo five. forall n. ~(exists x. n = 5 * x) -&gt; exists x. n * n * n * n = 5 * x + 1 congruence mod5_residue_complete square_residue_lift mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod5_fourth_power_one</code><span>A nonmultiple of five has fourth power one modulo five</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A fourth power of a nonmultiple of five is one modulo five.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod5_residue_complete" href="#theorem-mod5_residue_complete"><code>mod5_residue_complete</code></a> <a class="pa-theorem-chip" data-theorem-link="square_residue_lift" href="#theorem-square_residue_lift"><code>square_residue_lift</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod5_fourth_power_one">Copy statement</button>
        <pre id="statement-mod5_fourth_power_one"><code>forall n. ~(exists x. n = 5 * x) -&gt; exists x. n * n * n * n = 5 * x + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod5_fourth_power_one">Copy proof</button>
        <pre id="proof-mod5_fourth_power_one"><code>pa prove forall n. ~(exists x. n = 5 * x) -&gt; exists x. n * n * n * n = 5 * x + 1
use mod5_residue_complete
use square_residue_lift
use mul_assoc
intro n
intro h
specialize mod5_residue_complete n
cases mod5_residue_complete
cases mod5_residue_complete_witness
cases mod5_residue_complete_witness_left
cases mod5_residue_complete_witness_left_left
cases mod5_residue_complete_witness_left_left_left
exfalso
apply h
exists x
exact mod5_residue_complete_witness_left_left_left_left
have hsquare : n * n = 5 * ((x * n + 1 * x) + 0) + 1
apply square_residue_lift
exact mod5_residue_complete_witness_left_left_left_right
norm_num
exists ((((x * n + 1 * x) + 0) * (n * n) + 1 * ((x * n + 1 * x) + 0)) + 0)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
have hsquare : n * n = 5 * ((x * n + 2 * x) + 0) + 4
apply square_residue_lift
exact mod5_residue_complete_witness_left_left_right
norm_num
exists ((((x * n + 2 * x) + 0) * (n * n) + 4 * ((x * n + 2 * x) + 0)) + 3)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
have hsquare : n * n = 5 * ((x * n + 3 * x) + 1) + 4
apply square_residue_lift
exact mod5_residue_complete_witness_left_right
norm_num
exists ((((x * n + 3 * x) + 1) * (n * n) + 4 * ((x * n + 3 * x) + 1)) + 3)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
have hsquare : n * n = 5 * ((x * n + 4 * x) + 3) + 1
apply square_residue_lift
exact mod5_residue_complete_witness_right
norm_num
exists ((((x * n + 4 * x) + 3) * (n * n) + 1 * ((x * n + 4 * x) + 3)) + 0)
trans (n * n) * (n * n)
apply mul_assoc
apply square_residue_lift
exact hsquare
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,675</dd></div>
        <div><dt>Distinct objects</dt><dd>1,935</dd></div>
        <div><dt>Reused references</dt><dd>80</dd></div>
        <div><dt>Depth</dt><dd>38</dd></div>
        <div><dt>Cuts</dt><dd>33</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="67a58b05004383da725e477b98549c806304506802d8845c607a108aaa7a5ba1">67a58b050043…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod5_fourth_power_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod5_fourth_power_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/theorems.py#L9544">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod5_fourth_power_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-parity_cases"
  data-name="parity_cases" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="parity_cases parity cases every natural has a constructive even-or-odd witness. forall n. exists k. n = 2 * k \/ n = 2 * k + 1 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>parity_cases</code><span>Parity cases</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural has a constructive even-or-odd witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="odd_mod4_cases" href="#theorem-odd_mod4_cases"><code>odd_mod4_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_ne_two_is_odd" href="#theorem-prime_ne_two_is_odd"><code>prime_ne_two_is_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="even_successor_to_odd" href="#theorem-even_successor_to_odd"><code>even_successor_to_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_successor_to_even" href="#theorem-odd_successor_to_even"><code>odd_successor_to_even</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-parity_cases">Copy statement</button>
        <pre id="statement-parity_cases"><code>forall n. exists k. n = 2 * k \/ n = 2 * k + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-parity_cases">Copy proof</button>
        <pre id="proof-parity_cases"><code>pa prove forall n. exists k. n = 2 * k \/ n = 2 * k + 1
induction n
exists 0
left
norm_num
cases IH
cases IH_witness
exists x
right
rewrite IH_witness_left
simp
exists x + 1
left
rewrite IH_witness_right
simp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>80</dd></div>
        <div><dt>Distinct objects</dt><dd>73</dd></div>
        <div><dt>Reused references</dt><dd>7</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="958d38a5bc3e4940cf287b6ca1a77b51b19302b313015a9582b84875baa13d51">958d38a5bc3e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for parity_cases">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib parity_cases</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L22">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/parity_cases.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-even_odd_exclusive_pointwise"
  data-name="even_odd_exclusive_pointwise" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="division_remainder_unique"
  data-search="even_odd_exclusive_pointwise even odd exclusive pointwise an even and an odd decomposition of the same natural are incompatible. forall n a b. n = 2 * a -&gt; n = 2 * b + 1 -&gt; false quadratic_residues division_remainder_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>even_odd_exclusive_pointwise</code><span>Even odd exclusive pointwise</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">An even and an odd decomposition of the same natural are incompatible.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="even_not_odd" href="#theorem-even_not_odd"><code>even_not_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_not_even" href="#theorem-odd_not_even"><code>odd_not_even</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-even_odd_exclusive_pointwise">Copy statement</button>
        <pre id="statement-even_odd_exclusive_pointwise"><code>forall n a b. n = 2 * a -&gt; n = 2 * b + 1 -&gt; false</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-even_odd_exclusive_pointwise">Copy proof</button>
        <pre id="proof-even_odd_exclusive_pointwise"><code>pa prove forall n a b. n = 2 * a -&gt; n = 2 * b + 1 -&gt; false
use division_remainder_unique
intro n
intro a
intro b
intro he
intro ho
have hu : a = b /\ 0 = 1
specialize division_remainder_unique 2
specialize division_remainder_unique n
specialize division_remainder_unique a
specialize division_remainder_unique 0
specialize division_remainder_unique b
specialize division_remainder_unique 1
apply division_remainder_unique
rewrite he
simp
exists 1
norm_num
exact ho
exists 0
norm_num
cases hu
apply PA1
symm
exact hu_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>928</dd></div>
        <div><dt>Distinct objects</dt><dd>617</dd></div>
        <div><dt>Reused references</dt><dd>23</dd></div>
        <div><dt>Depth</dt><dd>58</dd></div>
        <div><dt>Cuts</dt><dd>23</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="77e109bc66457fb16714244805daef76ca8bd214fb7cc0a555f1a2fcaf47ecd4">77e109bc6645…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for even_odd_exclusive_pointwise">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib even_odd_exclusive_pointwise</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L44">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/even_odd_exclusive_pointwise.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-even_not_odd"
  data-name="even_not_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="even_odd_exclusive_pointwise"
  data-search="even_not_odd even not odd no even natural is odd. forall n. (exists a. n = 2 * a) -&gt; ~(exists b. n = 2 * b + 1) quadratic_residues even_odd_exclusive_pointwise">
  <details>
    <summary>
      <span class="pa-card-title"><code>even_not_odd</code><span>Even not odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">No even natural is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="even_odd_exclusive_pointwise" href="#theorem-even_odd_exclusive_pointwise"><code>even_odd_exclusive_pointwise</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="even_successor_to_odd" href="#theorem-even_successor_to_odd"><code>even_successor_to_odd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-even_not_odd">Copy statement</button>
        <pre id="statement-even_not_odd"><code>forall n. (exists a. n = 2 * a) -&gt; ~(exists b. n = 2 * b + 1)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-even_not_odd">Copy proof</button>
        <pre id="proof-even_not_odd"><code>pa prove forall n. (exists a. n = 2 * a) -&gt; ~(exists b. n = 2 * b + 1)
use even_odd_exclusive_pointwise
intro n
intro he
intro ho
cases he
cases ho
specialize even_odd_exclusive_pointwise n
specialize even_odd_exclusive_pointwise x
specialize even_odd_exclusive_pointwise x1
apply even_odd_exclusive_pointwise
exact he_witness
exact ho_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>953</dd></div>
        <div><dt>Distinct objects</dt><dd>642</dd></div>
        <div><dt>Reused references</dt><dd>23</dd></div>
        <div><dt>Depth</dt><dd>59</dd></div>
        <div><dt>Cuts</dt><dd>24</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="70a1576b3f52a4c7203c0d0dbafb61e0da606377d62ee96007b5ecaf4ab85f02">70a1576b3f52…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for even_not_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib even_not_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L76">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/even_not_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_not_even"
  data-name="odd_not_even" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="even_odd_exclusive_pointwise"
  data-search="odd_not_even odd not even no odd natural is even. forall n. (exists b. n = 2 * b + 1) -&gt; ~(exists a. n = 2 * a) quadratic_residues even_odd_exclusive_pointwise">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_not_even</code><span>Odd not even</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">No odd natural is even.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="even_odd_exclusive_pointwise" href="#theorem-even_odd_exclusive_pointwise"><code>even_odd_exclusive_pointwise</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="odd_successor_to_even" href="#theorem-odd_successor_to_even"><code>odd_successor_to_even</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_not_even">Copy statement</button>
        <pre id="statement-odd_not_even"><code>forall n. (exists b. n = 2 * b + 1) -&gt; ~(exists a. n = 2 * a)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_not_even">Copy proof</button>
        <pre id="proof-odd_not_even"><code>pa prove forall n. (exists b. n = 2 * b + 1) -&gt; ~(exists a. n = 2 * a)
use even_odd_exclusive_pointwise
intro n
intro ho
intro he
cases ho
cases he
specialize even_odd_exclusive_pointwise n
specialize even_odd_exclusive_pointwise x1
specialize even_odd_exclusive_pointwise x
apply even_odd_exclusive_pointwise
exact he_witness
exact ho_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>953</dd></div>
        <div><dt>Distinct objects</dt><dd>642</dd></div>
        <div><dt>Reused references</dt><dd>23</dd></div>
        <div><dt>Depth</dt><dd>59</dd></div>
        <div><dt>Cuts</dt><dd>24</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9d87768cd216587acd7145acf1ca1df7e0c199f72359e5834e43b141ceff74ae">9d87768cd216…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_not_even">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_not_even</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L95">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_not_even.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-successor_odd_of_even"
  data-name="successor_odd_of_even" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="successor_odd_of_even successor odd of even the successor of an even natural is odd. forall n. (exists a. n = 2 * a) -&gt; exists b. s n = 2 * b + 1 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>successor_odd_of_even</code><span>Successor odd of even</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The successor of an even natural is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="even_successor_to_odd" href="#theorem-even_successor_to_odd"><code>even_successor_to_odd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-successor_odd_of_even">Copy statement</button>
        <pre id="statement-successor_odd_of_even"><code>forall n. (exists a. n = 2 * a) -&gt; exists b. S n = 2 * b + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-successor_odd_of_even">Copy proof</button>
        <pre id="proof-successor_odd_of_even"><code>pa prove forall n. (exists a. n = 2 * a) -&gt; exists b. S n = 2 * b + 1
intro n
intro he
cases he
exists x
rewrite he_witness
simp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>18</dd></div>
        <div><dt>Distinct objects</dt><dd>18</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>10</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="60be8e49bc3aec5fd52035ed25e2606ac0a840b36a340b9789feeb7072868c5c">60be8e49bc3a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for successor_odd_of_even">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib successor_odd_of_even</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L114">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/successor_odd_of_even.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-successor_even_of_odd"
  data-name="successor_even_of_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="successor_even_of_odd successor even of odd the successor of an odd natural is even. forall n. (exists a. n = 2 * a + 1) -&gt; exists b. s n = 2 * b quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>successor_even_of_odd</code><span>Successor even of odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The successor of an odd natural is even.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="odd_successor_to_even" href="#theorem-odd_successor_to_even"><code>odd_successor_to_even</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-successor_even_of_odd">Copy statement</button>
        <pre id="statement-successor_even_of_odd"><code>forall n. (exists a. n = 2 * a + 1) -&gt; exists b. S n = 2 * b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-successor_even_of_odd">Copy proof</button>
        <pre id="proof-successor_even_of_odd"><code>pa prove forall n. (exists a. n = 2 * a + 1) -&gt; exists b. S n = 2 * b
intro n
intro ho
cases ho
exists x + 1
rewrite ho_witness
simp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>46</dd></div>
        <div><dt>Distinct objects</dt><dd>41</dd></div>
        <div><dt>Reused references</dt><dd>5</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f2a63e2bd60e6626fd787ef51f920b4e6b0bcdf9bdc955a86934e6077c4d0110">f2a63e2bd60e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for successor_even_of_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib successor_even_of_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L128">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/successor_even_of_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-even_add_even"
  data-name="even_add_even" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_add"
  data-search="even_add_even even add even the sum of two even naturals is even. forall m n. (exists a. m = 2 * a) -&gt; (exists b. n = 2 * b) -&gt; exists c. m + n = 2 * c quadratic_residues mul_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>even_add_even</code><span>Even add even</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The sum of two even naturals is even.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-even_add_even">Copy statement</button>
        <pre id="statement-even_add_even"><code>forall m n. (exists a. m = 2 * a) -&gt; (exists b. n = 2 * b) -&gt; exists c. m + n = 2 * c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-even_add_even">Copy proof</button>
        <pre id="proof-even_add_even"><code>pa prove forall m n. (exists a. m = 2 * a) -&gt; (exists b. n = 2 * b) -&gt; exists c. m + n = 2 * c
use mul_add
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1
rewrite hm_witness
rewrite hn_witness
simp [mul_add]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>100</dd></div>
        <div><dt>Distinct objects</dt><dd>93</dd></div>
        <div><dt>Reused references</dt><dd>7</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6ac0934839697be8c28b9afda8fb83d37c47682cc1ca3bdc02612707c310e5fd">6ac093483969…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for even_add_even">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib even_add_even</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L142">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/even_add_even.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-even_add_odd"
  data-name="even_add_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_add,add_assoc"
  data-search="even_add_odd even add odd an even natural plus an odd natural is odd. forall m n. (exists a. m = 2 * a) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m + n = 2 * c + 1 quadratic_residues mul_add add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>even_add_odd</code><span>Even add odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">An even natural plus an odd natural is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-even_add_odd">Copy statement</button>
        <pre id="statement-even_add_odd"><code>forall m n. (exists a. m = 2 * a) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m + n = 2 * c + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-even_add_odd">Copy proof</button>
        <pre id="proof-even_add_odd"><code>pa prove forall m n. (exists a. m = 2 * a) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m + n = 2 * c + 1
use mul_add
use add_assoc
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_assoc]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>157</dd></div>
        <div><dt>Distinct objects</dt><dd>112</dd></div>
        <div><dt>Reused references</dt><dd>13</dd></div>
        <div><dt>Depth</dt><dd>22</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5abbdaf6258269186dadae0f9a48a94fca524c383ea48527aba8f0c210cb7da6">5abbdaf62582…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for even_add_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib even_add_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L161">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/even_add_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_add_even"
  data-name="odd_add_even" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_add,add_succ_left"
  data-search="odd_add_even odd add even an odd natural plus an even natural is odd. forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b) -&gt; exists c. m + n = 2 * c + 1 quadratic_residues mul_add add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_add_even</code><span>Odd add even</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">An odd natural plus an even natural is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_add_even">Copy statement</button>
        <pre id="statement-odd_add_even"><code>forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b) -&gt; exists c. m + n = 2 * c + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_add_even">Copy proof</button>
        <pre id="proof-odd_add_even"><code>pa prove forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b) -&gt; exists c. m + n = 2 * c + 1
use mul_add
use add_succ_left
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_succ_left]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>151</dd></div>
        <div><dt>Distinct objects</dt><dd>136</dd></div>
        <div><dt>Reused references</dt><dd>15</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="51c7f3101d48e9e72bb74065de612dd4a7b7da70047e9880c1d5ceb845a1906e">51c7f3101d48…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_add_even">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_add_even</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L180">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_add_even.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_add_odd"
  data-name="odd_add_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_add,add_succ_left,add_assoc,add_comm"
  data-search="odd_add_odd odd add odd the sum of two odd naturals is even. forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m + n = 2 * c quadratic_residues mul_add add_succ_left add_assoc add_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_add_odd</code><span>Odd add odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The sum of two odd naturals is even.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_add_odd">Copy statement</button>
        <pre id="statement-odd_add_odd"><code>forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m + n = 2 * c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_add_odd">Copy proof</button>
        <pre id="proof-odd_add_odd"><code>pa prove forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m + n = 2 * c
use mul_add
use add_succ_left
use add_assoc
use add_comm
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists x + x1 + 1
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_assoc, add_comm]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>302</dd></div>
        <div><dt>Distinct objects</dt><dd>214</dd></div>
        <div><dt>Reused references</dt><dd>30</dd></div>
        <div><dt>Depth</dt><dd>32</dd></div>
        <div><dt>Cuts</dt><dd>7</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f00b8b27dc6f9f9dd1f0af5523986436643050f1c68b82f0763d041c7be3eaca">f00b8b27dc6f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_add_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_add_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L199">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_add_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-even_mul_left"
  data-name="even_mul_left" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_assoc"
  data-search="even_mul_left even mul left a product with an even left factor is even. forall m n. (exists a. m = 2 * a) -&gt; exists c. m * n = 2 * c quadratic_residues mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>even_mul_left</code><span>Even mul left</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A product with an even left factor is even.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-even_mul_left">Copy statement</button>
        <pre id="statement-even_mul_left"><code>forall m n. (exists a. m = 2 * a) -&gt; exists c. m * n = 2 * c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-even_mul_left">Copy proof</button>
        <pre id="proof-even_mul_left"><code>pa prove forall m n. (exists a. m = 2 * a) -&gt; exists c. m * n = 2 * c
use mul_assoc
intro m
intro n
intro hm
cases hm
exists x * n
rewrite hm_witness
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>130</dd></div>
        <div><dt>Distinct objects</dt><dd>118</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="eaa49b843794798878dd10fa27f4b088f96654a0c1699c1ad714ecda67fb4e3b">eaa49b843794…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for even_mul_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib even_mul_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L218">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/even_mul_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mul_double_right"
  data-name="mul_double_right" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_assoc,mul_comm"
  data-search="mul_double_right mul double right doubling commutes through multiplication on the right. forall m b. m * (2 * b) = 2 * (m * b) quadratic_residues mul_assoc mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>mul_double_right</code><span>Mul double right</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Doubling commutes through multiplication on the right.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="even_mul_right" href="#theorem-even_mul_right"><code>even_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_mul_odd" href="#theorem-odd_mul_odd"><code>odd_mul_odd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mul_double_right">Copy statement</button>
        <pre id="statement-mul_double_right"><code>forall m b. m * (2 * b) = 2 * (m * b)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mul_double_right">Copy proof</button>
        <pre id="proof-mul_double_right"><code>pa prove forall m b. m * (2 * b) = 2 * (m * b)
use mul_assoc
use mul_comm
intro m
intro b
trans (2 * b) * m
apply mul_comm
trans 2 * (b * m)
apply mul_assoc
congr
refl
apply mul_comm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>356</dd></div>
        <div><dt>Distinct objects</dt><dd>290</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>10</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="609eaec9eea93e6b4e139cf79de9c844983fef1015a12af42c459c04f68888eb">609eaec9eea9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mul_double_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mul_double_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L233">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mul_double_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-even_mul_right"
  data-name="even_mul_right" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_double_right"
  data-search="even_mul_right even mul right a product with an even right factor is even. forall m n. (exists b. n = 2 * b) -&gt; exists c. m * n = 2 * c quadratic_residues mul_double_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>even_mul_right</code><span>Even mul right</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A product with an even right factor is even.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_double_right" href="#theorem-mul_double_right"><code>mul_double_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-even_mul_right">Copy statement</button>
        <pre id="statement-even_mul_right"><code>forall m n. (exists b. n = 2 * b) -&gt; exists c. m * n = 2 * c</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-even_mul_right">Copy proof</button>
        <pre id="proof-even_mul_right"><code>pa prove forall m n. (exists b. n = 2 * b) -&gt; exists c. m * n = 2 * c
use mul_double_right
intro m
intro n
intro hn
cases hn
exists m * x
rewrite hn_witness
apply mul_double_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>369</dd></div>
        <div><dt>Distinct objects</dt><dd>303</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>11</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="857e963b17a3c9a9a14c37431682c6e3df5b70df593a41bf56ccbcb5f33c6f9c">857e963b17a3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for even_mul_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib even_mul_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L250">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/even_mul_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_mul_odd"
  data-name="odd_mul_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_add,add_mul,add_assoc,add_succ_left,mul_double_right"
  data-search="odd_mul_odd odd mul odd the product of two odd naturals is odd. forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m * n = 2 * c + 1 quadratic_residues mul_add add_mul add_assoc add_succ_left mul_double_right">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_mul_odd</code><span>Odd mul odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The product of two odd naturals is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_mul" href="#theorem-add_mul"><code>add_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_double_right" href="#theorem-mul_double_right"><code>mul_double_right</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_mul_odd">Copy statement</button>
        <pre id="statement-odd_mul_odd"><code>forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m * n = 2 * c + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_mul_odd">Copy proof</button>
        <pre id="proof-odd_mul_odd"><code>pa prove forall m n. (exists a. m = 2 * a + 1) -&gt; (exists b. n = 2 * b + 1) -&gt; exists c. m * n = 2 * c + 1
use mul_add
use add_mul
use add_assoc
use add_succ_left
use mul_double_right
intro m
intro n
intro hm
intro hn
cases hm
cases hn
exists (2 * x + 1) * x1 + x
rewrite hm_witness
rewrite hn_witness
simp [mul_add, add_mul, add_assoc, add_succ_left]
congr
congr
apply mul_double_right
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>897</dd></div>
        <div><dt>Distinct objects</dt><dd>383</dd></div>
        <div><dt>Reused references</dt><dd>51</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>25</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4749c2e868fc2229bfb8be3f70dd9851cd2aa7984ee99b7cf4fdc99f99999221">4749c2e868fc…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_mul_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_mul_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L265">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_mul_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_half_unique"
  data-name="odd_half_unique" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_right_cancel,mul_left_cancel_nonzero"
  data-search="odd_half_unique odd half unique the half witness in an odd decomposition is unique. forall n a b. n = 2 * a + 1 -&gt; n = 2 * b + 1 -&gt; a = b quadratic_residues add_right_cancel mul_left_cancel_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_half_unique</code><span>Odd half unique</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The half witness in an odd decomposition is unique.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_right_cancel" href="#theorem-add_right_cancel"><code>add_right_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="odd_half_exists_unique" href="#theorem-odd_half_exists_unique"><code>odd_half_exists_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_half_unique">Copy statement</button>
        <pre id="statement-odd_half_unique"><code>forall n a b. n = 2 * a + 1 -&gt; n = 2 * b + 1 -&gt; a = b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_half_unique">Copy proof</button>
        <pre id="proof-odd_half_unique"><code>pa prove forall n a b. n = 2 * a + 1 -&gt; n = 2 * b + 1 -&gt; a = b
use add_right_cancel
use mul_left_cancel_nonzero
intro n
intro a
intro b
intro ha
intro hb
have hs : 2 * a + 1 = 2 * b + 1
trans n
symm
exact ha
exact hb
have hm : 2 * a = 2 * b
specialize add_right_cancel (2 * a)
specialize add_right_cancel (2 * b)
specialize add_right_cancel 1
apply add_right_cancel
exact hs
specialize mul_left_cancel_nonzero 2
specialize mul_left_cancel_nonzero a
specialize mul_left_cancel_nonzero b
apply mul_left_cancel_nonzero
intro htwo
apply PA1
exact htwo
exact hm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>292</dd></div>
        <div><dt>Distinct objects</dt><dd>204</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>25</dd></div>
        <div><dt>Cuts</dt><dd>9</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e21d6292387c931932f96cb037bf2f822fd9de8a69c96e49ed83909c98f4e89d">e21d6292387c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_half_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_half_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L294">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_half_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_half_exists_unique"
  data-name="odd_half_exists_unique" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="odd_half_unique"
  data-search="odd_half_exists_unique odd half exists unique every odd natural has a unique half witness. forall n. (exists a. n = 2 * a + 1) -&gt; exists h. n = 2 * h + 1 /\ forall k. n = 2 * k + 1 -&gt; h = k quadratic_residues odd_half_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_half_exists_unique</code><span>Odd half exists unique</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every odd natural has a unique half witness.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="odd_half_unique" href="#theorem-odd_half_unique"><code>odd_half_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_half_exists_unique">Copy statement</button>
        <pre id="statement-odd_half_exists_unique"><code>forall n. (exists a. n = 2 * a + 1) -&gt; exists h. n = 2 * h + 1 /\ forall k. n = 2 * k + 1 -&gt; h = k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_half_exists_unique">Copy proof</button>
        <pre id="proof-odd_half_exists_unique"><code>pa prove forall n. (exists a. n = 2 * a + 1) -&gt; exists h. n = 2 * h + 1 /\ forall k. n = 2 * k + 1 -&gt; h = k
use odd_half_unique
intro n
intro ho
cases ho
exists x
split
exact ho_witness
intro k
intro hk
specialize odd_half_unique n
specialize odd_half_unique x
specialize odd_half_unique k
apply odd_half_unique
exact ho_witness
exact hk
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>319</dd></div>
        <div><dt>Distinct objects</dt><dd>231</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>26</dd></div>
        <div><dt>Cuts</dt><dd>10</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7fa50bde2df88d3f760b6e2975d8a2ff07ed0fd72e09a02e78eb098a4cec1c23">7fa50bde2df8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_half_exists_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_half_exists_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L326">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_half_exists_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-four_mul_eq_double_double"
  data-name="four_mul_eq_double_double" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_assoc"
  data-search="four_mul_eq_double_double four mul eq double double multiplication by four is iterated doubling. forall a. 4 * a = 2 * (2 * a) quadratic_residues mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>four_mul_eq_double_double</code><span>Four mul eq double double</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Multiplication by four is iterated doubling.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="odd_mod4_cases" href="#theorem-odd_mod4_cases"><code>odd_mod4_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="mod4_one_is_odd" href="#theorem-mod4_one_is_odd"><code>mod4_one_is_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="mod4_three_is_odd" href="#theorem-mod4_three_is_odd"><code>mod4_three_is_odd</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-four_mul_eq_double_double">Copy statement</button>
        <pre id="statement-four_mul_eq_double_double"><code>forall a. 4 * a = 2 * (2 * a)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-four_mul_eq_double_double">Copy proof</button>
        <pre id="proof-four_mul_eq_double_double"><code>pa prove forall a. 4 * a = 2 * (2 * a)
use mul_assoc
intro a
trans (2 * 2) * a
congr
norm_num
refl
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>178</dd></div>
        <div><dt>Distinct objects</dt><dd>166</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>19</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3b9071b49ae4d1e4233cfaf999d48feacc0760db4b7bb35b16597df237d0536a">3b9071b49ae4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for four_mul_eq_double_double">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib four_mul_eq_double_double</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L349">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/four_mul_eq_double_double.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_mod4_cases"
  data-name="odd_mod4_cases" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="parity_cases,mul_add,four_mul_eq_double_double"
  data-search="odd_mod4_cases odd mod4 cases every odd natural is congruent to one or three modulo four. forall n. (exists h. n = 2 * h + 1) -&gt; (exists a. n = 4 * a + 1) \/ exists b. n = 4 * b + 3 quadratic_residues parity_cases mul_add four_mul_eq_double_double">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_mod4_cases</code><span>Odd mod4 cases</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every odd natural is congruent to one or three modulo four.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="parity_cases" href="#theorem-parity_cases"><code>parity_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="four_mul_eq_double_double" href="#theorem-four_mul_eq_double_double"><code>four_mul_eq_double_double</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_mod4_cases">Copy statement</button>
        <pre id="statement-odd_mod4_cases"><code>forall n. (exists h. n = 2 * h + 1) -&gt; (exists a. n = 4 * a + 1) \/ exists b. n = 4 * b + 3</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_mod4_cases">Copy proof</button>
        <pre id="proof-odd_mod4_cases"><code>pa prove forall n. (exists h. n = 2 * h + 1) -&gt; (exists a. n = 4 * a + 1) \/ exists b. n = 4 * b + 3
use parity_cases
use mul_add
use four_mul_eq_double_double
intro n
intro ho
cases ho
specialize parity_cases x
cases parity_cases
cases parity_cases_witness
left
exists x1
rewrite ho_witness
rewrite parity_cases_witness_left
simp [mul_add]
congr
symm
apply four_mul_eq_double_double
right
exists x1
rewrite ho_witness
rewrite parity_cases_witness_right
simp [mul_add]
congr
congr
congr
symm
apply four_mul_eq_double_double
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>450</dd></div>
        <div><dt>Distinct objects</dt><dd>335</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>32</dd></div>
        <div><dt>Cuts</dt><dd>7</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="99e28f734f8b9e1409a15a5753ee37f998a3867c4b0536caed5ead4e5d77f58a">99e28f734f8b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_mod4_cases">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_mod4_cases</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L363">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_mod4_cases.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod4_one_three_exclusive_pointwise"
  data-name="mod4_one_three_exclusive_pointwise" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="division_remainder_unique"
  data-search="mod4_one_three_exclusive_pointwise mod4 one three exclusive pointwise residues one and three modulo four cannot describe the same natural. forall n a b. n = 4 * a + 1 -&gt; n = 4 * b + 3 -&gt; false quadratic_residues division_remainder_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod4_one_three_exclusive_pointwise</code><span>Mod4 one three exclusive pointwise</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Residues one and three modulo four cannot describe the same natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod4_one_three_exclusive_pointwise">Copy statement</button>
        <pre id="statement-mod4_one_three_exclusive_pointwise"><code>forall n a b. n = 4 * a + 1 -&gt; n = 4 * b + 3 -&gt; false</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod4_one_three_exclusive_pointwise">Copy proof</button>
        <pre id="proof-mod4_one_three_exclusive_pointwise"><code>pa prove forall n a b. n = 4 * a + 1 -&gt; n = 4 * b + 3 -&gt; false
use division_remainder_unique
intro n
intro a
intro b
intro h1
intro h3
have hu : a = b /\ 1 = 3
specialize division_remainder_unique 4
specialize division_remainder_unique n
specialize division_remainder_unique a
specialize division_remainder_unique 1
specialize division_remainder_unique b
specialize division_remainder_unique 3
apply division_remainder_unique
exact h1
exists 2
norm_num
exact h3
exists 0
norm_num
cases hu
have hz : 0 = 2
apply PA2
exact hu_right
apply PA1
symm
exact hz
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>944</dd></div>
        <div><dt>Distinct objects</dt><dd>634</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>58</dd></div>
        <div><dt>Cuts</dt><dd>23</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8ab417671cd8710057a390ff38c1615c796b04ac8cb601a9b5027f6d890672e5">8ab417671cd8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod4_one_three_exclusive_pointwise">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod4_one_three_exclusive_pointwise</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L396">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod4_one_three_exclusive_pointwise.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod4_one_is_odd"
  data-name="mod4_one_is_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="four_mul_eq_double_double"
  data-search="mod4_one_is_odd mod4 one is odd a natural congruent to one modulo four is odd. forall n. (exists a. n = 4 * a + 1) -&gt; exists h. n = 2 * h + 1 quadratic_residues four_mul_eq_double_double">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod4_one_is_odd</code><span>Mod4 one is odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A natural congruent to one modulo four is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="four_mul_eq_double_double" href="#theorem-four_mul_eq_double_double"><code>four_mul_eq_double_double</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod4_one_is_odd">Copy statement</button>
        <pre id="statement-mod4_one_is_odd"><code>forall n. (exists a. n = 4 * a + 1) -&gt; exists h. n = 2 * h + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod4_one_is_odd">Copy proof</button>
        <pre id="proof-mod4_one_is_odd"><code>pa prove forall n. (exists a. n = 4 * a + 1) -&gt; exists h. n = 2 * h + 1
use four_mul_eq_double_double
intro n
intro h
cases h
exists 2 * x
rewrite h_witness
congr
apply four_mul_eq_double_double
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>191</dd></div>
        <div><dt>Distinct objects</dt><dd>179</dd></div>
        <div><dt>Reused references</dt><dd>12</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="100ca77514b045bcf3a5945d8eb98a87741cb5a49e0bcf2ddb026f9fe447805e">100ca77514b0…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod4_one_is_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod4_one_is_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L430">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod4_one_is_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod4_three_is_odd"
  data-name="mod4_three_is_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_add,four_mul_eq_double_double"
  data-search="mod4_three_is_odd mod4 three is odd a natural congruent to three modulo four is odd. forall n. (exists a. n = 4 * a + 3) -&gt; exists h. n = 2 * h + 1 quadratic_residues mul_add four_mul_eq_double_double">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod4_three_is_odd</code><span>Mod4 three is odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A natural congruent to three modulo four is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="four_mul_eq_double_double" href="#theorem-four_mul_eq_double_double"><code>four_mul_eq_double_double</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod4_three_is_odd">Copy statement</button>
        <pre id="statement-mod4_three_is_odd"><code>forall n. (exists a. n = 4 * a + 3) -&gt; exists h. n = 2 * h + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod4_three_is_odd">Copy proof</button>
        <pre id="proof-mod4_three_is_odd"><code>pa prove forall n. (exists a. n = 4 * a + 3) -&gt; exists h. n = 2 * h + 1
use mul_add
use four_mul_eq_double_double
intro n
intro h
cases h
exists 2 * x + 1
rewrite h_witness
simp [mul_add]
congr
congr
congr
apply four_mul_eq_double_double
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>326</dd></div>
        <div><dt>Distinct objects</dt><dd>225</dd></div>
        <div><dt>Reused references</dt><dd>25</dd></div>
        <div><dt>Depth</dt><dd>24</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ecc3cdd649432457d61c554e85e152f507656b827d28e54e738325f28571f69a">ecc3cdd64943…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod4_three_is_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod4_three_is_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L446">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod4_three_is_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_ne_two_is_odd"
  data-name="prime_ne_two_is_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="parity_cases"
  data-search="prime_ne_two_is_odd prime ne two is odd every prime other than two is odd. forall p. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; ~(p = 2) -&gt; exists h. p = 2 * h + 1 quadratic_residues parity_cases">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_ne_two_is_odd</code><span>Prime ne two is odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every prime other than two is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="parity_cases" href="#theorem-parity_cases"><code>parity_cases</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_ne_two_is_odd">Copy statement</button>
        <pre id="statement-prime_ne_two_is_odd"><code>forall p. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; ~(p = 2) -&gt; exists h. p = 2 * h + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_ne_two_is_odd">Copy proof</button>
        <pre id="proof-prime_ne_two_is_odd"><code>pa prove forall p. (~(p = 1) /\ forall a b. p = a * b -&gt; a = 1 \/ b = 1) -&gt; ~(p = 2) -&gt; exists h. p = 2 * h + 1
use parity_cases
intro p
intro hp
intro hne
cases hp
specialize parity_cases p
cases parity_cases
cases parity_cases_witness
have hfac : 2 = 1 \/ x = 1
specialize hp_right 2
specialize hp_right x
apply hp_right
exact parity_cases_witness_left
cases hfac
exfalso
apply PA1
apply PA2
exact hfac_left
exfalso
apply hne
trans 2 * x
exact parity_cases_witness_left
rewrite hfac_right
simp
exists x
exact parity_cases_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>139</dd></div>
        <div><dt>Distinct objects</dt><dd>128</dd></div>
        <div><dt>Reused references</dt><dd>11</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="438d568150025eaca0227cceb68b919db6477666289b1774ab413153c502f5fd">438d56815002…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_ne_two_is_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_ne_two_is_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/parity.py#L464">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_ne_two_is_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_decidable_from_remainders"
  data-name="mod_eq_decidable_from_remainders" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="eq_decidable,remainder_decomposition_to_mod_eq,mod_eq_symm,mod_eq_trans,mod_eq_bounded_unique"
  data-search="mod_eq_decidable_from_remainders mod eq decidable from remainders canonical bounded remainders constructively decide congruence. forall p a b qa ra qb rb. a = qa * p + ra -&gt; (exists ha. ha + s ra = p) -&gt; b = qb * p + rb -&gt; (exists hb. hb + s rb = p) -&gt; (exists u v. a + p * u = b + p * v) \/ ~(exists u v. a + p * u = b + p * v) quadratic_residues eq_decidable remainder_decomposition_to_mod_eq mod_eq_symm mod_eq_trans mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_decidable_from_remainders</code><span>Mod eq decidable from remainders</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Canonical bounded remainders constructively decide congruence.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_nonzero" href="#theorem-mod_eq_decidable_nonzero"><code>mod_eq_decidable_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_decidable_from_remainders">Copy statement</button>
        <pre id="statement-mod_eq_decidable_from_remainders"><code>forall p a b qa ra qb rb. a = qa * p + ra -&gt; (exists ha. ha + S ra = p) -&gt; b = qb * p + rb -&gt; (exists hb. hb + S rb = p) -&gt; (exists u v. a + p * u = b + p * v) \/ ~(exists u v. a + p * u = b + p * v)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_decidable_from_remainders">Copy proof</button>
        <pre id="proof-mod_eq_decidable_from_remainders"><code>pa prove forall p a b qa ra qb rb. a = qa * p + ra -&gt; (exists ha. ha + S ra = p) -&gt; b = qb * p + rb -&gt; (exists hb. hb + S rb = p) -&gt; (exists u v. a + p * u = b + p * v) \/ ~(exists u v. a + p * u = b + p * v)
use eq_decidable
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mod_eq_bounded_unique
intro p
intro a
intro b
intro qa
intro ra
intro qb
intro rb
intro ha
intro hra
intro hb
intro hrb
specialize eq_decidable ra
specialize eq_decidable rb
cases eq_decidable
left
have har : exists u v. a + p * u = ra + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq qa
specialize remainder_decomposition_to_mod_eq ra
apply remainder_decomposition_to_mod_eq
exact ha
have hbr : exists u v. b + p * u = rb + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq qb
specialize remainder_decomposition_to_mod_eq rb
apply remainder_decomposition_to_mod_eq
exact hb
have hbra : exists u v. b + p * u = ra + p * v
rewrite eq_decidable_left
exact hbr
have hrab : exists u v. ra + p * u = b + p * v
specialize mod_eq_symm p
specialize mod_eq_symm b
specialize mod_eq_symm ra
apply mod_eq_symm
exact hbra
specialize mod_eq_trans p
specialize mod_eq_trans a
specialize mod_eq_trans ra
specialize mod_eq_trans b
apply mod_eq_trans
exact har
exact hrab
right
intro hab
apply eq_decidable_right
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique ra
specialize mod_eq_bounded_unique rb
apply mod_eq_bounded_unique
exact hra
exact hrb
have har : exists u v. a + p * u = ra + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq qa
specialize remainder_decomposition_to_mod_eq ra
apply remainder_decomposition_to_mod_eq
exact ha
have hra_a : exists u v. ra + p * u = a + p * v
specialize mod_eq_symm p
specialize mod_eq_symm a
specialize mod_eq_symm ra
apply mod_eq_symm
exact har
have hra_b : exists u v. ra + p * u = b + p * v
specialize mod_eq_trans p
specialize mod_eq_trans ra
specialize mod_eq_trans a
specialize mod_eq_trans b
apply mod_eq_trans
exact hra_a
exact hab
have hbr : exists u v. b + p * u = rb + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq qb
specialize remainder_decomposition_to_mod_eq rb
apply remainder_decomposition_to_mod_eq
exact hb
specialize mod_eq_trans p
specialize mod_eq_trans ra
specialize mod_eq_trans b
specialize mod_eq_trans rb
apply mod_eq_trans
exact hra_b
exact hbr
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,693</dd></div>
        <div><dt>Distinct objects</dt><dd>935</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>47</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="954dd30797834a7c08fa52917ed7a8824111b370fe0322c25bccf256ffa9bb7a">954dd3079783…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_decidable_from_remainders">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_decidable_from_remainders</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/quadratic_residue_theorems.py#L27">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_decidable_from_remainders.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_decidable_nonzero"
  data-name="mod_eq_decidable_nonzero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="division_remainder_exists,mul_comm,mod_eq_decidable_from_remainders"
  data-search="mod_eq_decidable_nonzero mod eq decidable nonzero balanced congruence is constructively decidable at nonzero modulus. forall p a b. ~(p = 0) -&gt; (exists qr_u_dec_yes qr_v_dec_yes. a + p * qr_u_dec_yes = b + p * qr_v_dec_yes) \/ ~(exists qr_u_dec_no qr_v_dec_no. a + p * qr_u_dec_no = b + p * qr_v_dec_no) quadratic_residues division_remainder_exists mul_comm mod_eq_decidable_from_remainders">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_decidable_nonzero</code><span>Mod eq decidable nonzero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced congruence is constructively decidable at nonzero modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_from_remainders" href="#theorem-mod_eq_decidable_from_remainders"><code>mod_eq_decidable_from_remainders</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_search_up_to" href="#theorem-quadratic_residue_search_up_to"><code>quadratic_residue_search_up_to</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable" href="#theorem-mod_eq_decidable"><code>mod_eq_decidable</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_decidable_nonzero">Copy statement</button>
        <pre id="statement-mod_eq_decidable_nonzero"><code>forall p a b. ~(p = 0) -&gt; (exists qr_u_dec_yes qr_v_dec_yes. a + p * qr_u_dec_yes = b + p * qr_v_dec_yes) \/ ~(exists qr_u_dec_no qr_v_dec_no. a + p * qr_u_dec_no = b + p * qr_v_dec_no)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_decidable_nonzero">Copy proof</button>
        <pre id="proof-mod_eq_decidable_nonzero"><code>pa prove forall p a b. ~(p = 0) -&gt; (exists qr_u_dec_yes qr_v_dec_yes. a + p * qr_u_dec_yes = b + p * qr_v_dec_yes) \/ ~(exists qr_u_dec_no qr_v_dec_no. a + p * qr_u_dec_no = b + p * qr_v_dec_no)
use division_remainder_exists
use mul_comm
use mod_eq_decidable_from_remainders
intro p
intro a
intro b
intro hp
have hda : exists qa ra. a = p * qa + ra /\ exists ha. ha + S ra = p
specialize division_remainder_exists p
specialize division_remainder_exists a
apply division_remainder_exists
exact hp
cases hda
cases hda_witness
cases hda_witness_witness
have hdb : exists qb rb. b = p * qb + rb /\ exists hb. hb + S rb = p
specialize division_remainder_exists p
specialize division_remainder_exists b
apply division_remainder_exists
exact hp
cases hdb
cases hdb_witness
cases hdb_witness_witness
have ha_comm : a = x * p + x1
trans p * x + x1
exact hda_witness_witness_left
congr
apply mul_comm
refl
have hb_comm : b = x2 * p + x3
trans p * x2 + x3
exact hdb_witness_witness_left
congr
apply mul_comm
refl
specialize mod_eq_decidable_from_remainders p
specialize mod_eq_decidable_from_remainders a
specialize mod_eq_decidable_from_remainders b
specialize mod_eq_decidable_from_remainders x
specialize mod_eq_decidable_from_remainders x1
specialize mod_eq_decidable_from_remainders x2
specialize mod_eq_decidable_from_remainders x3
apply mod_eq_decidable_from_remainders
exact ha_comm
exact hda_witness_witness_right
exact hb_comm
exact hdb_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,189</dd></div>
        <div><dt>Distinct objects</dt><dd>1,136</dd></div>
        <div><dt>Reused references</dt><dd>60</dd></div>
        <div><dt>Depth</dt><dd>67</dd></div>
        <div><dt>Cuts</dt><dd>61</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="dacd77a7c266aafa31add8fe7185159b54732fb5d5d74fe64f2074816d2d84c6">dacd77a7c266…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_decidable_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_decidable_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/quadratic_residue_theorems.py#L134">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_decidable_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-quadratic_residue_search_up_to"
  data-name="quadratic_residue_search_up_to" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mod_eq_decidable_nonzero,add_eq_zero_right,le_eq_or_lt,add_succ_left,zero_add"
  data-search="quadratic_residue_search_up_to quadratic residue search up to inclusive bounded search constructively decides square congruence. forall b p a. ~(p = 0) -&gt; ((exists qr_x_search_yes. (exists qr_bound_search_yes. qr_bound_search_yes + qr_x_search_yes = b) /\ (exists qr_u_search_yes qr_v_search_yes. qr_x_search_yes * qr_x_search_yes + p * qr_u_search_yes = a + p * qr_v_search_yes)) \/ (forall qr_x_search_no. (exists qr_bound_search_no. qr_bound_search_no + qr_x_search_no = b) -&gt; ~(exists qr_u_search_no qr_v_search_no. qr_x_search_no * qr_x_search_no + p * qr_u_search_no = a + p * qr_v_search_no))) quadratic_residues mod_eq_decidable_nonzero add_eq_zero_right le_eq_or_lt add_succ_left zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>quadratic_residue_search_up_to</code><span>Quadratic residue search up to</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Inclusive bounded search constructively decides square congruence.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_nonzero" href="#theorem-mod_eq_decidable_nonzero"><code>mod_eq_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_decidable_nonzero" href="#theorem-quadratic_residue_bounded_decidable_nonzero"><code>quadratic_residue_bounded_decidable_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-quadratic_residue_search_up_to">Copy statement</button>
        <pre id="statement-quadratic_residue_search_up_to"><code>forall B p a. ~(p = 0) -&gt; ((exists qr_x_search_yes. (exists qr_bound_search_yes. qr_bound_search_yes + qr_x_search_yes = B) /\ (exists qr_u_search_yes qr_v_search_yes. qr_x_search_yes * qr_x_search_yes + p * qr_u_search_yes = a + p * qr_v_search_yes)) \/ (forall qr_x_search_no. (exists qr_bound_search_no. qr_bound_search_no + qr_x_search_no = B) -&gt; ~(exists qr_u_search_no qr_v_search_no. qr_x_search_no * qr_x_search_no + p * qr_u_search_no = a + p * qr_v_search_no)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-quadratic_residue_search_up_to">Copy proof</button>
        <pre id="proof-quadratic_residue_search_up_to"><code>pa prove forall B p a. ~(p = 0) -&gt; ((exists qr_x_search_yes. (exists qr_bound_search_yes. qr_bound_search_yes + qr_x_search_yes = B) /\ (exists qr_u_search_yes qr_v_search_yes. qr_x_search_yes * qr_x_search_yes + p * qr_u_search_yes = a + p * qr_v_search_yes)) \/ (forall qr_x_search_no. (exists qr_bound_search_no. qr_bound_search_no + qr_x_search_no = B) -&gt; ~(exists qr_u_search_no qr_v_search_no. qr_x_search_no * qr_x_search_no + p * qr_u_search_no = a + p * qr_v_search_no)))
use mod_eq_decidable_nonzero
use add_eq_zero_right
use le_eq_or_lt
use add_succ_left
use zero_add
induction B
intro p
intro a
intro hp
have hdec : (exists u v. 0 * 0 + p * u = a + p * v) \/ ~(exists u v. 0 * 0 + p * u = a + p * v)
specialize mod_eq_decidable_nonzero p
specialize mod_eq_decidable_nonzero (0 * 0)
specialize mod_eq_decidable_nonzero a
apply mod_eq_decidable_nonzero
exact hp
cases hdec
left
exists 0
split
exists 0
simp
exact hdec_left
right
intro x
intro hx
intro hs
cases hx
have hx0 : x = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right x
apply add_eq_zero_right
exact hx_witness
apply hdec_right
rewrite hx0 at hs
rewrite hx0 at hs
exact hs
intro p
intro a
intro hp
have hprev : (exists x. (exists h. h + x = B) /\ exists u v. x * x + p * u = a + p * v) \/ (forall x. (exists h. h + x = B) -&gt; ~(exists u v. x * x + p * u = a + p * v))
specialize IH p
specialize IH a
apply IH
exact hp
cases hprev
left
cases hprev_left
cases hprev_left_witness
exists x
split
cases hprev_left_witness_left
exists S x1
trans S (x1 + x)
apply add_succ_left
congr
exact hprev_left_witness_left_witness
exact hprev_left_witness_right
have hdec : (exists u v. (S B) * (S B) + p * u = a + p * v) \/ ~(exists u v. (S B) * (S B) + p * u = a + p * v)
specialize mod_eq_decidable_nonzero p
specialize mod_eq_decidable_nonzero ((S B) * (S B))
specialize mod_eq_decidable_nonzero a
apply mod_eq_decidable_nonzero
exact hp
cases hdec
left
exists S B
split
exists 0
simp
congr
specialize zero_add B
exact zero_add
exact hdec_left
right
intro x
intro hx
intro hs
specialize le_eq_or_lt x
specialize le_eq_or_lt (S B)
have hcases : x = S B \/ exists k. k + S x = S B
apply le_eq_or_lt
exact hx
cases hcases
apply hdec_right
rewrite hcases_left at hs
rewrite hcases_left at hs
exact hs
apply hprev_right
cases hcases_right
exists x1
apply PA2
trans x1 + S x
symm
apply PA4
exact hcases_right_witness
exact hs
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,480</dd></div>
        <div><dt>Distinct objects</dt><dd>1,329</dd></div>
        <div><dt>Reused references</dt><dd>67</dd></div>
        <div><dt>Depth</dt><dd>68</dd></div>
        <div><dt>Cuts</dt><dd>69</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e459beb71367b2f57dee41c68ea4b4078ad6a3475b569fe134d68e1e64842e34">e459beb71367…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for quadratic_residue_search_up_to">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib quadratic_residue_search_up_to</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/quadratic_residue_theorems.py#L192">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/quadratic_residue_search_up_to.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-quadratic_residue_bounded_decidable_nonzero"
  data-name="quadratic_residue_bounded_decidable_nonzero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="nonzero_is_succ,quadratic_residue_search_up_to"
  data-search="quadratic_residue_bounded_decidable_nonzero quadratic residue bounded decidable nonzero a nonzero modulus admits a finite constructive residue search. forall p a. ~(p = 0) -&gt; (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + s qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) \/ ~(exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + s qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) quadratic_residues nonzero_is_succ quadratic_residue_search_up_to">
  <details>
    <summary>
      <span class="pa-card-title"><code>quadratic_residue_bounded_decidable_nonzero</code><span>Quadratic residue bounded decidable nonzero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero modulus admits a finite constructive residue search.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="nonzero_is_succ" href="#theorem-nonzero_is_succ"><code>nonzero_is_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_search_up_to" href="#theorem-quadratic_residue_search_up_to"><code>quadratic_residue_search_up_to</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_decidable_nonzero" href="#theorem-quadratic_residue_decidable_nonzero"><code>quadratic_residue_decidable_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-quadratic_residue_bounded_decidable_nonzero">Copy statement</button>
        <pre id="statement-quadratic_residue_bounded_decidable_nonzero"><code>forall p a. ~(p = 0) -&gt; (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) \/ ~(exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-quadratic_residue_bounded_decidable_nonzero">Copy proof</button>
        <pre id="proof-quadratic_residue_bounded_decidable_nonzero"><code>pa prove forall p a. ~(p = 0) -&gt; (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) \/ ~(exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)
use nonzero_is_succ
use quadratic_residue_search_up_to
intro p
intro a
intro hp
have hs : exists B. p = S B
specialize nonzero_is_succ p
apply nonzero_is_succ
exact hp
cases hs
have hsearch : (exists r. (exists h. h + r = x) /\ exists u v. r * r + p * u = a + p * v) \/ (forall r. (exists h. h + r = x) -&gt; ~(exists u v. r * r + p * u = a + p * v))
specialize quadratic_residue_search_up_to x
specialize quadratic_residue_search_up_to p
specialize quadratic_residue_search_up_to a
apply quadratic_residue_search_up_to
exact hp
cases hsearch
left
cases hsearch_left
cases hsearch_left_witness
exists x1
split
cases hsearch_left_witness_left
exists x2
trans S (x2 + x1)
apply PA4
trans S x
congr
exact hsearch_left_witness_left_witness
symm
exact hs_witness
exact hsearch_left_witness_right
right
intro hbounded
cases hbounded
cases hbounded_witness
specialize hsearch_right x1
apply hsearch_right
cases hbounded_witness_left
exists x2
apply PA2
trans x2 + S x1
symm
apply PA4
trans p
exact hbounded_witness_left_witness
exact hs_witness
exact hbounded_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,554</dd></div>
        <div><dt>Distinct objects</dt><dd>1,403</dd></div>
        <div><dt>Reused references</dt><dd>67</dd></div>
        <div><dt>Depth</dt><dd>70</dd></div>
        <div><dt>Cuts</dt><dd>71</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="228002501cce5663c0a4f5f16fa4cc04581ff51ebebebe6cbd19a55b836e2929">228002501cce…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for quadratic_residue_bounded_decidable_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib quadratic_residue_bounded_decidable_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/quadratic_residue_theorems.py#L303">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/quadratic_residue_bounded_decidable_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-quadratic_residue_bounded_equiv"
  data-name="quadratic_residue_bounded_equiv" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="division_remainder_exists,square_residue_witness,remainder_decomposition_to_mod_eq,mod_eq_symm,mod_eq_trans,mul_comm,zero_add"
  data-search="quadratic_residue_bounded_equiv quadratic residue bounded equiv every square witness has an equivalent canonical bounded root. forall p a. ~(p = 0) -&gt; (((exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) -&gt; (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + s qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)) /\ ((exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + s qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) -&gt; (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded))) quadratic_residues division_remainder_exists square_residue_witness remainder_decomposition_to_mod_eq mod_eq_symm mod_eq_trans mul_comm zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>quadratic_residue_bounded_equiv</code><span>Quadratic residue bounded equiv</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every square witness has an equivalent canonical bounded root.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="square_residue_witness" href="#theorem-square_residue_witness"><code>square_residue_witness</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_decidable_nonzero" href="#theorem-quadratic_residue_decidable_nonzero"><code>quadratic_residue_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod3_canonical_iff" href="#theorem-qres_mod3_canonical_iff"><code>qres_mod3_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-quadratic_residue_bounded_equiv">Copy statement</button>
        <pre id="statement-quadratic_residue_bounded_equiv"><code>forall p a. ~(p = 0) -&gt; (((exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) -&gt; (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)) /\ ((exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) -&gt; (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-quadratic_residue_bounded_equiv">Copy proof</button>
        <pre id="proof-quadratic_residue_bounded_equiv"><code>pa prove forall p a. ~(p = 0) -&gt; (((exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) -&gt; (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)) /\ ((exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) -&gt; (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)))
use division_remainder_exists
use square_residue_witness
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mul_comm
use zero_add
intro p
intro a
intro hp
split
intro hunbounded
cases hunbounded
have hdivision : exists q r. x = p * q + r /\ exists h. h + S r = p
specialize division_remainder_exists p
specialize division_remainder_exists x
apply division_remainder_exists
exact hp
cases hdivision
cases hdivision_witness
cases hdivision_witness_witness
have hsquare : exists w. x * x = p * w + x2 * x2
specialize square_residue_witness p
specialize square_residue_witness x
specialize square_residue_witness x1
specialize square_residue_witness x2
specialize square_residue_witness 0
specialize square_residue_witness (x2 * x2)
apply square_residue_witness
exact hdivision_witness_witness_left
simp
specialize zero_add (x2 * x2)
symm
exact zero_add
cases hsquare
have hdecomp : x * x = x3 * p + x2 * x2
trans p * x3 + x2 * x2
exact hsquare_witness
congr
apply mul_comm
refl
have hxr : exists u v. x * x + p * u = x2 * x2 + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq (x * x)
specialize remainder_decomposition_to_mod_eq x3
specialize remainder_decomposition_to_mod_eq (x2 * x2)
apply remainder_decomposition_to_mod_eq
exact hdecomp
have hrx : exists u v. x2 * x2 + p * u = x * x + p * v
specialize mod_eq_symm p
specialize mod_eq_symm (x * x)
specialize mod_eq_symm (x2 * x2)
apply mod_eq_symm
exact hxr
have hra : exists u v. x2 * x2 + p * u = a + p * v
specialize mod_eq_trans p
specialize mod_eq_trans (x2 * x2)
specialize mod_eq_trans (x * x)
specialize mod_eq_trans a
apply mod_eq_trans
exact hrx
exact hunbounded_witness
exists x2
split
exact hdivision_witness_witness_right
exact hra
intro hbounded
cases hbounded
cases hbounded_witness
exists x
exact hbounded_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,151</dd></div>
        <div><dt>Distinct objects</dt><dd>781</dd></div>
        <div><dt>Reused references</dt><dd>66</dd></div>
        <div><dt>Depth</dt><dd>34</dd></div>
        <div><dt>Cuts</dt><dd>63</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5b36bdde6d12734c2868e8db82852756a136fcea7c61eee39f1f3a320d934aad">5b36bdde6d12…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for quadratic_residue_bounded_equiv">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib quadratic_residue_bounded_equiv</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/quadratic_residue_theorems.py#L363">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/quadratic_residue_bounded_equiv.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-quadratic_residue_decidable_nonzero"
  data-name="quadratic_residue_decidable_nonzero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="quadratic_residue_bounded_decidable_nonzero,quadratic_residue_bounded_equiv"
  data-search="quadratic_residue_decidable_nonzero quadratic residue decidable nonzero quadratic residuosity is constructively decidable at nonzero modulus. forall p a. ~(p = 0) -&gt; (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) \/ ~(exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) quadratic_residues quadratic_residue_bounded_decidable_nonzero quadratic_residue_bounded_equiv">
  <details>
    <summary>
      <span class="pa-card-title"><code>quadratic_residue_decidable_nonzero</code><span>Quadratic residue decidable nonzero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Quadratic residuosity is constructively decidable at nonzero modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_decidable_nonzero" href="#theorem-quadratic_residue_bounded_decidable_nonzero"><code>quadratic_residue_bounded_decidable_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-quadratic_residue_decidable_nonzero">Copy statement</button>
        <pre id="statement-quadratic_residue_decidable_nonzero"><code>forall p a. ~(p = 0) -&gt; (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) \/ ~(exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-quadratic_residue_decidable_nonzero">Copy proof</button>
        <pre id="proof-quadratic_residue_decidable_nonzero"><code>pa prove forall p a. ~(p = 0) -&gt; (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) \/ ~(exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)
use quadratic_residue_bounded_decidable_nonzero
use quadratic_residue_bounded_equiv
intro p
intro a
intro hp
have hequiv : (((exists x. exists u v. x * x + p * u = a + p * v) -&gt; (exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v)) /\ ((exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v) -&gt; (exists x. exists u v. x * x + p * u = a + p * v)))
specialize quadratic_residue_bounded_equiv p
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
exact hp
cases hequiv
have hdec : (exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v) \/ ~(exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v)
specialize quadratic_residue_bounded_decidable_nonzero p
specialize quadratic_residue_bounded_decidable_nonzero a
apply quadratic_residue_bounded_decidable_nonzero
exact hp
cases hdec
left
apply hequiv_right
exact hdec_left
right
intro hunbounded
apply hdec_right
apply hequiv_left
exact hunbounded
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,737</dd></div>
        <div><dt>Distinct objects</dt><dd>1,715</dd></div>
        <div><dt>Reused references</dt><dd>89</dd></div>
        <div><dt>Depth</dt><dd>71</dd></div>
        <div><dt>Cuts</dt><dd>136</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3d53eba6ed8f6ad34455c4a318d9edcc723144d86ebd02ce65878627c05f90eb">3d53eba6ed8f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for quadratic_residue_decidable_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib quadratic_residue_decidable_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/quadratic_residue_theorems.py#L446">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/quadratic_residue_decidable_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_repeat_empty"
  data-name="beta_repeat_empty" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero"
  data-search="beta_repeat_empty beta repeat empty every constant beta prefix of length zero is vacuously repeat. forall b c a l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + s ff_i_empty = l) -&gt; (((exists ff_h_empty_decoded. ff_h_empty_decoded + s (a) = s ((s (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * s ((s (ff_i_empty)) * c) + (a)))) quadratic_residues add_eq_zero_right succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_repeat_empty</code><span>Beta repeat empty</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every constant beta prefix of length zero is vacuously Repeat.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_repeat_exists" href="#theorem-beta_repeat_exists"><code>beta_repeat_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_repeat_empty">Copy statement</button>
        <pre id="statement-beta_repeat_empty"><code>forall b c a l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -&gt; (((exists ff_h_empty_decoded. ff_h_empty_decoded + S (a) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (a))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_repeat_empty">Copy proof</button>
        <pre id="proof-beta_repeat_empty"><code>pa prove forall b c a l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -&gt; (((exists ff_h_empty_decoded. ff_h_empty_decoded + S (a) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (a))))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro a
intro l
intro hl
intro i
intro hi
rewrite hl at hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>42</dd></div>
        <div><dt>Distinct objects</dt><dd>42</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ef25ee646a84c0388e77da515677affdbf0fd91f87c12f9810c69308cd159688">ef25ee646a84…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_repeat_empty">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_repeat_empty</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L47">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_repeat_empty.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_repeat_succ_extend"
  data-name="beta_repeat_succ_extend" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_prefix_extend,le_of_succ_le_succ,le_eq_or_lt"
  data-search="beta_repeat_succ_extend beta repeat succ extend recode a constant prefix and append one more copy of its value. forall b c a l sl. sl = s l -&gt; (forall ff_i_before. (exists ff_lt_before_bound. ff_lt_before_bound + s ff_i_before = l) -&gt; (((exists ff_h_before_decoded. ff_h_before_decoded + s (a) = s ((s (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * s ((s (ff_i_before)) * c) + (a)))) -&gt; exists z d. (forall ff_i_after. (exists ff_lt_after_bound. ff_lt_after_bound + s ff_i_after = sl) -&gt; (((exists ff_h_after_decoded. ff_h_after_decoded + s (a) = s ((s (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * s ((s (ff_i_after)) * d) + (a)))) quadratic_residues beta_prefix_extend le_of_succ_le_succ le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_repeat_succ_extend</code><span>Beta repeat succ extend</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Recode a constant prefix and append one more copy of its value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_repeat_exists" href="#theorem-beta_repeat_exists"><code>beta_repeat_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_repeat_succ_extend">Copy statement</button>
        <pre id="statement-beta_repeat_succ_extend"><code>forall b c a l sl. sl = S l -&gt; (forall ff_i_before. (exists ff_lt_before_bound. ff_lt_before_bound + S ff_i_before = l) -&gt; (((exists ff_h_before_decoded. ff_h_before_decoded + S (a) = S ((S (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * S ((S (ff_i_before)) * c) + (a)))) -&gt; exists z d. (forall ff_i_after. (exists ff_lt_after_bound. ff_lt_after_bound + S ff_i_after = sl) -&gt; (((exists ff_h_after_decoded. ff_h_after_decoded + S (a) = S ((S (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * S ((S (ff_i_after)) * d) + (a))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_repeat_succ_extend">Copy proof</button>
        <pre id="proof-beta_repeat_succ_extend"><code>pa prove forall b c a l sl. sl = S l -&gt; (forall ff_i_before. (exists ff_lt_before_bound. ff_lt_before_bound + S ff_i_before = l) -&gt; (((exists ff_h_before_decoded. ff_h_before_decoded + S (a) = S ((S (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * S ((S (ff_i_before)) * c) + (a)))) -&gt; exists z d. (forall ff_i_after. (exists ff_lt_after_bound. ff_lt_after_bound + S ff_i_after = sl) -&gt; (((exists ff_h_after_decoded. ff_h_after_decoded + S (a) = S ((S (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * S ((S (ff_i_after)) * d) + (a))))
use beta_prefix_extend
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro a
intro l
intro sl
intro hsl
intro hrepeat
specialize beta_prefix_extend l
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend a
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x
exists x1
intro i
intro hi
rewrite hsl at hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
rewrite hsplit_left
rewrite hsplit_left
exact beta_prefix_extend_witness_witness_left
specialize beta_prefix_extend_witness_witness_right i
specialize beta_prefix_extend_witness_witness_right a
apply beta_prefix_extend_witness_witness_right
exact hsplit_right
specialize hrepeat i
apply hrepeat
exact hsplit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,224</dd></div>
        <div><dt>Distinct objects</dt><dd>4,561</dd></div>
        <div><dt>Reused references</dt><dd>227</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>873</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fa75837000d664b888fcef00d4d68b9bf2bf4a4bede68e4eaa27bcc24d3b0d09">fa75837000d6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_repeat_succ_extend">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_repeat_succ_extend</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L73">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_repeat_succ_extend.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_repeat_exists"
  data-name="beta_repeat_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_repeat_empty,beta_repeat_succ_extend"
  data-search="beta_repeat_exists beta repeat exists every value and length admit a beta-coded constant prefix. forall a l. exists b c. (forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + s ff_i_r = l) -&gt; (((exists ff_h_r_decoded. ff_h_r_decoded + s (a) = s ((s (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * s ((s (ff_i_r)) * c) + (a)))) quadratic_residues beta_repeat_empty beta_repeat_succ_extend">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_repeat_exists</code><span>Beta repeat exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every value and length admit a beta-coded constant prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_repeat_empty" href="#theorem-beta_repeat_empty"><code>beta_repeat_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_succ_extend" href="#theorem-beta_repeat_succ_extend"><code>beta_repeat_succ_extend</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_exists" href="#theorem-pow_exists"><code>pow_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_repeat_exists">Copy statement</button>
        <pre id="statement-beta_repeat_exists"><code>forall a l. exists b c. (forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -&gt; (((exists ff_h_r_decoded. ff_h_r_decoded + S (a) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * S ((S (ff_i_r)) * c) + (a))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_repeat_exists">Copy proof</button>
        <pre id="proof-beta_repeat_exists"><code>pa prove forall a l. exists b c. (forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -&gt; (((exists ff_h_r_decoded. ff_h_r_decoded + S (a) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * S ((S (ff_i_r)) * c) + (a))))
use beta_repeat_empty
use beta_repeat_succ_extend
intro a
induction l
exists 0
exists 0
specialize beta_repeat_empty 0
specialize beta_repeat_empty 0
specialize beta_repeat_empty a
specialize beta_repeat_empty 0
apply beta_repeat_empty
refl
cases IH
cases IH_witness
specialize beta_repeat_succ_extend x
specialize beta_repeat_succ_extend x1
specialize beta_repeat_succ_extend a
specialize beta_repeat_succ_extend l
specialize beta_repeat_succ_extend (S l)
apply beta_repeat_succ_extend
refl
exact IH_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,322</dd></div>
        <div><dt>Distinct objects</dt><dd>4,639</dd></div>
        <div><dt>Reused references</dt><dd>229</dd></div>
        <div><dt>Depth</dt><dd>83</dd></div>
        <div><dt>Cuts</dt><dd>877</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b7e496b360e7d8407b8fc3de370940ebf397250bd92b7be3a2ec9b294d23358c">b7e496b360e7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_repeat_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_repeat_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L126">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_repeat_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_repeat_entry_eq"
  data-name="beta_repeat_entry_eq" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_at_unique"
  data-search="beta_repeat_entry_eq beta repeat entry eq every decoded entry of a repeat prefix equals its repeated value. forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + s ff_i_entry = l) -&gt; (((exists ff_h_entry_decoded. ff_h_entry_decoded + s (a) = s ((s (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * s ((s (ff_i_entry)) * c) + (a)))) -&gt; (exists h. h + s i = l) -&gt; (((exists ff_h_entry_x. ff_h_entry_x + s (x) = s ((s (i)) * c)) /\ exists ff_q_entry_x. b = ff_q_entry_x * s ((s (i)) * c) + (x))) -&gt; x = a quadratic_residues beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_repeat_entry_eq</code><span>Beta repeat entry eq</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded entry of a Repeat prefix equals its repeated value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_repeat_transport_entry" href="#theorem-beta_repeat_transport_entry"><code>beta_repeat_transport_entry</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_repeat_entry_eq">Copy statement</button>
        <pre id="statement-beta_repeat_entry_eq"><code>forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + S ff_i_entry = l) -&gt; (((exists ff_h_entry_decoded. ff_h_entry_decoded + S (a) = S ((S (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * S ((S (ff_i_entry)) * c) + (a)))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_entry_x. ff_h_entry_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_x. b = ff_q_entry_x * S ((S (i)) * c) + (x))) -&gt; x = a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_repeat_entry_eq">Copy proof</button>
        <pre id="proof-beta_repeat_entry_eq"><code>pa prove forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + S ff_i_entry = l) -&gt; (((exists ff_h_entry_decoded. ff_h_entry_decoded + S (a) = S ((S (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * S ((S (ff_i_entry)) * c) + (a)))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_entry_x. ff_h_entry_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_x. b = ff_q_entry_x * S ((S (i)) * c) + (x))) -&gt; x = a
use beta_at_unique
intro b
intro c
intro a
intro l
intro i
intro x
intro hrepeat
intro hi
intro hx
have ha : ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a)
specialize hrepeat i
apply hrepeat
exact hi
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique a
apply beta_at_unique
exact hx
exact ha
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,144</dd></div>
        <div><dt>Distinct objects</dt><dd>715</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>31</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d54a910857106fa1db45a88496a3e1f8f90973e5afecd2c7ec88d1a04d98a5cb">d54a91085710…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_repeat_entry_eq">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_repeat_entry_eq</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L154">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_repeat_entry_eq.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_repeat_transport_entry"
  data-name="beta_repeat_transport_entry" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_repeat_entry_eq"
  data-search="beta_repeat_transport_entry beta repeat transport entry repeat prefixes with one value preserve every decoded entry extensionally. forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + s ff_i_transport_l = l) -&gt; (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + s (a) = s ((s (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * s ((s (ff_i_transport_l)) * c) + (a)))) -&gt; (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + s ff_i_transport_r = l) -&gt; (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + s (a) = s ((s (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * s ((s (ff_i_transport_r)) * d) + (a)))) -&gt; forall i x. (exists h. h + s i = l) -&gt; (((exists ff_h_transport_x. ff_h_transport_x + s (x) = s ((s (i)) * c)) /\ exists ff_q_transport_x. b = ff_q_transport_x * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_transport_y. ff_h_transport_y + s (x) = s ((s (i)) * d)) /\ exists ff_q_transport_y. z = ff_q_transport_y * s ((s (i)) * d) + (x))) quadratic_residues beta_repeat_entry_eq">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_repeat_transport_entry</code><span>Beta repeat transport entry</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Repeat prefixes with one value preserve every decoded entry extensionally.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_repeat_entry_eq" href="#theorem-beta_repeat_entry_eq"><code>beta_repeat_entry_eq</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_functional" href="#theorem-pow_functional"><code>pow_functional</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_repeat_transport_entry">Copy statement</button>
        <pre id="statement-beta_repeat_transport_entry"><code>forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -&gt; (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a)))) -&gt; (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -&gt; (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a)))) -&gt; forall i x. (exists h. h + S i = l) -&gt; (((exists ff_h_transport_x. ff_h_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_transport_x. b = ff_q_transport_x * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_transport_y. ff_h_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_transport_y. z = ff_q_transport_y * S ((S (i)) * d) + (x)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_repeat_transport_entry">Copy proof</button>
        <pre id="proof-beta_repeat_transport_entry"><code>pa prove forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -&gt; (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a)))) -&gt; (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -&gt; (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a)))) -&gt; forall i x. (exists h. h + S i = l) -&gt; (((exists ff_h_transport_x. ff_h_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_transport_x. b = ff_q_transport_x * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_transport_y. ff_h_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_transport_y. z = ff_q_transport_y * S ((S (i)) * d) + (x)))
use beta_repeat_entry_eq
intro b
intro c
intro z
intro d
intro a
intro l
intro hleft
intro hright
intro i
intro x
intro hi
intro hx
have hxa : x = a
specialize beta_repeat_entry_eq b
specialize beta_repeat_entry_eq c
specialize beta_repeat_entry_eq a
specialize beta_repeat_entry_eq l
specialize beta_repeat_entry_eq i
specialize beta_repeat_entry_eq x
apply beta_repeat_entry_eq
exact hleft
exact hi
exact hx
rewrite hxa
rewrite hxa
specialize hright i
apply hright
exact hi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,191</dd></div>
        <div><dt>Distinct objects</dt><dd>762</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>32</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="42179ced89f7d429e008f027d2797ac5c2c8ff46af47847f6de34b2ea780f0fb">42179ced89f7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_repeat_transport_entry">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_repeat_transport_entry</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L185">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_repeat_transport_entry.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_exists"
  data-name="pow_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_repeat_exists,beta_product_exists"
  data-search="pow_exists pow exists every base and exponent have a relational finite-product power. forall a e. exists n. (exists ff_b_x ff_c_x. ((forall ff_i_x_repeat. (exists ff_lt_x_repeat_bound. ff_lt_x_repeat_bound + s ff_i_x_repeat = e) -&gt; (((exists ff_h_x_repeat_decoded. ff_h_x_repeat_decoded + s (a) = s ((s (ff_i_x_repeat)) * ff_c_x)) /\ exists ff_q_x_repeat_decoded. ff_b_x = ff_q_x_repeat_decoded * s ((s (ff_i_x_repeat)) * ff_c_x) + (a)))) /\ (exists ff_u_x_product ff_v_x_product. ((((exists ff_h_x_product_start. ff_h_x_product_start + s (1) = s ((s (0)) * ff_v_x_product)) /\ exists ff_q_x_product_start. ff_u_x_product = ff_q_x_product_start * s ((s (0)) * ff_v_x_product) + (1))) /\ ((((exists ff_h_x_product_terminal. ff_h_x_product_terminal + s (n) = s ((s (e)) * ff_v_x_product)) /\ exists ff_q_x_product_terminal. ff_u_x_product = ff_q_x_product_terminal * s ((s (e)) * ff_v_x_product) + (n))) /\ forall ff_i_x_product. (exists ff_lt_x_product_bound. ff_lt_x_product_bound + s ff_i_x_product = e) -&gt; exists ff_p_x_product ff_r_x_product ff_s_x_product. ((((exists ff_h_x_product_factor. ff_h_x_product_factor + s (ff_p_x_product) = s ((s (ff_i_x_product)) * ff_c_x)) /\ exists ff_q_x_product_factor. ff_b_x = ff_q_x_product_factor * s ((s (ff_i_x_product)) * ff_c_x) + (ff_p_x_product))) /\ ((((exists ff_h_x_product_partial. ff_h_x_product_partial + s (ff_r_x_product) = s ((s (ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_partial. ff_u_x_product = ff_q_x_product_partial * s ((s (ff_i_x_product)) * ff_v_x_product) + (ff_r_x_product))) /\ ((((exists ff_h_x_product_successor. ff_h_x_product_successor + s (ff_s_x_product) = s ((s (s ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_successor. ff_u_x_product = ff_q_x_product_successor * s ((s (s ff_i_x_product)) * ff_v_x_product) + (ff_s_x_product))) /\ ff_s_x_product = ff_r_x_product * ff_p_x_product)))))))) quadratic_residues beta_repeat_exists beta_product_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_exists</code><span>Pow exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every base and exponent have a relational finite-product power.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_repeat_exists" href="#theorem-beta_repeat_exists"><code>beta_repeat_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_exists" href="#theorem-beta_product_exists"><code>beta_product_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_mul_exp" href="#theorem-pow_mul_exp"><code>pow_mul_exp</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_exists">Copy statement</button>
        <pre id="statement-pow_exists"><code>forall a e. exists n. (exists ff_b_x ff_c_x. ((forall ff_i_x_repeat. (exists ff_lt_x_repeat_bound. ff_lt_x_repeat_bound + S ff_i_x_repeat = e) -&gt; (((exists ff_h_x_repeat_decoded. ff_h_x_repeat_decoded + S (a) = S ((S (ff_i_x_repeat)) * ff_c_x)) /\ exists ff_q_x_repeat_decoded. ff_b_x = ff_q_x_repeat_decoded * S ((S (ff_i_x_repeat)) * ff_c_x) + (a)))) /\ (exists ff_u_x_product ff_v_x_product. ((((exists ff_h_x_product_start. ff_h_x_product_start + S (1) = S ((S (0)) * ff_v_x_product)) /\ exists ff_q_x_product_start. ff_u_x_product = ff_q_x_product_start * S ((S (0)) * ff_v_x_product) + (1))) /\ ((((exists ff_h_x_product_terminal. ff_h_x_product_terminal + S (n) = S ((S (e)) * ff_v_x_product)) /\ exists ff_q_x_product_terminal. ff_u_x_product = ff_q_x_product_terminal * S ((S (e)) * ff_v_x_product) + (n))) /\ forall ff_i_x_product. (exists ff_lt_x_product_bound. ff_lt_x_product_bound + S ff_i_x_product = e) -&gt; exists ff_p_x_product ff_r_x_product ff_s_x_product. ((((exists ff_h_x_product_factor. ff_h_x_product_factor + S (ff_p_x_product) = S ((S (ff_i_x_product)) * ff_c_x)) /\ exists ff_q_x_product_factor. ff_b_x = ff_q_x_product_factor * S ((S (ff_i_x_product)) * ff_c_x) + (ff_p_x_product))) /\ ((((exists ff_h_x_product_partial. ff_h_x_product_partial + S (ff_r_x_product) = S ((S (ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_partial. ff_u_x_product = ff_q_x_product_partial * S ((S (ff_i_x_product)) * ff_v_x_product) + (ff_r_x_product))) /\ ((((exists ff_h_x_product_successor. ff_h_x_product_successor + S (ff_s_x_product) = S ((S (S ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_successor. ff_u_x_product = ff_q_x_product_successor * S ((S (S ff_i_x_product)) * ff_v_x_product) + (ff_s_x_product))) /\ ff_s_x_product = ff_r_x_product * ff_p_x_product))))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_exists">Copy proof</button>
        <pre id="proof-pow_exists"><code>pa prove forall a e. exists n. (exists ff_b_x ff_c_x. ((forall ff_i_x_repeat. (exists ff_lt_x_repeat_bound. ff_lt_x_repeat_bound + S ff_i_x_repeat = e) -&gt; (((exists ff_h_x_repeat_decoded. ff_h_x_repeat_decoded + S (a) = S ((S (ff_i_x_repeat)) * ff_c_x)) /\ exists ff_q_x_repeat_decoded. ff_b_x = ff_q_x_repeat_decoded * S ((S (ff_i_x_repeat)) * ff_c_x) + (a)))) /\ (exists ff_u_x_product ff_v_x_product. ((((exists ff_h_x_product_start. ff_h_x_product_start + S (1) = S ((S (0)) * ff_v_x_product)) /\ exists ff_q_x_product_start. ff_u_x_product = ff_q_x_product_start * S ((S (0)) * ff_v_x_product) + (1))) /\ ((((exists ff_h_x_product_terminal. ff_h_x_product_terminal + S (n) = S ((S (e)) * ff_v_x_product)) /\ exists ff_q_x_product_terminal. ff_u_x_product = ff_q_x_product_terminal * S ((S (e)) * ff_v_x_product) + (n))) /\ forall ff_i_x_product. (exists ff_lt_x_product_bound. ff_lt_x_product_bound + S ff_i_x_product = e) -&gt; exists ff_p_x_product ff_r_x_product ff_s_x_product. ((((exists ff_h_x_product_factor. ff_h_x_product_factor + S (ff_p_x_product) = S ((S (ff_i_x_product)) * ff_c_x)) /\ exists ff_q_x_product_factor. ff_b_x = ff_q_x_product_factor * S ((S (ff_i_x_product)) * ff_c_x) + (ff_p_x_product))) /\ ((((exists ff_h_x_product_partial. ff_h_x_product_partial + S (ff_r_x_product) = S ((S (ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_partial. ff_u_x_product = ff_q_x_product_partial * S ((S (ff_i_x_product)) * ff_v_x_product) + (ff_r_x_product))) /\ ((((exists ff_h_x_product_successor. ff_h_x_product_successor + S (ff_s_x_product) = S ((S (S ff_i_x_product)) * ff_v_x_product)) /\ exists ff_q_x_product_successor. ff_u_x_product = ff_q_x_product_successor * S ((S (S ff_i_x_product)) * ff_v_x_product) + (ff_s_x_product))) /\ ff_s_x_product = ff_r_x_product * ff_p_x_product))))))))
use beta_repeat_exists
use beta_product_exists
intro a
intro e
have hrepeat : exists b c. (forall i. (exists h. h + S i = e) -&gt; ((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a))
specialize beta_repeat_exists a
specialize beta_repeat_exists e
exact beta_repeat_exists
cases hrepeat
cases hrepeat_witness
specialize beta_product_exists x
specialize beta_product_exists x1
specialize beta_product_exists e
cases beta_product_exists
cases beta_product_exists_witness
cases beta_product_exists_witness_witness
exists x2
exists x
exists x1
split
exact hrepeat_witness_witness
exists x3
exists x4
exact beta_product_exists_witness_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>59,836</dd></div>
        <div><dt>Distinct objects</dt><dd>4,902</dd></div>
        <div><dt>Reused references</dt><dd>241</dd></div>
        <div><dt>Depth</dt><dd>88</dd></div>
        <div><dt>Cuts</dt><dd>1,795</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="37a53929d6381ab048b9090f3093090aee7dd1f75d243f7c33f6087184560fcf">37a53929d638…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L224">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_zero"
  data-name="pow_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_product_zero"
  data-search="pow_zero pow zero the relational zeroth power is one. forall a e n. e = 0 -&gt; (exists ff_b_z ff_c_z. ((forall ff_i_z_repeat. (exists ff_lt_z_repeat_bound. ff_lt_z_repeat_bound + s ff_i_z_repeat = e) -&gt; (((exists ff_h_z_repeat_decoded. ff_h_z_repeat_decoded + s (a) = s ((s (ff_i_z_repeat)) * ff_c_z)) /\ exists ff_q_z_repeat_decoded. ff_b_z = ff_q_z_repeat_decoded * s ((s (ff_i_z_repeat)) * ff_c_z) + (a)))) /\ (exists ff_u_z_product ff_v_z_product. ((((exists ff_h_z_product_start. ff_h_z_product_start + s (1) = s ((s (0)) * ff_v_z_product)) /\ exists ff_q_z_product_start. ff_u_z_product = ff_q_z_product_start * s ((s (0)) * ff_v_z_product) + (1))) /\ ((((exists ff_h_z_product_terminal. ff_h_z_product_terminal + s (n) = s ((s (e)) * ff_v_z_product)) /\ exists ff_q_z_product_terminal. ff_u_z_product = ff_q_z_product_terminal * s ((s (e)) * ff_v_z_product) + (n))) /\ forall ff_i_z_product. (exists ff_lt_z_product_bound. ff_lt_z_product_bound + s ff_i_z_product = e) -&gt; exists ff_p_z_product ff_r_z_product ff_s_z_product. ((((exists ff_h_z_product_factor. ff_h_z_product_factor + s (ff_p_z_product) = s ((s (ff_i_z_product)) * ff_c_z)) /\ exists ff_q_z_product_factor. ff_b_z = ff_q_z_product_factor * s ((s (ff_i_z_product)) * ff_c_z) + (ff_p_z_product))) /\ ((((exists ff_h_z_product_partial. ff_h_z_product_partial + s (ff_r_z_product) = s ((s (ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_partial. ff_u_z_product = ff_q_z_product_partial * s ((s (ff_i_z_product)) * ff_v_z_product) + (ff_r_z_product))) /\ ((((exists ff_h_z_product_successor. ff_h_z_product_successor + s (ff_s_z_product) = s ((s (s ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_successor. ff_u_z_product = ff_q_z_product_successor * s ((s (s ff_i_z_product)) * ff_v_z_product) + (ff_s_z_product))) /\ ff_s_z_product = ff_r_z_product * ff_p_z_product)))))))) -&gt; n = 1 quadratic_residues beta_product_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_zero</code><span>Pow zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The relational zeroth power is one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_zero" href="#theorem-beta_product_zero"><code>beta_product_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_one_from_zero_successor" href="#theorem-pow_one_from_zero_successor"><code>pow_one_from_zero_successor</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_mod_congruent" href="#theorem-pow_mod_congruent"><code>pow_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_add" href="#theorem-pow_add"><code>pow_add</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_mul_exp" href="#theorem-pow_mul_exp"><code>pow_mul_exp</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_zero">Copy statement</button>
        <pre id="statement-pow_zero"><code>forall a e n. e = 0 -&gt; (exists ff_b_z ff_c_z. ((forall ff_i_z_repeat. (exists ff_lt_z_repeat_bound. ff_lt_z_repeat_bound + S ff_i_z_repeat = e) -&gt; (((exists ff_h_z_repeat_decoded. ff_h_z_repeat_decoded + S (a) = S ((S (ff_i_z_repeat)) * ff_c_z)) /\ exists ff_q_z_repeat_decoded. ff_b_z = ff_q_z_repeat_decoded * S ((S (ff_i_z_repeat)) * ff_c_z) + (a)))) /\ (exists ff_u_z_product ff_v_z_product. ((((exists ff_h_z_product_start. ff_h_z_product_start + S (1) = S ((S (0)) * ff_v_z_product)) /\ exists ff_q_z_product_start. ff_u_z_product = ff_q_z_product_start * S ((S (0)) * ff_v_z_product) + (1))) /\ ((((exists ff_h_z_product_terminal. ff_h_z_product_terminal + S (n) = S ((S (e)) * ff_v_z_product)) /\ exists ff_q_z_product_terminal. ff_u_z_product = ff_q_z_product_terminal * S ((S (e)) * ff_v_z_product) + (n))) /\ forall ff_i_z_product. (exists ff_lt_z_product_bound. ff_lt_z_product_bound + S ff_i_z_product = e) -&gt; exists ff_p_z_product ff_r_z_product ff_s_z_product. ((((exists ff_h_z_product_factor. ff_h_z_product_factor + S (ff_p_z_product) = S ((S (ff_i_z_product)) * ff_c_z)) /\ exists ff_q_z_product_factor. ff_b_z = ff_q_z_product_factor * S ((S (ff_i_z_product)) * ff_c_z) + (ff_p_z_product))) /\ ((((exists ff_h_z_product_partial. ff_h_z_product_partial + S (ff_r_z_product) = S ((S (ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_partial. ff_u_z_product = ff_q_z_product_partial * S ((S (ff_i_z_product)) * ff_v_z_product) + (ff_r_z_product))) /\ ((((exists ff_h_z_product_successor. ff_h_z_product_successor + S (ff_s_z_product) = S ((S (S ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_successor. ff_u_z_product = ff_q_z_product_successor * S ((S (S ff_i_z_product)) * ff_v_z_product) + (ff_s_z_product))) /\ ff_s_z_product = ff_r_z_product * ff_p_z_product)))))))) -&gt; n = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_zero">Copy proof</button>
        <pre id="proof-pow_zero"><code>pa prove forall a e n. e = 0 -&gt; (exists ff_b_z ff_c_z. ((forall ff_i_z_repeat. (exists ff_lt_z_repeat_bound. ff_lt_z_repeat_bound + S ff_i_z_repeat = e) -&gt; (((exists ff_h_z_repeat_decoded. ff_h_z_repeat_decoded + S (a) = S ((S (ff_i_z_repeat)) * ff_c_z)) /\ exists ff_q_z_repeat_decoded. ff_b_z = ff_q_z_repeat_decoded * S ((S (ff_i_z_repeat)) * ff_c_z) + (a)))) /\ (exists ff_u_z_product ff_v_z_product. ((((exists ff_h_z_product_start. ff_h_z_product_start + S (1) = S ((S (0)) * ff_v_z_product)) /\ exists ff_q_z_product_start. ff_u_z_product = ff_q_z_product_start * S ((S (0)) * ff_v_z_product) + (1))) /\ ((((exists ff_h_z_product_terminal. ff_h_z_product_terminal + S (n) = S ((S (e)) * ff_v_z_product)) /\ exists ff_q_z_product_terminal. ff_u_z_product = ff_q_z_product_terminal * S ((S (e)) * ff_v_z_product) + (n))) /\ forall ff_i_z_product. (exists ff_lt_z_product_bound. ff_lt_z_product_bound + S ff_i_z_product = e) -&gt; exists ff_p_z_product ff_r_z_product ff_s_z_product. ((((exists ff_h_z_product_factor. ff_h_z_product_factor + S (ff_p_z_product) = S ((S (ff_i_z_product)) * ff_c_z)) /\ exists ff_q_z_product_factor. ff_b_z = ff_q_z_product_factor * S ((S (ff_i_z_product)) * ff_c_z) + (ff_p_z_product))) /\ ((((exists ff_h_z_product_partial. ff_h_z_product_partial + S (ff_r_z_product) = S ((S (ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_partial. ff_u_z_product = ff_q_z_product_partial * S ((S (ff_i_z_product)) * ff_v_z_product) + (ff_r_z_product))) /\ ((((exists ff_h_z_product_successor. ff_h_z_product_successor + S (ff_s_z_product) = S ((S (S ff_i_z_product)) * ff_v_z_product)) /\ exists ff_q_z_product_successor. ff_u_z_product = ff_q_z_product_successor * S ((S (S ff_i_z_product)) * ff_v_z_product) + (ff_s_z_product))) /\ ff_s_z_product = ff_r_z_product * ff_p_z_product)))))))) -&gt; n = 1
use beta_product_zero
intro a
intro e
intro n
intro he
intro hpow
rewrite he at hpow
rewrite he at hpow
rewrite he at hpow
rewrite he at hpow
cases hpow
cases hpow_witness
cases hpow_witness_witness
specialize beta_product_zero x
specialize beta_product_zero x1
specialize beta_product_zero n
apply beta_product_zero
exact hpow_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,224</dd></div>
        <div><dt>Distinct objects</dt><dd>795</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>32</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f3e5705226dd57f733a8ac1adcf61e8612e09f72152f250a0fbe5b90d591dcf7">f3e5705226dd…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L257">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_functional"
  data-name="pow_functional" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_repeat_transport_entry,beta_product_transport_prefix,beta_product_functional"
  data-search="pow_functional pow functional relational powers have a unique natural value. forall a e n m. (exists ff_b_l ff_c_l. ((forall ff_i_l_repeat. (exists ff_lt_l_repeat_bound. ff_lt_l_repeat_bound + s ff_i_l_repeat = e) -&gt; (((exists ff_h_l_repeat_decoded. ff_h_l_repeat_decoded + s (a) = s ((s (ff_i_l_repeat)) * ff_c_l)) /\ exists ff_q_l_repeat_decoded. ff_b_l = ff_q_l_repeat_decoded * s ((s (ff_i_l_repeat)) * ff_c_l) + (a)))) /\ (exists ff_u_l_product ff_v_l_product. ((((exists ff_h_l_product_start. ff_h_l_product_start + s (1) = s ((s (0)) * ff_v_l_product)) /\ exists ff_q_l_product_start. ff_u_l_product = ff_q_l_product_start * s ((s (0)) * ff_v_l_product) + (1))) /\ ((((exists ff_h_l_product_terminal. ff_h_l_product_terminal + s (n) = s ((s (e)) * ff_v_l_product)) /\ exists ff_q_l_product_terminal. ff_u_l_product = ff_q_l_product_terminal * s ((s (e)) * ff_v_l_product) + (n))) /\ forall ff_i_l_product. (exists ff_lt_l_product_bound. ff_lt_l_product_bound + s ff_i_l_product = e) -&gt; exists ff_p_l_product ff_r_l_product ff_s_l_product. ((((exists ff_h_l_product_factor. ff_h_l_product_factor + s (ff_p_l_product) = s ((s (ff_i_l_product)) * ff_c_l)) /\ exists ff_q_l_product_factor. ff_b_l = ff_q_l_product_factor * s ((s (ff_i_l_product)) * ff_c_l) + (ff_p_l_product))) /\ ((((exists ff_h_l_product_partial. ff_h_l_product_partial + s (ff_r_l_product) = s ((s (ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_partial. ff_u_l_product = ff_q_l_product_partial * s ((s (ff_i_l_product)) * ff_v_l_product) + (ff_r_l_product))) /\ ((((exists ff_h_l_product_successor. ff_h_l_product_successor + s (ff_s_l_product) = s ((s (s ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_successor. ff_u_l_product = ff_q_l_product_successor * s ((s (s ff_i_l_product)) * ff_v_l_product) + (ff_s_l_product))) /\ ff_s_l_product = ff_r_l_product * ff_p_l_product)))))))) -&gt; (exists ff_b_r ff_c_r. ((forall ff_i_r_repeat. (exists ff_lt_r_repeat_bound. ff_lt_r_repeat_bound + s ff_i_r_repeat = e) -&gt; (((exists ff_h_r_repeat_decoded. ff_h_r_repeat_decoded + s (a) = s ((s (ff_i_r_repeat)) * ff_c_r)) /\ exists ff_q_r_repeat_decoded. ff_b_r = ff_q_r_repeat_decoded * s ((s (ff_i_r_repeat)) * ff_c_r) + (a)))) /\ (exists ff_u_r_product ff_v_r_product. ((((exists ff_h_r_product_start. ff_h_r_product_start + s (1) = s ((s (0)) * ff_v_r_product)) /\ exists ff_q_r_product_start. ff_u_r_product = ff_q_r_product_start * s ((s (0)) * ff_v_r_product) + (1))) /\ ((((exists ff_h_r_product_terminal. ff_h_r_product_terminal + s (m) = s ((s (e)) * ff_v_r_product)) /\ exists ff_q_r_product_terminal. ff_u_r_product = ff_q_r_product_terminal * s ((s (e)) * ff_v_r_product) + (m))) /\ forall ff_i_r_product. (exists ff_lt_r_product_bound. ff_lt_r_product_bound + s ff_i_r_product = e) -&gt; exists ff_p_r_product ff_r_r_product ff_s_r_product. ((((exists ff_h_r_product_factor. ff_h_r_product_factor + s (ff_p_r_product) = s ((s (ff_i_r_product)) * ff_c_r)) /\ exists ff_q_r_product_factor. ff_b_r = ff_q_r_product_factor * s ((s (ff_i_r_product)) * ff_c_r) + (ff_p_r_product))) /\ ((((exists ff_h_r_product_partial. ff_h_r_product_partial + s (ff_r_r_product) = s ((s (ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_partial. ff_u_r_product = ff_q_r_product_partial * s ((s (ff_i_r_product)) * ff_v_r_product) + (ff_r_r_product))) /\ ((((exists ff_h_r_product_successor. ff_h_r_product_successor + s (ff_s_r_product) = s ((s (s ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_successor. ff_u_r_product = ff_q_r_product_successor * s ((s (s ff_i_r_product)) * ff_v_r_product) + (ff_s_r_product))) /\ ff_s_r_product = ff_r_r_product * ff_p_r_product)))))))) -&gt; n = m quadratic_residues beta_repeat_transport_entry beta_product_transport_prefix beta_product_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_functional</code><span>Pow functional</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Relational powers have a unique natural value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_repeat_transport_entry" href="#theorem-beta_repeat_transport_entry"><code>beta_repeat_transport_entry</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_transport_prefix" href="#theorem-beta_product_transport_prefix"><code>beta_product_transport_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_successor_pair_mul" href="#theorem-pow_successor_pair_mul"><code>pow_successor_pair_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_add" href="#theorem-pow_add"><code>pow_add</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_functional">Copy statement</button>
        <pre id="statement-pow_functional"><code>forall a e n m. (exists ff_b_l ff_c_l. ((forall ff_i_l_repeat. (exists ff_lt_l_repeat_bound. ff_lt_l_repeat_bound + S ff_i_l_repeat = e) -&gt; (((exists ff_h_l_repeat_decoded. ff_h_l_repeat_decoded + S (a) = S ((S (ff_i_l_repeat)) * ff_c_l)) /\ exists ff_q_l_repeat_decoded. ff_b_l = ff_q_l_repeat_decoded * S ((S (ff_i_l_repeat)) * ff_c_l) + (a)))) /\ (exists ff_u_l_product ff_v_l_product. ((((exists ff_h_l_product_start. ff_h_l_product_start + S (1) = S ((S (0)) * ff_v_l_product)) /\ exists ff_q_l_product_start. ff_u_l_product = ff_q_l_product_start * S ((S (0)) * ff_v_l_product) + (1))) /\ ((((exists ff_h_l_product_terminal. ff_h_l_product_terminal + S (n) = S ((S (e)) * ff_v_l_product)) /\ exists ff_q_l_product_terminal. ff_u_l_product = ff_q_l_product_terminal * S ((S (e)) * ff_v_l_product) + (n))) /\ forall ff_i_l_product. (exists ff_lt_l_product_bound. ff_lt_l_product_bound + S ff_i_l_product = e) -&gt; exists ff_p_l_product ff_r_l_product ff_s_l_product. ((((exists ff_h_l_product_factor. ff_h_l_product_factor + S (ff_p_l_product) = S ((S (ff_i_l_product)) * ff_c_l)) /\ exists ff_q_l_product_factor. ff_b_l = ff_q_l_product_factor * S ((S (ff_i_l_product)) * ff_c_l) + (ff_p_l_product))) /\ ((((exists ff_h_l_product_partial. ff_h_l_product_partial + S (ff_r_l_product) = S ((S (ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_partial. ff_u_l_product = ff_q_l_product_partial * S ((S (ff_i_l_product)) * ff_v_l_product) + (ff_r_l_product))) /\ ((((exists ff_h_l_product_successor. ff_h_l_product_successor + S (ff_s_l_product) = S ((S (S ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_successor. ff_u_l_product = ff_q_l_product_successor * S ((S (S ff_i_l_product)) * ff_v_l_product) + (ff_s_l_product))) /\ ff_s_l_product = ff_r_l_product * ff_p_l_product)))))))) -&gt; (exists ff_b_r ff_c_r. ((forall ff_i_r_repeat. (exists ff_lt_r_repeat_bound. ff_lt_r_repeat_bound + S ff_i_r_repeat = e) -&gt; (((exists ff_h_r_repeat_decoded. ff_h_r_repeat_decoded + S (a) = S ((S (ff_i_r_repeat)) * ff_c_r)) /\ exists ff_q_r_repeat_decoded. ff_b_r = ff_q_r_repeat_decoded * S ((S (ff_i_r_repeat)) * ff_c_r) + (a)))) /\ (exists ff_u_r_product ff_v_r_product. ((((exists ff_h_r_product_start. ff_h_r_product_start + S (1) = S ((S (0)) * ff_v_r_product)) /\ exists ff_q_r_product_start. ff_u_r_product = ff_q_r_product_start * S ((S (0)) * ff_v_r_product) + (1))) /\ ((((exists ff_h_r_product_terminal. ff_h_r_product_terminal + S (m) = S ((S (e)) * ff_v_r_product)) /\ exists ff_q_r_product_terminal. ff_u_r_product = ff_q_r_product_terminal * S ((S (e)) * ff_v_r_product) + (m))) /\ forall ff_i_r_product. (exists ff_lt_r_product_bound. ff_lt_r_product_bound + S ff_i_r_product = e) -&gt; exists ff_p_r_product ff_r_r_product ff_s_r_product. ((((exists ff_h_r_product_factor. ff_h_r_product_factor + S (ff_p_r_product) = S ((S (ff_i_r_product)) * ff_c_r)) /\ exists ff_q_r_product_factor. ff_b_r = ff_q_r_product_factor * S ((S (ff_i_r_product)) * ff_c_r) + (ff_p_r_product))) /\ ((((exists ff_h_r_product_partial. ff_h_r_product_partial + S (ff_r_r_product) = S ((S (ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_partial. ff_u_r_product = ff_q_r_product_partial * S ((S (ff_i_r_product)) * ff_v_r_product) + (ff_r_r_product))) /\ ((((exists ff_h_r_product_successor. ff_h_r_product_successor + S (ff_s_r_product) = S ((S (S ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_successor. ff_u_r_product = ff_q_r_product_successor * S ((S (S ff_i_r_product)) * ff_v_r_product) + (ff_s_r_product))) /\ ff_s_r_product = ff_r_r_product * ff_p_r_product)))))))) -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_functional">Copy proof</button>
        <pre id="proof-pow_functional"><code>pa prove forall a e n m. (exists ff_b_l ff_c_l. ((forall ff_i_l_repeat. (exists ff_lt_l_repeat_bound. ff_lt_l_repeat_bound + S ff_i_l_repeat = e) -&gt; (((exists ff_h_l_repeat_decoded. ff_h_l_repeat_decoded + S (a) = S ((S (ff_i_l_repeat)) * ff_c_l)) /\ exists ff_q_l_repeat_decoded. ff_b_l = ff_q_l_repeat_decoded * S ((S (ff_i_l_repeat)) * ff_c_l) + (a)))) /\ (exists ff_u_l_product ff_v_l_product. ((((exists ff_h_l_product_start. ff_h_l_product_start + S (1) = S ((S (0)) * ff_v_l_product)) /\ exists ff_q_l_product_start. ff_u_l_product = ff_q_l_product_start * S ((S (0)) * ff_v_l_product) + (1))) /\ ((((exists ff_h_l_product_terminal. ff_h_l_product_terminal + S (n) = S ((S (e)) * ff_v_l_product)) /\ exists ff_q_l_product_terminal. ff_u_l_product = ff_q_l_product_terminal * S ((S (e)) * ff_v_l_product) + (n))) /\ forall ff_i_l_product. (exists ff_lt_l_product_bound. ff_lt_l_product_bound + S ff_i_l_product = e) -&gt; exists ff_p_l_product ff_r_l_product ff_s_l_product. ((((exists ff_h_l_product_factor. ff_h_l_product_factor + S (ff_p_l_product) = S ((S (ff_i_l_product)) * ff_c_l)) /\ exists ff_q_l_product_factor. ff_b_l = ff_q_l_product_factor * S ((S (ff_i_l_product)) * ff_c_l) + (ff_p_l_product))) /\ ((((exists ff_h_l_product_partial. ff_h_l_product_partial + S (ff_r_l_product) = S ((S (ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_partial. ff_u_l_product = ff_q_l_product_partial * S ((S (ff_i_l_product)) * ff_v_l_product) + (ff_r_l_product))) /\ ((((exists ff_h_l_product_successor. ff_h_l_product_successor + S (ff_s_l_product) = S ((S (S ff_i_l_product)) * ff_v_l_product)) /\ exists ff_q_l_product_successor. ff_u_l_product = ff_q_l_product_successor * S ((S (S ff_i_l_product)) * ff_v_l_product) + (ff_s_l_product))) /\ ff_s_l_product = ff_r_l_product * ff_p_l_product)))))))) -&gt; (exists ff_b_r ff_c_r. ((forall ff_i_r_repeat. (exists ff_lt_r_repeat_bound. ff_lt_r_repeat_bound + S ff_i_r_repeat = e) -&gt; (((exists ff_h_r_repeat_decoded. ff_h_r_repeat_decoded + S (a) = S ((S (ff_i_r_repeat)) * ff_c_r)) /\ exists ff_q_r_repeat_decoded. ff_b_r = ff_q_r_repeat_decoded * S ((S (ff_i_r_repeat)) * ff_c_r) + (a)))) /\ (exists ff_u_r_product ff_v_r_product. ((((exists ff_h_r_product_start. ff_h_r_product_start + S (1) = S ((S (0)) * ff_v_r_product)) /\ exists ff_q_r_product_start. ff_u_r_product = ff_q_r_product_start * S ((S (0)) * ff_v_r_product) + (1))) /\ ((((exists ff_h_r_product_terminal. ff_h_r_product_terminal + S (m) = S ((S (e)) * ff_v_r_product)) /\ exists ff_q_r_product_terminal. ff_u_r_product = ff_q_r_product_terminal * S ((S (e)) * ff_v_r_product) + (m))) /\ forall ff_i_r_product. (exists ff_lt_r_product_bound. ff_lt_r_product_bound + S ff_i_r_product = e) -&gt; exists ff_p_r_product ff_r_r_product ff_s_r_product. ((((exists ff_h_r_product_factor. ff_h_r_product_factor + S (ff_p_r_product) = S ((S (ff_i_r_product)) * ff_c_r)) /\ exists ff_q_r_product_factor. ff_b_r = ff_q_r_product_factor * S ((S (ff_i_r_product)) * ff_c_r) + (ff_p_r_product))) /\ ((((exists ff_h_r_product_partial. ff_h_r_product_partial + S (ff_r_r_product) = S ((S (ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_partial. ff_u_r_product = ff_q_r_product_partial * S ((S (ff_i_r_product)) * ff_v_r_product) + (ff_r_r_product))) /\ ((((exists ff_h_r_product_successor. ff_h_r_product_successor + S (ff_s_r_product) = S ((S (S ff_i_r_product)) * ff_v_r_product)) /\ exists ff_q_r_product_successor. ff_u_r_product = ff_q_r_product_successor * S ((S (S ff_i_r_product)) * ff_v_r_product) + (ff_s_r_product))) /\ ff_s_r_product = ff_r_r_product * ff_p_r_product)))))))) -&gt; n = m
use beta_repeat_transport_entry
use beta_product_transport_prefix
use beta_product_functional
intro a
intro e
intro n
intro m
intro hn
intro hm
cases hn
cases hn_witness
cases hn_witness_witness
cases hm
cases hm_witness
cases hm_witness_witness
have htransport : exists ff_u_transport ff_v_transport. ((((exists ff_h_transport_start. ff_h_transport_start + S (1) = S ((S (0)) * ff_v_transport)) /\ exists ff_q_transport_start. ff_u_transport = ff_q_transport_start * S ((S (0)) * ff_v_transport) + (1))) /\ ((((exists ff_h_transport_terminal. ff_h_transport_terminal + S (n) = S ((S (e)) * ff_v_transport)) /\ exists ff_q_transport_terminal. ff_u_transport = ff_q_transport_terminal * S ((S (e)) * ff_v_transport) + (n))) /\ forall ff_i_transport. (exists ff_lt_transport_bound. ff_lt_transport_bound + S ff_i_transport = e) -&gt; exists ff_p_transport ff_r_transport ff_s_transport. ((((exists ff_h_transport_factor. ff_h_transport_factor + S (ff_p_transport) = S ((S (ff_i_transport)) * x3)) /\ exists ff_q_transport_factor. x2 = ff_q_transport_factor * S ((S (ff_i_transport)) * x3) + (ff_p_transport))) /\ ((((exists ff_h_transport_partial. ff_h_transport_partial + S (ff_r_transport) = S ((S (ff_i_transport)) * ff_v_transport)) /\ exists ff_q_transport_partial. ff_u_transport = ff_q_transport_partial * S ((S (ff_i_transport)) * ff_v_transport) + (ff_r_transport))) /\ ((((exists ff_h_transport_successor. ff_h_transport_successor + S (ff_s_transport) = S ((S (S ff_i_transport)) * ff_v_transport)) /\ exists ff_q_transport_successor. ff_u_transport = ff_q_transport_successor * S ((S (S ff_i_transport)) * ff_v_transport) + (ff_s_transport))) /\ ff_s_transport = ff_r_transport * ff_p_transport)))))
specialize beta_product_transport_prefix x
specialize beta_product_transport_prefix x1
specialize beta_product_transport_prefix x2
specialize beta_product_transport_prefix x3
specialize beta_product_transport_prefix e
specialize beta_product_transport_prefix n
apply beta_product_transport_prefix
exact hn_witness_witness_right
intro i
intro p
intro hi
intro hp
specialize beta_repeat_transport_entry x
specialize beta_repeat_transport_entry x1
specialize beta_repeat_transport_entry x2
specialize beta_repeat_transport_entry x3
specialize beta_repeat_transport_entry a
specialize beta_repeat_transport_entry e
have hentries : forall i p. (exists h. h + S i = e) -&gt; (((exists ff_h_pow_transport_l. ff_h_pow_transport_l + S (p) = S ((S (i)) * x1)) /\ exists ff_q_pow_transport_l. x = ff_q_pow_transport_l * S ((S (i)) * x1) + (p))) -&gt; (((exists ff_h_pow_transport_r. ff_h_pow_transport_r + S (p) = S ((S (i)) * x3)) /\ exists ff_q_pow_transport_r. x2 = ff_q_pow_transport_r * S ((S (i)) * x3) + (p)))
apply beta_repeat_transport_entry
exact hn_witness_witness_left
exact hm_witness_witness_left
specialize hentries i
specialize hentries p
apply hentries
exact hi
exact hp
cases htransport
cases htransport_witness
cases hm_witness_witness_right
cases hm_witness_witness_right_witness
specialize beta_product_functional x2
specialize beta_product_functional x3
specialize beta_product_functional e
specialize beta_product_functional n
specialize beta_product_functional x4
specialize beta_product_functional x5
specialize beta_product_functional m
specialize beta_product_functional x6
specialize beta_product_functional x7
apply beta_product_functional
exact htransport_witness_witness
exact hm_witness_witness_right_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,705</dd></div>
        <div><dt>Distinct objects</dt><dd>1,111</dd></div>
        <div><dt>Reused references</dt><dd>40</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>71</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="93be6fa1bf4660de3047ea977bd40d1d2725bbb6805d50cbf783f150d4ab770d">93be6fa1bf46…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_functional">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_functional</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L282">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_functional.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_successor_decompose"
  data-name="pow_successor_decompose" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_product_succ_decompose,beta_repeat_entry_eq,le_refl,le_succ"
  data-search="pow_successor_decompose pow successor decompose a successor relational power is its predecessor power times the base. forall a e se n. se = s e -&gt; (exists ff_b_s ff_c_s. ((forall ff_i_s_repeat. (exists ff_lt_s_repeat_bound. ff_lt_s_repeat_bound + s ff_i_s_repeat = se) -&gt; (((exists ff_h_s_repeat_decoded. ff_h_s_repeat_decoded + s (a) = s ((s (ff_i_s_repeat)) * ff_c_s)) /\ exists ff_q_s_repeat_decoded. ff_b_s = ff_q_s_repeat_decoded * s ((s (ff_i_s_repeat)) * ff_c_s) + (a)))) /\ (exists ff_u_s_product ff_v_s_product. ((((exists ff_h_s_product_start. ff_h_s_product_start + s (1) = s ((s (0)) * ff_v_s_product)) /\ exists ff_q_s_product_start. ff_u_s_product = ff_q_s_product_start * s ((s (0)) * ff_v_s_product) + (1))) /\ ((((exists ff_h_s_product_terminal. ff_h_s_product_terminal + s (n) = s ((s (se)) * ff_v_s_product)) /\ exists ff_q_s_product_terminal. ff_u_s_product = ff_q_s_product_terminal * s ((s (se)) * ff_v_s_product) + (n))) /\ forall ff_i_s_product. (exists ff_lt_s_product_bound. ff_lt_s_product_bound + s ff_i_s_product = se) -&gt; exists ff_p_s_product ff_r_s_product ff_s_s_product. ((((exists ff_h_s_product_factor. ff_h_s_product_factor + s (ff_p_s_product) = s ((s (ff_i_s_product)) * ff_c_s)) /\ exists ff_q_s_product_factor. ff_b_s = ff_q_s_product_factor * s ((s (ff_i_s_product)) * ff_c_s) + (ff_p_s_product))) /\ ((((exists ff_h_s_product_partial. ff_h_s_product_partial + s (ff_r_s_product) = s ((s (ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_partial. ff_u_s_product = ff_q_s_product_partial * s ((s (ff_i_s_product)) * ff_v_s_product) + (ff_r_s_product))) /\ ((((exists ff_h_s_product_successor. ff_h_s_product_successor + s (ff_s_s_product) = s ((s (s ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_successor. ff_u_s_product = ff_q_s_product_successor * s ((s (s ff_i_s_product)) * ff_v_s_product) + (ff_s_s_product))) /\ ff_s_s_product = ff_r_s_product * ff_p_s_product)))))))) -&gt; exists r. (exists ff_b_p ff_c_p. ((forall ff_i_p_repeat. (exists ff_lt_p_repeat_bound. ff_lt_p_repeat_bound + s ff_i_p_repeat = e) -&gt; (((exists ff_h_p_repeat_decoded. ff_h_p_repeat_decoded + s (a) = s ((s (ff_i_p_repeat)) * ff_c_p)) /\ exists ff_q_p_repeat_decoded. ff_b_p = ff_q_p_repeat_decoded * s ((s (ff_i_p_repeat)) * ff_c_p) + (a)))) /\ (exists ff_u_p_product ff_v_p_product. ((((exists ff_h_p_product_start. ff_h_p_product_start + s (1) = s ((s (0)) * ff_v_p_product)) /\ exists ff_q_p_product_start. ff_u_p_product = ff_q_p_product_start * s ((s (0)) * ff_v_p_product) + (1))) /\ ((((exists ff_h_p_product_terminal. ff_h_p_product_terminal + s (r) = s ((s (e)) * ff_v_p_product)) /\ exists ff_q_p_product_terminal. ff_u_p_product = ff_q_p_product_terminal * s ((s (e)) * ff_v_p_product) + (r))) /\ forall ff_i_p_product. (exists ff_lt_p_product_bound. ff_lt_p_product_bound + s ff_i_p_product = e) -&gt; exists ff_p_p_product ff_r_p_product ff_s_p_product. ((((exists ff_h_p_product_factor. ff_h_p_product_factor + s (ff_p_p_product) = s ((s (ff_i_p_product)) * ff_c_p)) /\ exists ff_q_p_product_factor. ff_b_p = ff_q_p_product_factor * s ((s (ff_i_p_product)) * ff_c_p) + (ff_p_p_product))) /\ ((((exists ff_h_p_product_partial. ff_h_p_product_partial + s (ff_r_p_product) = s ((s (ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_partial. ff_u_p_product = ff_q_p_product_partial * s ((s (ff_i_p_product)) * ff_v_p_product) + (ff_r_p_product))) /\ ((((exists ff_h_p_product_successor. ff_h_p_product_successor + s (ff_s_p_product) = s ((s (s ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_successor. ff_u_p_product = ff_q_p_product_successor * s ((s (s ff_i_p_product)) * ff_v_p_product) + (ff_s_p_product))) /\ ff_s_p_product = ff_r_p_product * ff_p_p_product)))))))) /\ n = r * a quadratic_residues beta_product_succ_decompose beta_repeat_entry_eq le_refl le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_successor_decompose</code><span>Pow successor decompose</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor relational power is its predecessor power times the base.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_repeat_entry_eq" href="#theorem-beta_repeat_entry_eq"><code>beta_repeat_entry_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_one_from_zero_successor" href="#theorem-pow_one_from_zero_successor"><code>pow_one_from_zero_successor</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_pair_mul" href="#theorem-pow_successor_pair_mul"><code>pow_successor_pair_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_mod_congruent" href="#theorem-pow_mod_congruent"><code>pow_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_two_from_one_successor" href="#theorem-pow_two_from_one_successor"><code>pow_two_from_one_successor</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_add" href="#theorem-pow_add"><code>pow_add</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_mul_exp" href="#theorem-pow_mul_exp"><code>pow_mul_exp</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_successor_decompose">Copy statement</button>
        <pre id="statement-pow_successor_decompose"><code>forall a e se n. se = S e -&gt; (exists ff_b_s ff_c_s. ((forall ff_i_s_repeat. (exists ff_lt_s_repeat_bound. ff_lt_s_repeat_bound + S ff_i_s_repeat = se) -&gt; (((exists ff_h_s_repeat_decoded. ff_h_s_repeat_decoded + S (a) = S ((S (ff_i_s_repeat)) * ff_c_s)) /\ exists ff_q_s_repeat_decoded. ff_b_s = ff_q_s_repeat_decoded * S ((S (ff_i_s_repeat)) * ff_c_s) + (a)))) /\ (exists ff_u_s_product ff_v_s_product. ((((exists ff_h_s_product_start. ff_h_s_product_start + S (1) = S ((S (0)) * ff_v_s_product)) /\ exists ff_q_s_product_start. ff_u_s_product = ff_q_s_product_start * S ((S (0)) * ff_v_s_product) + (1))) /\ ((((exists ff_h_s_product_terminal. ff_h_s_product_terminal + S (n) = S ((S (se)) * ff_v_s_product)) /\ exists ff_q_s_product_terminal. ff_u_s_product = ff_q_s_product_terminal * S ((S (se)) * ff_v_s_product) + (n))) /\ forall ff_i_s_product. (exists ff_lt_s_product_bound. ff_lt_s_product_bound + S ff_i_s_product = se) -&gt; exists ff_p_s_product ff_r_s_product ff_s_s_product. ((((exists ff_h_s_product_factor. ff_h_s_product_factor + S (ff_p_s_product) = S ((S (ff_i_s_product)) * ff_c_s)) /\ exists ff_q_s_product_factor. ff_b_s = ff_q_s_product_factor * S ((S (ff_i_s_product)) * ff_c_s) + (ff_p_s_product))) /\ ((((exists ff_h_s_product_partial. ff_h_s_product_partial + S (ff_r_s_product) = S ((S (ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_partial. ff_u_s_product = ff_q_s_product_partial * S ((S (ff_i_s_product)) * ff_v_s_product) + (ff_r_s_product))) /\ ((((exists ff_h_s_product_successor. ff_h_s_product_successor + S (ff_s_s_product) = S ((S (S ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_successor. ff_u_s_product = ff_q_s_product_successor * S ((S (S ff_i_s_product)) * ff_v_s_product) + (ff_s_s_product))) /\ ff_s_s_product = ff_r_s_product * ff_p_s_product)))))))) -&gt; exists r. (exists ff_b_p ff_c_p. ((forall ff_i_p_repeat. (exists ff_lt_p_repeat_bound. ff_lt_p_repeat_bound + S ff_i_p_repeat = e) -&gt; (((exists ff_h_p_repeat_decoded. ff_h_p_repeat_decoded + S (a) = S ((S (ff_i_p_repeat)) * ff_c_p)) /\ exists ff_q_p_repeat_decoded. ff_b_p = ff_q_p_repeat_decoded * S ((S (ff_i_p_repeat)) * ff_c_p) + (a)))) /\ (exists ff_u_p_product ff_v_p_product. ((((exists ff_h_p_product_start. ff_h_p_product_start + S (1) = S ((S (0)) * ff_v_p_product)) /\ exists ff_q_p_product_start. ff_u_p_product = ff_q_p_product_start * S ((S (0)) * ff_v_p_product) + (1))) /\ ((((exists ff_h_p_product_terminal. ff_h_p_product_terminal + S (r) = S ((S (e)) * ff_v_p_product)) /\ exists ff_q_p_product_terminal. ff_u_p_product = ff_q_p_product_terminal * S ((S (e)) * ff_v_p_product) + (r))) /\ forall ff_i_p_product. (exists ff_lt_p_product_bound. ff_lt_p_product_bound + S ff_i_p_product = e) -&gt; exists ff_p_p_product ff_r_p_product ff_s_p_product. ((((exists ff_h_p_product_factor. ff_h_p_product_factor + S (ff_p_p_product) = S ((S (ff_i_p_product)) * ff_c_p)) /\ exists ff_q_p_product_factor. ff_b_p = ff_q_p_product_factor * S ((S (ff_i_p_product)) * ff_c_p) + (ff_p_p_product))) /\ ((((exists ff_h_p_product_partial. ff_h_p_product_partial + S (ff_r_p_product) = S ((S (ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_partial. ff_u_p_product = ff_q_p_product_partial * S ((S (ff_i_p_product)) * ff_v_p_product) + (ff_r_p_product))) /\ ((((exists ff_h_p_product_successor. ff_h_p_product_successor + S (ff_s_p_product) = S ((S (S ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_successor. ff_u_p_product = ff_q_p_product_successor * S ((S (S ff_i_p_product)) * ff_v_p_product) + (ff_s_p_product))) /\ ff_s_p_product = ff_r_p_product * ff_p_p_product)))))))) /\ n = r * a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_successor_decompose">Copy proof</button>
        <pre id="proof-pow_successor_decompose"><code>pa prove forall a e se n. se = S e -&gt; (exists ff_b_s ff_c_s. ((forall ff_i_s_repeat. (exists ff_lt_s_repeat_bound. ff_lt_s_repeat_bound + S ff_i_s_repeat = se) -&gt; (((exists ff_h_s_repeat_decoded. ff_h_s_repeat_decoded + S (a) = S ((S (ff_i_s_repeat)) * ff_c_s)) /\ exists ff_q_s_repeat_decoded. ff_b_s = ff_q_s_repeat_decoded * S ((S (ff_i_s_repeat)) * ff_c_s) + (a)))) /\ (exists ff_u_s_product ff_v_s_product. ((((exists ff_h_s_product_start. ff_h_s_product_start + S (1) = S ((S (0)) * ff_v_s_product)) /\ exists ff_q_s_product_start. ff_u_s_product = ff_q_s_product_start * S ((S (0)) * ff_v_s_product) + (1))) /\ ((((exists ff_h_s_product_terminal. ff_h_s_product_terminal + S (n) = S ((S (se)) * ff_v_s_product)) /\ exists ff_q_s_product_terminal. ff_u_s_product = ff_q_s_product_terminal * S ((S (se)) * ff_v_s_product) + (n))) /\ forall ff_i_s_product. (exists ff_lt_s_product_bound. ff_lt_s_product_bound + S ff_i_s_product = se) -&gt; exists ff_p_s_product ff_r_s_product ff_s_s_product. ((((exists ff_h_s_product_factor. ff_h_s_product_factor + S (ff_p_s_product) = S ((S (ff_i_s_product)) * ff_c_s)) /\ exists ff_q_s_product_factor. ff_b_s = ff_q_s_product_factor * S ((S (ff_i_s_product)) * ff_c_s) + (ff_p_s_product))) /\ ((((exists ff_h_s_product_partial. ff_h_s_product_partial + S (ff_r_s_product) = S ((S (ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_partial. ff_u_s_product = ff_q_s_product_partial * S ((S (ff_i_s_product)) * ff_v_s_product) + (ff_r_s_product))) /\ ((((exists ff_h_s_product_successor. ff_h_s_product_successor + S (ff_s_s_product) = S ((S (S ff_i_s_product)) * ff_v_s_product)) /\ exists ff_q_s_product_successor. ff_u_s_product = ff_q_s_product_successor * S ((S (S ff_i_s_product)) * ff_v_s_product) + (ff_s_s_product))) /\ ff_s_s_product = ff_r_s_product * ff_p_s_product)))))))) -&gt; exists r. (exists ff_b_p ff_c_p. ((forall ff_i_p_repeat. (exists ff_lt_p_repeat_bound. ff_lt_p_repeat_bound + S ff_i_p_repeat = e) -&gt; (((exists ff_h_p_repeat_decoded. ff_h_p_repeat_decoded + S (a) = S ((S (ff_i_p_repeat)) * ff_c_p)) /\ exists ff_q_p_repeat_decoded. ff_b_p = ff_q_p_repeat_decoded * S ((S (ff_i_p_repeat)) * ff_c_p) + (a)))) /\ (exists ff_u_p_product ff_v_p_product. ((((exists ff_h_p_product_start. ff_h_p_product_start + S (1) = S ((S (0)) * ff_v_p_product)) /\ exists ff_q_p_product_start. ff_u_p_product = ff_q_p_product_start * S ((S (0)) * ff_v_p_product) + (1))) /\ ((((exists ff_h_p_product_terminal. ff_h_p_product_terminal + S (r) = S ((S (e)) * ff_v_p_product)) /\ exists ff_q_p_product_terminal. ff_u_p_product = ff_q_p_product_terminal * S ((S (e)) * ff_v_p_product) + (r))) /\ forall ff_i_p_product. (exists ff_lt_p_product_bound. ff_lt_p_product_bound + S ff_i_p_product = e) -&gt; exists ff_p_p_product ff_r_p_product ff_s_p_product. ((((exists ff_h_p_product_factor. ff_h_p_product_factor + S (ff_p_p_product) = S ((S (ff_i_p_product)) * ff_c_p)) /\ exists ff_q_p_product_factor. ff_b_p = ff_q_p_product_factor * S ((S (ff_i_p_product)) * ff_c_p) + (ff_p_p_product))) /\ ((((exists ff_h_p_product_partial. ff_h_p_product_partial + S (ff_r_p_product) = S ((S (ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_partial. ff_u_p_product = ff_q_p_product_partial * S ((S (ff_i_p_product)) * ff_v_p_product) + (ff_r_p_product))) /\ ((((exists ff_h_p_product_successor. ff_h_p_product_successor + S (ff_s_p_product) = S ((S (S ff_i_p_product)) * ff_v_p_product)) /\ exists ff_q_p_product_successor. ff_u_p_product = ff_q_p_product_successor * S ((S (S ff_i_p_product)) * ff_v_p_product) + (ff_s_p_product))) /\ ff_s_p_product = ff_r_p_product * ff_p_p_product)))))))) /\ n = r * a
use beta_product_succ_decompose
use beta_repeat_entry_eq
use le_refl
use le_succ
intro a
intro e
intro se
intro n
intro hse
intro hpow
rewrite hse at hpow
rewrite hse at hpow
rewrite hse at hpow
rewrite hse at hpow
cases hpow
cases hpow_witness
cases hpow_witness_witness
have hdecomp : exists p r. (((exists ff_h_pow_succ_factor. ff_h_pow_succ_factor + S (p) = S ((S (e)) * x1)) /\ exists ff_q_pow_succ_factor. x = ff_q_pow_succ_factor * S ((S (e)) * x1) + (p))) /\ ((exists ff_u_pow_succ_prefix ff_v_pow_succ_prefix. ((((exists ff_h_pow_succ_prefix_start. ff_h_pow_succ_prefix_start + S (1) = S ((S (0)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_start. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_start * S ((S (0)) * ff_v_pow_succ_prefix) + (1))) /\ ((((exists ff_h_pow_succ_prefix_terminal. ff_h_pow_succ_prefix_terminal + S (r) = S ((S (e)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_terminal. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_terminal * S ((S (e)) * ff_v_pow_succ_prefix) + (r))) /\ forall ff_i_pow_succ_prefix. (exists ff_lt_pow_succ_prefix_bound. ff_lt_pow_succ_prefix_bound + S ff_i_pow_succ_prefix = e) -&gt; exists ff_p_pow_succ_prefix ff_r_pow_succ_prefix ff_s_pow_succ_prefix. ((((exists ff_h_pow_succ_prefix_factor. ff_h_pow_succ_prefix_factor + S (ff_p_pow_succ_prefix) = S ((S (ff_i_pow_succ_prefix)) * x1)) /\ exists ff_q_pow_succ_prefix_factor. x = ff_q_pow_succ_prefix_factor * S ((S (ff_i_pow_succ_prefix)) * x1) + (ff_p_pow_succ_prefix))) /\ ((((exists ff_h_pow_succ_prefix_partial. ff_h_pow_succ_prefix_partial + S (ff_r_pow_succ_prefix) = S ((S (ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_partial. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_partial * S ((S (ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix) + (ff_r_pow_succ_prefix))) /\ ((((exists ff_h_pow_succ_prefix_successor. ff_h_pow_succ_prefix_successor + S (ff_s_pow_succ_prefix) = S ((S (S ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix)) /\ exists ff_q_pow_succ_prefix_successor. ff_u_pow_succ_prefix = ff_q_pow_succ_prefix_successor * S ((S (S ff_i_pow_succ_prefix)) * ff_v_pow_succ_prefix) + (ff_s_pow_succ_prefix))) /\ ff_s_pow_succ_prefix = ff_r_pow_succ_prefix * ff_p_pow_succ_prefix)))))) /\ n = r * p)
specialize beta_product_succ_decompose x
specialize beta_product_succ_decompose x1
specialize beta_product_succ_decompose e
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hpow_witness_witness_right
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hpa : x2 = a
specialize beta_repeat_entry_eq x
specialize beta_repeat_entry_eq x1
specialize beta_repeat_entry_eq a
specialize beta_repeat_entry_eq (S e)
specialize beta_repeat_entry_eq e
specialize beta_repeat_entry_eq x2
apply beta_repeat_entry_eq
exact hpow_witness_witness_left
specialize le_refl (S e)
exact le_refl
exact hdecomp_witness_witness_left
exists x3
split
exists x
exists x1
split
intro i
intro hi
specialize hpow_witness_witness_left i
apply hpow_witness_witness_left
specialize le_succ (S i)
specialize le_succ e
apply le_succ
exact hi
exact hdecomp_witness_witness_right_left
trans x3 * x2
exact hdecomp_witness_witness_right_right
rewrite hpa
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,541</dd></div>
        <div><dt>Distinct objects</dt><dd>882</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>72</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="70defcae97b2be790af783d9f5f6ca51a853b585ac28ab575dddf8be61fd51ef">70defcae97b2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_successor_decompose">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_successor_decompose</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_fold_theorems.py#L350">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_successor_decompose.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_range_empty"
  data-name="beta_range_empty" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero"
  data-search="beta_range_empty beta range empty every consecutive beta range of length zero is vacuous. forall b c a l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + s ff_i_empty = l) -&gt; (((exists ff_h_empty_decoded. ff_h_empty_decoded + s (a + ff_i_empty) = s ((s (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * s ((s (ff_i_empty)) * c) + (a + ff_i_empty)))) quadratic_residues add_eq_zero_right succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_range_empty</code><span>Beta range empty</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every consecutive beta range of length zero is vacuous.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_exists" href="#theorem-beta_range_exists"><code>beta_range_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_range_empty">Copy statement</button>
        <pre id="statement-beta_range_empty"><code>forall b c a l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -&gt; (((exists ff_h_empty_decoded. ff_h_empty_decoded + S (a + ff_i_empty) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (a + ff_i_empty))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_range_empty">Copy proof</button>
        <pre id="proof-beta_range_empty"><code>pa prove forall b c a l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -&gt; (((exists ff_h_empty_decoded. ff_h_empty_decoded + S (a + ff_i_empty) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (a + ff_i_empty))))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro a
intro l
intro hl
intro i
intro hi
rewrite hl at hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>42</dd></div>
        <div><dt>Distinct objects</dt><dd>42</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d7a576b1da6fcef8b29a6bf86207452945753824cb92ff89aae6d7fe79ff1265">d7a576b1da6f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_range_empty">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_range_empty</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_range_theorems.py#L39">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_range_empty.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_range_succ_extend"
  data-name="beta_range_succ_extend" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_prefix_extend,le_of_succ_le_succ,le_eq_or_lt"
  data-search="beta_range_succ_extend beta range succ extend recode a consecutive prefix and append its next value. forall b c a l sl. sl = s l -&gt; (forall ff_i_before. (exists ff_lt_before_bound. ff_lt_before_bound + s ff_i_before = l) -&gt; (((exists ff_h_before_decoded. ff_h_before_decoded + s (a + ff_i_before) = s ((s (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * s ((s (ff_i_before)) * c) + (a + ff_i_before)))) -&gt; exists z d. (forall ff_i_after. (exists ff_lt_after_bound. ff_lt_after_bound + s ff_i_after = sl) -&gt; (((exists ff_h_after_decoded. ff_h_after_decoded + s (a + ff_i_after) = s ((s (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * s ((s (ff_i_after)) * d) + (a + ff_i_after)))) quadratic_residues beta_prefix_extend le_of_succ_le_succ le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_range_succ_extend</code><span>Beta range succ extend</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Recode a consecutive prefix and append its next value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_exists" href="#theorem-beta_range_exists"><code>beta_range_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_range_succ_extend">Copy statement</button>
        <pre id="statement-beta_range_succ_extend"><code>forall b c a l sl. sl = S l -&gt; (forall ff_i_before. (exists ff_lt_before_bound. ff_lt_before_bound + S ff_i_before = l) -&gt; (((exists ff_h_before_decoded. ff_h_before_decoded + S (a + ff_i_before) = S ((S (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * S ((S (ff_i_before)) * c) + (a + ff_i_before)))) -&gt; exists z d. (forall ff_i_after. (exists ff_lt_after_bound. ff_lt_after_bound + S ff_i_after = sl) -&gt; (((exists ff_h_after_decoded. ff_h_after_decoded + S (a + ff_i_after) = S ((S (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * S ((S (ff_i_after)) * d) + (a + ff_i_after))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_range_succ_extend">Copy proof</button>
        <pre id="proof-beta_range_succ_extend"><code>pa prove forall b c a l sl. sl = S l -&gt; (forall ff_i_before. (exists ff_lt_before_bound. ff_lt_before_bound + S ff_i_before = l) -&gt; (((exists ff_h_before_decoded. ff_h_before_decoded + S (a + ff_i_before) = S ((S (ff_i_before)) * c)) /\ exists ff_q_before_decoded. b = ff_q_before_decoded * S ((S (ff_i_before)) * c) + (a + ff_i_before)))) -&gt; exists z d. (forall ff_i_after. (exists ff_lt_after_bound. ff_lt_after_bound + S ff_i_after = sl) -&gt; (((exists ff_h_after_decoded. ff_h_after_decoded + S (a + ff_i_after) = S ((S (ff_i_after)) * d)) /\ exists ff_q_after_decoded. z = ff_q_after_decoded * S ((S (ff_i_after)) * d) + (a + ff_i_after))))
use beta_prefix_extend
use le_of_succ_le_succ
use le_eq_or_lt
intro b
intro c
intro a
intro l
intro sl
intro hsl
intro hrange
specialize beta_prefix_extend l
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend (a + l)
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x
exists x1
intro i
intro hi
rewrite hsl at hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
rewrite hsplit_left
rewrite hsplit_left
rewrite hsplit_left
rewrite hsplit_left
exact beta_prefix_extend_witness_witness_left
specialize beta_prefix_extend_witness_witness_right i
specialize beta_prefix_extend_witness_witness_right (a + i)
apply beta_prefix_extend_witness_witness_right
exact hsplit_right
specialize hrange i
apply hrange
exact hsplit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,230</dd></div>
        <div><dt>Distinct objects</dt><dd>4,567</dd></div>
        <div><dt>Reused references</dt><dd>227</dd></div>
        <div><dt>Depth</dt><dd>81</dd></div>
        <div><dt>Cuts</dt><dd>873</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="379e8d00134002e845e23c567247d38c4c15530d1501caa87471297a2cd1875c">379e8d001340…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_range_succ_extend">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_range_succ_extend</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_range_theorems.py#L65">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_range_succ_extend.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_range_exists"
  data-name="beta_range_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_range_empty,beta_range_succ_extend"
  data-search="beta_range_exists beta range exists every start and length admit a beta-coded consecutive range. forall a l. exists b c. (forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + s ff_i_r = l) -&gt; (((exists ff_h_r_decoded. ff_h_r_decoded + s (a + ff_i_r) = s ((s (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * s ((s (ff_i_r)) * c) + (a + ff_i_r)))) quadratic_residues beta_range_empty beta_range_succ_extend">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_range_exists</code><span>Beta range exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every start and length admit a beta-coded consecutive range.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_empty" href="#theorem-beta_range_empty"><code>beta_range_empty</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_succ_extend" href="#theorem-beta_range_succ_extend"><code>beta_range_succ_extend</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="factorial_exists" href="#theorem-factorial_exists"><code>factorial_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_range_exists">Copy statement</button>
        <pre id="statement-beta_range_exists"><code>forall a l. exists b c. (forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -&gt; (((exists ff_h_r_decoded. ff_h_r_decoded + S (a + ff_i_r) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * S ((S (ff_i_r)) * c) + (a + ff_i_r))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_range_exists">Copy proof</button>
        <pre id="proof-beta_range_exists"><code>pa prove forall a l. exists b c. (forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -&gt; (((exists ff_h_r_decoded. ff_h_r_decoded + S (a + ff_i_r) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_decoded. b = ff_q_r_decoded * S ((S (ff_i_r)) * c) + (a + ff_i_r))))
use beta_range_empty
use beta_range_succ_extend
intro a
induction l
exists 0
exists 0
specialize beta_range_empty 0
specialize beta_range_empty 0
specialize beta_range_empty a
specialize beta_range_empty 0
apply beta_range_empty
refl
cases IH
cases IH_witness
specialize beta_range_succ_extend x
specialize beta_range_succ_extend x1
specialize beta_range_succ_extend a
specialize beta_range_succ_extend l
specialize beta_range_succ_extend (S l)
apply beta_range_succ_extend
refl
exact IH_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,328</dd></div>
        <div><dt>Distinct objects</dt><dd>4,645</dd></div>
        <div><dt>Reused references</dt><dd>229</dd></div>
        <div><dt>Depth</dt><dd>83</dd></div>
        <div><dt>Cuts</dt><dd>877</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a1cbdd3326ccbf802b30d91c23ff7fe7717a69bcfa7f7eaaae2a268e6d56f98f">a1cbdd3326cc…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_range_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_range_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_range_theorems.py#L120">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_range_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_range_entry_eq"
  data-name="beta_range_entry_eq" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_at_unique"
  data-search="beta_range_entry_eq beta range entry eq a decoded entry of a range prefix is its start plus its index. forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + s ff_i_entry = l) -&gt; (((exists ff_h_entry_decoded. ff_h_entry_decoded + s (a + ff_i_entry) = s ((s (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * s ((s (ff_i_entry)) * c) + (a + ff_i_entry)))) -&gt; (exists h. h + s i = l) -&gt; (((exists ff_h_range_entry_x. ff_h_range_entry_x + s (x) = s ((s (i)) * c)) /\ exists ff_q_range_entry_x. b = ff_q_range_entry_x * s ((s (i)) * c) + (x))) -&gt; x = a + i quadratic_residues beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_range_entry_eq</code><span>Beta range entry eq</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A decoded entry of a Range prefix is its start plus its index.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_transport_entry" href="#theorem-beta_range_transport_entry"><code>beta_range_transport_entry</code></a> <a class="pa-theorem-chip" data-theorem-link="factorial_succ_decompose" href="#theorem-factorial_succ_decompose"><code>factorial_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_injective" href="#theorem-beta_range_injective"><code>beta_range_injective</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_range_entry_eq">Copy statement</button>
        <pre id="statement-beta_range_entry_eq"><code>forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + S ff_i_entry = l) -&gt; (((exists ff_h_entry_decoded. ff_h_entry_decoded + S (a + ff_i_entry) = S ((S (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * S ((S (ff_i_entry)) * c) + (a + ff_i_entry)))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_range_entry_x. ff_h_range_entry_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_range_entry_x. b = ff_q_range_entry_x * S ((S (i)) * c) + (x))) -&gt; x = a + i</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_range_entry_eq">Copy proof</button>
        <pre id="proof-beta_range_entry_eq"><code>pa prove forall b c a l i x. (forall ff_i_entry. (exists ff_lt_entry_bound. ff_lt_entry_bound + S ff_i_entry = l) -&gt; (((exists ff_h_entry_decoded. ff_h_entry_decoded + S (a + ff_i_entry) = S ((S (ff_i_entry)) * c)) /\ exists ff_q_entry_decoded. b = ff_q_entry_decoded * S ((S (ff_i_entry)) * c) + (a + ff_i_entry)))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_range_entry_x. ff_h_range_entry_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_range_entry_x. b = ff_q_range_entry_x * S ((S (i)) * c) + (x))) -&gt; x = a + i
use beta_at_unique
intro b
intro c
intro a
intro l
intro i
intro x
intro hrange
intro hi
intro hx
have ha : ((exists h. h + S (a + i) = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + (a + i))
specialize hrange i
apply hrange
exact hi
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique (a + i)
apply beta_at_unique
exact hx
exact ha
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,144</dd></div>
        <div><dt>Distinct objects</dt><dd>715</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>31</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0dd30bba2db7ddd37e91ff3593b30818794468f07465da15a44715e5ed2cd68d">0dd30bba2db7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_range_entry_eq">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_range_entry_eq</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_range_theorems.py#L148">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_range_entry_eq.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_range_transport_entry"
  data-name="beta_range_transport_entry" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_range_entry_eq"
  data-search="beta_range_transport_entry beta range transport entry two range codes preserve every decoded entry extensionally. forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + s ff_i_transport_l = l) -&gt; (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + s (a + ff_i_transport_l) = s ((s (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * s ((s (ff_i_transport_l)) * c) + (a + ff_i_transport_l)))) -&gt; (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + s ff_i_transport_r = l) -&gt; (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + s (a + ff_i_transport_r) = s ((s (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * s ((s (ff_i_transport_r)) * d) + (a + ff_i_transport_r)))) -&gt; forall i x. (exists h. h + s i = l) -&gt; (((exists ff_h_range_transport_x. ff_h_range_transport_x + s (x) = s ((s (i)) * c)) /\ exists ff_q_range_transport_x. b = ff_q_range_transport_x * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_range_transport_y. ff_h_range_transport_y + s (x) = s ((s (i)) * d)) /\ exists ff_q_range_transport_y. z = ff_q_range_transport_y * s ((s (i)) * d) + (x))) quadratic_residues beta_range_entry_eq">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_range_transport_entry</code><span>Beta range transport entry</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two Range codes preserve every decoded entry extensionally.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_entry_eq" href="#theorem-beta_range_entry_eq"><code>beta_range_entry_eq</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="factorial_functional" href="#theorem-factorial_functional"><code>factorial_functional</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_range_transport_entry">Copy statement</button>
        <pre id="statement-beta_range_transport_entry"><code>forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -&gt; (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a + ff_i_transport_l) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a + ff_i_transport_l)))) -&gt; (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -&gt; (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a + ff_i_transport_r) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a + ff_i_transport_r)))) -&gt; forall i x. (exists h. h + S i = l) -&gt; (((exists ff_h_range_transport_x. ff_h_range_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_range_transport_x. b = ff_q_range_transport_x * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_range_transport_y. ff_h_range_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_range_transport_y. z = ff_q_range_transport_y * S ((S (i)) * d) + (x)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_range_transport_entry">Copy proof</button>
        <pre id="proof-beta_range_transport_entry"><code>pa prove forall b c z d a l. (forall ff_i_transport_l. (exists ff_lt_transport_l_bound. ff_lt_transport_l_bound + S ff_i_transport_l = l) -&gt; (((exists ff_h_transport_l_decoded. ff_h_transport_l_decoded + S (a + ff_i_transport_l) = S ((S (ff_i_transport_l)) * c)) /\ exists ff_q_transport_l_decoded. b = ff_q_transport_l_decoded * S ((S (ff_i_transport_l)) * c) + (a + ff_i_transport_l)))) -&gt; (forall ff_i_transport_r. (exists ff_lt_transport_r_bound. ff_lt_transport_r_bound + S ff_i_transport_r = l) -&gt; (((exists ff_h_transport_r_decoded. ff_h_transport_r_decoded + S (a + ff_i_transport_r) = S ((S (ff_i_transport_r)) * d)) /\ exists ff_q_transport_r_decoded. z = ff_q_transport_r_decoded * S ((S (ff_i_transport_r)) * d) + (a + ff_i_transport_r)))) -&gt; forall i x. (exists h. h + S i = l) -&gt; (((exists ff_h_range_transport_x. ff_h_range_transport_x + S (x) = S ((S (i)) * c)) /\ exists ff_q_range_transport_x. b = ff_q_range_transport_x * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_range_transport_y. ff_h_range_transport_y + S (x) = S ((S (i)) * d)) /\ exists ff_q_range_transport_y. z = ff_q_range_transport_y * S ((S (i)) * d) + (x)))
use beta_range_entry_eq
intro b
intro c
intro z
intro d
intro a
intro l
intro hleft
intro hright
intro i
intro x
intro hi
intro hx
have hxa : x = a + i
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq a
specialize beta_range_entry_eq l
specialize beta_range_entry_eq i
specialize beta_range_entry_eq x
apply beta_range_entry_eq
exact hleft
exact hi
exact hx
rewrite hxa
rewrite hxa
specialize hright i
apply hright
exact hi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,191</dd></div>
        <div><dt>Distinct objects</dt><dd>762</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>32</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fcaeff825005b453533ca04bdd3881882dceb46b841fdccbce0e0973a622bb9a">fcaeff825005…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_range_transport_entry">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_range_transport_entry</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_range_theorems.py#L179">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_range_transport_entry.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_sum_trace_exists"
  data-name="beta_prefix_sum_trace_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_at_self_of_bound,add_eq_zero_right,succ_ne_zero,beta_at_exists,beta_prefix_extend,zero_le,succ_le_succ,le_refl,le_of_succ_le_succ,le_eq_or_lt,one_mul"
  data-search="beta_prefix_sum_trace_exists beta prefix sum trace exists every decoded beta prefix admits an exact beta-coded prefix-sum trace. forall b c l. exists fs_u_trace fs_v_trace. ((((exists fs_h_trace_start. fs_h_trace_start + s (0) = s ((s (0)) * fs_v_trace)) /\ exists fs_q_trace_start. fs_u_trace = fs_q_trace_start * s ((s (0)) * fs_v_trace) + (0))) /\ forall fs_i_trace_steps. (exists fs_lt_trace_steps_bound. fs_lt_trace_steps_bound + s fs_i_trace_steps = l) -&gt; exists fs_a_trace_steps fs_r_trace_steps fs_s_trace_steps. ((((exists fs_h_trace_steps_summand. fs_h_trace_steps_summand + s (fs_a_trace_steps) = s ((s (fs_i_trace_steps)) * c)) /\ exists fs_q_trace_steps_summand. b = fs_q_trace_steps_summand * s ((s (fs_i_trace_steps)) * c) + (fs_a_trace_steps))) /\ ((((exists fs_h_trace_steps_partial. fs_h_trace_steps_partial + s (fs_r_trace_steps) = s ((s (fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_partial. fs_u_trace = fs_q_trace_steps_partial * s ((s (fs_i_trace_steps)) * fs_v_trace) + (fs_r_trace_steps))) /\ ((((exists fs_h_trace_steps_successor. fs_h_trace_steps_successor + s (fs_s_trace_steps) = s ((s (s fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_successor. fs_u_trace = fs_q_trace_steps_successor * s ((s (s fs_i_trace_steps)) * fs_v_trace) + (fs_s_trace_steps))) /\ fs_s_trace_steps = fs_r_trace_steps + fs_a_trace_steps)))) quadratic_residues beta_at_self_of_bound add_eq_zero_right succ_ne_zero beta_at_exists beta_prefix_extend zero_le succ_le_succ le_refl le_of_succ_le_succ le_eq_or_lt one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_sum_trace_exists</code><span>Beta prefix sum trace exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded beta prefix admits an exact beta-coded prefix-sum trace.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_self_of_bound" href="#theorem-beta_at_self_of_bound"><code>beta_at_self_of_bound</code></a> <a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_le" href="#theorem-zero_le"><code>zero_le</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_le_succ" href="#theorem-succ_le_succ"><code>succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_exists" href="#theorem-beta_sum_exists"><code>beta_sum_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_sum_trace_exists">Copy statement</button>
        <pre id="statement-beta_prefix_sum_trace_exists"><code>forall b c l. exists fs_u_trace fs_v_trace. ((((exists fs_h_trace_start. fs_h_trace_start + S (0) = S ((S (0)) * fs_v_trace)) /\ exists fs_q_trace_start. fs_u_trace = fs_q_trace_start * S ((S (0)) * fs_v_trace) + (0))) /\ forall fs_i_trace_steps. (exists fs_lt_trace_steps_bound. fs_lt_trace_steps_bound + S fs_i_trace_steps = l) -&gt; exists fs_a_trace_steps fs_r_trace_steps fs_s_trace_steps. ((((exists fs_h_trace_steps_summand. fs_h_trace_steps_summand + S (fs_a_trace_steps) = S ((S (fs_i_trace_steps)) * c)) /\ exists fs_q_trace_steps_summand. b = fs_q_trace_steps_summand * S ((S (fs_i_trace_steps)) * c) + (fs_a_trace_steps))) /\ ((((exists fs_h_trace_steps_partial. fs_h_trace_steps_partial + S (fs_r_trace_steps) = S ((S (fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_partial. fs_u_trace = fs_q_trace_steps_partial * S ((S (fs_i_trace_steps)) * fs_v_trace) + (fs_r_trace_steps))) /\ ((((exists fs_h_trace_steps_successor. fs_h_trace_steps_successor + S (fs_s_trace_steps) = S ((S (S fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_successor. fs_u_trace = fs_q_trace_steps_successor * S ((S (S fs_i_trace_steps)) * fs_v_trace) + (fs_s_trace_steps))) /\ fs_s_trace_steps = fs_r_trace_steps + fs_a_trace_steps))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_sum_trace_exists">Copy proof</button>
        <pre id="proof-beta_prefix_sum_trace_exists"><code>pa prove forall b c l. exists fs_u_trace fs_v_trace. ((((exists fs_h_trace_start. fs_h_trace_start + S (0) = S ((S (0)) * fs_v_trace)) /\ exists fs_q_trace_start. fs_u_trace = fs_q_trace_start * S ((S (0)) * fs_v_trace) + (0))) /\ forall fs_i_trace_steps. (exists fs_lt_trace_steps_bound. fs_lt_trace_steps_bound + S fs_i_trace_steps = l) -&gt; exists fs_a_trace_steps fs_r_trace_steps fs_s_trace_steps. ((((exists fs_h_trace_steps_summand. fs_h_trace_steps_summand + S (fs_a_trace_steps) = S ((S (fs_i_trace_steps)) * c)) /\ exists fs_q_trace_steps_summand. b = fs_q_trace_steps_summand * S ((S (fs_i_trace_steps)) * c) + (fs_a_trace_steps))) /\ ((((exists fs_h_trace_steps_partial. fs_h_trace_steps_partial + S (fs_r_trace_steps) = S ((S (fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_partial. fs_u_trace = fs_q_trace_steps_partial * S ((S (fs_i_trace_steps)) * fs_v_trace) + (fs_r_trace_steps))) /\ ((((exists fs_h_trace_steps_successor. fs_h_trace_steps_successor + S (fs_s_trace_steps) = S ((S (S fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_successor. fs_u_trace = fs_q_trace_steps_successor * S ((S (S fs_i_trace_steps)) * fs_v_trace) + (fs_s_trace_steps))) /\ fs_s_trace_steps = fs_r_trace_steps + fs_a_trace_steps))))
use beta_at_self_of_bound
use add_eq_zero_right
use succ_ne_zero
use beta_at_exists
use beta_prefix_extend
use zero_le
use succ_le_succ
use le_refl
use le_of_succ_le_succ
use le_eq_or_lt
use one_mul
intro b
intro c
induction l
exists 0
exists 1
split
specialize beta_at_self_of_bound 1
specialize beta_at_self_of_bound 0
specialize beta_at_self_of_bound 0
apply beta_at_self_of_bound
specialize one_mul 1
rewrite one_mul
specialize succ_le_succ 0
specialize succ_le_succ (S 0)
apply succ_le_succ
specialize zero_le (S 0)
exact zero_le
intro i
intro hi
exfalso
cases hi
have hsi0 : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi0
have htrace : exists fs_u_induction fs_v_induction. ((((exists fs_h_induction_start. fs_h_induction_start + S (0) = S ((S (0)) * fs_v_induction)) /\ exists fs_q_induction_start. fs_u_induction = fs_q_induction_start * S ((S (0)) * fs_v_induction) + (0))) /\ forall fs_i_induction_steps. (exists fs_lt_induction_steps_bound. fs_lt_induction_steps_bound + S fs_i_induction_steps = l) -&gt; exists fs_a_induction_steps fs_r_induction_steps fs_s_induction_steps. ((((exists fs_h_induction_steps_summand. fs_h_induction_steps_summand + S (fs_a_induction_steps) = S ((S (fs_i_induction_steps)) * c)) /\ exists fs_q_induction_steps_summand. b = fs_q_induction_steps_summand * S ((S (fs_i_induction_steps)) * c) + (fs_a_induction_steps))) /\ ((((exists fs_h_induction_steps_partial. fs_h_induction_steps_partial + S (fs_r_induction_steps) = S ((S (fs_i_induction_steps)) * fs_v_induction)) /\ exists fs_q_induction_steps_partial. fs_u_induction = fs_q_induction_steps_partial * S ((S (fs_i_induction_steps)) * fs_v_induction) + (fs_r_induction_steps))) /\ ((((exists fs_h_induction_steps_successor. fs_h_induction_steps_successor + S (fs_s_induction_steps) = S ((S (S fs_i_induction_steps)) * fs_v_induction)) /\ exists fs_q_induction_steps_successor. fs_u_induction = fs_q_induction_steps_successor * S ((S (S fs_i_induction_steps)) * fs_v_induction) + (fs_s_induction_steps))) /\ fs_s_induction_steps = fs_r_induction_steps + fs_a_induction_steps))))
apply IH
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hfactor : exists p. ((exists fs_h_trace_factor. fs_h_trace_factor + S (p) = S ((S (l)) * c)) /\ exists fs_q_trace_factor. b = fs_q_trace_factor * S ((S (l)) * c) + (p))
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists l
exact beta_at_exists
cases hfactor
have hlast : exists r. ((exists fs_h_trace_last. fs_h_trace_last + S (r) = S ((S (l)) * x1)) /\ exists fs_q_trace_last. x = fs_q_trace_last * S ((S (l)) * x1) + (r))
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hlast
have hext : exists z v. ((((exists fs_h_trace_extension. fs_h_trace_extension + S (x3 + x2) = S ((S (S l)) * v)) /\ exists fs_q_trace_extension. z = fs_q_trace_extension * S ((S (S l)) * v) + (x3 + x2))) /\ forall i a. (exists h. h + S i = S l) -&gt; (((exists fs_h_trace_old. fs_h_trace_old + S (a) = S ((S (i)) * x1)) /\ exists fs_q_trace_old. x = fs_q_trace_old * S ((S (i)) * x1) + (a))) -&gt; (((exists fs_h_trace_new. fs_h_trace_new + S (a) = S ((S (i)) * v)) /\ exists fs_q_trace_new. z = fs_q_trace_new * S ((S (i)) * v) + (a))))
specialize beta_prefix_extend (S l)
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend (x3 + x2)
exact beta_prefix_extend
cases hext
cases hext_witness
cases hext_witness_witness
exists x4
exists x5
split
specialize hext_witness_witness_right 0
specialize hext_witness_witness_right 0
apply hext_witness_witness_right
have h0 : exists h. h + S 0 = S l
have hzero : exists h. h + 0 = l
specialize zero_le l
exact zero_le
specialize succ_le_succ 0
specialize succ_le_succ l
apply succ_le_succ
exact hzero
exact h0
exact htrace_witness_witness_left
intro i
intro hi
have hil : exists h. h + i = l
specialize le_of_succ_le_succ i
specialize le_of_succ_le_succ l
apply le_of_succ_le_succ
exact hi
have hsplit : i = l \/ exists h. h + S i = l
specialize le_eq_or_lt i
specialize le_eq_or_lt l
apply le_eq_or_lt
exact hil
cases hsplit
exists x2
exists x3
exists x3 + x2
split
rewrite hsplit_left
rewrite hsplit_left
exact hfactor_witness
split
rewrite hsplit_left
rewrite hsplit_left
specialize hext_witness_witness_right l
specialize hext_witness_witness_right x3
apply hext_witness_witness_right
specialize le_refl (S l)
exact le_refl
exact hlast_witness
split
rewrite hsplit_left
rewrite hsplit_left
exact hext_witness_witness_left
refl
have hold : exists p r s. ((((exists fs_h_trace_hold_factor. fs_h_trace_hold_factor + S (p) = S ((S (i)) * c)) /\ exists fs_q_trace_hold_factor. b = fs_q_trace_hold_factor * S ((S (i)) * c) + (p))) /\ ((((exists fs_h_trace_hold_partial. fs_h_trace_hold_partial + S (r) = S ((S (i)) * x1)) /\ exists fs_q_trace_hold_partial. x = fs_q_trace_hold_partial * S ((S (i)) * x1) + (r))) /\ ((((exists fs_h_trace_hold_successor. fs_h_trace_hold_successor + S (s) = S ((S (S i)) * x1)) /\ exists fs_q_trace_hold_successor. x = fs_q_trace_hold_successor * S ((S (S i)) * x1) + (s))) /\ s = r + p)))
specialize htrace_witness_witness_right i
apply htrace_witness_witness_right
exact hsplit_right
cases hold
cases hold_witness
cases hold_witness_witness
cases hold_witness_witness_witness
cases hold_witness_witness_witness_right
cases hold_witness_witness_witness_right_right
exists x6
exists x7
exists x8
split
exact hold_witness_witness_witness_left
split
specialize hext_witness_witness_right i
specialize hext_witness_witness_right x7
apply hext_witness_witness_right
exact hi
exact hold_witness_witness_witness_right_left
split
specialize hext_witness_witness_right (S i)
specialize hext_witness_witness_right x8
apply hext_witness_witness_right
specialize succ_le_succ (S i)
specialize succ_le_succ l
apply succ_le_succ
exact hsplit_right
exact hold_witness_witness_witness_right_right_left
exact hold_witness_witness_witness_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>29,985</dd></div>
        <div><dt>Distinct objects</dt><dd>4,721</dd></div>
        <div><dt>Reused references</dt><dd>235</dd></div>
        <div><dt>Depth</dt><dd>85</dd></div>
        <div><dt>Cuts</dt><dd>899</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d0c3456472f12091ed185b0737a6884d967227d85b3bda37bf829c54ab9ac26b">d0c3456472f1…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_sum_trace_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_sum_trace_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_sum_theorems.py#L132">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_sum_trace_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sum_exists"
  data-name="beta_sum_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_prefix_sum_trace_exists,beta_at_exists"
  data-search="beta_sum_exists beta sum exists every decoded beta prefix has a relational finite sum. forall b c l. exists n. (exists ff_u_x ff_v_x. ((((exists ff_h_x_start. ff_h_x_start + s (0) = s ((s (0)) * ff_v_x)) /\ exists ff_q_x_start. ff_u_x = ff_q_x_start * s ((s (0)) * ff_v_x) + (0))) /\ ((((exists ff_h_x_terminal. ff_h_x_terminal + s (n) = s ((s (l)) * ff_v_x)) /\ exists ff_q_x_terminal. ff_u_x = ff_q_x_terminal * s ((s (l)) * ff_v_x) + (n))) /\ forall ff_i_x. (exists ff_lt_x_bound. ff_lt_x_bound + s ff_i_x = l) -&gt; exists ff_a_x ff_r_x ff_s_x. ((((exists ff_h_x_summand. ff_h_x_summand + s (ff_a_x) = s ((s (ff_i_x)) * c)) /\ exists ff_q_x_summand. b = ff_q_x_summand * s ((s (ff_i_x)) * c) + (ff_a_x))) /\ ((((exists ff_h_x_partial. ff_h_x_partial + s (ff_r_x) = s ((s (ff_i_x)) * ff_v_x)) /\ exists ff_q_x_partial. ff_u_x = ff_q_x_partial * s ((s (ff_i_x)) * ff_v_x) + (ff_r_x))) /\ ((((exists ff_h_x_successor. ff_h_x_successor + s (ff_s_x) = s ((s (s ff_i_x)) * ff_v_x)) /\ exists ff_q_x_successor. ff_u_x = ff_q_x_successor * s ((s (s ff_i_x)) * ff_v_x) + (ff_s_x))) /\ ff_s_x = ff_r_x + ff_a_x)))))) quadratic_residues beta_prefix_sum_trace_exists beta_at_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sum_exists</code><span>Beta sum exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded beta prefix has a relational finite sum.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_sum_trace_exists" href="#theorem-beta_prefix_sum_trace_exists"><code>beta_prefix_sum_trace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_exists_unique" href="#theorem-beta_sum_exists_unique"><code>beta_sum_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_exists" href="#theorem-bit_count_exists"><code>bit_count_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sum_exists">Copy statement</button>
        <pre id="statement-beta_sum_exists"><code>forall b c l. exists n. (exists ff_u_x ff_v_x. ((((exists ff_h_x_start. ff_h_x_start + S (0) = S ((S (0)) * ff_v_x)) /\ exists ff_q_x_start. ff_u_x = ff_q_x_start * S ((S (0)) * ff_v_x) + (0))) /\ ((((exists ff_h_x_terminal. ff_h_x_terminal + S (n) = S ((S (l)) * ff_v_x)) /\ exists ff_q_x_terminal. ff_u_x = ff_q_x_terminal * S ((S (l)) * ff_v_x) + (n))) /\ forall ff_i_x. (exists ff_lt_x_bound. ff_lt_x_bound + S ff_i_x = l) -&gt; exists ff_a_x ff_r_x ff_s_x. ((((exists ff_h_x_summand. ff_h_x_summand + S (ff_a_x) = S ((S (ff_i_x)) * c)) /\ exists ff_q_x_summand. b = ff_q_x_summand * S ((S (ff_i_x)) * c) + (ff_a_x))) /\ ((((exists ff_h_x_partial. ff_h_x_partial + S (ff_r_x) = S ((S (ff_i_x)) * ff_v_x)) /\ exists ff_q_x_partial. ff_u_x = ff_q_x_partial * S ((S (ff_i_x)) * ff_v_x) + (ff_r_x))) /\ ((((exists ff_h_x_successor. ff_h_x_successor + S (ff_s_x) = S ((S (S ff_i_x)) * ff_v_x)) /\ exists ff_q_x_successor. ff_u_x = ff_q_x_successor * S ((S (S ff_i_x)) * ff_v_x) + (ff_s_x))) /\ ff_s_x = ff_r_x + ff_a_x))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sum_exists">Copy proof</button>
        <pre id="proof-beta_sum_exists"><code>pa prove forall b c l. exists n. (exists ff_u_x ff_v_x. ((((exists ff_h_x_start. ff_h_x_start + S (0) = S ((S (0)) * ff_v_x)) /\ exists ff_q_x_start. ff_u_x = ff_q_x_start * S ((S (0)) * ff_v_x) + (0))) /\ ((((exists ff_h_x_terminal. ff_h_x_terminal + S (n) = S ((S (l)) * ff_v_x)) /\ exists ff_q_x_terminal. ff_u_x = ff_q_x_terminal * S ((S (l)) * ff_v_x) + (n))) /\ forall ff_i_x. (exists ff_lt_x_bound. ff_lt_x_bound + S ff_i_x = l) -&gt; exists ff_a_x ff_r_x ff_s_x. ((((exists ff_h_x_summand. ff_h_x_summand + S (ff_a_x) = S ((S (ff_i_x)) * c)) /\ exists ff_q_x_summand. b = ff_q_x_summand * S ((S (ff_i_x)) * c) + (ff_a_x))) /\ ((((exists ff_h_x_partial. ff_h_x_partial + S (ff_r_x) = S ((S (ff_i_x)) * ff_v_x)) /\ exists ff_q_x_partial. ff_u_x = ff_q_x_partial * S ((S (ff_i_x)) * ff_v_x) + (ff_r_x))) /\ ((((exists ff_h_x_successor. ff_h_x_successor + S (ff_s_x) = S ((S (S ff_i_x)) * ff_v_x)) /\ exists ff_q_x_successor. ff_u_x = ff_q_x_successor * S ((S (S ff_i_x)) * ff_v_x) + (ff_s_x))) /\ ff_s_x = ff_r_x + ff_a_x))))))
use beta_prefix_sum_trace_exists
use beta_at_exists
intro b
intro c
intro l
have htrace : exists fs_u_exists_trace fs_v_exists_trace. ((((exists fs_h_exists_trace_start. fs_h_exists_trace_start + S (0) = S ((S (0)) * fs_v_exists_trace)) /\ exists fs_q_exists_trace_start. fs_u_exists_trace = fs_q_exists_trace_start * S ((S (0)) * fs_v_exists_trace) + (0))) /\ forall fs_i_exists_trace_steps. (exists fs_lt_exists_trace_steps_bound. fs_lt_exists_trace_steps_bound + S fs_i_exists_trace_steps = l) -&gt; exists fs_a_exists_trace_steps fs_r_exists_trace_steps fs_s_exists_trace_steps. ((((exists fs_h_exists_trace_steps_summand. fs_h_exists_trace_steps_summand + S (fs_a_exists_trace_steps) = S ((S (fs_i_exists_trace_steps)) * c)) /\ exists fs_q_exists_trace_steps_summand. b = fs_q_exists_trace_steps_summand * S ((S (fs_i_exists_trace_steps)) * c) + (fs_a_exists_trace_steps))) /\ ((((exists fs_h_exists_trace_steps_partial. fs_h_exists_trace_steps_partial + S (fs_r_exists_trace_steps) = S ((S (fs_i_exists_trace_steps)) * fs_v_exists_trace)) /\ exists fs_q_exists_trace_steps_partial. fs_u_exists_trace = fs_q_exists_trace_steps_partial * S ((S (fs_i_exists_trace_steps)) * fs_v_exists_trace) + (fs_r_exists_trace_steps))) /\ ((((exists fs_h_exists_trace_steps_successor. fs_h_exists_trace_steps_successor + S (fs_s_exists_trace_steps) = S ((S (S fs_i_exists_trace_steps)) * fs_v_exists_trace)) /\ exists fs_q_exists_trace_steps_successor. fs_u_exists_trace = fs_q_exists_trace_steps_successor * S ((S (S fs_i_exists_trace_steps)) * fs_v_exists_trace) + (fs_s_exists_trace_steps))) /\ fs_s_exists_trace_steps = fs_r_exists_trace_steps + fs_a_exists_trace_steps))))
specialize beta_prefix_sum_trace_exists b
specialize beta_prefix_sum_trace_exists c
specialize beta_prefix_sum_trace_exists l
exact beta_prefix_sum_trace_exists
cases htrace
cases htrace_witness
cases htrace_witness_witness
have hterminal : exists n. ((exists fs_h_sum_terminal. fs_h_sum_terminal + S (n) = S ((S (l)) * x1)) /\ exists fs_q_sum_terminal. x = fs_q_sum_terminal * S ((S (l)) * x1) + (n))
specialize beta_at_exists x
specialize beta_at_exists x1
specialize beta_at_exists l
exact beta_at_exists
cases hterminal
exists x2
exists x
exists x1
split
exact htrace_witness_witness_left
split
exact hterminal_witness
exact htrace_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>30,491</dd></div>
        <div><dt>Distinct objects</dt><dd>4,748</dd></div>
        <div><dt>Reused references</dt><dd>236</dd></div>
        <div><dt>Depth</dt><dd>86</dd></div>
        <div><dt>Cuts</dt><dd>916</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b3c6bf491d9c8bb564b0e471edefed7e908d30fc0134b688001f533d5070a403">b3c6bf491d9c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sum_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sum_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_sum_theorems.py#L296">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sum_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sum_trace_functional"
  data-name="beta_sum_trace_functional" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_at_unique,le_refl,le_succ,add_congr"
  data-search="beta_sum_trace_functional beta sum trace functional two exact prefix-sum traces over one decoded prefix have equal endpoints. forall b c l n u v m w d. (((((exists fs_h_functional_left_start. fs_h_functional_left_start + s (0) = s ((s (0)) * v)) /\ exists fs_q_functional_left_start. u = fs_q_functional_left_start * s ((s (0)) * v) + (0))) /\ ((((exists fs_h_functional_left_terminal. fs_h_functional_left_terminal + s (n) = s ((s (l)) * v)) /\ exists fs_q_functional_left_terminal. u = fs_q_functional_left_terminal * s ((s (l)) * v) + (n))) /\ forall fs_i_functional_left_steps. (exists fs_lt_functional_left_steps_bound. fs_lt_functional_left_steps_bound + s fs_i_functional_left_steps = l) -&gt; exists fs_a_functional_left_steps fs_r_functional_left_steps fs_s_functional_left_steps. ((((exists fs_h_functional_left_steps_summand. fs_h_functional_left_steps_summand + s (fs_a_functional_left_steps) = s ((s (fs_i_functional_left_steps)) * c)) /\ exists fs_q_functional_left_steps_summand. b = fs_q_functional_left_steps_summand * s ((s (fs_i_functional_left_steps)) * c) + (fs_a_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_partial. fs_h_functional_left_steps_partial + s (fs_r_functional_left_steps) = s ((s (fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_partial. u = fs_q_functional_left_steps_partial * s ((s (fs_i_functional_left_steps)) * v) + (fs_r_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_successor. fs_h_functional_left_steps_successor + s (fs_s_functional_left_steps) = s ((s (s fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_successor. u = fs_q_functional_left_steps_successor * s ((s (s fs_i_functional_left_steps)) * v) + (fs_s_functional_left_steps))) /\ fs_s_functional_left_steps = fs_r_functional_left_steps + fs_a_functional_left_steps)))))) -&gt; (((((exists fs_h_functional_right_start. fs_h_functional_right_start + s (0) = s ((s (0)) * d)) /\ exists fs_q_functional_right_start. w = fs_q_functional_right_start * s ((s (0)) * d) + (0))) /\ ((((exists fs_h_functional_right_terminal. fs_h_functional_right_terminal + s (m) = s ((s (l)) * d)) /\ exists fs_q_functional_right_terminal. w = fs_q_functional_right_terminal * s ((s (l)) * d) + (m))) /\ forall fs_i_functional_right_steps. (exists fs_lt_functional_right_steps_bound. fs_lt_functional_right_steps_bound + s fs_i_functional_right_steps = l) -&gt; exists fs_a_functional_right_steps fs_r_functional_right_steps fs_s_functional_right_steps. ((((exists fs_h_functional_right_steps_summand. fs_h_functional_right_steps_summand + s (fs_a_functional_right_steps) = s ((s (fs_i_functional_right_steps)) * c)) /\ exists fs_q_functional_right_steps_summand. b = fs_q_functional_right_steps_summand * s ((s (fs_i_functional_right_steps)) * c) + (fs_a_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_partial. fs_h_functional_right_steps_partial + s (fs_r_functional_right_steps) = s ((s (fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_partial. w = fs_q_functional_right_steps_partial * s ((s (fs_i_functional_right_steps)) * d) + (fs_r_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_successor. fs_h_functional_right_steps_successor + s (fs_s_functional_right_steps) = s ((s (s fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_successor. w = fs_q_functional_right_steps_successor * s ((s (s fs_i_functional_right_steps)) * d) + (fs_s_functional_right_steps))) /\ fs_s_functional_right_steps = fs_r_functional_right_steps + fs_a_functional_right_steps)))))) -&gt; n = m quadratic_residues beta_at_unique le_refl le_succ add_congr">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sum_trace_functional</code><span>Beta sum trace functional</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two exact prefix-sum traces over one decoded prefix have equal endpoints.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="add_congr" href="#theorem-add_congr"><code>add_congr</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_functional" href="#theorem-beta_sum_functional"><code>beta_sum_functional</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sum_trace_functional">Copy statement</button>
        <pre id="statement-beta_sum_trace_functional"><code>forall b c l n u v m w d. (((((exists fs_h_functional_left_start. fs_h_functional_left_start + S (0) = S ((S (0)) * v)) /\ exists fs_q_functional_left_start. u = fs_q_functional_left_start * S ((S (0)) * v) + (0))) /\ ((((exists fs_h_functional_left_terminal. fs_h_functional_left_terminal + S (n) = S ((S (l)) * v)) /\ exists fs_q_functional_left_terminal. u = fs_q_functional_left_terminal * S ((S (l)) * v) + (n))) /\ forall fs_i_functional_left_steps. (exists fs_lt_functional_left_steps_bound. fs_lt_functional_left_steps_bound + S fs_i_functional_left_steps = l) -&gt; exists fs_a_functional_left_steps fs_r_functional_left_steps fs_s_functional_left_steps. ((((exists fs_h_functional_left_steps_summand. fs_h_functional_left_steps_summand + S (fs_a_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * c)) /\ exists fs_q_functional_left_steps_summand. b = fs_q_functional_left_steps_summand * S ((S (fs_i_functional_left_steps)) * c) + (fs_a_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_partial. fs_h_functional_left_steps_partial + S (fs_r_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_partial. u = fs_q_functional_left_steps_partial * S ((S (fs_i_functional_left_steps)) * v) + (fs_r_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_successor. fs_h_functional_left_steps_successor + S (fs_s_functional_left_steps) = S ((S (S fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_successor. u = fs_q_functional_left_steps_successor * S ((S (S fs_i_functional_left_steps)) * v) + (fs_s_functional_left_steps))) /\ fs_s_functional_left_steps = fs_r_functional_left_steps + fs_a_functional_left_steps)))))) -&gt; (((((exists fs_h_functional_right_start. fs_h_functional_right_start + S (0) = S ((S (0)) * d)) /\ exists fs_q_functional_right_start. w = fs_q_functional_right_start * S ((S (0)) * d) + (0))) /\ ((((exists fs_h_functional_right_terminal. fs_h_functional_right_terminal + S (m) = S ((S (l)) * d)) /\ exists fs_q_functional_right_terminal. w = fs_q_functional_right_terminal * S ((S (l)) * d) + (m))) /\ forall fs_i_functional_right_steps. (exists fs_lt_functional_right_steps_bound. fs_lt_functional_right_steps_bound + S fs_i_functional_right_steps = l) -&gt; exists fs_a_functional_right_steps fs_r_functional_right_steps fs_s_functional_right_steps. ((((exists fs_h_functional_right_steps_summand. fs_h_functional_right_steps_summand + S (fs_a_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * c)) /\ exists fs_q_functional_right_steps_summand. b = fs_q_functional_right_steps_summand * S ((S (fs_i_functional_right_steps)) * c) + (fs_a_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_partial. fs_h_functional_right_steps_partial + S (fs_r_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_partial. w = fs_q_functional_right_steps_partial * S ((S (fs_i_functional_right_steps)) * d) + (fs_r_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_successor. fs_h_functional_right_steps_successor + S (fs_s_functional_right_steps) = S ((S (S fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_successor. w = fs_q_functional_right_steps_successor * S ((S (S fs_i_functional_right_steps)) * d) + (fs_s_functional_right_steps))) /\ fs_s_functional_right_steps = fs_r_functional_right_steps + fs_a_functional_right_steps)))))) -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sum_trace_functional">Copy proof</button>
        <pre id="proof-beta_sum_trace_functional"><code>pa prove forall b c l n u v m w d. (((((exists fs_h_functional_left_start. fs_h_functional_left_start + S (0) = S ((S (0)) * v)) /\ exists fs_q_functional_left_start. u = fs_q_functional_left_start * S ((S (0)) * v) + (0))) /\ ((((exists fs_h_functional_left_terminal. fs_h_functional_left_terminal + S (n) = S ((S (l)) * v)) /\ exists fs_q_functional_left_terminal. u = fs_q_functional_left_terminal * S ((S (l)) * v) + (n))) /\ forall fs_i_functional_left_steps. (exists fs_lt_functional_left_steps_bound. fs_lt_functional_left_steps_bound + S fs_i_functional_left_steps = l) -&gt; exists fs_a_functional_left_steps fs_r_functional_left_steps fs_s_functional_left_steps. ((((exists fs_h_functional_left_steps_summand. fs_h_functional_left_steps_summand + S (fs_a_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * c)) /\ exists fs_q_functional_left_steps_summand. b = fs_q_functional_left_steps_summand * S ((S (fs_i_functional_left_steps)) * c) + (fs_a_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_partial. fs_h_functional_left_steps_partial + S (fs_r_functional_left_steps) = S ((S (fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_partial. u = fs_q_functional_left_steps_partial * S ((S (fs_i_functional_left_steps)) * v) + (fs_r_functional_left_steps))) /\ ((((exists fs_h_functional_left_steps_successor. fs_h_functional_left_steps_successor + S (fs_s_functional_left_steps) = S ((S (S fs_i_functional_left_steps)) * v)) /\ exists fs_q_functional_left_steps_successor. u = fs_q_functional_left_steps_successor * S ((S (S fs_i_functional_left_steps)) * v) + (fs_s_functional_left_steps))) /\ fs_s_functional_left_steps = fs_r_functional_left_steps + fs_a_functional_left_steps)))))) -&gt; (((((exists fs_h_functional_right_start. fs_h_functional_right_start + S (0) = S ((S (0)) * d)) /\ exists fs_q_functional_right_start. w = fs_q_functional_right_start * S ((S (0)) * d) + (0))) /\ ((((exists fs_h_functional_right_terminal. fs_h_functional_right_terminal + S (m) = S ((S (l)) * d)) /\ exists fs_q_functional_right_terminal. w = fs_q_functional_right_terminal * S ((S (l)) * d) + (m))) /\ forall fs_i_functional_right_steps. (exists fs_lt_functional_right_steps_bound. fs_lt_functional_right_steps_bound + S fs_i_functional_right_steps = l) -&gt; exists fs_a_functional_right_steps fs_r_functional_right_steps fs_s_functional_right_steps. ((((exists fs_h_functional_right_steps_summand. fs_h_functional_right_steps_summand + S (fs_a_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * c)) /\ exists fs_q_functional_right_steps_summand. b = fs_q_functional_right_steps_summand * S ((S (fs_i_functional_right_steps)) * c) + (fs_a_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_partial. fs_h_functional_right_steps_partial + S (fs_r_functional_right_steps) = S ((S (fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_partial. w = fs_q_functional_right_steps_partial * S ((S (fs_i_functional_right_steps)) * d) + (fs_r_functional_right_steps))) /\ ((((exists fs_h_functional_right_steps_successor. fs_h_functional_right_steps_successor + S (fs_s_functional_right_steps) = S ((S (S fs_i_functional_right_steps)) * d)) /\ exists fs_q_functional_right_steps_successor. w = fs_q_functional_right_steps_successor * S ((S (S fs_i_functional_right_steps)) * d) + (fs_s_functional_right_steps))) /\ fs_s_functional_right_steps = fs_r_functional_right_steps + fs_a_functional_right_steps)))))) -&gt; n = m
use beta_at_unique
use le_refl
use le_succ
use add_congr
intro b
intro c
induction l
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
have hn : n = 0
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 0
apply beta_at_unique
exact h1_right_left
exact h1_left
have hm : m = 0
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique 0
specialize beta_at_unique m
specialize beta_at_unique 0
apply beta_at_unique
exact h2_right_left
exact h2_left
trans 0
exact hn
symm
exact hm
intro n
intro u
intro v
intro m
intro w
intro d
intro h1
intro h2
cases h1
cases h1_right
cases h2
cases h2_right
have hstep1 : exists a r s. ((((exists fs_h_functional_step1_factor. fs_h_functional_step1_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_functional_step1_factor. b = fs_q_functional_step1_factor * S ((S (l)) * c) + (a))) /\ ((((exists fs_h_functional_step1_partial. fs_h_functional_step1_partial + S (r) = S ((S (l)) * v)) /\ exists fs_q_functional_step1_partial. u = fs_q_functional_step1_partial * S ((S (l)) * v) + (r))) /\ ((((exists fs_h_functional_step1_successor. fs_h_functional_step1_successor + S (s) = S ((S (S l)) * v)) /\ exists fs_q_functional_step1_successor. u = fs_q_functional_step1_successor * S ((S (S l)) * v) + (s))) /\ s = r + a)))
specialize h1_right_right l
apply h1_right_right
specialize le_refl (S l)
exact le_refl
cases hstep1
cases hstep1_witness
cases hstep1_witness_witness
cases hstep1_witness_witness_witness
cases hstep1_witness_witness_witness_right
cases hstep1_witness_witness_witness_right_right
have hstep2 : exists a r s. ((((exists fs_h_functional_step2_factor. fs_h_functional_step2_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_functional_step2_factor. b = fs_q_functional_step2_factor * S ((S (l)) * c) + (a))) /\ ((((exists fs_h_functional_step2_partial. fs_h_functional_step2_partial + S (r) = S ((S (l)) * d)) /\ exists fs_q_functional_step2_partial. w = fs_q_functional_step2_partial * S ((S (l)) * d) + (r))) /\ ((((exists fs_h_functional_step2_successor. fs_h_functional_step2_successor + S (s) = S ((S (S l)) * d)) /\ exists fs_q_functional_step2_successor. w = fs_q_functional_step2_successor * S ((S (S l)) * d) + (s))) /\ s = r + a)))
specialize h2_right_right l
apply h2_right_right
specialize le_refl (S l)
exact le_refl
cases hstep2
cases hstep2_witness
cases hstep2_witness_witness
cases hstep2_witness_witness_witness
cases hstep2_witness_witness_witness_right
cases hstep2_witness_witness_witness_right_right
have hn : n = x2
specialize beta_at_unique u
specialize beta_at_unique v
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x2
apply beta_at_unique
exact h1_right_left
exact hstep1_witness_witness_witness_right_right_left
have hm : m = x5
specialize beta_at_unique w
specialize beta_at_unique d
specialize beta_at_unique (S l)
specialize beta_at_unique m
specialize beta_at_unique x5
apply beta_at_unique
exact h2_right_left
exact hstep2_witness_witness_witness_right_right_left
have ha : x = x3
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x3
apply beta_at_unique
exact hstep1_witness_witness_witness_left
exact hstep2_witness_witness_witness_left
have hsum1 : ((((exists fs_h_functional_prefix1_start. fs_h_functional_prefix1_start + S (0) = S ((S (0)) * v)) /\ exists fs_q_functional_prefix1_start. u = fs_q_functional_prefix1_start * S ((S (0)) * v) + (0))) /\ ((((exists fs_h_functional_prefix1_terminal. fs_h_functional_prefix1_terminal + S (x1) = S ((S (l)) * v)) /\ exists fs_q_functional_prefix1_terminal. u = fs_q_functional_prefix1_terminal * S ((S (l)) * v) + (x1))) /\ forall fs_i_functional_prefix1_steps. (exists fs_lt_functional_prefix1_steps_bound. fs_lt_functional_prefix1_steps_bound + S fs_i_functional_prefix1_steps = l) -&gt; exists fs_a_functional_prefix1_steps fs_r_functional_prefix1_steps fs_s_functional_prefix1_steps. ((((exists fs_h_functional_prefix1_steps_summand. fs_h_functional_prefix1_steps_summand + S (fs_a_functional_prefix1_steps) = S ((S (fs_i_functional_prefix1_steps)) * c)) /\ exists fs_q_functional_prefix1_steps_summand. b = fs_q_functional_prefix1_steps_summand * S ((S (fs_i_functional_prefix1_steps)) * c) + (fs_a_functional_prefix1_steps))) /\ ((((exists fs_h_functional_prefix1_steps_partial. fs_h_functional_prefix1_steps_partial + S (fs_r_functional_prefix1_steps) = S ((S (fs_i_functional_prefix1_steps)) * v)) /\ exists fs_q_functional_prefix1_steps_partial. u = fs_q_functional_prefix1_steps_partial * S ((S (fs_i_functional_prefix1_steps)) * v) + (fs_r_functional_prefix1_steps))) /\ ((((exists fs_h_functional_prefix1_steps_successor. fs_h_functional_prefix1_steps_successor + S (fs_s_functional_prefix1_steps) = S ((S (S fs_i_functional_prefix1_steps)) * v)) /\ exists fs_q_functional_prefix1_steps_successor. u = fs_q_functional_prefix1_steps_successor * S ((S (S fs_i_functional_prefix1_steps)) * v) + (fs_s_functional_prefix1_steps))) /\ fs_s_functional_prefix1_steps = fs_r_functional_prefix1_steps + fs_a_functional_prefix1_steps)))))
split
exact h1_left
split
exact hstep1_witness_witness_witness_right_left
intro i
intro hi
specialize h1_right_right i
apply h1_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
have hsum2 : ((((exists fs_h_functional_prefix2_start. fs_h_functional_prefix2_start + S (0) = S ((S (0)) * d)) /\ exists fs_q_functional_prefix2_start. w = fs_q_functional_prefix2_start * S ((S (0)) * d) + (0))) /\ ((((exists fs_h_functional_prefix2_terminal. fs_h_functional_prefix2_terminal + S (x4) = S ((S (l)) * d)) /\ exists fs_q_functional_prefix2_terminal. w = fs_q_functional_prefix2_terminal * S ((S (l)) * d) + (x4))) /\ forall fs_i_functional_prefix2_steps. (exists fs_lt_functional_prefix2_steps_bound. fs_lt_functional_prefix2_steps_bound + S fs_i_functional_prefix2_steps = l) -&gt; exists fs_a_functional_prefix2_steps fs_r_functional_prefix2_steps fs_s_functional_prefix2_steps. ((((exists fs_h_functional_prefix2_steps_summand. fs_h_functional_prefix2_steps_summand + S (fs_a_functional_prefix2_steps) = S ((S (fs_i_functional_prefix2_steps)) * c)) /\ exists fs_q_functional_prefix2_steps_summand. b = fs_q_functional_prefix2_steps_summand * S ((S (fs_i_functional_prefix2_steps)) * c) + (fs_a_functional_prefix2_steps))) /\ ((((exists fs_h_functional_prefix2_steps_partial. fs_h_functional_prefix2_steps_partial + S (fs_r_functional_prefix2_steps) = S ((S (fs_i_functional_prefix2_steps)) * d)) /\ exists fs_q_functional_prefix2_steps_partial. w = fs_q_functional_prefix2_steps_partial * S ((S (fs_i_functional_prefix2_steps)) * d) + (fs_r_functional_prefix2_steps))) /\ ((((exists fs_h_functional_prefix2_steps_successor. fs_h_functional_prefix2_steps_successor + S (fs_s_functional_prefix2_steps) = S ((S (S fs_i_functional_prefix2_steps)) * d)) /\ exists fs_q_functional_prefix2_steps_successor. w = fs_q_functional_prefix2_steps_successor * S ((S (S fs_i_functional_prefix2_steps)) * d) + (fs_s_functional_prefix2_steps))) /\ fs_s_functional_prefix2_steps = fs_r_functional_prefix2_steps + fs_a_functional_prefix2_steps)))))
split
exact h2_left
split
exact hstep2_witness_witness_witness_right_left
intro i
intro hi
specialize h2_right_right i
apply h2_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
have hprev : x1 = x4
specialize IH x1
specialize IH u
specialize IH v
specialize IH x4
specialize IH w
specialize IH d
apply IH
exact hsum1
exact hsum2
have hadd : x1 + x = x4 + x3
specialize add_congr x1
specialize add_congr x4
specialize add_congr x
specialize add_congr x3
apply add_congr
exact hprev
exact ha
trans x2
exact hn
trans x1 + x
exact hstep1_witness_witness_witness_right_right_right
trans x4 + x3
exact hadd
trans x5
symm
exact hstep2_witness_witness_witness_right_right_right
symm
exact hm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,382</dd></div>
        <div><dt>Distinct objects</dt><dd>909</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>36</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="239426e5d78c3e12a3387cbea7c23be561987a39b75c68063ba10d13c4cee0a6">239426e5d78c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sum_trace_functional">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sum_trace_functional</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_sum_theorems.py#L329">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sum_trace_functional.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sum_functional"
  data-name="beta_sum_functional" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_sum_trace_functional"
  data-search="beta_sum_functional beta sum functional the relational finite sum has a unique natural value. forall b c l n m. (exists ff_u_l ff_v_l. ((((exists ff_h_l_start. ff_h_l_start + s (0) = s ((s (0)) * ff_v_l)) /\ exists ff_q_l_start. ff_u_l = ff_q_l_start * s ((s (0)) * ff_v_l) + (0))) /\ ((((exists ff_h_l_terminal. ff_h_l_terminal + s (n) = s ((s (l)) * ff_v_l)) /\ exists ff_q_l_terminal. ff_u_l = ff_q_l_terminal * s ((s (l)) * ff_v_l) + (n))) /\ forall ff_i_l. (exists ff_lt_l_bound. ff_lt_l_bound + s ff_i_l = l) -&gt; exists ff_a_l ff_r_l ff_s_l. ((((exists ff_h_l_summand. ff_h_l_summand + s (ff_a_l) = s ((s (ff_i_l)) * c)) /\ exists ff_q_l_summand. b = ff_q_l_summand * s ((s (ff_i_l)) * c) + (ff_a_l))) /\ ((((exists ff_h_l_partial. ff_h_l_partial + s (ff_r_l) = s ((s (ff_i_l)) * ff_v_l)) /\ exists ff_q_l_partial. ff_u_l = ff_q_l_partial * s ((s (ff_i_l)) * ff_v_l) + (ff_r_l))) /\ ((((exists ff_h_l_successor. ff_h_l_successor + s (ff_s_l) = s ((s (s ff_i_l)) * ff_v_l)) /\ exists ff_q_l_successor. ff_u_l = ff_q_l_successor * s ((s (s ff_i_l)) * ff_v_l) + (ff_s_l))) /\ ff_s_l = ff_r_l + ff_a_l)))))) -&gt; (exists ff_u_r ff_v_r. ((((exists ff_h_r_start. ff_h_r_start + s (0) = s ((s (0)) * ff_v_r)) /\ exists ff_q_r_start. ff_u_r = ff_q_r_start * s ((s (0)) * ff_v_r) + (0))) /\ ((((exists ff_h_r_terminal. ff_h_r_terminal + s (m) = s ((s (l)) * ff_v_r)) /\ exists ff_q_r_terminal. ff_u_r = ff_q_r_terminal * s ((s (l)) * ff_v_r) + (m))) /\ forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + s ff_i_r = l) -&gt; exists ff_a_r ff_r_r ff_s_r. ((((exists ff_h_r_summand. ff_h_r_summand + s (ff_a_r) = s ((s (ff_i_r)) * c)) /\ exists ff_q_r_summand. b = ff_q_r_summand * s ((s (ff_i_r)) * c) + (ff_a_r))) /\ ((((exists ff_h_r_partial. ff_h_r_partial + s (ff_r_r) = s ((s (ff_i_r)) * ff_v_r)) /\ exists ff_q_r_partial. ff_u_r = ff_q_r_partial * s ((s (ff_i_r)) * ff_v_r) + (ff_r_r))) /\ ((((exists ff_h_r_successor. ff_h_r_successor + s (ff_s_r) = s ((s (s ff_i_r)) * ff_v_r)) /\ exists ff_q_r_successor. ff_u_r = ff_q_r_successor * s ((s (s ff_i_r)) * ff_v_r) + (ff_s_r))) /\ ff_s_r = ff_r_r + ff_a_r)))))) -&gt; n = m quadratic_residues beta_sum_trace_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sum_functional</code><span>Beta sum functional</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The relational finite sum has a unique natural value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_trace_functional" href="#theorem-beta_sum_trace_functional"><code>beta_sum_trace_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_exists_unique" href="#theorem-beta_sum_exists_unique"><code>beta_sum_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_functional" href="#theorem-bit_count_functional"><code>bit_count_functional</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sum_functional">Copy statement</button>
        <pre id="statement-beta_sum_functional"><code>forall b c l n m. (exists ff_u_l ff_v_l. ((((exists ff_h_l_start. ff_h_l_start + S (0) = S ((S (0)) * ff_v_l)) /\ exists ff_q_l_start. ff_u_l = ff_q_l_start * S ((S (0)) * ff_v_l) + (0))) /\ ((((exists ff_h_l_terminal. ff_h_l_terminal + S (n) = S ((S (l)) * ff_v_l)) /\ exists ff_q_l_terminal. ff_u_l = ff_q_l_terminal * S ((S (l)) * ff_v_l) + (n))) /\ forall ff_i_l. (exists ff_lt_l_bound. ff_lt_l_bound + S ff_i_l = l) -&gt; exists ff_a_l ff_r_l ff_s_l. ((((exists ff_h_l_summand. ff_h_l_summand + S (ff_a_l) = S ((S (ff_i_l)) * c)) /\ exists ff_q_l_summand. b = ff_q_l_summand * S ((S (ff_i_l)) * c) + (ff_a_l))) /\ ((((exists ff_h_l_partial. ff_h_l_partial + S (ff_r_l) = S ((S (ff_i_l)) * ff_v_l)) /\ exists ff_q_l_partial. ff_u_l = ff_q_l_partial * S ((S (ff_i_l)) * ff_v_l) + (ff_r_l))) /\ ((((exists ff_h_l_successor. ff_h_l_successor + S (ff_s_l) = S ((S (S ff_i_l)) * ff_v_l)) /\ exists ff_q_l_successor. ff_u_l = ff_q_l_successor * S ((S (S ff_i_l)) * ff_v_l) + (ff_s_l))) /\ ff_s_l = ff_r_l + ff_a_l)))))) -&gt; (exists ff_u_r ff_v_r. ((((exists ff_h_r_start. ff_h_r_start + S (0) = S ((S (0)) * ff_v_r)) /\ exists ff_q_r_start. ff_u_r = ff_q_r_start * S ((S (0)) * ff_v_r) + (0))) /\ ((((exists ff_h_r_terminal. ff_h_r_terminal + S (m) = S ((S (l)) * ff_v_r)) /\ exists ff_q_r_terminal. ff_u_r = ff_q_r_terminal * S ((S (l)) * ff_v_r) + (m))) /\ forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -&gt; exists ff_a_r ff_r_r ff_s_r. ((((exists ff_h_r_summand. ff_h_r_summand + S (ff_a_r) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_summand. b = ff_q_r_summand * S ((S (ff_i_r)) * c) + (ff_a_r))) /\ ((((exists ff_h_r_partial. ff_h_r_partial + S (ff_r_r) = S ((S (ff_i_r)) * ff_v_r)) /\ exists ff_q_r_partial. ff_u_r = ff_q_r_partial * S ((S (ff_i_r)) * ff_v_r) + (ff_r_r))) /\ ((((exists ff_h_r_successor. ff_h_r_successor + S (ff_s_r) = S ((S (S ff_i_r)) * ff_v_r)) /\ exists ff_q_r_successor. ff_u_r = ff_q_r_successor * S ((S (S ff_i_r)) * ff_v_r) + (ff_s_r))) /\ ff_s_r = ff_r_r + ff_a_r)))))) -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sum_functional">Copy proof</button>
        <pre id="proof-beta_sum_functional"><code>pa prove forall b c l n m. (exists ff_u_l ff_v_l. ((((exists ff_h_l_start. ff_h_l_start + S (0) = S ((S (0)) * ff_v_l)) /\ exists ff_q_l_start. ff_u_l = ff_q_l_start * S ((S (0)) * ff_v_l) + (0))) /\ ((((exists ff_h_l_terminal. ff_h_l_terminal + S (n) = S ((S (l)) * ff_v_l)) /\ exists ff_q_l_terminal. ff_u_l = ff_q_l_terminal * S ((S (l)) * ff_v_l) + (n))) /\ forall ff_i_l. (exists ff_lt_l_bound. ff_lt_l_bound + S ff_i_l = l) -&gt; exists ff_a_l ff_r_l ff_s_l. ((((exists ff_h_l_summand. ff_h_l_summand + S (ff_a_l) = S ((S (ff_i_l)) * c)) /\ exists ff_q_l_summand. b = ff_q_l_summand * S ((S (ff_i_l)) * c) + (ff_a_l))) /\ ((((exists ff_h_l_partial. ff_h_l_partial + S (ff_r_l) = S ((S (ff_i_l)) * ff_v_l)) /\ exists ff_q_l_partial. ff_u_l = ff_q_l_partial * S ((S (ff_i_l)) * ff_v_l) + (ff_r_l))) /\ ((((exists ff_h_l_successor. ff_h_l_successor + S (ff_s_l) = S ((S (S ff_i_l)) * ff_v_l)) /\ exists ff_q_l_successor. ff_u_l = ff_q_l_successor * S ((S (S ff_i_l)) * ff_v_l) + (ff_s_l))) /\ ff_s_l = ff_r_l + ff_a_l)))))) -&gt; (exists ff_u_r ff_v_r. ((((exists ff_h_r_start. ff_h_r_start + S (0) = S ((S (0)) * ff_v_r)) /\ exists ff_q_r_start. ff_u_r = ff_q_r_start * S ((S (0)) * ff_v_r) + (0))) /\ ((((exists ff_h_r_terminal. ff_h_r_terminal + S (m) = S ((S (l)) * ff_v_r)) /\ exists ff_q_r_terminal. ff_u_r = ff_q_r_terminal * S ((S (l)) * ff_v_r) + (m))) /\ forall ff_i_r. (exists ff_lt_r_bound. ff_lt_r_bound + S ff_i_r = l) -&gt; exists ff_a_r ff_r_r ff_s_r. ((((exists ff_h_r_summand. ff_h_r_summand + S (ff_a_r) = S ((S (ff_i_r)) * c)) /\ exists ff_q_r_summand. b = ff_q_r_summand * S ((S (ff_i_r)) * c) + (ff_a_r))) /\ ((((exists ff_h_r_partial. ff_h_r_partial + S (ff_r_r) = S ((S (ff_i_r)) * ff_v_r)) /\ exists ff_q_r_partial. ff_u_r = ff_q_r_partial * S ((S (ff_i_r)) * ff_v_r) + (ff_r_r))) /\ ((((exists ff_h_r_successor. ff_h_r_successor + S (ff_s_r) = S ((S (S ff_i_r)) * ff_v_r)) /\ exists ff_q_r_successor. ff_u_r = ff_q_r_successor * S ((S (S ff_i_r)) * ff_v_r) + (ff_s_r))) /\ ff_s_r = ff_r_r + ff_a_r)))))) -&gt; n = m
use beta_sum_trace_functional
intro b
intro c
intro l
intro n
intro m
intro hn
intro hm
cases hn
cases hn_witness
cases hm
cases hm_witness
specialize beta_sum_trace_functional b
specialize beta_sum_trace_functional c
specialize beta_sum_trace_functional l
specialize beta_sum_trace_functional n
specialize beta_sum_trace_functional x
specialize beta_sum_trace_functional x1
specialize beta_sum_trace_functional m
specialize beta_sum_trace_functional x2
specialize beta_sum_trace_functional x3
apply beta_sum_trace_functional
exact hn_witness_witness
exact hm_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,439</dd></div>
        <div><dt>Distinct objects</dt><dd>966</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>37</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="580611f0e6ce204da661d14cba008bd522f262cd64df3ee34abda1a910c31b90">580611f0e6ce…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sum_functional">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sum_functional</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_sum_theorems.py#L500">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sum_functional.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sum_exists_unique"
  data-name="beta_sum_exists_unique" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_sum_exists,beta_sum_functional"
  data-search="beta_sum_exists_unique beta sum exists unique every decoded beta prefix has exactly one relational finite sum. forall b c l. exists n. ((exists ff_u_unique_value ff_v_unique_value. ((((exists ff_h_unique_value_start. ff_h_unique_value_start + s (0) = s ((s (0)) * ff_v_unique_value)) /\ exists ff_q_unique_value_start. ff_u_unique_value = ff_q_unique_value_start * s ((s (0)) * ff_v_unique_value) + (0))) /\ ((((exists ff_h_unique_value_terminal. ff_h_unique_value_terminal + s (n) = s ((s (l)) * ff_v_unique_value)) /\ exists ff_q_unique_value_terminal. ff_u_unique_value = ff_q_unique_value_terminal * s ((s (l)) * ff_v_unique_value) + (n))) /\ forall ff_i_unique_value. (exists ff_lt_unique_value_bound. ff_lt_unique_value_bound + s ff_i_unique_value = l) -&gt; exists ff_a_unique_value ff_r_unique_value ff_s_unique_value. ((((exists ff_h_unique_value_summand. ff_h_unique_value_summand + s (ff_a_unique_value) = s ((s (ff_i_unique_value)) * c)) /\ exists ff_q_unique_value_summand. b = ff_q_unique_value_summand * s ((s (ff_i_unique_value)) * c) + (ff_a_unique_value))) /\ ((((exists ff_h_unique_value_partial. ff_h_unique_value_partial + s (ff_r_unique_value) = s ((s (ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_partial. ff_u_unique_value = ff_q_unique_value_partial * s ((s (ff_i_unique_value)) * ff_v_unique_value) + (ff_r_unique_value))) /\ ((((exists ff_h_unique_value_successor. ff_h_unique_value_successor + s (ff_s_unique_value) = s ((s (s ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_successor. ff_u_unique_value = ff_q_unique_value_successor * s ((s (s ff_i_unique_value)) * ff_v_unique_value) + (ff_s_unique_value))) /\ ff_s_unique_value = ff_r_unique_value + ff_a_unique_value)))))) /\ forall m. (exists ff_u_unique_other ff_v_unique_other. ((((exists ff_h_unique_other_start. ff_h_unique_other_start + s (0) = s ((s (0)) * ff_v_unique_other)) /\ exists ff_q_unique_other_start. ff_u_unique_other = ff_q_unique_other_start * s ((s (0)) * ff_v_unique_other) + (0))) /\ ((((exists ff_h_unique_other_terminal. ff_h_unique_other_terminal + s (m) = s ((s (l)) * ff_v_unique_other)) /\ exists ff_q_unique_other_terminal. ff_u_unique_other = ff_q_unique_other_terminal * s ((s (l)) * ff_v_unique_other) + (m))) /\ forall ff_i_unique_other. (exists ff_lt_unique_other_bound. ff_lt_unique_other_bound + s ff_i_unique_other = l) -&gt; exists ff_a_unique_other ff_r_unique_other ff_s_unique_other. ((((exists ff_h_unique_other_summand. ff_h_unique_other_summand + s (ff_a_unique_other) = s ((s (ff_i_unique_other)) * c)) /\ exists ff_q_unique_other_summand. b = ff_q_unique_other_summand * s ((s (ff_i_unique_other)) * c) + (ff_a_unique_other))) /\ ((((exists ff_h_unique_other_partial. ff_h_unique_other_partial + s (ff_r_unique_other) = s ((s (ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_partial. ff_u_unique_other = ff_q_unique_other_partial * s ((s (ff_i_unique_other)) * ff_v_unique_other) + (ff_r_unique_other))) /\ ((((exists ff_h_unique_other_successor. ff_h_unique_other_successor + s (ff_s_unique_other) = s ((s (s ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_successor. ff_u_unique_other = ff_q_unique_other_successor * s ((s (s ff_i_unique_other)) * ff_v_unique_other) + (ff_s_unique_other))) /\ ff_s_unique_other = ff_r_unique_other + ff_a_unique_other)))))) -&gt; n = m) quadratic_residues beta_sum_exists beta_sum_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sum_exists_unique</code><span>Beta sum exists unique</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded beta prefix has exactly one relational finite sum.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_exists" href="#theorem-beta_sum_exists"><code>beta_sum_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_functional" href="#theorem-beta_sum_functional"><code>beta_sum_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sum_exists_unique">Copy statement</button>
        <pre id="statement-beta_sum_exists_unique"><code>forall b c l. exists n. ((exists ff_u_unique_value ff_v_unique_value. ((((exists ff_h_unique_value_start. ff_h_unique_value_start + S (0) = S ((S (0)) * ff_v_unique_value)) /\ exists ff_q_unique_value_start. ff_u_unique_value = ff_q_unique_value_start * S ((S (0)) * ff_v_unique_value) + (0))) /\ ((((exists ff_h_unique_value_terminal. ff_h_unique_value_terminal + S (n) = S ((S (l)) * ff_v_unique_value)) /\ exists ff_q_unique_value_terminal. ff_u_unique_value = ff_q_unique_value_terminal * S ((S (l)) * ff_v_unique_value) + (n))) /\ forall ff_i_unique_value. (exists ff_lt_unique_value_bound. ff_lt_unique_value_bound + S ff_i_unique_value = l) -&gt; exists ff_a_unique_value ff_r_unique_value ff_s_unique_value. ((((exists ff_h_unique_value_summand. ff_h_unique_value_summand + S (ff_a_unique_value) = S ((S (ff_i_unique_value)) * c)) /\ exists ff_q_unique_value_summand. b = ff_q_unique_value_summand * S ((S (ff_i_unique_value)) * c) + (ff_a_unique_value))) /\ ((((exists ff_h_unique_value_partial. ff_h_unique_value_partial + S (ff_r_unique_value) = S ((S (ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_partial. ff_u_unique_value = ff_q_unique_value_partial * S ((S (ff_i_unique_value)) * ff_v_unique_value) + (ff_r_unique_value))) /\ ((((exists ff_h_unique_value_successor. ff_h_unique_value_successor + S (ff_s_unique_value) = S ((S (S ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_successor. ff_u_unique_value = ff_q_unique_value_successor * S ((S (S ff_i_unique_value)) * ff_v_unique_value) + (ff_s_unique_value))) /\ ff_s_unique_value = ff_r_unique_value + ff_a_unique_value)))))) /\ forall m. (exists ff_u_unique_other ff_v_unique_other. ((((exists ff_h_unique_other_start. ff_h_unique_other_start + S (0) = S ((S (0)) * ff_v_unique_other)) /\ exists ff_q_unique_other_start. ff_u_unique_other = ff_q_unique_other_start * S ((S (0)) * ff_v_unique_other) + (0))) /\ ((((exists ff_h_unique_other_terminal. ff_h_unique_other_terminal + S (m) = S ((S (l)) * ff_v_unique_other)) /\ exists ff_q_unique_other_terminal. ff_u_unique_other = ff_q_unique_other_terminal * S ((S (l)) * ff_v_unique_other) + (m))) /\ forall ff_i_unique_other. (exists ff_lt_unique_other_bound. ff_lt_unique_other_bound + S ff_i_unique_other = l) -&gt; exists ff_a_unique_other ff_r_unique_other ff_s_unique_other. ((((exists ff_h_unique_other_summand. ff_h_unique_other_summand + S (ff_a_unique_other) = S ((S (ff_i_unique_other)) * c)) /\ exists ff_q_unique_other_summand. b = ff_q_unique_other_summand * S ((S (ff_i_unique_other)) * c) + (ff_a_unique_other))) /\ ((((exists ff_h_unique_other_partial. ff_h_unique_other_partial + S (ff_r_unique_other) = S ((S (ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_partial. ff_u_unique_other = ff_q_unique_other_partial * S ((S (ff_i_unique_other)) * ff_v_unique_other) + (ff_r_unique_other))) /\ ((((exists ff_h_unique_other_successor. ff_h_unique_other_successor + S (ff_s_unique_other) = S ((S (S ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_successor. ff_u_unique_other = ff_q_unique_other_successor * S ((S (S ff_i_unique_other)) * ff_v_unique_other) + (ff_s_unique_other))) /\ ff_s_unique_other = ff_r_unique_other + ff_a_unique_other)))))) -&gt; n = m)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sum_exists_unique">Copy proof</button>
        <pre id="proof-beta_sum_exists_unique"><code>pa prove forall b c l. exists n. ((exists ff_u_unique_value ff_v_unique_value. ((((exists ff_h_unique_value_start. ff_h_unique_value_start + S (0) = S ((S (0)) * ff_v_unique_value)) /\ exists ff_q_unique_value_start. ff_u_unique_value = ff_q_unique_value_start * S ((S (0)) * ff_v_unique_value) + (0))) /\ ((((exists ff_h_unique_value_terminal. ff_h_unique_value_terminal + S (n) = S ((S (l)) * ff_v_unique_value)) /\ exists ff_q_unique_value_terminal. ff_u_unique_value = ff_q_unique_value_terminal * S ((S (l)) * ff_v_unique_value) + (n))) /\ forall ff_i_unique_value. (exists ff_lt_unique_value_bound. ff_lt_unique_value_bound + S ff_i_unique_value = l) -&gt; exists ff_a_unique_value ff_r_unique_value ff_s_unique_value. ((((exists ff_h_unique_value_summand. ff_h_unique_value_summand + S (ff_a_unique_value) = S ((S (ff_i_unique_value)) * c)) /\ exists ff_q_unique_value_summand. b = ff_q_unique_value_summand * S ((S (ff_i_unique_value)) * c) + (ff_a_unique_value))) /\ ((((exists ff_h_unique_value_partial. ff_h_unique_value_partial + S (ff_r_unique_value) = S ((S (ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_partial. ff_u_unique_value = ff_q_unique_value_partial * S ((S (ff_i_unique_value)) * ff_v_unique_value) + (ff_r_unique_value))) /\ ((((exists ff_h_unique_value_successor. ff_h_unique_value_successor + S (ff_s_unique_value) = S ((S (S ff_i_unique_value)) * ff_v_unique_value)) /\ exists ff_q_unique_value_successor. ff_u_unique_value = ff_q_unique_value_successor * S ((S (S ff_i_unique_value)) * ff_v_unique_value) + (ff_s_unique_value))) /\ ff_s_unique_value = ff_r_unique_value + ff_a_unique_value)))))) /\ forall m. (exists ff_u_unique_other ff_v_unique_other. ((((exists ff_h_unique_other_start. ff_h_unique_other_start + S (0) = S ((S (0)) * ff_v_unique_other)) /\ exists ff_q_unique_other_start. ff_u_unique_other = ff_q_unique_other_start * S ((S (0)) * ff_v_unique_other) + (0))) /\ ((((exists ff_h_unique_other_terminal. ff_h_unique_other_terminal + S (m) = S ((S (l)) * ff_v_unique_other)) /\ exists ff_q_unique_other_terminal. ff_u_unique_other = ff_q_unique_other_terminal * S ((S (l)) * ff_v_unique_other) + (m))) /\ forall ff_i_unique_other. (exists ff_lt_unique_other_bound. ff_lt_unique_other_bound + S ff_i_unique_other = l) -&gt; exists ff_a_unique_other ff_r_unique_other ff_s_unique_other. ((((exists ff_h_unique_other_summand. ff_h_unique_other_summand + S (ff_a_unique_other) = S ((S (ff_i_unique_other)) * c)) /\ exists ff_q_unique_other_summand. b = ff_q_unique_other_summand * S ((S (ff_i_unique_other)) * c) + (ff_a_unique_other))) /\ ((((exists ff_h_unique_other_partial. ff_h_unique_other_partial + S (ff_r_unique_other) = S ((S (ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_partial. ff_u_unique_other = ff_q_unique_other_partial * S ((S (ff_i_unique_other)) * ff_v_unique_other) + (ff_r_unique_other))) /\ ((((exists ff_h_unique_other_successor. ff_h_unique_other_successor + S (ff_s_unique_other) = S ((S (S ff_i_unique_other)) * ff_v_unique_other)) /\ exists ff_q_unique_other_successor. ff_u_unique_other = ff_q_unique_other_successor * S ((S (S ff_i_unique_other)) * ff_v_unique_other) + (ff_s_unique_other))) /\ ff_s_unique_other = ff_r_unique_other + ff_a_unique_other)))))) -&gt; n = m)
use beta_sum_exists
use beta_sum_functional
intro b
intro c
intro l
specialize beta_sum_exists b
specialize beta_sum_exists c
specialize beta_sum_exists l
cases beta_sum_exists
exists x
split
exact beta_sum_exists_witness
intro m
intro hm
specialize beta_sum_functional b
specialize beta_sum_functional c
specialize beta_sum_functional l
specialize beta_sum_functional x
specialize beta_sum_functional m
apply beta_sum_functional
exact beta_sum_exists_witness
exact hm
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>31,979</dd></div>
        <div><dt>Distinct objects</dt><dd>5,050</dd></div>
        <div><dt>Reused references</dt><dd>239</dd></div>
        <div><dt>Depth</dt><dd>87</dd></div>
        <div><dt>Cuts</dt><dd>955</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c40396e72cc984f0e1f2923a0c36f3d816e170c4619ddac3cd2cc8bd26855f7c">c40396e72cc9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sum_exists_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sum_exists_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_sum_theorems.py#L531">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sum_exists_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sum_zero"
  data-name="beta_sum_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_at_unique"
  data-search="beta_sum_zero beta sum zero the sum of an empty decoded prefix is zero. forall b c n. (exists fs_u_zero fs_v_zero. ((((exists fs_h_zero_body_start. fs_h_zero_body_start + s (0) = s ((s (0)) * fs_v_zero)) /\ exists fs_q_zero_body_start. fs_u_zero = fs_q_zero_body_start * s ((s (0)) * fs_v_zero) + (0))) /\ ((((exists fs_h_zero_body_terminal. fs_h_zero_body_terminal + s (n) = s ((s (0)) * fs_v_zero)) /\ exists fs_q_zero_body_terminal. fs_u_zero = fs_q_zero_body_terminal * s ((s (0)) * fs_v_zero) + (n))) /\ forall fs_i_zero_body_steps. (exists fs_lt_zero_body_steps_bound. fs_lt_zero_body_steps_bound + s fs_i_zero_body_steps = 0) -&gt; exists fs_a_zero_body_steps fs_r_zero_body_steps fs_s_zero_body_steps. ((((exists fs_h_zero_body_steps_summand. fs_h_zero_body_steps_summand + s (fs_a_zero_body_steps) = s ((s (fs_i_zero_body_steps)) * c)) /\ exists fs_q_zero_body_steps_summand. b = fs_q_zero_body_steps_summand * s ((s (fs_i_zero_body_steps)) * c) + (fs_a_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_partial. fs_h_zero_body_steps_partial + s (fs_r_zero_body_steps) = s ((s (fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_partial. fs_u_zero = fs_q_zero_body_steps_partial * s ((s (fs_i_zero_body_steps)) * fs_v_zero) + (fs_r_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_successor. fs_h_zero_body_steps_successor + s (fs_s_zero_body_steps) = s ((s (s fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_successor. fs_u_zero = fs_q_zero_body_steps_successor * s ((s (s fs_i_zero_body_steps)) * fs_v_zero) + (fs_s_zero_body_steps))) /\ fs_s_zero_body_steps = fs_r_zero_body_steps + fs_a_zero_body_steps)))))) -&gt; n = 0 quadratic_residues beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sum_zero</code><span>Beta sum zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The sum of an empty decoded prefix is zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_pointwise_mod_congruent" href="#theorem-beta_sum_pointwise_mod_congruent"><code>beta_sum_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_zero" href="#theorem-bit_count_zero"><code>bit_count_zero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sum_zero">Copy statement</button>
        <pre id="statement-beta_sum_zero"><code>forall b c n. (exists fs_u_zero fs_v_zero. ((((exists fs_h_zero_body_start. fs_h_zero_body_start + S (0) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_start. fs_u_zero = fs_q_zero_body_start * S ((S (0)) * fs_v_zero) + (0))) /\ ((((exists fs_h_zero_body_terminal. fs_h_zero_body_terminal + S (n) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_terminal. fs_u_zero = fs_q_zero_body_terminal * S ((S (0)) * fs_v_zero) + (n))) /\ forall fs_i_zero_body_steps. (exists fs_lt_zero_body_steps_bound. fs_lt_zero_body_steps_bound + S fs_i_zero_body_steps = 0) -&gt; exists fs_a_zero_body_steps fs_r_zero_body_steps fs_s_zero_body_steps. ((((exists fs_h_zero_body_steps_summand. fs_h_zero_body_steps_summand + S (fs_a_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * c)) /\ exists fs_q_zero_body_steps_summand. b = fs_q_zero_body_steps_summand * S ((S (fs_i_zero_body_steps)) * c) + (fs_a_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_partial. fs_h_zero_body_steps_partial + S (fs_r_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_partial. fs_u_zero = fs_q_zero_body_steps_partial * S ((S (fs_i_zero_body_steps)) * fs_v_zero) + (fs_r_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_successor. fs_h_zero_body_steps_successor + S (fs_s_zero_body_steps) = S ((S (S fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_successor. fs_u_zero = fs_q_zero_body_steps_successor * S ((S (S fs_i_zero_body_steps)) * fs_v_zero) + (fs_s_zero_body_steps))) /\ fs_s_zero_body_steps = fs_r_zero_body_steps + fs_a_zero_body_steps)))))) -&gt; n = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sum_zero">Copy proof</button>
        <pre id="proof-beta_sum_zero"><code>pa prove forall b c n. (exists fs_u_zero fs_v_zero. ((((exists fs_h_zero_body_start. fs_h_zero_body_start + S (0) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_start. fs_u_zero = fs_q_zero_body_start * S ((S (0)) * fs_v_zero) + (0))) /\ ((((exists fs_h_zero_body_terminal. fs_h_zero_body_terminal + S (n) = S ((S (0)) * fs_v_zero)) /\ exists fs_q_zero_body_terminal. fs_u_zero = fs_q_zero_body_terminal * S ((S (0)) * fs_v_zero) + (n))) /\ forall fs_i_zero_body_steps. (exists fs_lt_zero_body_steps_bound. fs_lt_zero_body_steps_bound + S fs_i_zero_body_steps = 0) -&gt; exists fs_a_zero_body_steps fs_r_zero_body_steps fs_s_zero_body_steps. ((((exists fs_h_zero_body_steps_summand. fs_h_zero_body_steps_summand + S (fs_a_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * c)) /\ exists fs_q_zero_body_steps_summand. b = fs_q_zero_body_steps_summand * S ((S (fs_i_zero_body_steps)) * c) + (fs_a_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_partial. fs_h_zero_body_steps_partial + S (fs_r_zero_body_steps) = S ((S (fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_partial. fs_u_zero = fs_q_zero_body_steps_partial * S ((S (fs_i_zero_body_steps)) * fs_v_zero) + (fs_r_zero_body_steps))) /\ ((((exists fs_h_zero_body_steps_successor. fs_h_zero_body_steps_successor + S (fs_s_zero_body_steps) = S ((S (S fs_i_zero_body_steps)) * fs_v_zero)) /\ exists fs_q_zero_body_steps_successor. fs_u_zero = fs_q_zero_body_steps_successor * S ((S (S fs_i_zero_body_steps)) * fs_v_zero) + (fs_s_zero_body_steps))) /\ fs_s_zero_body_steps = fs_r_zero_body_steps + fs_a_zero_body_steps)))))) -&gt; n = 0
use beta_at_unique
intro b
intro c
intro n
intro hsum
cases hsum
cases hsum_witness
cases hsum_witness_witness
cases hsum_witness_witness_right
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique 0
specialize beta_at_unique n
specialize beta_at_unique 0
apply beta_at_unique
exact hsum_witness_witness_right_left
exact hsum_witness_witness_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,171</dd></div>
        <div><dt>Distinct objects</dt><dd>742</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>31</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f1bbae9a62a0498dc48a9cab62eee041cf220f8cc45a02a3722b45e4c0507408">f1bbae9a62a0…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sum_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sum_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_sum_theorems.py#L559">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sum_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sum_succ_decompose"
  data-name="beta_sum_succ_decompose" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_refl,le_succ,beta_at_unique"
  data-search="beta_sum_succ_decompose beta sum succ decompose a successor sum decomposes into its prefix sum and final summand. forall b c l n. (exists fs_u_succ fs_v_succ. ((((exists fs_h_succ_body_start. fs_h_succ_body_start + s (0) = s ((s (0)) * fs_v_succ)) /\ exists fs_q_succ_body_start. fs_u_succ = fs_q_succ_body_start * s ((s (0)) * fs_v_succ) + (0))) /\ ((((exists fs_h_succ_body_terminal. fs_h_succ_body_terminal + s (n) = s ((s (s l)) * fs_v_succ)) /\ exists fs_q_succ_body_terminal. fs_u_succ = fs_q_succ_body_terminal * s ((s (s l)) * fs_v_succ) + (n))) /\ forall fs_i_succ_body_steps. (exists fs_lt_succ_body_steps_bound. fs_lt_succ_body_steps_bound + s fs_i_succ_body_steps = s l) -&gt; exists fs_a_succ_body_steps fs_r_succ_body_steps fs_s_succ_body_steps. ((((exists fs_h_succ_body_steps_summand. fs_h_succ_body_steps_summand + s (fs_a_succ_body_steps) = s ((s (fs_i_succ_body_steps)) * c)) /\ exists fs_q_succ_body_steps_summand. b = fs_q_succ_body_steps_summand * s ((s (fs_i_succ_body_steps)) * c) + (fs_a_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_partial. fs_h_succ_body_steps_partial + s (fs_r_succ_body_steps) = s ((s (fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_partial. fs_u_succ = fs_q_succ_body_steps_partial * s ((s (fs_i_succ_body_steps)) * fs_v_succ) + (fs_r_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_successor. fs_h_succ_body_steps_successor + s (fs_s_succ_body_steps) = s ((s (s fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_successor. fs_u_succ = fs_q_succ_body_steps_successor * s ((s (s fs_i_succ_body_steps)) * fs_v_succ) + (fs_s_succ_body_steps))) /\ fs_s_succ_body_steps = fs_r_succ_body_steps + fs_a_succ_body_steps)))))) -&gt; exists a r. (((exists fs_h_succ_factor. fs_h_succ_factor + s (a) = s ((s (l)) * c)) /\ exists fs_q_succ_factor. b = fs_q_succ_factor * s ((s (l)) * c) + (a))) /\ ((exists ff_u_prefix ff_v_prefix. ((((exists ff_h_prefix_start. ff_h_prefix_start + s (0) = s ((s (0)) * ff_v_prefix)) /\ exists ff_q_prefix_start. ff_u_prefix = ff_q_prefix_start * s ((s (0)) * ff_v_prefix) + (0))) /\ ((((exists ff_h_prefix_terminal. ff_h_prefix_terminal + s (r) = s ((s (l)) * ff_v_prefix)) /\ exists ff_q_prefix_terminal. ff_u_prefix = ff_q_prefix_terminal * s ((s (l)) * ff_v_prefix) + (r))) /\ forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + s ff_i_prefix = l) -&gt; exists ff_a_prefix ff_r_prefix ff_s_prefix. ((((exists ff_h_prefix_summand. ff_h_prefix_summand + s (ff_a_prefix) = s ((s (ff_i_prefix)) * c)) /\ exists ff_q_prefix_summand. b = ff_q_prefix_summand * s ((s (ff_i_prefix)) * c) + (ff_a_prefix))) /\ ((((exists ff_h_prefix_partial. ff_h_prefix_partial + s (ff_r_prefix) = s ((s (ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_partial. ff_u_prefix = ff_q_prefix_partial * s ((s (ff_i_prefix)) * ff_v_prefix) + (ff_r_prefix))) /\ ((((exists ff_h_prefix_successor. ff_h_prefix_successor + s (ff_s_prefix) = s ((s (s ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_successor. ff_u_prefix = ff_q_prefix_successor * s ((s (s ff_i_prefix)) * ff_v_prefix) + (ff_s_prefix))) /\ ff_s_prefix = ff_r_prefix + ff_a_prefix)))))) /\ n = r + a) quadratic_residues le_refl le_succ beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sum_succ_decompose</code><span>Beta sum succ decompose</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor sum decomposes into its prefix sum and final summand.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_pointwise_mod_congruent" href="#theorem-beta_sum_pointwise_mod_congruent"><code>beta_sum_pointwise_mod_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_succ_decompose" href="#theorem-bit_count_succ_decompose"><code>bit_count_succ_decompose</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sum_succ_decompose">Copy statement</button>
        <pre id="statement-beta_sum_succ_decompose"><code>forall b c l n. (exists fs_u_succ fs_v_succ. ((((exists fs_h_succ_body_start. fs_h_succ_body_start + S (0) = S ((S (0)) * fs_v_succ)) /\ exists fs_q_succ_body_start. fs_u_succ = fs_q_succ_body_start * S ((S (0)) * fs_v_succ) + (0))) /\ ((((exists fs_h_succ_body_terminal. fs_h_succ_body_terminal + S (n) = S ((S (S l)) * fs_v_succ)) /\ exists fs_q_succ_body_terminal. fs_u_succ = fs_q_succ_body_terminal * S ((S (S l)) * fs_v_succ) + (n))) /\ forall fs_i_succ_body_steps. (exists fs_lt_succ_body_steps_bound. fs_lt_succ_body_steps_bound + S fs_i_succ_body_steps = S l) -&gt; exists fs_a_succ_body_steps fs_r_succ_body_steps fs_s_succ_body_steps. ((((exists fs_h_succ_body_steps_summand. fs_h_succ_body_steps_summand + S (fs_a_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * c)) /\ exists fs_q_succ_body_steps_summand. b = fs_q_succ_body_steps_summand * S ((S (fs_i_succ_body_steps)) * c) + (fs_a_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_partial. fs_h_succ_body_steps_partial + S (fs_r_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_partial. fs_u_succ = fs_q_succ_body_steps_partial * S ((S (fs_i_succ_body_steps)) * fs_v_succ) + (fs_r_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_successor. fs_h_succ_body_steps_successor + S (fs_s_succ_body_steps) = S ((S (S fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_successor. fs_u_succ = fs_q_succ_body_steps_successor * S ((S (S fs_i_succ_body_steps)) * fs_v_succ) + (fs_s_succ_body_steps))) /\ fs_s_succ_body_steps = fs_r_succ_body_steps + fs_a_succ_body_steps)))))) -&gt; exists a r. (((exists fs_h_succ_factor. fs_h_succ_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_succ_factor. b = fs_q_succ_factor * S ((S (l)) * c) + (a))) /\ ((exists ff_u_prefix ff_v_prefix. ((((exists ff_h_prefix_start. ff_h_prefix_start + S (0) = S ((S (0)) * ff_v_prefix)) /\ exists ff_q_prefix_start. ff_u_prefix = ff_q_prefix_start * S ((S (0)) * ff_v_prefix) + (0))) /\ ((((exists ff_h_prefix_terminal. ff_h_prefix_terminal + S (r) = S ((S (l)) * ff_v_prefix)) /\ exists ff_q_prefix_terminal. ff_u_prefix = ff_q_prefix_terminal * S ((S (l)) * ff_v_prefix) + (r))) /\ forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -&gt; exists ff_a_prefix ff_r_prefix ff_s_prefix. ((((exists ff_h_prefix_summand. ff_h_prefix_summand + S (ff_a_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_summand. b = ff_q_prefix_summand * S ((S (ff_i_prefix)) * c) + (ff_a_prefix))) /\ ((((exists ff_h_prefix_partial. ff_h_prefix_partial + S (ff_r_prefix) = S ((S (ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_partial. ff_u_prefix = ff_q_prefix_partial * S ((S (ff_i_prefix)) * ff_v_prefix) + (ff_r_prefix))) /\ ((((exists ff_h_prefix_successor. ff_h_prefix_successor + S (ff_s_prefix) = S ((S (S ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_successor. ff_u_prefix = ff_q_prefix_successor * S ((S (S ff_i_prefix)) * ff_v_prefix) + (ff_s_prefix))) /\ ff_s_prefix = ff_r_prefix + ff_a_prefix)))))) /\ n = r + a)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sum_succ_decompose">Copy proof</button>
        <pre id="proof-beta_sum_succ_decompose"><code>pa prove forall b c l n. (exists fs_u_succ fs_v_succ. ((((exists fs_h_succ_body_start. fs_h_succ_body_start + S (0) = S ((S (0)) * fs_v_succ)) /\ exists fs_q_succ_body_start. fs_u_succ = fs_q_succ_body_start * S ((S (0)) * fs_v_succ) + (0))) /\ ((((exists fs_h_succ_body_terminal. fs_h_succ_body_terminal + S (n) = S ((S (S l)) * fs_v_succ)) /\ exists fs_q_succ_body_terminal. fs_u_succ = fs_q_succ_body_terminal * S ((S (S l)) * fs_v_succ) + (n))) /\ forall fs_i_succ_body_steps. (exists fs_lt_succ_body_steps_bound. fs_lt_succ_body_steps_bound + S fs_i_succ_body_steps = S l) -&gt; exists fs_a_succ_body_steps fs_r_succ_body_steps fs_s_succ_body_steps. ((((exists fs_h_succ_body_steps_summand. fs_h_succ_body_steps_summand + S (fs_a_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * c)) /\ exists fs_q_succ_body_steps_summand. b = fs_q_succ_body_steps_summand * S ((S (fs_i_succ_body_steps)) * c) + (fs_a_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_partial. fs_h_succ_body_steps_partial + S (fs_r_succ_body_steps) = S ((S (fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_partial. fs_u_succ = fs_q_succ_body_steps_partial * S ((S (fs_i_succ_body_steps)) * fs_v_succ) + (fs_r_succ_body_steps))) /\ ((((exists fs_h_succ_body_steps_successor. fs_h_succ_body_steps_successor + S (fs_s_succ_body_steps) = S ((S (S fs_i_succ_body_steps)) * fs_v_succ)) /\ exists fs_q_succ_body_steps_successor. fs_u_succ = fs_q_succ_body_steps_successor * S ((S (S fs_i_succ_body_steps)) * fs_v_succ) + (fs_s_succ_body_steps))) /\ fs_s_succ_body_steps = fs_r_succ_body_steps + fs_a_succ_body_steps)))))) -&gt; exists a r. (((exists fs_h_succ_factor. fs_h_succ_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_succ_factor. b = fs_q_succ_factor * S ((S (l)) * c) + (a))) /\ ((exists ff_u_prefix ff_v_prefix. ((((exists ff_h_prefix_start. ff_h_prefix_start + S (0) = S ((S (0)) * ff_v_prefix)) /\ exists ff_q_prefix_start. ff_u_prefix = ff_q_prefix_start * S ((S (0)) * ff_v_prefix) + (0))) /\ ((((exists ff_h_prefix_terminal. ff_h_prefix_terminal + S (r) = S ((S (l)) * ff_v_prefix)) /\ exists ff_q_prefix_terminal. ff_u_prefix = ff_q_prefix_terminal * S ((S (l)) * ff_v_prefix) + (r))) /\ forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -&gt; exists ff_a_prefix ff_r_prefix ff_s_prefix. ((((exists ff_h_prefix_summand. ff_h_prefix_summand + S (ff_a_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_summand. b = ff_q_prefix_summand * S ((S (ff_i_prefix)) * c) + (ff_a_prefix))) /\ ((((exists ff_h_prefix_partial. ff_h_prefix_partial + S (ff_r_prefix) = S ((S (ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_partial. ff_u_prefix = ff_q_prefix_partial * S ((S (ff_i_prefix)) * ff_v_prefix) + (ff_r_prefix))) /\ ((((exists ff_h_prefix_successor. ff_h_prefix_successor + S (ff_s_prefix) = S ((S (S ff_i_prefix)) * ff_v_prefix)) /\ exists ff_q_prefix_successor. ff_u_prefix = ff_q_prefix_successor * S ((S (S ff_i_prefix)) * ff_v_prefix) + (ff_s_prefix))) /\ ff_s_prefix = ff_r_prefix + ff_a_prefix)))))) /\ n = r + a)
use le_refl
use le_succ
use beta_at_unique
intro b
intro c
intro l
intro n
intro hsum
cases hsum
cases hsum_witness
cases hsum_witness_witness
cases hsum_witness_witness_right
have hstep : exists a r s. ((((exists fs_h_decomp_factor. fs_h_decomp_factor + S (a) = S ((S (l)) * c)) /\ exists fs_q_decomp_factor. b = fs_q_decomp_factor * S ((S (l)) * c) + (a))) /\ ((((exists fs_h_decomp_partial. fs_h_decomp_partial + S (r) = S ((S (l)) * x1)) /\ exists fs_q_decomp_partial. x = fs_q_decomp_partial * S ((S (l)) * x1) + (r))) /\ ((((exists fs_h_decomp_successor. fs_h_decomp_successor + S (s) = S ((S (S l)) * x1)) /\ exists fs_q_decomp_successor. x = fs_q_decomp_successor * S ((S (S l)) * x1) + (s))) /\ s = r + a)))
specialize hsum_witness_witness_right_right l
apply hsum_witness_witness_right_right
specialize le_refl (S l)
exact le_refl
cases hstep
cases hstep_witness
cases hstep_witness_witness
cases hstep_witness_witness_witness
cases hstep_witness_witness_witness_right
cases hstep_witness_witness_witness_right_right
have hn : n = x4
specialize beta_at_unique x
specialize beta_at_unique x1
specialize beta_at_unique (S l)
specialize beta_at_unique n
specialize beta_at_unique x4
apply beta_at_unique
exact hsum_witness_witness_right_left
exact hstep_witness_witness_witness_right_right_left
exists x2
exists x3
split
exact hstep_witness_witness_witness_left
split
exists x
exists x1
split
exact hsum_witness_witness_left
split
exact hstep_witness_witness_witness_right_left
intro i
intro hi
specialize hsum_witness_witness_right_right i
apply hsum_witness_witness_right_right
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
trans x4
exact hn
exact hstep_witness_witness_witness_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,257</dd></div>
        <div><dt>Distinct objects</dt><dd>784</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>35</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="810c7005959faac9df0cba19f36be04d2a738c8d22d08dc214dfba7867a51b44">810c7005959f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sum_succ_decompose">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sum_succ_decompose</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_sum_theorems.py#L583">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sum_succ_decompose.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_pointwise_mod_congruent"
  data-name="beta_product_pointwise_mod_congruent" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_product_zero,beta_product_succ_decompose,le_succ,le_refl,mod_eq_refl,mod_eq_mul"
  data-search="beta_product_pointwise_mod_congruent beta product pointwise mod congruent pointwise congruent decoded prefixes have congruent finite products. forall m b c d e l n q. (forall i a z. (exists fc_h_pp. fc_h_pp + s i = l) -&gt; (((exists ff_h_pp_la. ff_h_pp_la + s (a) = s ((s (i)) * c)) /\ exists ff_q_pp_la. b = ff_q_pp_la * s ((s (i)) * c) + (a))) -&gt; (((exists ff_h_pp_ra. ff_h_pp_ra + s (z) = s ((s (i)) * e)) /\ exists ff_q_pp_ra. d = ff_q_pp_ra * s ((s (i)) * e) + (z))) -&gt; exists fc_u_pp_me fc_v_pp_me. a + m * fc_u_pp_me = z + m * fc_v_pp_me) -&gt; (exists ff_u_pl ff_v_pl. ((((exists ff_h_pl_start. ff_h_pl_start + s (1) = s ((s (0)) * ff_v_pl)) /\ exists ff_q_pl_start. ff_u_pl = ff_q_pl_start * s ((s (0)) * ff_v_pl) + (1))) /\ ((((exists ff_h_pl_terminal. ff_h_pl_terminal + s (n) = s ((s (l)) * ff_v_pl)) /\ exists ff_q_pl_terminal. ff_u_pl = ff_q_pl_terminal * s ((s (l)) * ff_v_pl) + (n))) /\ forall ff_i_pl. (exists ff_lt_pl_bound. ff_lt_pl_bound + s ff_i_pl = l) -&gt; exists ff_p_pl ff_r_pl ff_s_pl. ((((exists ff_h_pl_factor. ff_h_pl_factor + s (ff_p_pl) = s ((s (ff_i_pl)) * c)) /\ exists ff_q_pl_factor. b = ff_q_pl_factor * s ((s (ff_i_pl)) * c) + (ff_p_pl))) /\ ((((exists ff_h_pl_partial. ff_h_pl_partial + s (ff_r_pl) = s ((s (ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_partial. ff_u_pl = ff_q_pl_partial * s ((s (ff_i_pl)) * ff_v_pl) + (ff_r_pl))) /\ ((((exists ff_h_pl_successor. ff_h_pl_successor + s (ff_s_pl) = s ((s (s ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_successor. ff_u_pl = ff_q_pl_successor * s ((s (s ff_i_pl)) * ff_v_pl) + (ff_s_pl))) /\ ff_s_pl = ff_r_pl * ff_p_pl)))))) -&gt; (exists ff_u_pr ff_v_pr. ((((exists ff_h_pr_start. ff_h_pr_start + s (1) = s ((s (0)) * ff_v_pr)) /\ exists ff_q_pr_start. ff_u_pr = ff_q_pr_start * s ((s (0)) * ff_v_pr) + (1))) /\ ((((exists ff_h_pr_terminal. ff_h_pr_terminal + s (q) = s ((s (l)) * ff_v_pr)) /\ exists ff_q_pr_terminal. ff_u_pr = ff_q_pr_terminal * s ((s (l)) * ff_v_pr) + (q))) /\ forall ff_i_pr. (exists ff_lt_pr_bound. ff_lt_pr_bound + s ff_i_pr = l) -&gt; exists ff_p_pr ff_r_pr ff_s_pr. ((((exists ff_h_pr_factor. ff_h_pr_factor + s (ff_p_pr) = s ((s (ff_i_pr)) * e)) /\ exists ff_q_pr_factor. d = ff_q_pr_factor * s ((s (ff_i_pr)) * e) + (ff_p_pr))) /\ ((((exists ff_h_pr_partial. ff_h_pr_partial + s (ff_r_pr) = s ((s (ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_partial. ff_u_pr = ff_q_pr_partial * s ((s (ff_i_pr)) * ff_v_pr) + (ff_r_pr))) /\ ((((exists ff_h_pr_successor. ff_h_pr_successor + s (ff_s_pr) = s ((s (s ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_successor. ff_u_pr = ff_q_pr_successor * s ((s (s ff_i_pr)) * ff_v_pr) + (ff_s_pr))) /\ ff_s_pr = ff_r_pr * ff_p_pr)))))) -&gt; exists fc_u_pv fc_v_pv. n + m * fc_u_pv = q + m * fc_v_pv quadratic_residues beta_product_zero beta_product_succ_decompose le_succ le_refl mod_eq_refl mod_eq_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_pointwise_mod_congruent</code><span>Beta product pointwise mod congruent</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Pointwise congruent decoded prefixes have congruent finite products.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_zero" href="#theorem-beta_product_zero"><code>beta_product_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul" href="#theorem-mod_eq_mul"><code>mod_eq_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_pointwise_mod_congruent">Copy statement</button>
        <pre id="statement-beta_product_pointwise_mod_congruent"><code>forall m b c d e l n q. (forall i a z. (exists fc_h_pp. fc_h_pp + S i = l) -&gt; (((exists ff_h_pp_la. ff_h_pp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_pp_la. b = ff_q_pp_la * S ((S (i)) * c) + (a))) -&gt; (((exists ff_h_pp_ra. ff_h_pp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_pp_ra. d = ff_q_pp_ra * S ((S (i)) * e) + (z))) -&gt; exists fc_u_pp_me fc_v_pp_me. a + m * fc_u_pp_me = z + m * fc_v_pp_me) -&gt; (exists ff_u_pl ff_v_pl. ((((exists ff_h_pl_start. ff_h_pl_start + S (1) = S ((S (0)) * ff_v_pl)) /\ exists ff_q_pl_start. ff_u_pl = ff_q_pl_start * S ((S (0)) * ff_v_pl) + (1))) /\ ((((exists ff_h_pl_terminal. ff_h_pl_terminal + S (n) = S ((S (l)) * ff_v_pl)) /\ exists ff_q_pl_terminal. ff_u_pl = ff_q_pl_terminal * S ((S (l)) * ff_v_pl) + (n))) /\ forall ff_i_pl. (exists ff_lt_pl_bound. ff_lt_pl_bound + S ff_i_pl = l) -&gt; exists ff_p_pl ff_r_pl ff_s_pl. ((((exists ff_h_pl_factor. ff_h_pl_factor + S (ff_p_pl) = S ((S (ff_i_pl)) * c)) /\ exists ff_q_pl_factor. b = ff_q_pl_factor * S ((S (ff_i_pl)) * c) + (ff_p_pl))) /\ ((((exists ff_h_pl_partial. ff_h_pl_partial + S (ff_r_pl) = S ((S (ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_partial. ff_u_pl = ff_q_pl_partial * S ((S (ff_i_pl)) * ff_v_pl) + (ff_r_pl))) /\ ((((exists ff_h_pl_successor. ff_h_pl_successor + S (ff_s_pl) = S ((S (S ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_successor. ff_u_pl = ff_q_pl_successor * S ((S (S ff_i_pl)) * ff_v_pl) + (ff_s_pl))) /\ ff_s_pl = ff_r_pl * ff_p_pl)))))) -&gt; (exists ff_u_pr ff_v_pr. ((((exists ff_h_pr_start. ff_h_pr_start + S (1) = S ((S (0)) * ff_v_pr)) /\ exists ff_q_pr_start. ff_u_pr = ff_q_pr_start * S ((S (0)) * ff_v_pr) + (1))) /\ ((((exists ff_h_pr_terminal. ff_h_pr_terminal + S (q) = S ((S (l)) * ff_v_pr)) /\ exists ff_q_pr_terminal. ff_u_pr = ff_q_pr_terminal * S ((S (l)) * ff_v_pr) + (q))) /\ forall ff_i_pr. (exists ff_lt_pr_bound. ff_lt_pr_bound + S ff_i_pr = l) -&gt; exists ff_p_pr ff_r_pr ff_s_pr. ((((exists ff_h_pr_factor. ff_h_pr_factor + S (ff_p_pr) = S ((S (ff_i_pr)) * e)) /\ exists ff_q_pr_factor. d = ff_q_pr_factor * S ((S (ff_i_pr)) * e) + (ff_p_pr))) /\ ((((exists ff_h_pr_partial. ff_h_pr_partial + S (ff_r_pr) = S ((S (ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_partial. ff_u_pr = ff_q_pr_partial * S ((S (ff_i_pr)) * ff_v_pr) + (ff_r_pr))) /\ ((((exists ff_h_pr_successor. ff_h_pr_successor + S (ff_s_pr) = S ((S (S ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_successor. ff_u_pr = ff_q_pr_successor * S ((S (S ff_i_pr)) * ff_v_pr) + (ff_s_pr))) /\ ff_s_pr = ff_r_pr * ff_p_pr)))))) -&gt; exists fc_u_pv fc_v_pv. n + m * fc_u_pv = q + m * fc_v_pv</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_pointwise_mod_congruent">Copy proof</button>
        <pre id="proof-beta_product_pointwise_mod_congruent"><code>pa prove forall m b c d e l n q. (forall i a z. (exists fc_h_pp. fc_h_pp + S i = l) -&gt; (((exists ff_h_pp_la. ff_h_pp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_pp_la. b = ff_q_pp_la * S ((S (i)) * c) + (a))) -&gt; (((exists ff_h_pp_ra. ff_h_pp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_pp_ra. d = ff_q_pp_ra * S ((S (i)) * e) + (z))) -&gt; exists fc_u_pp_me fc_v_pp_me. a + m * fc_u_pp_me = z + m * fc_v_pp_me) -&gt; (exists ff_u_pl ff_v_pl. ((((exists ff_h_pl_start. ff_h_pl_start + S (1) = S ((S (0)) * ff_v_pl)) /\ exists ff_q_pl_start. ff_u_pl = ff_q_pl_start * S ((S (0)) * ff_v_pl) + (1))) /\ ((((exists ff_h_pl_terminal. ff_h_pl_terminal + S (n) = S ((S (l)) * ff_v_pl)) /\ exists ff_q_pl_terminal. ff_u_pl = ff_q_pl_terminal * S ((S (l)) * ff_v_pl) + (n))) /\ forall ff_i_pl. (exists ff_lt_pl_bound. ff_lt_pl_bound + S ff_i_pl = l) -&gt; exists ff_p_pl ff_r_pl ff_s_pl. ((((exists ff_h_pl_factor. ff_h_pl_factor + S (ff_p_pl) = S ((S (ff_i_pl)) * c)) /\ exists ff_q_pl_factor. b = ff_q_pl_factor * S ((S (ff_i_pl)) * c) + (ff_p_pl))) /\ ((((exists ff_h_pl_partial. ff_h_pl_partial + S (ff_r_pl) = S ((S (ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_partial. ff_u_pl = ff_q_pl_partial * S ((S (ff_i_pl)) * ff_v_pl) + (ff_r_pl))) /\ ((((exists ff_h_pl_successor. ff_h_pl_successor + S (ff_s_pl) = S ((S (S ff_i_pl)) * ff_v_pl)) /\ exists ff_q_pl_successor. ff_u_pl = ff_q_pl_successor * S ((S (S ff_i_pl)) * ff_v_pl) + (ff_s_pl))) /\ ff_s_pl = ff_r_pl * ff_p_pl)))))) -&gt; (exists ff_u_pr ff_v_pr. ((((exists ff_h_pr_start. ff_h_pr_start + S (1) = S ((S (0)) * ff_v_pr)) /\ exists ff_q_pr_start. ff_u_pr = ff_q_pr_start * S ((S (0)) * ff_v_pr) + (1))) /\ ((((exists ff_h_pr_terminal. ff_h_pr_terminal + S (q) = S ((S (l)) * ff_v_pr)) /\ exists ff_q_pr_terminal. ff_u_pr = ff_q_pr_terminal * S ((S (l)) * ff_v_pr) + (q))) /\ forall ff_i_pr. (exists ff_lt_pr_bound. ff_lt_pr_bound + S ff_i_pr = l) -&gt; exists ff_p_pr ff_r_pr ff_s_pr. ((((exists ff_h_pr_factor. ff_h_pr_factor + S (ff_p_pr) = S ((S (ff_i_pr)) * e)) /\ exists ff_q_pr_factor. d = ff_q_pr_factor * S ((S (ff_i_pr)) * e) + (ff_p_pr))) /\ ((((exists ff_h_pr_partial. ff_h_pr_partial + S (ff_r_pr) = S ((S (ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_partial. ff_u_pr = ff_q_pr_partial * S ((S (ff_i_pr)) * ff_v_pr) + (ff_r_pr))) /\ ((((exists ff_h_pr_successor. ff_h_pr_successor + S (ff_s_pr) = S ((S (S ff_i_pr)) * ff_v_pr)) /\ exists ff_q_pr_successor. ff_u_pr = ff_q_pr_successor * S ((S (S ff_i_pr)) * ff_v_pr) + (ff_s_pr))) /\ ff_s_pr = ff_r_pr * ff_p_pr)))))) -&gt; exists fc_u_pv fc_v_pv. n + m * fc_u_pv = q + m * fc_v_pv
use beta_product_zero
use beta_product_succ_decompose
use le_succ
use le_refl
use mod_eq_refl
use mod_eq_mul
intro m
intro b
intro c
intro d
intro e
induction l
intro n
intro q
intro hpw
intro hn
intro hq
have hn1 : n = 1
specialize beta_product_zero b
specialize beta_product_zero c
specialize beta_product_zero n
apply beta_product_zero
exact hn
have hq1 : q = 1
specialize beta_product_zero d
specialize beta_product_zero e
specialize beta_product_zero q
apply beta_product_zero
exact hq
rewrite hn1
rewrite hq1
specialize mod_eq_refl m
specialize mod_eq_refl 1
exact mod_eq_refl
intro n
intro q
intro hpw
intro hn
intro hq
have hnd : exists a r. (((exists ff_h_pd_l_a. ff_h_pd_l_a + S (a) = S ((S (l)) * c)) /\ exists ff_q_pd_l_a. b = ff_q_pd_l_a * S ((S (l)) * c) + (a))) /\ ((exists ff_u_pd_l_p ff_v_pd_l_p. ((((exists ff_h_pd_l_p_start. ff_h_pd_l_p_start + S (1) = S ((S (0)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_start. ff_u_pd_l_p = ff_q_pd_l_p_start * S ((S (0)) * ff_v_pd_l_p) + (1))) /\ ((((exists ff_h_pd_l_p_terminal. ff_h_pd_l_p_terminal + S (r) = S ((S (l)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_terminal. ff_u_pd_l_p = ff_q_pd_l_p_terminal * S ((S (l)) * ff_v_pd_l_p) + (r))) /\ forall ff_i_pd_l_p. (exists ff_lt_pd_l_p_bound. ff_lt_pd_l_p_bound + S ff_i_pd_l_p = l) -&gt; exists ff_p_pd_l_p ff_r_pd_l_p ff_s_pd_l_p. ((((exists ff_h_pd_l_p_factor. ff_h_pd_l_p_factor + S (ff_p_pd_l_p) = S ((S (ff_i_pd_l_p)) * c)) /\ exists ff_q_pd_l_p_factor. b = ff_q_pd_l_p_factor * S ((S (ff_i_pd_l_p)) * c) + (ff_p_pd_l_p))) /\ ((((exists ff_h_pd_l_p_partial. ff_h_pd_l_p_partial + S (ff_r_pd_l_p) = S ((S (ff_i_pd_l_p)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_partial. ff_u_pd_l_p = ff_q_pd_l_p_partial * S ((S (ff_i_pd_l_p)) * ff_v_pd_l_p) + (ff_r_pd_l_p))) /\ ((((exists ff_h_pd_l_p_successor. ff_h_pd_l_p_successor + S (ff_s_pd_l_p) = S ((S (S ff_i_pd_l_p)) * ff_v_pd_l_p)) /\ exists ff_q_pd_l_p_successor. ff_u_pd_l_p = ff_q_pd_l_p_successor * S ((S (S ff_i_pd_l_p)) * ff_v_pd_l_p) + (ff_s_pd_l_p))) /\ ff_s_pd_l_p = ff_r_pd_l_p * ff_p_pd_l_p)))))) /\ n = r * a)
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose n
apply beta_product_succ_decompose
exact hn
cases hnd
cases hnd_witness
cases hnd_witness_witness
cases hnd_witness_witness_right
have hqd : exists a r. (((exists ff_h_pd_r_a. ff_h_pd_r_a + S (a) = S ((S (l)) * e)) /\ exists ff_q_pd_r_a. d = ff_q_pd_r_a * S ((S (l)) * e) + (a))) /\ ((exists ff_u_pd_r_p ff_v_pd_r_p. ((((exists ff_h_pd_r_p_start. ff_h_pd_r_p_start + S (1) = S ((S (0)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_start. ff_u_pd_r_p = ff_q_pd_r_p_start * S ((S (0)) * ff_v_pd_r_p) + (1))) /\ ((((exists ff_h_pd_r_p_terminal. ff_h_pd_r_p_terminal + S (r) = S ((S (l)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_terminal. ff_u_pd_r_p = ff_q_pd_r_p_terminal * S ((S (l)) * ff_v_pd_r_p) + (r))) /\ forall ff_i_pd_r_p. (exists ff_lt_pd_r_p_bound. ff_lt_pd_r_p_bound + S ff_i_pd_r_p = l) -&gt; exists ff_p_pd_r_p ff_r_pd_r_p ff_s_pd_r_p. ((((exists ff_h_pd_r_p_factor. ff_h_pd_r_p_factor + S (ff_p_pd_r_p) = S ((S (ff_i_pd_r_p)) * e)) /\ exists ff_q_pd_r_p_factor. d = ff_q_pd_r_p_factor * S ((S (ff_i_pd_r_p)) * e) + (ff_p_pd_r_p))) /\ ((((exists ff_h_pd_r_p_partial. ff_h_pd_r_p_partial + S (ff_r_pd_r_p) = S ((S (ff_i_pd_r_p)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_partial. ff_u_pd_r_p = ff_q_pd_r_p_partial * S ((S (ff_i_pd_r_p)) * ff_v_pd_r_p) + (ff_r_pd_r_p))) /\ ((((exists ff_h_pd_r_p_successor. ff_h_pd_r_p_successor + S (ff_s_pd_r_p) = S ((S (S ff_i_pd_r_p)) * ff_v_pd_r_p)) /\ exists ff_q_pd_r_p_successor. ff_u_pd_r_p = ff_q_pd_r_p_successor * S ((S (S ff_i_pd_r_p)) * ff_v_pd_r_p) + (ff_s_pd_r_p))) /\ ff_s_pd_r_p = ff_r_pd_r_p * ff_p_pd_r_p)))))) /\ q = r * a)
specialize beta_product_succ_decompose d
specialize beta_product_succ_decompose e
specialize beta_product_succ_decompose l
specialize beta_product_succ_decompose q
apply beta_product_succ_decompose
exact hq
cases hqd
cases hqd_witness
cases hqd_witness_witness
cases hqd_witness_witness_right
have hpw_prefix : forall i a z. (exists fc_h_pp_pre. fc_h_pp_pre + S i = l) -&gt; (((exists ff_h_pp_pre_la. ff_h_pp_pre_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_pp_pre_la. b = ff_q_pp_pre_la * S ((S (i)) * c) + (a))) -&gt; (((exists ff_h_pp_pre_ra. ff_h_pp_pre_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_pp_pre_ra. d = ff_q_pp_pre_ra * S ((S (i)) * e) + (z))) -&gt; exists fc_u_pp_pre_me fc_v_pp_pre_me. a + m * fc_u_pp_pre_me = z + m * fc_v_pp_pre_me
intro i
intro a
intro z
intro hi
intro ha
intro hz
specialize hpw i
specialize hpw a
specialize hpw z
apply hpw
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
exact ha
exact hz
have hprefix : exists u v. x1 + m * u = x3 + m * v
specialize IH x1
specialize IH x3
apply IH
exact hpw_prefix
exact hnd_witness_witness_right_left
exact hqd_witness_witness_right_left
have hentry : exists u v. x + m * u = x2 + m * v
specialize hpw l
specialize hpw x
specialize hpw x2
apply hpw
specialize le_refl (S l)
exact le_refl
exact hnd_witness_witness_left
exact hqd_witness_witness_left
have hfold : exists u v. (x1 * x) + m * u = (x3 * x2) + m * v
specialize mod_eq_mul m
specialize mod_eq_mul x1
specialize mod_eq_mul x3
specialize mod_eq_mul x
specialize mod_eq_mul x2
apply mod_eq_mul
exact hprefix
exact hentry
rewrite hnd_witness_witness_right_right
rewrite hqd_witness_witness_right_right
exact hfold
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,129</dd></div>
        <div><dt>Distinct objects</dt><dd>1,198</dd></div>
        <div><dt>Reused references</dt><dd>57</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>117</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="eade7d849228d9d4ef9944a605f71bf9a04074587a70c72cf14c6dc91424f044">eade7d849228…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_pointwise_mod_congruent">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_pointwise_mod_congruent</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_congruence_theorems.py#L104">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_pointwise_mod_congruent.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_sum_pointwise_mod_congruent"
  data-name="beta_sum_pointwise_mod_congruent" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_sum_zero,beta_sum_succ_decompose,le_succ,le_refl,mod_eq_refl,mod_eq_add"
  data-search="beta_sum_pointwise_mod_congruent beta sum pointwise mod congruent pointwise congruent decoded prefixes have congruent finite sums. forall m b c d e l n q. (forall i a z. (exists fc_h_sp. fc_h_sp + s i = l) -&gt; (((exists ff_h_sp_la. ff_h_sp_la + s (a) = s ((s (i)) * c)) /\ exists ff_q_sp_la. b = ff_q_sp_la * s ((s (i)) * c) + (a))) -&gt; (((exists ff_h_sp_ra. ff_h_sp_ra + s (z) = s ((s (i)) * e)) /\ exists ff_q_sp_ra. d = ff_q_sp_ra * s ((s (i)) * e) + (z))) -&gt; exists fc_u_sp_me fc_v_sp_me. a + m * fc_u_sp_me = z + m * fc_v_sp_me) -&gt; (exists ff_u_sl ff_v_sl. ((((exists ff_h_sl_start. ff_h_sl_start + s (0) = s ((s (0)) * ff_v_sl)) /\ exists ff_q_sl_start. ff_u_sl = ff_q_sl_start * s ((s (0)) * ff_v_sl) + (0))) /\ ((((exists ff_h_sl_terminal. ff_h_sl_terminal + s (n) = s ((s (l)) * ff_v_sl)) /\ exists ff_q_sl_terminal. ff_u_sl = ff_q_sl_terminal * s ((s (l)) * ff_v_sl) + (n))) /\ forall ff_i_sl. (exists ff_lt_sl_bound. ff_lt_sl_bound + s ff_i_sl = l) -&gt; exists ff_a_sl ff_r_sl ff_s_sl. ((((exists ff_h_sl_summand. ff_h_sl_summand + s (ff_a_sl) = s ((s (ff_i_sl)) * c)) /\ exists ff_q_sl_summand. b = ff_q_sl_summand * s ((s (ff_i_sl)) * c) + (ff_a_sl))) /\ ((((exists ff_h_sl_partial. ff_h_sl_partial + s (ff_r_sl) = s ((s (ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_partial. ff_u_sl = ff_q_sl_partial * s ((s (ff_i_sl)) * ff_v_sl) + (ff_r_sl))) /\ ((((exists ff_h_sl_successor. ff_h_sl_successor + s (ff_s_sl) = s ((s (s ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_successor. ff_u_sl = ff_q_sl_successor * s ((s (s ff_i_sl)) * ff_v_sl) + (ff_s_sl))) /\ ff_s_sl = ff_r_sl + ff_a_sl)))))) -&gt; (exists ff_u_sr ff_v_sr. ((((exists ff_h_sr_start. ff_h_sr_start + s (0) = s ((s (0)) * ff_v_sr)) /\ exists ff_q_sr_start. ff_u_sr = ff_q_sr_start * s ((s (0)) * ff_v_sr) + (0))) /\ ((((exists ff_h_sr_terminal. ff_h_sr_terminal + s (q) = s ((s (l)) * ff_v_sr)) /\ exists ff_q_sr_terminal. ff_u_sr = ff_q_sr_terminal * s ((s (l)) * ff_v_sr) + (q))) /\ forall ff_i_sr. (exists ff_lt_sr_bound. ff_lt_sr_bound + s ff_i_sr = l) -&gt; exists ff_a_sr ff_r_sr ff_s_sr. ((((exists ff_h_sr_summand. ff_h_sr_summand + s (ff_a_sr) = s ((s (ff_i_sr)) * e)) /\ exists ff_q_sr_summand. d = ff_q_sr_summand * s ((s (ff_i_sr)) * e) + (ff_a_sr))) /\ ((((exists ff_h_sr_partial. ff_h_sr_partial + s (ff_r_sr) = s ((s (ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_partial. ff_u_sr = ff_q_sr_partial * s ((s (ff_i_sr)) * ff_v_sr) + (ff_r_sr))) /\ ((((exists ff_h_sr_successor. ff_h_sr_successor + s (ff_s_sr) = s ((s (s ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_successor. ff_u_sr = ff_q_sr_successor * s ((s (s ff_i_sr)) * ff_v_sr) + (ff_s_sr))) /\ ff_s_sr = ff_r_sr + ff_a_sr)))))) -&gt; exists fc_u_sv fc_v_sv. n + m * fc_u_sv = q + m * fc_v_sv quadratic_residues beta_sum_zero beta_sum_succ_decompose le_succ le_refl mod_eq_refl mod_eq_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_sum_pointwise_mod_congruent</code><span>Beta sum pointwise mod congruent</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Pointwise congruent decoded prefixes have congruent finite sums.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_zero" href="#theorem-beta_sum_zero"><code>beta_sum_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_sum_succ_decompose" href="#theorem-beta_sum_succ_decompose"><code>beta_sum_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_add" href="#theorem-mod_eq_add"><code>mod_eq_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_sum_pointwise_mod_congruent">Copy statement</button>
        <pre id="statement-beta_sum_pointwise_mod_congruent"><code>forall m b c d e l n q. (forall i a z. (exists fc_h_sp. fc_h_sp + S i = l) -&gt; (((exists ff_h_sp_la. ff_h_sp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_sp_la. b = ff_q_sp_la * S ((S (i)) * c) + (a))) -&gt; (((exists ff_h_sp_ra. ff_h_sp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_sp_ra. d = ff_q_sp_ra * S ((S (i)) * e) + (z))) -&gt; exists fc_u_sp_me fc_v_sp_me. a + m * fc_u_sp_me = z + m * fc_v_sp_me) -&gt; (exists ff_u_sl ff_v_sl. ((((exists ff_h_sl_start. ff_h_sl_start + S (0) = S ((S (0)) * ff_v_sl)) /\ exists ff_q_sl_start. ff_u_sl = ff_q_sl_start * S ((S (0)) * ff_v_sl) + (0))) /\ ((((exists ff_h_sl_terminal. ff_h_sl_terminal + S (n) = S ((S (l)) * ff_v_sl)) /\ exists ff_q_sl_terminal. ff_u_sl = ff_q_sl_terminal * S ((S (l)) * ff_v_sl) + (n))) /\ forall ff_i_sl. (exists ff_lt_sl_bound. ff_lt_sl_bound + S ff_i_sl = l) -&gt; exists ff_a_sl ff_r_sl ff_s_sl. ((((exists ff_h_sl_summand. ff_h_sl_summand + S (ff_a_sl) = S ((S (ff_i_sl)) * c)) /\ exists ff_q_sl_summand. b = ff_q_sl_summand * S ((S (ff_i_sl)) * c) + (ff_a_sl))) /\ ((((exists ff_h_sl_partial. ff_h_sl_partial + S (ff_r_sl) = S ((S (ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_partial. ff_u_sl = ff_q_sl_partial * S ((S (ff_i_sl)) * ff_v_sl) + (ff_r_sl))) /\ ((((exists ff_h_sl_successor. ff_h_sl_successor + S (ff_s_sl) = S ((S (S ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_successor. ff_u_sl = ff_q_sl_successor * S ((S (S ff_i_sl)) * ff_v_sl) + (ff_s_sl))) /\ ff_s_sl = ff_r_sl + ff_a_sl)))))) -&gt; (exists ff_u_sr ff_v_sr. ((((exists ff_h_sr_start. ff_h_sr_start + S (0) = S ((S (0)) * ff_v_sr)) /\ exists ff_q_sr_start. ff_u_sr = ff_q_sr_start * S ((S (0)) * ff_v_sr) + (0))) /\ ((((exists ff_h_sr_terminal. ff_h_sr_terminal + S (q) = S ((S (l)) * ff_v_sr)) /\ exists ff_q_sr_terminal. ff_u_sr = ff_q_sr_terminal * S ((S (l)) * ff_v_sr) + (q))) /\ forall ff_i_sr. (exists ff_lt_sr_bound. ff_lt_sr_bound + S ff_i_sr = l) -&gt; exists ff_a_sr ff_r_sr ff_s_sr. ((((exists ff_h_sr_summand. ff_h_sr_summand + S (ff_a_sr) = S ((S (ff_i_sr)) * e)) /\ exists ff_q_sr_summand. d = ff_q_sr_summand * S ((S (ff_i_sr)) * e) + (ff_a_sr))) /\ ((((exists ff_h_sr_partial. ff_h_sr_partial + S (ff_r_sr) = S ((S (ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_partial. ff_u_sr = ff_q_sr_partial * S ((S (ff_i_sr)) * ff_v_sr) + (ff_r_sr))) /\ ((((exists ff_h_sr_successor. ff_h_sr_successor + S (ff_s_sr) = S ((S (S ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_successor. ff_u_sr = ff_q_sr_successor * S ((S (S ff_i_sr)) * ff_v_sr) + (ff_s_sr))) /\ ff_s_sr = ff_r_sr + ff_a_sr)))))) -&gt; exists fc_u_sv fc_v_sv. n + m * fc_u_sv = q + m * fc_v_sv</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_sum_pointwise_mod_congruent">Copy proof</button>
        <pre id="proof-beta_sum_pointwise_mod_congruent"><code>pa prove forall m b c d e l n q. (forall i a z. (exists fc_h_sp. fc_h_sp + S i = l) -&gt; (((exists ff_h_sp_la. ff_h_sp_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_sp_la. b = ff_q_sp_la * S ((S (i)) * c) + (a))) -&gt; (((exists ff_h_sp_ra. ff_h_sp_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_sp_ra. d = ff_q_sp_ra * S ((S (i)) * e) + (z))) -&gt; exists fc_u_sp_me fc_v_sp_me. a + m * fc_u_sp_me = z + m * fc_v_sp_me) -&gt; (exists ff_u_sl ff_v_sl. ((((exists ff_h_sl_start. ff_h_sl_start + S (0) = S ((S (0)) * ff_v_sl)) /\ exists ff_q_sl_start. ff_u_sl = ff_q_sl_start * S ((S (0)) * ff_v_sl) + (0))) /\ ((((exists ff_h_sl_terminal. ff_h_sl_terminal + S (n) = S ((S (l)) * ff_v_sl)) /\ exists ff_q_sl_terminal. ff_u_sl = ff_q_sl_terminal * S ((S (l)) * ff_v_sl) + (n))) /\ forall ff_i_sl. (exists ff_lt_sl_bound. ff_lt_sl_bound + S ff_i_sl = l) -&gt; exists ff_a_sl ff_r_sl ff_s_sl. ((((exists ff_h_sl_summand. ff_h_sl_summand + S (ff_a_sl) = S ((S (ff_i_sl)) * c)) /\ exists ff_q_sl_summand. b = ff_q_sl_summand * S ((S (ff_i_sl)) * c) + (ff_a_sl))) /\ ((((exists ff_h_sl_partial. ff_h_sl_partial + S (ff_r_sl) = S ((S (ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_partial. ff_u_sl = ff_q_sl_partial * S ((S (ff_i_sl)) * ff_v_sl) + (ff_r_sl))) /\ ((((exists ff_h_sl_successor. ff_h_sl_successor + S (ff_s_sl) = S ((S (S ff_i_sl)) * ff_v_sl)) /\ exists ff_q_sl_successor. ff_u_sl = ff_q_sl_successor * S ((S (S ff_i_sl)) * ff_v_sl) + (ff_s_sl))) /\ ff_s_sl = ff_r_sl + ff_a_sl)))))) -&gt; (exists ff_u_sr ff_v_sr. ((((exists ff_h_sr_start. ff_h_sr_start + S (0) = S ((S (0)) * ff_v_sr)) /\ exists ff_q_sr_start. ff_u_sr = ff_q_sr_start * S ((S (0)) * ff_v_sr) + (0))) /\ ((((exists ff_h_sr_terminal. ff_h_sr_terminal + S (q) = S ((S (l)) * ff_v_sr)) /\ exists ff_q_sr_terminal. ff_u_sr = ff_q_sr_terminal * S ((S (l)) * ff_v_sr) + (q))) /\ forall ff_i_sr. (exists ff_lt_sr_bound. ff_lt_sr_bound + S ff_i_sr = l) -&gt; exists ff_a_sr ff_r_sr ff_s_sr. ((((exists ff_h_sr_summand. ff_h_sr_summand + S (ff_a_sr) = S ((S (ff_i_sr)) * e)) /\ exists ff_q_sr_summand. d = ff_q_sr_summand * S ((S (ff_i_sr)) * e) + (ff_a_sr))) /\ ((((exists ff_h_sr_partial. ff_h_sr_partial + S (ff_r_sr) = S ((S (ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_partial. ff_u_sr = ff_q_sr_partial * S ((S (ff_i_sr)) * ff_v_sr) + (ff_r_sr))) /\ ((((exists ff_h_sr_successor. ff_h_sr_successor + S (ff_s_sr) = S ((S (S ff_i_sr)) * ff_v_sr)) /\ exists ff_q_sr_successor. ff_u_sr = ff_q_sr_successor * S ((S (S ff_i_sr)) * ff_v_sr) + (ff_s_sr))) /\ ff_s_sr = ff_r_sr + ff_a_sr)))))) -&gt; exists fc_u_sv fc_v_sv. n + m * fc_u_sv = q + m * fc_v_sv
use beta_sum_zero
use beta_sum_succ_decompose
use le_succ
use le_refl
use mod_eq_refl
use mod_eq_add
intro m
intro b
intro c
intro d
intro e
induction l
intro n
intro q
intro hpw
intro hn
intro hq
have hn0 : n = 0
specialize beta_sum_zero b
specialize beta_sum_zero c
specialize beta_sum_zero n
apply beta_sum_zero
exact hn
have hq0 : q = 0
specialize beta_sum_zero d
specialize beta_sum_zero e
specialize beta_sum_zero q
apply beta_sum_zero
exact hq
rewrite hn0
rewrite hq0
specialize mod_eq_refl m
specialize mod_eq_refl 0
exact mod_eq_refl
intro n
intro q
intro hpw
intro hn
intro hq
have hnd : exists a r. (((exists ff_h_sd_l_a. ff_h_sd_l_a + S (a) = S ((S (l)) * c)) /\ exists ff_q_sd_l_a. b = ff_q_sd_l_a * S ((S (l)) * c) + (a))) /\ ((exists ff_u_sd_l_p ff_v_sd_l_p. ((((exists ff_h_sd_l_p_start. ff_h_sd_l_p_start + S (0) = S ((S (0)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_start. ff_u_sd_l_p = ff_q_sd_l_p_start * S ((S (0)) * ff_v_sd_l_p) + (0))) /\ ((((exists ff_h_sd_l_p_terminal. ff_h_sd_l_p_terminal + S (r) = S ((S (l)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_terminal. ff_u_sd_l_p = ff_q_sd_l_p_terminal * S ((S (l)) * ff_v_sd_l_p) + (r))) /\ forall ff_i_sd_l_p. (exists ff_lt_sd_l_p_bound. ff_lt_sd_l_p_bound + S ff_i_sd_l_p = l) -&gt; exists ff_a_sd_l_p ff_r_sd_l_p ff_s_sd_l_p. ((((exists ff_h_sd_l_p_summand. ff_h_sd_l_p_summand + S (ff_a_sd_l_p) = S ((S (ff_i_sd_l_p)) * c)) /\ exists ff_q_sd_l_p_summand. b = ff_q_sd_l_p_summand * S ((S (ff_i_sd_l_p)) * c) + (ff_a_sd_l_p))) /\ ((((exists ff_h_sd_l_p_partial. ff_h_sd_l_p_partial + S (ff_r_sd_l_p) = S ((S (ff_i_sd_l_p)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_partial. ff_u_sd_l_p = ff_q_sd_l_p_partial * S ((S (ff_i_sd_l_p)) * ff_v_sd_l_p) + (ff_r_sd_l_p))) /\ ((((exists ff_h_sd_l_p_successor. ff_h_sd_l_p_successor + S (ff_s_sd_l_p) = S ((S (S ff_i_sd_l_p)) * ff_v_sd_l_p)) /\ exists ff_q_sd_l_p_successor. ff_u_sd_l_p = ff_q_sd_l_p_successor * S ((S (S ff_i_sd_l_p)) * ff_v_sd_l_p) + (ff_s_sd_l_p))) /\ ff_s_sd_l_p = ff_r_sd_l_p + ff_a_sd_l_p)))))) /\ n = r + a)
specialize beta_sum_succ_decompose b
specialize beta_sum_succ_decompose c
specialize beta_sum_succ_decompose l
specialize beta_sum_succ_decompose n
apply beta_sum_succ_decompose
exact hn
cases hnd
cases hnd_witness
cases hnd_witness_witness
cases hnd_witness_witness_right
have hqd : exists a r. (((exists ff_h_sd_r_a. ff_h_sd_r_a + S (a) = S ((S (l)) * e)) /\ exists ff_q_sd_r_a. d = ff_q_sd_r_a * S ((S (l)) * e) + (a))) /\ ((exists ff_u_sd_r_p ff_v_sd_r_p. ((((exists ff_h_sd_r_p_start. ff_h_sd_r_p_start + S (0) = S ((S (0)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_start. ff_u_sd_r_p = ff_q_sd_r_p_start * S ((S (0)) * ff_v_sd_r_p) + (0))) /\ ((((exists ff_h_sd_r_p_terminal. ff_h_sd_r_p_terminal + S (r) = S ((S (l)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_terminal. ff_u_sd_r_p = ff_q_sd_r_p_terminal * S ((S (l)) * ff_v_sd_r_p) + (r))) /\ forall ff_i_sd_r_p. (exists ff_lt_sd_r_p_bound. ff_lt_sd_r_p_bound + S ff_i_sd_r_p = l) -&gt; exists ff_a_sd_r_p ff_r_sd_r_p ff_s_sd_r_p. ((((exists ff_h_sd_r_p_summand. ff_h_sd_r_p_summand + S (ff_a_sd_r_p) = S ((S (ff_i_sd_r_p)) * e)) /\ exists ff_q_sd_r_p_summand. d = ff_q_sd_r_p_summand * S ((S (ff_i_sd_r_p)) * e) + (ff_a_sd_r_p))) /\ ((((exists ff_h_sd_r_p_partial. ff_h_sd_r_p_partial + S (ff_r_sd_r_p) = S ((S (ff_i_sd_r_p)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_partial. ff_u_sd_r_p = ff_q_sd_r_p_partial * S ((S (ff_i_sd_r_p)) * ff_v_sd_r_p) + (ff_r_sd_r_p))) /\ ((((exists ff_h_sd_r_p_successor. ff_h_sd_r_p_successor + S (ff_s_sd_r_p) = S ((S (S ff_i_sd_r_p)) * ff_v_sd_r_p)) /\ exists ff_q_sd_r_p_successor. ff_u_sd_r_p = ff_q_sd_r_p_successor * S ((S (S ff_i_sd_r_p)) * ff_v_sd_r_p) + (ff_s_sd_r_p))) /\ ff_s_sd_r_p = ff_r_sd_r_p + ff_a_sd_r_p)))))) /\ q = r + a)
specialize beta_sum_succ_decompose d
specialize beta_sum_succ_decompose e
specialize beta_sum_succ_decompose l
specialize beta_sum_succ_decompose q
apply beta_sum_succ_decompose
exact hq
cases hqd
cases hqd_witness
cases hqd_witness_witness
cases hqd_witness_witness_right
have hpw_prefix : forall i a z. (exists fc_h_sp_pre. fc_h_sp_pre + S i = l) -&gt; (((exists ff_h_sp_pre_la. ff_h_sp_pre_la + S (a) = S ((S (i)) * c)) /\ exists ff_q_sp_pre_la. b = ff_q_sp_pre_la * S ((S (i)) * c) + (a))) -&gt; (((exists ff_h_sp_pre_ra. ff_h_sp_pre_ra + S (z) = S ((S (i)) * e)) /\ exists ff_q_sp_pre_ra. d = ff_q_sp_pre_ra * S ((S (i)) * e) + (z))) -&gt; exists fc_u_sp_pre_me fc_v_sp_pre_me. a + m * fc_u_sp_pre_me = z + m * fc_v_sp_pre_me
intro i
intro a
intro z
intro hi
intro ha
intro hz
specialize hpw i
specialize hpw a
specialize hpw z
apply hpw
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
exact ha
exact hz
have hprefix : exists u v. x1 + m * u = x3 + m * v
specialize IH x1
specialize IH x3
apply IH
exact hpw_prefix
exact hnd_witness_witness_right_left
exact hqd_witness_witness_right_left
have hentry : exists u v. x + m * u = x2 + m * v
specialize hpw l
specialize hpw x
specialize hpw x2
apply hpw
specialize le_refl (S l)
exact le_refl
exact hnd_witness_witness_left
exact hqd_witness_witness_left
have hfold : exists u v. (x1 + x) + m * u = (x3 + x2) + m * v
specialize mod_eq_add m
specialize mod_eq_add x1
specialize mod_eq_add x3
specialize mod_eq_add x
specialize mod_eq_add x2
apply mod_eq_add
exact hprefix
exact hentry
rewrite hnd_witness_witness_right_right
rewrite hqd_witness_witness_right_right
exact hfold
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,994</dd></div>
        <div><dt>Distinct objects</dt><dd>1,079</dd></div>
        <div><dt>Reused references</dt><dd>46</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>84</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3e8170b1fba38c8b4bd33664e00cf92fbe2dc4245fdb404a410f38532057fbe9">3e8170b1fba3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_sum_pointwise_mod_congruent">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_sum_pointwise_mod_congruent</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_congruence_theorems.py#L220">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_sum_pointwise_mod_congruent.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_bits_zero"
  data-name="all_bits_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero"
  data-search="all_bits_zero all bits zero the empty decoded prefix consists only of bits, vacuously. forall b c l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + s ff_i_empty = l) -&gt; exists ff_bit_empty. ((((exists ff_h_empty_decoded. ff_h_empty_decoded + s (ff_bit_empty) = s ((s (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * s ((s (ff_i_empty)) * c) + (ff_bit_empty))) /\ (ff_bit_empty = 0 \/ ff_bit_empty = 1))) quadratic_residues add_eq_zero_right succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_bits_zero</code><span>All bits zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The empty decoded prefix consists only of bits, vacuously.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_bits_zero">Copy statement</button>
        <pre id="statement-all_bits_zero"><code>forall b c l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -&gt; exists ff_bit_empty. ((((exists ff_h_empty_decoded. ff_h_empty_decoded + S (ff_bit_empty) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (ff_bit_empty))) /\ (ff_bit_empty = 0 \/ ff_bit_empty = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_bits_zero">Copy proof</button>
        <pre id="proof-all_bits_zero"><code>pa prove forall b c l. l = 0 -&gt; (forall ff_i_empty. (exists ff_lt_empty_bound. ff_lt_empty_bound + S ff_i_empty = l) -&gt; exists ff_bit_empty. ((((exists ff_h_empty_decoded. ff_h_empty_decoded + S (ff_bit_empty) = S ((S (ff_i_empty)) * c)) /\ exists ff_q_empty_decoded. b = ff_q_empty_decoded * S ((S (ff_i_empty)) * c) + (ff_bit_empty))) /\ (ff_bit_empty = 0 \/ ff_bit_empty = 1)))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro l
intro hl
intro i
intro hi
rewrite hl at hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>41</dd></div>
        <div><dt>Distinct objects</dt><dd>41</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1dff5495e030bf3c570b1530e34e22966ec7b9d6acf3ff416741537135a8552a">1dff5495e030…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_bits_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_bits_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L44">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_bits_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_bits_prefix_succ"
  data-name="all_bits_prefix_succ" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_succ"
  data-search="all_bits_prefix_succ all bits prefix succ dropping the final entry preserves the all-bits invariant. forall b c l sl. sl = s l -&gt; (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + s ff_i_successor = sl) -&gt; exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + s (ff_bit_successor) = s ((s (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * s ((s (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -&gt; (forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + s ff_i_prefix = l) -&gt; exists ff_bit_prefix. ((((exists ff_h_prefix_decoded. ff_h_prefix_decoded + s (ff_bit_prefix) = s ((s (ff_i_prefix)) * c)) /\ exists ff_q_prefix_decoded. b = ff_q_prefix_decoded * s ((s (ff_i_prefix)) * c) + (ff_bit_prefix))) /\ (ff_bit_prefix = 0 \/ ff_bit_prefix = 1))) quadratic_residues le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_bits_prefix_succ</code><span>All bits prefix succ</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Dropping the final entry preserves the all-bits invariant.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bit_count_succ_decompose" href="#theorem-bit_count_succ_decompose"><code>bit_count_succ_decompose</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_bits_prefix_succ">Copy statement</button>
        <pre id="statement-all_bits_prefix_succ"><code>forall b c l sl. sl = S l -&gt; (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -&gt; exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -&gt; (forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -&gt; exists ff_bit_prefix. ((((exists ff_h_prefix_decoded. ff_h_prefix_decoded + S (ff_bit_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_decoded. b = ff_q_prefix_decoded * S ((S (ff_i_prefix)) * c) + (ff_bit_prefix))) /\ (ff_bit_prefix = 0 \/ ff_bit_prefix = 1)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_bits_prefix_succ">Copy proof</button>
        <pre id="proof-all_bits_prefix_succ"><code>pa prove forall b c l sl. sl = S l -&gt; (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -&gt; exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -&gt; (forall ff_i_prefix. (exists ff_lt_prefix_bound. ff_lt_prefix_bound + S ff_i_prefix = l) -&gt; exists ff_bit_prefix. ((((exists ff_h_prefix_decoded. ff_h_prefix_decoded + S (ff_bit_prefix) = S ((S (ff_i_prefix)) * c)) /\ exists ff_q_prefix_decoded. b = ff_q_prefix_decoded * S ((S (ff_i_prefix)) * c) + (ff_bit_prefix))) /\ (ff_bit_prefix = 0 \/ ff_bit_prefix = 1)))
use le_succ
intro b
intro c
intro l
intro sl
intro hsl
intro hbits
rewrite hsl at hbits
intro i
intro hi
specialize hbits i
apply hbits
specialize le_succ (S i)
specialize le_succ l
apply le_succ
exact hi
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>71</dd></div>
        <div><dt>Distinct objects</dt><dd>69</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>20</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ed2b35b3bbd8142215ff36e36f281efca83335b709fb6e72d52201d4281c59df">ed2b35b3bbd8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_bits_prefix_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_bits_prefix_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L69">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_bits_prefix_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-all_bits_last_succ"
  data-name="all_bits_last_succ" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_refl"
  data-search="all_bits_last_succ all bits last succ the final entry of a nonempty all-bits prefix is zero or one. forall b c l sl. sl = s l -&gt; (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + s ff_i_successor = sl) -&gt; exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + s (ff_bit_successor) = s ((s (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * s ((s (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -&gt; exists a. ((((exists ff_h_last. ff_h_last + s (a) = s ((s (l)) * c)) /\ exists ff_q_last. b = ff_q_last * s ((s (l)) * c) + (a))) /\ (a = 0 \/ a = 1)) quadratic_residues le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>all_bits_last_succ</code><span>All bits last succ</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The final entry of a nonempty all-bits prefix is zero or one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bit_count_succ_decompose" href="#theorem-bit_count_succ_decompose"><code>bit_count_succ_decompose</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-all_bits_last_succ">Copy statement</button>
        <pre id="statement-all_bits_last_succ"><code>forall b c l sl. sl = S l -&gt; (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -&gt; exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -&gt; exists a. ((((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ (a = 0 \/ a = 1))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-all_bits_last_succ">Copy proof</button>
        <pre id="proof-all_bits_last_succ"><code>pa prove forall b c l sl. sl = S l -&gt; (forall ff_i_successor. (exists ff_lt_successor_bound. ff_lt_successor_bound + S ff_i_successor = sl) -&gt; exists ff_bit_successor. ((((exists ff_h_successor_decoded. ff_h_successor_decoded + S (ff_bit_successor) = S ((S (ff_i_successor)) * c)) /\ exists ff_q_successor_decoded. b = ff_q_successor_decoded * S ((S (ff_i_successor)) * c) + (ff_bit_successor))) /\ (ff_bit_successor = 0 \/ ff_bit_successor = 1))) -&gt; exists a. ((((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ (a = 0 \/ a = 1))
use le_refl
intro b
intro c
intro l
intro sl
intro hsl
intro hbits
rewrite hsl at hbits
specialize hbits l
apply hbits
specialize le_refl (S l)
exact le_refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>48</dd></div>
        <div><dt>Distinct objects</dt><dd>48</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="11b88553710c7d2fa18ba5bbbbfb5c695925fd9f0a2d5f1b17ecec0c17b0f413">11b88553710c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for all_bits_last_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib all_bits_last_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L93">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/all_bits_last_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bit_count_exists"
  data-name="bit_count_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_sum_exists"
  data-search="bit_count_exists bit count exists every all-bits prefix has a relational count of its ones. forall b c l. (forall ff_i_a. (exists ff_lt_a_bound. ff_lt_a_bound + s ff_i_a = l) -&gt; exists ff_bit_a. ((((exists ff_h_a_decoded. ff_h_a_decoded + s (ff_bit_a) = s ((s (ff_i_a)) * c)) /\ exists ff_q_a_decoded. b = ff_q_a_decoded * s ((s (ff_i_a)) * c) + (ff_bit_a))) /\ (ff_bit_a = 0 \/ ff_bit_a = 1))) -&gt; exists n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + s (0) = s ((s (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * s ((s (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + s (n) = s ((s (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * s ((s (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + s ff_i_b_sum = l) -&gt; exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + s (ff_a_b_sum) = s ((s (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * s ((s (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + s (ff_r_b_sum) = s ((s (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * s ((s (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + s (ff_s_b_sum) = s ((s (s ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * s ((s (s ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + s ff_i_b_bits = l) -&gt; exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + s (ff_bit_b_bits) = s ((s (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * s ((s (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1))))) quadratic_residues beta_sum_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>bit_count_exists</code><span>Bit count exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every all-bits prefix has a relational count of its ones.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_exists" href="#theorem-beta_sum_exists"><code>beta_sum_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bit_count_exists">Copy statement</button>
        <pre id="statement-bit_count_exists"><code>forall b c l. (forall ff_i_a. (exists ff_lt_a_bound. ff_lt_a_bound + S ff_i_a = l) -&gt; exists ff_bit_a. ((((exists ff_h_a_decoded. ff_h_a_decoded + S (ff_bit_a) = S ((S (ff_i_a)) * c)) /\ exists ff_q_a_decoded. b = ff_q_a_decoded * S ((S (ff_i_a)) * c) + (ff_bit_a))) /\ (ff_bit_a = 0 \/ ff_bit_a = 1))) -&gt; exists n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -&gt; exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -&gt; exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bit_count_exists">Copy proof</button>
        <pre id="proof-bit_count_exists"><code>pa prove forall b c l. (forall ff_i_a. (exists ff_lt_a_bound. ff_lt_a_bound + S ff_i_a = l) -&gt; exists ff_bit_a. ((((exists ff_h_a_decoded. ff_h_a_decoded + S (ff_bit_a) = S ((S (ff_i_a)) * c)) /\ exists ff_q_a_decoded. b = ff_q_a_decoded * S ((S (ff_i_a)) * c) + (ff_bit_a))) /\ (ff_bit_a = 0 \/ ff_bit_a = 1))) -&gt; exists n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -&gt; exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -&gt; exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1)))))
use beta_sum_exists
intro b
intro c
intro l
intro hbits
specialize beta_sum_exists b
specialize beta_sum_exists c
specialize beta_sum_exists l
cases beta_sum_exists
exists x
split
exact beta_sum_exists_witness
exact hbits
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>30,514</dd></div>
        <div><dt>Distinct objects</dt><dd>4,771</dd></div>
        <div><dt>Reused references</dt><dd>236</dd></div>
        <div><dt>Depth</dt><dd>87</dd></div>
        <div><dt>Cuts</dt><dd>917</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="547a69863934743569030872640306474254a55d90346657ad55a734e526ddb2">547a69863934…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bit_count_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bit_count_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L113">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bit_count_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bit_count_functional"
  data-name="bit_count_functional" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_sum_functional"
  data-search="bit_count_functional bit count functional the relational count of a fixed all-bits prefix is unique. forall b c l n m. (((exists ff_u_l_sum ff_v_l_sum. ((((exists ff_h_l_sum_start. ff_h_l_sum_start + s (0) = s ((s (0)) * ff_v_l_sum)) /\ exists ff_q_l_sum_start. ff_u_l_sum = ff_q_l_sum_start * s ((s (0)) * ff_v_l_sum) + (0))) /\ ((((exists ff_h_l_sum_terminal. ff_h_l_sum_terminal + s (n) = s ((s (l)) * ff_v_l_sum)) /\ exists ff_q_l_sum_terminal. ff_u_l_sum = ff_q_l_sum_terminal * s ((s (l)) * ff_v_l_sum) + (n))) /\ forall ff_i_l_sum. (exists ff_lt_l_sum_bound. ff_lt_l_sum_bound + s ff_i_l_sum = l) -&gt; exists ff_a_l_sum ff_r_l_sum ff_s_l_sum. ((((exists ff_h_l_sum_summand. ff_h_l_sum_summand + s (ff_a_l_sum) = s ((s (ff_i_l_sum)) * c)) /\ exists ff_q_l_sum_summand. b = ff_q_l_sum_summand * s ((s (ff_i_l_sum)) * c) + (ff_a_l_sum))) /\ ((((exists ff_h_l_sum_partial. ff_h_l_sum_partial + s (ff_r_l_sum) = s ((s (ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_partial. ff_u_l_sum = ff_q_l_sum_partial * s ((s (ff_i_l_sum)) * ff_v_l_sum) + (ff_r_l_sum))) /\ ((((exists ff_h_l_sum_successor. ff_h_l_sum_successor + s (ff_s_l_sum) = s ((s (s ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_successor. ff_u_l_sum = ff_q_l_sum_successor * s ((s (s ff_i_l_sum)) * ff_v_l_sum) + (ff_s_l_sum))) /\ ff_s_l_sum = ff_r_l_sum + ff_a_l_sum)))))) /\ (forall ff_i_l_bits. (exists ff_lt_l_bits_bound. ff_lt_l_bits_bound + s ff_i_l_bits = l) -&gt; exists ff_bit_l_bits. ((((exists ff_h_l_bits_decoded. ff_h_l_bits_decoded + s (ff_bit_l_bits) = s ((s (ff_i_l_bits)) * c)) /\ exists ff_q_l_bits_decoded. b = ff_q_l_bits_decoded * s ((s (ff_i_l_bits)) * c) + (ff_bit_l_bits))) /\ (ff_bit_l_bits = 0 \/ ff_bit_l_bits = 1))))) -&gt; (((exists ff_u_r_sum ff_v_r_sum. ((((exists ff_h_r_sum_start. ff_h_r_sum_start + s (0) = s ((s (0)) * ff_v_r_sum)) /\ exists ff_q_r_sum_start. ff_u_r_sum = ff_q_r_sum_start * s ((s (0)) * ff_v_r_sum) + (0))) /\ ((((exists ff_h_r_sum_terminal. ff_h_r_sum_terminal + s (m) = s ((s (l)) * ff_v_r_sum)) /\ exists ff_q_r_sum_terminal. ff_u_r_sum = ff_q_r_sum_terminal * s ((s (l)) * ff_v_r_sum) + (m))) /\ forall ff_i_r_sum. (exists ff_lt_r_sum_bound. ff_lt_r_sum_bound + s ff_i_r_sum = l) -&gt; exists ff_a_r_sum ff_r_r_sum ff_s_r_sum. ((((exists ff_h_r_sum_summand. ff_h_r_sum_summand + s (ff_a_r_sum) = s ((s (ff_i_r_sum)) * c)) /\ exists ff_q_r_sum_summand. b = ff_q_r_sum_summand * s ((s (ff_i_r_sum)) * c) + (ff_a_r_sum))) /\ ((((exists ff_h_r_sum_partial. ff_h_r_sum_partial + s (ff_r_r_sum) = s ((s (ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_partial. ff_u_r_sum = ff_q_r_sum_partial * s ((s (ff_i_r_sum)) * ff_v_r_sum) + (ff_r_r_sum))) /\ ((((exists ff_h_r_sum_successor. ff_h_r_sum_successor + s (ff_s_r_sum) = s ((s (s ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_successor. ff_u_r_sum = ff_q_r_sum_successor * s ((s (s ff_i_r_sum)) * ff_v_r_sum) + (ff_s_r_sum))) /\ ff_s_r_sum = ff_r_r_sum + ff_a_r_sum)))))) /\ (forall ff_i_r_bits. (exists ff_lt_r_bits_bound. ff_lt_r_bits_bound + s ff_i_r_bits = l) -&gt; exists ff_bit_r_bits. ((((exists ff_h_r_bits_decoded. ff_h_r_bits_decoded + s (ff_bit_r_bits) = s ((s (ff_i_r_bits)) * c)) /\ exists ff_q_r_bits_decoded. b = ff_q_r_bits_decoded * s ((s (ff_i_r_bits)) * c) + (ff_bit_r_bits))) /\ (ff_bit_r_bits = 0 \/ ff_bit_r_bits = 1))))) -&gt; n = m quadratic_residues beta_sum_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>bit_count_functional</code><span>Bit count functional</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The relational count of a fixed all-bits prefix is unique.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_functional" href="#theorem-beta_sum_functional"><code>beta_sum_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bit_count_functional">Copy statement</button>
        <pre id="statement-bit_count_functional"><code>forall b c l n m. (((exists ff_u_l_sum ff_v_l_sum. ((((exists ff_h_l_sum_start. ff_h_l_sum_start + S (0) = S ((S (0)) * ff_v_l_sum)) /\ exists ff_q_l_sum_start. ff_u_l_sum = ff_q_l_sum_start * S ((S (0)) * ff_v_l_sum) + (0))) /\ ((((exists ff_h_l_sum_terminal. ff_h_l_sum_terminal + S (n) = S ((S (l)) * ff_v_l_sum)) /\ exists ff_q_l_sum_terminal. ff_u_l_sum = ff_q_l_sum_terminal * S ((S (l)) * ff_v_l_sum) + (n))) /\ forall ff_i_l_sum. (exists ff_lt_l_sum_bound. ff_lt_l_sum_bound + S ff_i_l_sum = l) -&gt; exists ff_a_l_sum ff_r_l_sum ff_s_l_sum. ((((exists ff_h_l_sum_summand. ff_h_l_sum_summand + S (ff_a_l_sum) = S ((S (ff_i_l_sum)) * c)) /\ exists ff_q_l_sum_summand. b = ff_q_l_sum_summand * S ((S (ff_i_l_sum)) * c) + (ff_a_l_sum))) /\ ((((exists ff_h_l_sum_partial. ff_h_l_sum_partial + S (ff_r_l_sum) = S ((S (ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_partial. ff_u_l_sum = ff_q_l_sum_partial * S ((S (ff_i_l_sum)) * ff_v_l_sum) + (ff_r_l_sum))) /\ ((((exists ff_h_l_sum_successor. ff_h_l_sum_successor + S (ff_s_l_sum) = S ((S (S ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_successor. ff_u_l_sum = ff_q_l_sum_successor * S ((S (S ff_i_l_sum)) * ff_v_l_sum) + (ff_s_l_sum))) /\ ff_s_l_sum = ff_r_l_sum + ff_a_l_sum)))))) /\ (forall ff_i_l_bits. (exists ff_lt_l_bits_bound. ff_lt_l_bits_bound + S ff_i_l_bits = l) -&gt; exists ff_bit_l_bits. ((((exists ff_h_l_bits_decoded. ff_h_l_bits_decoded + S (ff_bit_l_bits) = S ((S (ff_i_l_bits)) * c)) /\ exists ff_q_l_bits_decoded. b = ff_q_l_bits_decoded * S ((S (ff_i_l_bits)) * c) + (ff_bit_l_bits))) /\ (ff_bit_l_bits = 0 \/ ff_bit_l_bits = 1))))) -&gt; (((exists ff_u_r_sum ff_v_r_sum. ((((exists ff_h_r_sum_start. ff_h_r_sum_start + S (0) = S ((S (0)) * ff_v_r_sum)) /\ exists ff_q_r_sum_start. ff_u_r_sum = ff_q_r_sum_start * S ((S (0)) * ff_v_r_sum) + (0))) /\ ((((exists ff_h_r_sum_terminal. ff_h_r_sum_terminal + S (m) = S ((S (l)) * ff_v_r_sum)) /\ exists ff_q_r_sum_terminal. ff_u_r_sum = ff_q_r_sum_terminal * S ((S (l)) * ff_v_r_sum) + (m))) /\ forall ff_i_r_sum. (exists ff_lt_r_sum_bound. ff_lt_r_sum_bound + S ff_i_r_sum = l) -&gt; exists ff_a_r_sum ff_r_r_sum ff_s_r_sum. ((((exists ff_h_r_sum_summand. ff_h_r_sum_summand + S (ff_a_r_sum) = S ((S (ff_i_r_sum)) * c)) /\ exists ff_q_r_sum_summand. b = ff_q_r_sum_summand * S ((S (ff_i_r_sum)) * c) + (ff_a_r_sum))) /\ ((((exists ff_h_r_sum_partial. ff_h_r_sum_partial + S (ff_r_r_sum) = S ((S (ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_partial. ff_u_r_sum = ff_q_r_sum_partial * S ((S (ff_i_r_sum)) * ff_v_r_sum) + (ff_r_r_sum))) /\ ((((exists ff_h_r_sum_successor. ff_h_r_sum_successor + S (ff_s_r_sum) = S ((S (S ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_successor. ff_u_r_sum = ff_q_r_sum_successor * S ((S (S ff_i_r_sum)) * ff_v_r_sum) + (ff_s_r_sum))) /\ ff_s_r_sum = ff_r_r_sum + ff_a_r_sum)))))) /\ (forall ff_i_r_bits. (exists ff_lt_r_bits_bound. ff_lt_r_bits_bound + S ff_i_r_bits = l) -&gt; exists ff_bit_r_bits. ((((exists ff_h_r_bits_decoded. ff_h_r_bits_decoded + S (ff_bit_r_bits) = S ((S (ff_i_r_bits)) * c)) /\ exists ff_q_r_bits_decoded. b = ff_q_r_bits_decoded * S ((S (ff_i_r_bits)) * c) + (ff_bit_r_bits))) /\ (ff_bit_r_bits = 0 \/ ff_bit_r_bits = 1))))) -&gt; n = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bit_count_functional">Copy proof</button>
        <pre id="proof-bit_count_functional"><code>pa prove forall b c l n m. (((exists ff_u_l_sum ff_v_l_sum. ((((exists ff_h_l_sum_start. ff_h_l_sum_start + S (0) = S ((S (0)) * ff_v_l_sum)) /\ exists ff_q_l_sum_start. ff_u_l_sum = ff_q_l_sum_start * S ((S (0)) * ff_v_l_sum) + (0))) /\ ((((exists ff_h_l_sum_terminal. ff_h_l_sum_terminal + S (n) = S ((S (l)) * ff_v_l_sum)) /\ exists ff_q_l_sum_terminal. ff_u_l_sum = ff_q_l_sum_terminal * S ((S (l)) * ff_v_l_sum) + (n))) /\ forall ff_i_l_sum. (exists ff_lt_l_sum_bound. ff_lt_l_sum_bound + S ff_i_l_sum = l) -&gt; exists ff_a_l_sum ff_r_l_sum ff_s_l_sum. ((((exists ff_h_l_sum_summand. ff_h_l_sum_summand + S (ff_a_l_sum) = S ((S (ff_i_l_sum)) * c)) /\ exists ff_q_l_sum_summand. b = ff_q_l_sum_summand * S ((S (ff_i_l_sum)) * c) + (ff_a_l_sum))) /\ ((((exists ff_h_l_sum_partial. ff_h_l_sum_partial + S (ff_r_l_sum) = S ((S (ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_partial. ff_u_l_sum = ff_q_l_sum_partial * S ((S (ff_i_l_sum)) * ff_v_l_sum) + (ff_r_l_sum))) /\ ((((exists ff_h_l_sum_successor. ff_h_l_sum_successor + S (ff_s_l_sum) = S ((S (S ff_i_l_sum)) * ff_v_l_sum)) /\ exists ff_q_l_sum_successor. ff_u_l_sum = ff_q_l_sum_successor * S ((S (S ff_i_l_sum)) * ff_v_l_sum) + (ff_s_l_sum))) /\ ff_s_l_sum = ff_r_l_sum + ff_a_l_sum)))))) /\ (forall ff_i_l_bits. (exists ff_lt_l_bits_bound. ff_lt_l_bits_bound + S ff_i_l_bits = l) -&gt; exists ff_bit_l_bits. ((((exists ff_h_l_bits_decoded. ff_h_l_bits_decoded + S (ff_bit_l_bits) = S ((S (ff_i_l_bits)) * c)) /\ exists ff_q_l_bits_decoded. b = ff_q_l_bits_decoded * S ((S (ff_i_l_bits)) * c) + (ff_bit_l_bits))) /\ (ff_bit_l_bits = 0 \/ ff_bit_l_bits = 1))))) -&gt; (((exists ff_u_r_sum ff_v_r_sum. ((((exists ff_h_r_sum_start. ff_h_r_sum_start + S (0) = S ((S (0)) * ff_v_r_sum)) /\ exists ff_q_r_sum_start. ff_u_r_sum = ff_q_r_sum_start * S ((S (0)) * ff_v_r_sum) + (0))) /\ ((((exists ff_h_r_sum_terminal. ff_h_r_sum_terminal + S (m) = S ((S (l)) * ff_v_r_sum)) /\ exists ff_q_r_sum_terminal. ff_u_r_sum = ff_q_r_sum_terminal * S ((S (l)) * ff_v_r_sum) + (m))) /\ forall ff_i_r_sum. (exists ff_lt_r_sum_bound. ff_lt_r_sum_bound + S ff_i_r_sum = l) -&gt; exists ff_a_r_sum ff_r_r_sum ff_s_r_sum. ((((exists ff_h_r_sum_summand. ff_h_r_sum_summand + S (ff_a_r_sum) = S ((S (ff_i_r_sum)) * c)) /\ exists ff_q_r_sum_summand. b = ff_q_r_sum_summand * S ((S (ff_i_r_sum)) * c) + (ff_a_r_sum))) /\ ((((exists ff_h_r_sum_partial. ff_h_r_sum_partial + S (ff_r_r_sum) = S ((S (ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_partial. ff_u_r_sum = ff_q_r_sum_partial * S ((S (ff_i_r_sum)) * ff_v_r_sum) + (ff_r_r_sum))) /\ ((((exists ff_h_r_sum_successor. ff_h_r_sum_successor + S (ff_s_r_sum) = S ((S (S ff_i_r_sum)) * ff_v_r_sum)) /\ exists ff_q_r_sum_successor. ff_u_r_sum = ff_q_r_sum_successor * S ((S (S ff_i_r_sum)) * ff_v_r_sum) + (ff_s_r_sum))) /\ ff_s_r_sum = ff_r_r_sum + ff_a_r_sum)))))) /\ (forall ff_i_r_bits. (exists ff_lt_r_bits_bound. ff_lt_r_bits_bound + S ff_i_r_bits = l) -&gt; exists ff_bit_r_bits. ((((exists ff_h_r_bits_decoded. ff_h_r_bits_decoded + S (ff_bit_r_bits) = S ((S (ff_i_r_bits)) * c)) /\ exists ff_q_r_bits_decoded. b = ff_q_r_bits_decoded * S ((S (ff_i_r_bits)) * c) + (ff_bit_r_bits))) /\ (ff_bit_r_bits = 0 \/ ff_bit_r_bits = 1))))) -&gt; n = m
use beta_sum_functional
intro b
intro c
intro l
intro n
intro m
intro hn
intro hm
cases hn
cases hm
specialize beta_sum_functional b
specialize beta_sum_functional c
specialize beta_sum_functional l
specialize beta_sum_functional n
specialize beta_sum_functional m
apply beta_sum_functional
exact hn_left
exact hm_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,488</dd></div>
        <div><dt>Distinct objects</dt><dd>1,015</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>38</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f92a1960a1429a940fcf9a316325aeb9d21700c61071b78aa71a8bb54873d8a0">f92a1960a142…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bit_count_functional">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bit_count_functional</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L133">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bit_count_functional.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bit_count_zero"
  data-name="bit_count_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_sum_zero"
  data-search="bit_count_zero bit count zero an empty bit prefix contains zero ones. forall b c l n. l = 0 -&gt; (((exists ff_u_zero_sum ff_v_zero_sum. ((((exists ff_h_zero_sum_start. ff_h_zero_sum_start + s (0) = s ((s (0)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_start. ff_u_zero_sum = ff_q_zero_sum_start * s ((s (0)) * ff_v_zero_sum) + (0))) /\ ((((exists ff_h_zero_sum_terminal. ff_h_zero_sum_terminal + s (n) = s ((s (l)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_terminal. ff_u_zero_sum = ff_q_zero_sum_terminal * s ((s (l)) * ff_v_zero_sum) + (n))) /\ forall ff_i_zero_sum. (exists ff_lt_zero_sum_bound. ff_lt_zero_sum_bound + s ff_i_zero_sum = l) -&gt; exists ff_a_zero_sum ff_r_zero_sum ff_s_zero_sum. ((((exists ff_h_zero_sum_summand. ff_h_zero_sum_summand + s (ff_a_zero_sum) = s ((s (ff_i_zero_sum)) * c)) /\ exists ff_q_zero_sum_summand. b = ff_q_zero_sum_summand * s ((s (ff_i_zero_sum)) * c) + (ff_a_zero_sum))) /\ ((((exists ff_h_zero_sum_partial. ff_h_zero_sum_partial + s (ff_r_zero_sum) = s ((s (ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_partial. ff_u_zero_sum = ff_q_zero_sum_partial * s ((s (ff_i_zero_sum)) * ff_v_zero_sum) + (ff_r_zero_sum))) /\ ((((exists ff_h_zero_sum_successor. ff_h_zero_sum_successor + s (ff_s_zero_sum) = s ((s (s ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_successor. ff_u_zero_sum = ff_q_zero_sum_successor * s ((s (s ff_i_zero_sum)) * ff_v_zero_sum) + (ff_s_zero_sum))) /\ ff_s_zero_sum = ff_r_zero_sum + ff_a_zero_sum)))))) /\ (forall ff_i_zero_bits. (exists ff_lt_zero_bits_bound. ff_lt_zero_bits_bound + s ff_i_zero_bits = l) -&gt; exists ff_bit_zero_bits. ((((exists ff_h_zero_bits_decoded. ff_h_zero_bits_decoded + s (ff_bit_zero_bits) = s ((s (ff_i_zero_bits)) * c)) /\ exists ff_q_zero_bits_decoded. b = ff_q_zero_bits_decoded * s ((s (ff_i_zero_bits)) * c) + (ff_bit_zero_bits))) /\ (ff_bit_zero_bits = 0 \/ ff_bit_zero_bits = 1))))) -&gt; n = 0 quadratic_residues beta_sum_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>bit_count_zero</code><span>Bit count zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">An empty bit prefix contains zero ones.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_zero" href="#theorem-beta_sum_zero"><code>beta_sum_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bit_count_bounded" href="#theorem-bit_count_bounded"><code>bit_count_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bit_count_zero">Copy statement</button>
        <pre id="statement-bit_count_zero"><code>forall b c l n. l = 0 -&gt; (((exists ff_u_zero_sum ff_v_zero_sum. ((((exists ff_h_zero_sum_start. ff_h_zero_sum_start + S (0) = S ((S (0)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_start. ff_u_zero_sum = ff_q_zero_sum_start * S ((S (0)) * ff_v_zero_sum) + (0))) /\ ((((exists ff_h_zero_sum_terminal. ff_h_zero_sum_terminal + S (n) = S ((S (l)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_terminal. ff_u_zero_sum = ff_q_zero_sum_terminal * S ((S (l)) * ff_v_zero_sum) + (n))) /\ forall ff_i_zero_sum. (exists ff_lt_zero_sum_bound. ff_lt_zero_sum_bound + S ff_i_zero_sum = l) -&gt; exists ff_a_zero_sum ff_r_zero_sum ff_s_zero_sum. ((((exists ff_h_zero_sum_summand. ff_h_zero_sum_summand + S (ff_a_zero_sum) = S ((S (ff_i_zero_sum)) * c)) /\ exists ff_q_zero_sum_summand. b = ff_q_zero_sum_summand * S ((S (ff_i_zero_sum)) * c) + (ff_a_zero_sum))) /\ ((((exists ff_h_zero_sum_partial. ff_h_zero_sum_partial + S (ff_r_zero_sum) = S ((S (ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_partial. ff_u_zero_sum = ff_q_zero_sum_partial * S ((S (ff_i_zero_sum)) * ff_v_zero_sum) + (ff_r_zero_sum))) /\ ((((exists ff_h_zero_sum_successor. ff_h_zero_sum_successor + S (ff_s_zero_sum) = S ((S (S ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_successor. ff_u_zero_sum = ff_q_zero_sum_successor * S ((S (S ff_i_zero_sum)) * ff_v_zero_sum) + (ff_s_zero_sum))) /\ ff_s_zero_sum = ff_r_zero_sum + ff_a_zero_sum)))))) /\ (forall ff_i_zero_bits. (exists ff_lt_zero_bits_bound. ff_lt_zero_bits_bound + S ff_i_zero_bits = l) -&gt; exists ff_bit_zero_bits. ((((exists ff_h_zero_bits_decoded. ff_h_zero_bits_decoded + S (ff_bit_zero_bits) = S ((S (ff_i_zero_bits)) * c)) /\ exists ff_q_zero_bits_decoded. b = ff_q_zero_bits_decoded * S ((S (ff_i_zero_bits)) * c) + (ff_bit_zero_bits))) /\ (ff_bit_zero_bits = 0 \/ ff_bit_zero_bits = 1))))) -&gt; n = 0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bit_count_zero">Copy proof</button>
        <pre id="proof-bit_count_zero"><code>pa prove forall b c l n. l = 0 -&gt; (((exists ff_u_zero_sum ff_v_zero_sum. ((((exists ff_h_zero_sum_start. ff_h_zero_sum_start + S (0) = S ((S (0)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_start. ff_u_zero_sum = ff_q_zero_sum_start * S ((S (0)) * ff_v_zero_sum) + (0))) /\ ((((exists ff_h_zero_sum_terminal. ff_h_zero_sum_terminal + S (n) = S ((S (l)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_terminal. ff_u_zero_sum = ff_q_zero_sum_terminal * S ((S (l)) * ff_v_zero_sum) + (n))) /\ forall ff_i_zero_sum. (exists ff_lt_zero_sum_bound. ff_lt_zero_sum_bound + S ff_i_zero_sum = l) -&gt; exists ff_a_zero_sum ff_r_zero_sum ff_s_zero_sum. ((((exists ff_h_zero_sum_summand. ff_h_zero_sum_summand + S (ff_a_zero_sum) = S ((S (ff_i_zero_sum)) * c)) /\ exists ff_q_zero_sum_summand. b = ff_q_zero_sum_summand * S ((S (ff_i_zero_sum)) * c) + (ff_a_zero_sum))) /\ ((((exists ff_h_zero_sum_partial. ff_h_zero_sum_partial + S (ff_r_zero_sum) = S ((S (ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_partial. ff_u_zero_sum = ff_q_zero_sum_partial * S ((S (ff_i_zero_sum)) * ff_v_zero_sum) + (ff_r_zero_sum))) /\ ((((exists ff_h_zero_sum_successor. ff_h_zero_sum_successor + S (ff_s_zero_sum) = S ((S (S ff_i_zero_sum)) * ff_v_zero_sum)) /\ exists ff_q_zero_sum_successor. ff_u_zero_sum = ff_q_zero_sum_successor * S ((S (S ff_i_zero_sum)) * ff_v_zero_sum) + (ff_s_zero_sum))) /\ ff_s_zero_sum = ff_r_zero_sum + ff_a_zero_sum)))))) /\ (forall ff_i_zero_bits. (exists ff_lt_zero_bits_bound. ff_lt_zero_bits_bound + S ff_i_zero_bits = l) -&gt; exists ff_bit_zero_bits. ((((exists ff_h_zero_bits_decoded. ff_h_zero_bits_decoded + S (ff_bit_zero_bits) = S ((S (ff_i_zero_bits)) * c)) /\ exists ff_q_zero_bits_decoded. b = ff_q_zero_bits_decoded * S ((S (ff_i_zero_bits)) * c) + (ff_bit_zero_bits))) /\ (ff_bit_zero_bits = 0 \/ ff_bit_zero_bits = 1))))) -&gt; n = 0
use beta_sum_zero
intro b
intro c
intro l
intro n
intro hl
intro hcount
rewrite hl at hcount
rewrite hl at hcount
rewrite hl at hcount
cases hcount
specialize beta_sum_zero b
specialize beta_sum_zero c
specialize beta_sum_zero n
apply beta_sum_zero
exact hcount_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,216</dd></div>
        <div><dt>Distinct objects</dt><dd>787</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>32</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d7b3bef133553b5fd6c7307798005ede4dbe69c036a2b5a74a6049139aeecab3">d7b3bef13355…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bit_count_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bit_count_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L158">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bit_count_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bit_count_succ_decompose"
  data-name="bit_count_succ_decompose" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_sum_succ_decompose,all_bits_prefix_succ,all_bits_last_succ,beta_at_unique"
  data-search="bit_count_succ_decompose bit count succ decompose a successor count is its prefix count plus a final zero-or-one bit. forall b c l sl n. sl = s l -&gt; (((exists ff_u_successor_sum ff_v_successor_sum. ((((exists ff_h_successor_sum_start. ff_h_successor_sum_start + s (0) = s ((s (0)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_start. ff_u_successor_sum = ff_q_successor_sum_start * s ((s (0)) * ff_v_successor_sum) + (0))) /\ ((((exists ff_h_successor_sum_terminal. ff_h_successor_sum_terminal + s (n) = s ((s (sl)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_terminal. ff_u_successor_sum = ff_q_successor_sum_terminal * s ((s (sl)) * ff_v_successor_sum) + (n))) /\ forall ff_i_successor_sum. (exists ff_lt_successor_sum_bound. ff_lt_successor_sum_bound + s ff_i_successor_sum = sl) -&gt; exists ff_a_successor_sum ff_r_successor_sum ff_s_successor_sum. ((((exists ff_h_successor_sum_summand. ff_h_successor_sum_summand + s (ff_a_successor_sum) = s ((s (ff_i_successor_sum)) * c)) /\ exists ff_q_successor_sum_summand. b = ff_q_successor_sum_summand * s ((s (ff_i_successor_sum)) * c) + (ff_a_successor_sum))) /\ ((((exists ff_h_successor_sum_partial. ff_h_successor_sum_partial + s (ff_r_successor_sum) = s ((s (ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_partial. ff_u_successor_sum = ff_q_successor_sum_partial * s ((s (ff_i_successor_sum)) * ff_v_successor_sum) + (ff_r_successor_sum))) /\ ((((exists ff_h_successor_sum_successor. ff_h_successor_sum_successor + s (ff_s_successor_sum) = s ((s (s ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_successor. ff_u_successor_sum = ff_q_successor_sum_successor * s ((s (s ff_i_successor_sum)) * ff_v_successor_sum) + (ff_s_successor_sum))) /\ ff_s_successor_sum = ff_r_successor_sum + ff_a_successor_sum)))))) /\ (forall ff_i_successor_bits. (exists ff_lt_successor_bits_bound. ff_lt_successor_bits_bound + s ff_i_successor_bits = sl) -&gt; exists ff_bit_successor_bits. ((((exists ff_h_successor_bits_decoded. ff_h_successor_bits_decoded + s (ff_bit_successor_bits) = s ((s (ff_i_successor_bits)) * c)) /\ exists ff_q_successor_bits_decoded. b = ff_q_successor_bits_decoded * s ((s (ff_i_successor_bits)) * c) + (ff_bit_successor_bits))) /\ (ff_bit_successor_bits = 0 \/ ff_bit_successor_bits = 1))))) -&gt; exists a r. (((exists ff_h_last. ff_h_last + s (a) = s ((s (l)) * c)) /\ exists ff_q_last. b = ff_q_last * s ((s (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + s (0) = s ((s (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * s ((s (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + s (r) = s ((s (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * s ((s (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + s ff_i_prefix_sum = l) -&gt; exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + s (ff_a_prefix_sum) = s ((s (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * s ((s (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + s (ff_r_prefix_sum) = s ((s (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * s ((s (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + s (ff_s_prefix_sum) = s ((s (s ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * s ((s (s ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + s ff_i_prefix_bits = l) -&gt; exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + s (ff_bit_prefix_bits) = s ((s (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * s ((s (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a)) quadratic_residues beta_sum_succ_decompose all_bits_prefix_succ all_bits_last_succ beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>bit_count_succ_decompose</code><span>Bit count succ decompose</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor count is its prefix count plus a final zero-or-one bit.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_sum_succ_decompose" href="#theorem-beta_sum_succ_decompose"><code>beta_sum_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="all_bits_prefix_succ" href="#theorem-all_bits_prefix_succ"><code>all_bits_prefix_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="all_bits_last_succ" href="#theorem-all_bits_last_succ"><code>all_bits_last_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bit_count_bounded" href="#theorem-bit_count_bounded"><code>bit_count_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bit_count_succ_decompose">Copy statement</button>
        <pre id="statement-bit_count_succ_decompose"><code>forall b c l sl n. sl = S l -&gt; (((exists ff_u_successor_sum ff_v_successor_sum. ((((exists ff_h_successor_sum_start. ff_h_successor_sum_start + S (0) = S ((S (0)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_start. ff_u_successor_sum = ff_q_successor_sum_start * S ((S (0)) * ff_v_successor_sum) + (0))) /\ ((((exists ff_h_successor_sum_terminal. ff_h_successor_sum_terminal + S (n) = S ((S (sl)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_terminal. ff_u_successor_sum = ff_q_successor_sum_terminal * S ((S (sl)) * ff_v_successor_sum) + (n))) /\ forall ff_i_successor_sum. (exists ff_lt_successor_sum_bound. ff_lt_successor_sum_bound + S ff_i_successor_sum = sl) -&gt; exists ff_a_successor_sum ff_r_successor_sum ff_s_successor_sum. ((((exists ff_h_successor_sum_summand. ff_h_successor_sum_summand + S (ff_a_successor_sum) = S ((S (ff_i_successor_sum)) * c)) /\ exists ff_q_successor_sum_summand. b = ff_q_successor_sum_summand * S ((S (ff_i_successor_sum)) * c) + (ff_a_successor_sum))) /\ ((((exists ff_h_successor_sum_partial. ff_h_successor_sum_partial + S (ff_r_successor_sum) = S ((S (ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_partial. ff_u_successor_sum = ff_q_successor_sum_partial * S ((S (ff_i_successor_sum)) * ff_v_successor_sum) + (ff_r_successor_sum))) /\ ((((exists ff_h_successor_sum_successor. ff_h_successor_sum_successor + S (ff_s_successor_sum) = S ((S (S ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_successor. ff_u_successor_sum = ff_q_successor_sum_successor * S ((S (S ff_i_successor_sum)) * ff_v_successor_sum) + (ff_s_successor_sum))) /\ ff_s_successor_sum = ff_r_successor_sum + ff_a_successor_sum)))))) /\ (forall ff_i_successor_bits. (exists ff_lt_successor_bits_bound. ff_lt_successor_bits_bound + S ff_i_successor_bits = sl) -&gt; exists ff_bit_successor_bits. ((((exists ff_h_successor_bits_decoded. ff_h_successor_bits_decoded + S (ff_bit_successor_bits) = S ((S (ff_i_successor_bits)) * c)) /\ exists ff_q_successor_bits_decoded. b = ff_q_successor_bits_decoded * S ((S (ff_i_successor_bits)) * c) + (ff_bit_successor_bits))) /\ (ff_bit_successor_bits = 0 \/ ff_bit_successor_bits = 1))))) -&gt; exists a r. (((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + S (0) = S ((S (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * S ((S (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * S ((S (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + S ff_i_prefix_sum = l) -&gt; exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + S (ff_a_prefix_sum) = S ((S (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * S ((S (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + S (ff_r_prefix_sum) = S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + S (ff_s_prefix_sum) = S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + S ff_i_prefix_bits = l) -&gt; exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + S (ff_bit_prefix_bits) = S ((S (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * S ((S (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bit_count_succ_decompose">Copy proof</button>
        <pre id="proof-bit_count_succ_decompose"><code>pa prove forall b c l sl n. sl = S l -&gt; (((exists ff_u_successor_sum ff_v_successor_sum. ((((exists ff_h_successor_sum_start. ff_h_successor_sum_start + S (0) = S ((S (0)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_start. ff_u_successor_sum = ff_q_successor_sum_start * S ((S (0)) * ff_v_successor_sum) + (0))) /\ ((((exists ff_h_successor_sum_terminal. ff_h_successor_sum_terminal + S (n) = S ((S (sl)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_terminal. ff_u_successor_sum = ff_q_successor_sum_terminal * S ((S (sl)) * ff_v_successor_sum) + (n))) /\ forall ff_i_successor_sum. (exists ff_lt_successor_sum_bound. ff_lt_successor_sum_bound + S ff_i_successor_sum = sl) -&gt; exists ff_a_successor_sum ff_r_successor_sum ff_s_successor_sum. ((((exists ff_h_successor_sum_summand. ff_h_successor_sum_summand + S (ff_a_successor_sum) = S ((S (ff_i_successor_sum)) * c)) /\ exists ff_q_successor_sum_summand. b = ff_q_successor_sum_summand * S ((S (ff_i_successor_sum)) * c) + (ff_a_successor_sum))) /\ ((((exists ff_h_successor_sum_partial. ff_h_successor_sum_partial + S (ff_r_successor_sum) = S ((S (ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_partial. ff_u_successor_sum = ff_q_successor_sum_partial * S ((S (ff_i_successor_sum)) * ff_v_successor_sum) + (ff_r_successor_sum))) /\ ((((exists ff_h_successor_sum_successor. ff_h_successor_sum_successor + S (ff_s_successor_sum) = S ((S (S ff_i_successor_sum)) * ff_v_successor_sum)) /\ exists ff_q_successor_sum_successor. ff_u_successor_sum = ff_q_successor_sum_successor * S ((S (S ff_i_successor_sum)) * ff_v_successor_sum) + (ff_s_successor_sum))) /\ ff_s_successor_sum = ff_r_successor_sum + ff_a_successor_sum)))))) /\ (forall ff_i_successor_bits. (exists ff_lt_successor_bits_bound. ff_lt_successor_bits_bound + S ff_i_successor_bits = sl) -&gt; exists ff_bit_successor_bits. ((((exists ff_h_successor_bits_decoded. ff_h_successor_bits_decoded + S (ff_bit_successor_bits) = S ((S (ff_i_successor_bits)) * c)) /\ exists ff_q_successor_bits_decoded. b = ff_q_successor_bits_decoded * S ((S (ff_i_successor_bits)) * c) + (ff_bit_successor_bits))) /\ (ff_bit_successor_bits = 0 \/ ff_bit_successor_bits = 1))))) -&gt; exists a r. (((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + S (0) = S ((S (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * S ((S (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * S ((S (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + S ff_i_prefix_sum = l) -&gt; exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + S (ff_a_prefix_sum) = S ((S (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * S ((S (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + S (ff_r_prefix_sum) = S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + S (ff_s_prefix_sum) = S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + S ff_i_prefix_bits = l) -&gt; exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + S (ff_bit_prefix_bits) = S ((S (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * S ((S (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a))
use beta_sum_succ_decompose
use all_bits_prefix_succ
use all_bits_last_succ
use beta_at_unique
intro b
intro c
intro l
intro sl
intro n
intro hsl
intro hcount
rewrite hsl at hcount
rewrite hsl at hcount
rewrite hsl at hcount
rewrite hsl at hcount
cases hcount
have hsum : exists a r. (((exists ff_h_sum_last. ff_h_sum_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_sum_last. b = ff_q_sum_last * S ((S (l)) * c) + (a))) /\ ((exists ff_u_sum_prefix ff_v_sum_prefix. ((((exists ff_h_sum_prefix_start. ff_h_sum_prefix_start + S (0) = S ((S (0)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_start. ff_u_sum_prefix = ff_q_sum_prefix_start * S ((S (0)) * ff_v_sum_prefix) + (0))) /\ ((((exists ff_h_sum_prefix_terminal. ff_h_sum_prefix_terminal + S (r) = S ((S (l)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_terminal. ff_u_sum_prefix = ff_q_sum_prefix_terminal * S ((S (l)) * ff_v_sum_prefix) + (r))) /\ forall ff_i_sum_prefix. (exists ff_lt_sum_prefix_bound. ff_lt_sum_prefix_bound + S ff_i_sum_prefix = l) -&gt; exists ff_a_sum_prefix ff_r_sum_prefix ff_s_sum_prefix. ((((exists ff_h_sum_prefix_summand. ff_h_sum_prefix_summand + S (ff_a_sum_prefix) = S ((S (ff_i_sum_prefix)) * c)) /\ exists ff_q_sum_prefix_summand. b = ff_q_sum_prefix_summand * S ((S (ff_i_sum_prefix)) * c) + (ff_a_sum_prefix))) /\ ((((exists ff_h_sum_prefix_partial. ff_h_sum_prefix_partial + S (ff_r_sum_prefix) = S ((S (ff_i_sum_prefix)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_partial. ff_u_sum_prefix = ff_q_sum_prefix_partial * S ((S (ff_i_sum_prefix)) * ff_v_sum_prefix) + (ff_r_sum_prefix))) /\ ((((exists ff_h_sum_prefix_successor. ff_h_sum_prefix_successor + S (ff_s_sum_prefix) = S ((S (S ff_i_sum_prefix)) * ff_v_sum_prefix)) /\ exists ff_q_sum_prefix_successor. ff_u_sum_prefix = ff_q_sum_prefix_successor * S ((S (S ff_i_sum_prefix)) * ff_v_sum_prefix) + (ff_s_sum_prefix))) /\ ff_s_sum_prefix = ff_r_sum_prefix + ff_a_sum_prefix)))))) /\ n = r + a)
specialize beta_sum_succ_decompose b
specialize beta_sum_succ_decompose c
specialize beta_sum_succ_decompose l
specialize beta_sum_succ_decompose n
apply beta_sum_succ_decompose
exact hcount_left
cases hsum
cases hsum_witness
cases hsum_witness_witness
cases hsum_witness_witness_right
have hlast : exists a. ((((exists ff_h_bits_last. ff_h_bits_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_bits_last. b = ff_q_bits_last * S ((S (l)) * c) + (a))) /\ (a = 0 \/ a = 1))
specialize all_bits_last_succ b
specialize all_bits_last_succ c
specialize all_bits_last_succ l
specialize all_bits_last_succ (S l)
apply all_bits_last_succ
refl
exact hcount_right
cases hlast
cases hlast_witness
have ha : x = x2
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique x2
apply beta_at_unique
exact hsum_witness_witness_left
exact hlast_witness_left
have hprefix : forall ff_i_kept_prefix. (exists ff_lt_kept_prefix_bound. ff_lt_kept_prefix_bound + S ff_i_kept_prefix = l) -&gt; exists ff_bit_kept_prefix. ((((exists ff_h_kept_prefix_decoded. ff_h_kept_prefix_decoded + S (ff_bit_kept_prefix) = S ((S (ff_i_kept_prefix)) * c)) /\ exists ff_q_kept_prefix_decoded. b = ff_q_kept_prefix_decoded * S ((S (ff_i_kept_prefix)) * c) + (ff_bit_kept_prefix))) /\ (ff_bit_kept_prefix = 0 \/ ff_bit_kept_prefix = 1))
specialize all_bits_prefix_succ b
specialize all_bits_prefix_succ c
specialize all_bits_prefix_succ l
specialize all_bits_prefix_succ (S l)
apply all_bits_prefix_succ
refl
exact hcount_right
exists x
exists x1
split
exact hsum_witness_witness_left
split
split
exact hsum_witness_witness_right_left
exact hprefix
split
rewrite ha
rewrite ha
exact hlast_witness_right
exact hsum_witness_witness_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,608</dd></div>
        <div><dt>Distinct objects</dt><dd>949</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>73</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e4dbc903d361568b596ec9b4be5bda519f5dc693fcd604dd5127b4aa9e8daf6d">e4dbc903d361…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bit_count_succ_decompose">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bit_count_succ_decompose</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L181">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bit_count_succ_decompose.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bit_count_bounded"
  data-name="bit_count_bounded" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="bit_count_zero,bit_count_succ_decompose,add_succ_left,add_assoc"
  data-search="bit_count_bounded bit count bounded a zero/one count never exceeds the length of its decoded prefix. forall b c l n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + s (0) = s ((s (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * s ((s (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + s (n) = s ((s (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * s ((s (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + s ff_i_b_sum = l) -&gt; exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + s (ff_a_b_sum) = s ((s (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * s ((s (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + s (ff_r_b_sum) = s ((s (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * s ((s (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + s (ff_s_b_sum) = s ((s (s ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * s ((s (s ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + s ff_i_b_bits = l) -&gt; exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + s (ff_bit_b_bits) = s ((s (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * s ((s (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1))))) -&gt; exists h. h + n = l quadratic_residues bit_count_zero bit_count_succ_decompose add_succ_left add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>bit_count_bounded</code><span>Bit count bounded</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A zero/one count never exceeds the length of its decoded prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bit_count_zero" href="#theorem-bit_count_zero"><code>bit_count_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="bit_count_succ_decompose" href="#theorem-bit_count_succ_decompose"><code>bit_count_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bit_count_bounded">Copy statement</button>
        <pre id="statement-bit_count_bounded"><code>forall b c l n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -&gt; exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -&gt; exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1))))) -&gt; exists h. h + n = l</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bit_count_bounded">Copy proof</button>
        <pre id="proof-bit_count_bounded"><code>pa prove forall b c l n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -&gt; exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -&gt; exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1))))) -&gt; exists h. h + n = l
use bit_count_zero
use bit_count_succ_decompose
use add_succ_left
use add_assoc
intro b
intro c
induction l
intro n
intro hcount
have hn : n = 0
specialize bit_count_zero b
specialize bit_count_zero c
specialize bit_count_zero 0
specialize bit_count_zero n
apply bit_count_zero
refl
exact hcount
exists 0
rewrite hn
rewrite PA3
refl
intro n
intro hcount
have hdecomp : exists a r. (((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + S (0) = S ((S (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * S ((S (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * S ((S (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + S ff_i_prefix_sum = l) -&gt; exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + S (ff_a_prefix_sum) = S ((S (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * S ((S (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + S (ff_r_prefix_sum) = S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + S (ff_s_prefix_sum) = S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + S ff_i_prefix_bits = l) -&gt; exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + S (ff_bit_prefix_bits) = S ((S (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * S ((S (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a))
specialize bit_count_succ_decompose b
specialize bit_count_succ_decompose c
specialize bit_count_succ_decompose l
specialize bit_count_succ_decompose (S l)
specialize bit_count_succ_decompose n
apply bit_count_succ_decompose
refl
exact hcount
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
cases hdecomp_witness_witness_right_right
have hr : exists h. h + x1 = l
specialize IH x1
apply IH
exact hdecomp_witness_witness_right_left
cases hr
cases hdecomp_witness_witness_right_right_left
exists S x2
rewrite hdecomp_witness_witness_right_right_right
rewrite hdecomp_witness_witness_right_right_left_left
rewrite PA3
specialize add_succ_left x2
specialize add_succ_left x1
rewrite add_succ_left
congr
exact hr_witness
exists x2
rewrite hdecomp_witness_witness_right_right_right
rewrite hdecomp_witness_witness_right_right_left_right
trans (x2 + x1) + 1
symm
apply add_assoc
rewrite PA4
rewrite PA3
congr
exact hr_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,987</dd></div>
        <div><dt>Distinct objects</dt><dd>1,147</dd></div>
        <div><dt>Reused references</dt><dd>45</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>109</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="53aa30ac165928fabf8802447d99587dd3df84a581a0a34fabbc3a92049c6a7d">53aa30ac1659…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bit_count_bounded">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bit_count_bounded</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_bitcount_theorems.py#L260">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bit_count_bounded.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_coprime_or_divides"
  data-name="prime_coprime_or_divides" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="gcd_exists_relational,prime_divisor_eq_one_or_self,is_gcd_one_to_coprime"
  data-search="prime_coprime_or_divides prime coprime or divides a prime is constructively either coprime to a natural or divides it. forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; (forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1) \/ exists k. a = p * k quadratic_residues gcd_exists_relational prime_divisor_eq_one_or_self is_gcd_one_to_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_coprime_or_divides</code><span>Prime coprime or divides</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A prime is constructively either coprime to a natural or divides it.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_relational" href="#theorem-gcd_exists_relational"><code>gcd_exists_relational</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_divisor_eq_one_or_self" href="#theorem-prime_divisor_eq_one_or_self"><code>prime_divisor_eq_one_or_self</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_one_to_coprime" href="#theorem-is_gcd_one_to_coprime"><code>is_gcd_one_to_coprime</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_not_divides_coprime" href="#theorem-prime_not_divides_coprime"><code>prime_not_divides_coprime</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_coprime_or_divides">Copy statement</button>
        <pre id="statement-prime_coprime_or_divides"><code>forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; (forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1) \/ exists k. a = p * k</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_coprime_or_divides">Copy proof</button>
        <pre id="proof-prime_coprime_or_divides"><code>pa prove forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; (forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1) \/ exists k. a = p * k
use gcd_exists_relational
use prime_divisor_eq_one_or_self
use is_gcd_one_to_coprime
intro p
intro a
intro hp
have hg : exists g. (((exists x. p = g * x) /\ (exists y. a = g * y)) /\ forall c. (exists u. p = c * u) -&gt; (exists v. a = c * v) -&gt; exists w. g = c * w)
apply gcd_exists_relational
cases hg
have hgfull : (((exists u. p = x * u) /\ (exists v. a = x * v)) /\ forall c. (exists s. p = c * s) -&gt; (exists t. a = c * t) -&gt; exists w. x = c * w)
exact hg_witness
cases hg_witness
cases hg_witness_left
have hfactor : x = 1 \/ p = x
specialize prime_divisor_eq_one_or_self p
specialize prime_divisor_eq_one_or_self x
apply prime_divisor_eq_one_or_self
exact hp
exact hg_witness_left_left
cases hfactor
left
apply is_gcd_one_to_coprime
have hg1 : (((exists u. p = 1 * u) /\ (exists v. a = 1 * v)) /\ forall c. (exists s. p = c * s) -&gt; (exists t. a = c * t) -&gt; exists w. 1 = c * w)
rewrite &lt;- hfactor_left
rewrite &lt;- hfactor_left
rewrite &lt;- hfactor_left
exact hgfull
exact hg1
right
cases hg_witness_left_right
exists x1
rewrite hfactor_right
exact hg_witness_left_right_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,572</dd></div>
        <div><dt>Distinct objects</dt><dd>1,069</dd></div>
        <div><dt>Reused references</dt><dd>66</dd></div>
        <div><dt>Depth</dt><dd>47</dd></div>
        <div><dt>Cuts</dt><dd>48</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8d298ff62d8de45e37db200bf4b7e160810c816f4ac4cead6617fd088e8b34b2">8d298ff62d8d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_coprime_or_divides">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_coprime_or_divides</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L31">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_coprime_or_divides.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_not_divides_coprime"
  data-name="prime_not_divides_coprime" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="prime_coprime_or_divides"
  data-search="prime_not_divides_coprime prime not divides coprime a prime not dividing a natural is coprime to that natural. forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1 quadratic_residues prime_coprime_or_divides">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_not_divides_coprime</code><span>Prime not divides coprime</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A prime not dividing a natural is coprime to that natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_coprime_or_divides" href="#theorem-prime_coprime_or_divides"><code>prime_coprime_or_divides</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="distinct_primes_coprime" href="#theorem-distinct_primes_coprime"><code>distinct_primes_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_mod_inverse" href="#theorem-prime_mod_inverse"><code>prime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_mod_cancel" href="#theorem-prime_mod_cancel"><code>prime_mod_cancel</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_not_divides_coprime">Copy statement</button>
        <pre id="statement-prime_not_divides_coprime"><code>forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_not_divides_coprime">Copy proof</button>
        <pre id="proof-prime_not_divides_coprime"><code>pa prove forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1
use prime_coprime_or_divides
intro p
intro a
intro hp
intro hnot
specialize prime_coprime_or_divides p
specialize prime_coprime_or_divides a
have hsplit : (forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1) \/ exists k. a = p * k
apply prime_coprime_or_divides
exact hp
cases hsplit
exact hsplit_left
exfalso
apply hnot
exact hsplit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,588</dd></div>
        <div><dt>Distinct objects</dt><dd>1,085</dd></div>
        <div><dt>Reused references</dt><dd>66</dd></div>
        <div><dt>Depth</dt><dd>48</dd></div>
        <div><dt>Cuts</dt><dd>49</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="cc42611e7af1289d9fe52fe1a6e9969ff5bbb2b3ab0ec5a04788e60fa40a5f12">cc42611e7af1…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_not_divides_coprime">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_not_divides_coprime</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L83">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_not_divides_coprime.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-distinct_primes_coprime"
  data-name="distinct_primes_coprime" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="prime_divisor_eq_one_or_self,prime_not_divides_coprime"
  data-search="distinct_primes_coprime distinct primes coprime distinct primes are coprime in the expanded common-divisor relation. forall p q. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; (~(q = 1) /\ forall c e. q = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(p = q) -&gt; forall d. (exists x. p = d * x) -&gt; (exists y. q = d * y) -&gt; d = 1 quadratic_residues prime_divisor_eq_one_or_self prime_not_divides_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>distinct_primes_coprime</code><span>Distinct primes coprime</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Distinct primes are coprime in the expanded common-divisor relation.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_divisor_eq_one_or_self" href="#theorem-prime_divisor_eq_one_or_self"><code>prime_divisor_eq_one_or_self</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_not_divides_coprime" href="#theorem-prime_not_divides_coprime"><code>prime_not_divides_coprime</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-distinct_primes_coprime">Copy statement</button>
        <pre id="statement-distinct_primes_coprime"><code>forall p q. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; (~(q = 1) /\ forall c e. q = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(p = q) -&gt; forall d. (exists x. p = d * x) -&gt; (exists y. q = d * y) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-distinct_primes_coprime">Copy proof</button>
        <pre id="proof-distinct_primes_coprime"><code>pa prove forall p q. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; (~(q = 1) /\ forall c e. q = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(p = q) -&gt; forall d. (exists x. p = d * x) -&gt; (exists y. q = d * y) -&gt; d = 1
use prime_divisor_eq_one_or_self
use prime_not_divides_coprime
intro p
intro q
intro hp
intro hq
intro hpq
have hnot : ~(exists k. q = p * k)
intro hdiv
specialize prime_divisor_eq_one_or_self q
specialize prime_divisor_eq_one_or_self p
have hfactor : p = 1 \/ q = p
apply prime_divisor_eq_one_or_self
exact hq
exact hdiv
cases hfactor
cases hp
apply hp_left
exact hfactor_left
apply hpq
symm
exact hfactor_right
specialize prime_not_divides_coprime p
specialize prime_not_divides_coprime q
apply prime_not_divides_coprime
exact hp
exact hnot
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,675</dd></div>
        <div><dt>Distinct objects</dt><dd>1,115</dd></div>
        <div><dt>Reused references</dt><dd>67</dd></div>
        <div><dt>Depth</dt><dd>50</dd></div>
        <div><dt>Cuts</dt><dd>53</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="16d0eddcf30a7ef95b0ed9ac7ba0870b69782832463a8e4001fbffd2f19a2834">16d0eddcf30a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for distinct_primes_coprime">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib distinct_primes_coprime</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L108">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/distinct_primes_coprime.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_balanced_mod_inverse"
  data-name="coprime_balanced_mod_inverse" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="coprime_balanced_bezout,add_assoc"
  data-search="coprime_balanced_mod_inverse coprime balanced mod inverse balanced bezout coefficients give a subtraction-free modular inverse. forall a m. (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v quadratic_residues coprime_balanced_bezout add_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_balanced_mod_inverse</code><span>Coprime balanced mod inverse</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced Bezout coefficients give a subtraction-free modular inverse.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_balanced_bezout" href="#theorem-coprime_balanced_bezout"><code>coprime_balanced_bezout</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_balanced_mod_inverse">Copy statement</button>
        <pre id="statement-coprime_balanced_mod_inverse"><code>forall a m. (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_balanced_mod_inverse">Copy proof</button>
        <pre id="proof-coprime_balanced_mod_inverse"><code>pa prove forall a m. (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v
use coprime_balanced_bezout
use add_assoc
intro a
intro m
intro hcop
have hbez : exists xp yp xn yn. a * xp + m * yp = 1 + (a * xn + m * yn)
specialize coprime_balanced_bezout a
specialize coprime_balanced_bezout m
apply coprime_balanced_bezout
exact hcop
cases hbez
cases hbez_witness
cases hbez_witness_witness
cases hbez_witness_witness_witness
exists x
exists x2
exists x1
exists x3
trans 1 + (a * x2 + m * x3)
exact hbez_witness_witness_witness_witness
symm
apply add_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,365</dd></div>
        <div><dt>Distinct objects</dt><dd>1,269</dd></div>
        <div><dt>Reused references</dt><dd>82</dd></div>
        <div><dt>Depth</dt><dd>49</dd></div>
        <div><dt>Cuts</dt><dd>69</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3b82b2213ae10abf386053eca3d5649b324328de97bd20bb662c0e5066da6735">3b82b2213ae1…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_balanced_mod_inverse">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_balanced_mod_inverse</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L143">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_balanced_mod_inverse.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_mod_inverse"
  data-name="coprime_mod_inverse" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="nonzero_is_succ,coprime_balanced_mod_inverse,mod_eq_refl,mod_eq_add,mod_eq_predecessor_cancel,mod_eq_trans,mul_add,mul_assoc,mul_comm"
  data-search="coprime_mod_inverse coprime mod inverse a nonzero modulus turns balanced bezout data into a natural modular inverse. forall a m. ~(m = 0) -&gt; (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; exists z u v. a * z + m * u = 1 + m * v quadratic_residues nonzero_is_succ coprime_balanced_mod_inverse mod_eq_refl mod_eq_add mod_eq_predecessor_cancel mod_eq_trans mul_add mul_assoc mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_mod_inverse</code><span>Coprime mod inverse</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero modulus turns balanced Bezout data into a natural modular inverse.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="nonzero_is_succ" href="#theorem-nonzero_is_succ"><code>nonzero_is_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_balanced_mod_inverse" href="#theorem-coprime_balanced_mod_inverse"><code>coprime_balanced_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_add" href="#theorem-mod_eq_add"><code>mod_eq_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_predecessor_cancel" href="#theorem-mod_eq_predecessor_cancel"><code>mod_eq_predecessor_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_mod_inverse" href="#theorem-prime_mod_inverse"><code>prime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_mod_inverse">Copy statement</button>
        <pre id="statement-coprime_mod_inverse"><code>forall a m. ~(m = 0) -&gt; (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; exists z u v. a * z + m * u = 1 + m * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_mod_inverse">Copy proof</button>
        <pre id="proof-coprime_mod_inverse"><code>pa prove forall a m. ~(m = 0) -&gt; (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; exists z u v. a * z + m * u = 1 + m * v
use nonzero_is_succ
use coprime_balanced_mod_inverse
use mod_eq_refl
use mod_eq_add
use mod_eq_predecessor_cancel
use mod_eq_trans
use mul_add
use mul_assoc
use mul_comm
intro a
intro m
intro hm
intro hcop
have hms : exists k. m = S k
specialize nonzero_is_succ m
apply nonzero_is_succ
exact hm
have hbal : exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v
specialize coprime_balanced_mod_inverse a
specialize coprime_balanced_mod_inverse m
apply coprime_balanced_mod_inverse
exact hcop
cases hms
cases hbal
cases hbal_witness
cases hbal_witness_witness
cases hbal_witness_witness_witness
have hself : exists u v. (x * (a * x2)) + m * u = (x * (a * x2)) + m * v
specialize mod_eq_refl m
specialize mod_eq_refl (x * (a * x2))
apply mod_eq_refl
have hadd : exists u v. ((a * x1) + x * (a * x2)) + m * u = ((1 + a * x2) + x * (a * x2)) + m * v
specialize mod_eq_add m
specialize mod_eq_add (a * x1)
specialize mod_eq_add (1 + a * x2)
specialize mod_eq_add (x * (a * x2))
specialize mod_eq_add (x * (a * x2))
apply mod_eq_add
exists x3
exists x4
exact hbal_witness_witness_witness_witness
exact hself
have hcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + m * u = 1 + m * v
specialize mod_eq_predecessor_cancel x
specialize mod_eq_predecessor_cancel 1
specialize mod_eq_predecessor_cancel (a * x2)
have hkcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + S x * u = 1 + S x * v
apply mod_eq_predecessor_cancel
rewrite &lt;- hms_witness at hkcancel
rewrite &lt;- hms_witness at hkcancel
exact hkcancel
have hfinal : exists u v. ((a * x1) + x * (a * x2)) + m * u = 1 + m * v
specialize mod_eq_trans m
specialize mod_eq_trans ((a * x1) + x * (a * x2))
specialize mod_eq_trans ((1 + a * x2) + x * (a * x2))
specialize mod_eq_trans 1
apply mod_eq_trans
exact hadd
exact hcancel
have hnorm : a * (x1 + x * x2) = (a * x1) + x * (a * x2)
trans a * x1 + a * (x * x2)
apply mul_add
congr
refl
trans (a * x) * x2
symm
apply mul_assoc
trans (x * a) * x2
congr
apply mul_comm
refl
apply mul_assoc
exists x1 + x * x2
rewrite hnorm
exact hfinal
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,820</dd></div>
        <div><dt>Distinct objects</dt><dd>1,549</dd></div>
        <div><dt>Reused references</dt><dd>94</dd></div>
        <div><dt>Depth</dt><dd>51</dd></div>
        <div><dt>Cuts</dt><dd>112</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f60b0a6bf02465352caf00ef0b5ae804cf5174cb832f4ed634da05df9053cd5f">f60b0a6bf024…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_mod_inverse">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_mod_inverse</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L173">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_mod_inverse.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_cancel_coprime"
  data-name="mod_eq_cancel_coprime" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="coprime_mod_inverse,mod_eq_mul_right,mod_eq_mul_left,mod_eq_symm,mod_eq_trans,mul_assoc,mul_comm,mul_one"
  data-search="mod_eq_cancel_coprime mod eq cancel coprime a coprime factor cancels from balanced congruence at nonzero modulus. forall m a x y. ~(m = 0) -&gt; (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; (exists u v. (a * x) + m * u = (a * y) + m * v) -&gt; exists r s. x + m * r = y + m * s quadratic_residues coprime_mod_inverse mod_eq_mul_right mod_eq_mul_left mod_eq_symm mod_eq_trans mul_assoc mul_comm mul_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_cancel_coprime</code><span>Mod eq cancel coprime</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A coprime factor cancels from balanced congruence at nonzero modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_right" href="#theorem-mod_eq_mul_right"><code>mod_eq_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_mod_cancel" href="#theorem-prime_mod_cancel"><code>prime_mod_cancel</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_cancel_coprime">Copy statement</button>
        <pre id="statement-mod_eq_cancel_coprime"><code>forall m a x y. ~(m = 0) -&gt; (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; (exists u v. (a * x) + m * u = (a * y) + m * v) -&gt; exists r s. x + m * r = y + m * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_cancel_coprime">Copy proof</button>
        <pre id="proof-mod_eq_cancel_coprime"><code>pa prove forall m a x y. ~(m = 0) -&gt; (forall d. (exists x. a = d * x) -&gt; (exists y. m = d * y) -&gt; d = 1) -&gt; (exists u v. (a * x) + m * u = (a * y) + m * v) -&gt; exists r s. x + m * r = y + m * s
use coprime_mod_inverse
use mod_eq_mul_right
use mod_eq_mul_left
use mod_eq_symm
use mod_eq_trans
use mul_assoc
use mul_comm
use mul_one
intro m
intro a
intro x
intro y
intro hm
intro hcop
intro hxy
have hinv : exists z u v. a * z + m * u = 1 + m * v
specialize coprime_mod_inverse a
specialize coprime_mod_inverse m
apply coprime_mod_inverse
exact hm
exact hcop
cases hinv
cases hinv_witness
cases hinv_witness_witness
have hzx : exists u v. (x * (a * x1)) + m * u = (x * 1) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left (a * x1)
specialize mod_eq_mul_left 1
specialize mod_eq_mul_left x
apply mod_eq_mul_left
exists x2
exists x3
exact hinv_witness_witness_witness
have hnormx : x * (a * x1) = (a * x) * x1
trans (x * a) * x1
symm
apply mul_assoc
trans (a * x) * x1
congr
apply mul_comm
refl
refl
have honex : x * 1 = x
apply mul_one
have hxprod : exists u v. ((a * x) * x1) + m * u = x + m * v
cases hzx
cases hzx_witness
exists x4
exists x5
trans (x * (a * x1)) + m * x4
congr
symm
exact hnormx
refl
trans (x * 1) + m * x5
exact hzx_witness_witness
congr
exact honex
refl
have hxhprod : exists u v. x + m * u = ((a * x) * x1) + m * v
specialize mod_eq_symm m
specialize mod_eq_symm ((a * x) * x1)
specialize mod_eq_symm x
apply mod_eq_symm
exact hxprod
have hscaled : exists u v. ((a * x) * x1) + m * u = ((a * y) * x1) + m * v
specialize mod_eq_mul_right m
specialize mod_eq_mul_right (a * x)
specialize mod_eq_mul_right (a * y)
specialize mod_eq_mul_right x1
apply mod_eq_mul_right
exact hxy
have hzy : exists u v. (y * (a * x1)) + m * u = (y * 1) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left (a * x1)
specialize mod_eq_mul_left 1
specialize mod_eq_mul_left y
apply mod_eq_mul_left
exists x2
exists x3
exact hinv_witness_witness_witness
have hnormy : y * (a * x1) = (a * y) * x1
trans (y * a) * x1
symm
apply mul_assoc
trans (a * y) * x1
congr
apply mul_comm
refl
refl
have honey : y * 1 = y
apply mul_one
have hyprod : exists u v. ((a * y) * x1) + m * u = y + m * v
cases hzy
cases hzy_witness
exists x4
exists x5
trans (y * (a * x1)) + m * x4
congr
symm
exact hnormy
refl
trans (y * 1) + m * x5
exact hzy_witness_witness
congr
exact honey
refl
have hmid : exists u v. x + m * u = ((a * y) * x1) + m * v
specialize mod_eq_trans m
specialize mod_eq_trans x
specialize mod_eq_trans ((a * x) * x1)
specialize mod_eq_trans ((a * y) * x1)
apply mod_eq_trans
exact hxhprod
exact hscaled
specialize mod_eq_trans m
specialize mod_eq_trans x
specialize mod_eq_trans ((a * y) * x1)
specialize mod_eq_trans y
apply mod_eq_trans
exact hmid
exact hyprod
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,804</dd></div>
        <div><dt>Distinct objects</dt><dd>1,762</dd></div>
        <div><dt>Reused references</dt><dd>102</dd></div>
        <div><dt>Depth</dt><dd>52</dd></div>
        <div><dt>Cuts</dt><dd>169</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d7a55457c6e7fcb0bdbaaa362cbe4fc9ee8062ac7e22b8630a8c8548ac8848ef">d7a55457c6e7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_cancel_coprime">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_cancel_coprime</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L266">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_cancel_coprime.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_mod_inverse"
  data-name="prime_mod_inverse" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="prime_nonzero,prime_not_divides_coprime,coprime_mod_inverse"
  data-search="prime_mod_inverse prime mod inverse a nonzero residue modulo a prime has a natural modular inverse. forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; exists z u v. a * z + p * u = 1 + p * v quadratic_residues prime_nonzero prime_not_divides_coprime coprime_mod_inverse">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_mod_inverse</code><span>Prime mod inverse</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero residue modulo a prime has a natural modular inverse.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_not_divides_coprime" href="#theorem-prime_not_divides_coprime"><code>prime_not_divides_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_mod_inverse">Copy statement</button>
        <pre id="statement-prime_mod_inverse"><code>forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; exists z u v. a * z + p * u = 1 + p * v</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_mod_inverse">Copy proof</button>
        <pre id="proof-prime_mod_inverse"><code>pa prove forall p a. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; exists z u v. a * z + p * u = 1 + p * v
use prime_nonzero
use prime_not_divides_coprime
use coprime_mod_inverse
intro p
intro a
intro hp
intro hnot
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hcop : forall d. (exists x. a = d * x) -&gt; (exists y. p = d * y) -&gt; d = 1
have hpacop : forall d. (exists x. p = d * x) -&gt; (exists y. a = d * y) -&gt; d = 1
specialize prime_not_divides_coprime p
specialize prime_not_divides_coprime a
apply prime_not_divides_coprime
exact hp
exact hnot
intro d
intro hda
intro hdp
specialize hpacop d
apply hpacop
exact hdp
exact hda
specialize coprime_mod_inverse a
specialize coprime_mod_inverse p
apply coprime_mod_inverse
exact hp0
exact hcop
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,491</dd></div>
        <div><dt>Distinct objects</dt><dd>1,946</dd></div>
        <div><dt>Reused references</dt><dd>118</dd></div>
        <div><dt>Depth</dt><dd>54</dd></div>
        <div><dt>Cuts</dt><dd>166</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="84f40e5a8c1044c73eb18fdb7780f6a34bd840152facff3c5e6b3d01a3fc84b8">84f40e5a8c10…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_mod_inverse">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_mod_inverse</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L402">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_mod_inverse.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_mod_cancel"
  data-name="prime_mod_cancel" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="prime_nonzero,prime_not_divides_coprime,coprime_symm,mod_eq_cancel_coprime"
  data-search="prime_mod_cancel prime mod cancel a nonzero residue factor cancels from congruence modulo a prime. forall p a x y. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; (exists u v. (a * x) + p * u = (a * y) + p * v) -&gt; exists r s. x + p * r = y + p * s quadratic_residues prime_nonzero prime_not_divides_coprime coprime_symm mod_eq_cancel_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_mod_cancel</code><span>Prime mod cancel</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero residue factor cancels from congruence modulo a prime.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_not_divides_coprime" href="#theorem-prime_not_divides_coprime"><code>prime_not_divides_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_symm" href="#theorem-coprime_symm"><code>coprime_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_cancel_coprime" href="#theorem-mod_eq_cancel_coprime"><code>mod_eq_cancel_coprime</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_mod_cancel">Copy statement</button>
        <pre id="statement-prime_mod_cancel"><code>forall p a x y. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; (exists u v. (a * x) + p * u = (a * y) + p * v) -&gt; exists r s. x + p * r = y + p * s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_mod_cancel">Copy proof</button>
        <pre id="proof-prime_mod_cancel"><code>pa prove forall p a x y. (~(p = 1) /\ forall c e. p = c * e -&gt; c = 1 \/ e = 1) -&gt; ~(exists k. a = p * k) -&gt; (exists u v. (a * x) + p * u = (a * y) + p * v) -&gt; exists r s. x + p * r = y + p * s
use prime_nonzero
use prime_not_divides_coprime
use coprime_symm
use mod_eq_cancel_coprime
intro p
intro a
intro x
intro y
intro hp
intro hnot
intro hxy
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hpacop : forall d. (exists u. p = d * u) -&gt; (exists v. a = d * v) -&gt; d = 1
specialize prime_not_divides_coprime p
specialize prime_not_divides_coprime a
apply prime_not_divides_coprime
exact hp
exact hnot
have hapcop : forall d. (exists u. a = d * u) -&gt; (exists v. p = d * v) -&gt; d = 1
specialize coprime_symm p
specialize coprime_symm a
apply coprime_symm
exact hpacop
specialize mod_eq_cancel_coprime p
specialize mod_eq_cancel_coprime a
specialize mod_eq_cancel_coprime x
specialize mod_eq_cancel_coprime y
apply mod_eq_cancel_coprime
exact hp0
exact hapcop
exact hxy
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7,494</dd></div>
        <div><dt>Distinct objects</dt><dd>2,178</dd></div>
        <div><dt>Reused references</dt><dd>126</dd></div>
        <div><dt>Depth</dt><dd>56</dd></div>
        <div><dt>Cuts</dt><dd>224</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e6fdc689812fd2c29b7e33ad85067b632559741c532b5f82a4864aae023ec2f7">e6fdc689812f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_mod_cancel">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_mod_cancel</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_prime_units.py#L446">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_mod_cancel.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factorial_exists"
  data-name="factorial_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_range_exists,beta_product_exists"
  data-search="factorial_exists factorial exists every natural has a beta-coded relational factorial value. forall n. exists z. (exists ff_b_exists ff_c_exists. ((forall ff_i_exists_range. (exists ff_lt_exists_range_bound. ff_lt_exists_range_bound + s ff_i_exists_range = n) -&gt; (((exists ff_h_exists_range_decoded. ff_h_exists_range_decoded + s (1 + ff_i_exists_range) = s ((s (ff_i_exists_range)) * ff_c_exists)) /\ exists ff_q_exists_range_decoded. ff_b_exists = ff_q_exists_range_decoded * s ((s (ff_i_exists_range)) * ff_c_exists) + (1 + ff_i_exists_range)))) /\ (exists ff_u_exists_product ff_v_exists_product. ((((exists ff_h_exists_product_start. ff_h_exists_product_start + s (1) = s ((s (0)) * ff_v_exists_product)) /\ exists ff_q_exists_product_start. ff_u_exists_product = ff_q_exists_product_start * s ((s (0)) * ff_v_exists_product) + (1))) /\ ((((exists ff_h_exists_product_terminal. ff_h_exists_product_terminal + s (z) = s ((s (n)) * ff_v_exists_product)) /\ exists ff_q_exists_product_terminal. ff_u_exists_product = ff_q_exists_product_terminal * s ((s (n)) * ff_v_exists_product) + (z))) /\ forall ff_i_exists_product. (exists ff_lt_exists_product_bound. ff_lt_exists_product_bound + s ff_i_exists_product = n) -&gt; exists ff_p_exists_product ff_r_exists_product ff_s_exists_product. ((((exists ff_h_exists_product_factor. ff_h_exists_product_factor + s (ff_p_exists_product) = s ((s (ff_i_exists_product)) * ff_c_exists)) /\ exists ff_q_exists_product_factor. ff_b_exists = ff_q_exists_product_factor * s ((s (ff_i_exists_product)) * ff_c_exists) + (ff_p_exists_product))) /\ ((((exists ff_h_exists_product_partial. ff_h_exists_product_partial + s (ff_r_exists_product) = s ((s (ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_partial. ff_u_exists_product = ff_q_exists_product_partial * s ((s (ff_i_exists_product)) * ff_v_exists_product) + (ff_r_exists_product))) /\ ((((exists ff_h_exists_product_successor. ff_h_exists_product_successor + s (ff_s_exists_product) = s ((s (s ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_successor. ff_u_exists_product = ff_q_exists_product_successor * s ((s (s ff_i_exists_product)) * ff_v_exists_product) + (ff_s_exists_product))) /\ ff_s_exists_product = ff_r_exists_product * ff_p_exists_product)))))))) quadratic_residues beta_range_exists beta_product_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>factorial_exists</code><span>Factorial exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural has a beta-coded relational factorial value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_exists" href="#theorem-beta_range_exists"><code>beta_range_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_exists" href="#theorem-beta_product_exists"><code>beta_product_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factorial_exists">Copy statement</button>
        <pre id="statement-factorial_exists"><code>forall n. exists z. (exists ff_b_exists ff_c_exists. ((forall ff_i_exists_range. (exists ff_lt_exists_range_bound. ff_lt_exists_range_bound + S ff_i_exists_range = n) -&gt; (((exists ff_h_exists_range_decoded. ff_h_exists_range_decoded + S (1 + ff_i_exists_range) = S ((S (ff_i_exists_range)) * ff_c_exists)) /\ exists ff_q_exists_range_decoded. ff_b_exists = ff_q_exists_range_decoded * S ((S (ff_i_exists_range)) * ff_c_exists) + (1 + ff_i_exists_range)))) /\ (exists ff_u_exists_product ff_v_exists_product. ((((exists ff_h_exists_product_start. ff_h_exists_product_start + S (1) = S ((S (0)) * ff_v_exists_product)) /\ exists ff_q_exists_product_start. ff_u_exists_product = ff_q_exists_product_start * S ((S (0)) * ff_v_exists_product) + (1))) /\ ((((exists ff_h_exists_product_terminal. ff_h_exists_product_terminal + S (z) = S ((S (n)) * ff_v_exists_product)) /\ exists ff_q_exists_product_terminal. ff_u_exists_product = ff_q_exists_product_terminal * S ((S (n)) * ff_v_exists_product) + (z))) /\ forall ff_i_exists_product. (exists ff_lt_exists_product_bound. ff_lt_exists_product_bound + S ff_i_exists_product = n) -&gt; exists ff_p_exists_product ff_r_exists_product ff_s_exists_product. ((((exists ff_h_exists_product_factor. ff_h_exists_product_factor + S (ff_p_exists_product) = S ((S (ff_i_exists_product)) * ff_c_exists)) /\ exists ff_q_exists_product_factor. ff_b_exists = ff_q_exists_product_factor * S ((S (ff_i_exists_product)) * ff_c_exists) + (ff_p_exists_product))) /\ ((((exists ff_h_exists_product_partial. ff_h_exists_product_partial + S (ff_r_exists_product) = S ((S (ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_partial. ff_u_exists_product = ff_q_exists_product_partial * S ((S (ff_i_exists_product)) * ff_v_exists_product) + (ff_r_exists_product))) /\ ((((exists ff_h_exists_product_successor. ff_h_exists_product_successor + S (ff_s_exists_product) = S ((S (S ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_successor. ff_u_exists_product = ff_q_exists_product_successor * S ((S (S ff_i_exists_product)) * ff_v_exists_product) + (ff_s_exists_product))) /\ ff_s_exists_product = ff_r_exists_product * ff_p_exists_product))))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factorial_exists">Copy proof</button>
        <pre id="proof-factorial_exists"><code>pa prove forall n. exists z. (exists ff_b_exists ff_c_exists. ((forall ff_i_exists_range. (exists ff_lt_exists_range_bound. ff_lt_exists_range_bound + S ff_i_exists_range = n) -&gt; (((exists ff_h_exists_range_decoded. ff_h_exists_range_decoded + S (1 + ff_i_exists_range) = S ((S (ff_i_exists_range)) * ff_c_exists)) /\ exists ff_q_exists_range_decoded. ff_b_exists = ff_q_exists_range_decoded * S ((S (ff_i_exists_range)) * ff_c_exists) + (1 + ff_i_exists_range)))) /\ (exists ff_u_exists_product ff_v_exists_product. ((((exists ff_h_exists_product_start. ff_h_exists_product_start + S (1) = S ((S (0)) * ff_v_exists_product)) /\ exists ff_q_exists_product_start. ff_u_exists_product = ff_q_exists_product_start * S ((S (0)) * ff_v_exists_product) + (1))) /\ ((((exists ff_h_exists_product_terminal. ff_h_exists_product_terminal + S (z) = S ((S (n)) * ff_v_exists_product)) /\ exists ff_q_exists_product_terminal. ff_u_exists_product = ff_q_exists_product_terminal * S ((S (n)) * ff_v_exists_product) + (z))) /\ forall ff_i_exists_product. (exists ff_lt_exists_product_bound. ff_lt_exists_product_bound + S ff_i_exists_product = n) -&gt; exists ff_p_exists_product ff_r_exists_product ff_s_exists_product. ((((exists ff_h_exists_product_factor. ff_h_exists_product_factor + S (ff_p_exists_product) = S ((S (ff_i_exists_product)) * ff_c_exists)) /\ exists ff_q_exists_product_factor. ff_b_exists = ff_q_exists_product_factor * S ((S (ff_i_exists_product)) * ff_c_exists) + (ff_p_exists_product))) /\ ((((exists ff_h_exists_product_partial. ff_h_exists_product_partial + S (ff_r_exists_product) = S ((S (ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_partial. ff_u_exists_product = ff_q_exists_product_partial * S ((S (ff_i_exists_product)) * ff_v_exists_product) + (ff_r_exists_product))) /\ ((((exists ff_h_exists_product_successor. ff_h_exists_product_successor + S (ff_s_exists_product) = S ((S (S ff_i_exists_product)) * ff_v_exists_product)) /\ exists ff_q_exists_product_successor. ff_u_exists_product = ff_q_exists_product_successor * S ((S (S ff_i_exists_product)) * ff_v_exists_product) + (ff_s_exists_product))) /\ ff_s_exists_product = ff_r_exists_product * ff_p_exists_product))))))))
use beta_range_exists
use beta_product_exists
intro n
have hrange : exists b c. (forall i. (exists h. h + S i = n) -&gt; ((exists h. h + S (1 + i) = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + (1 + i)))
specialize beta_range_exists 1
specialize beta_range_exists n
exact beta_range_exists
cases hrange
cases hrange_witness
specialize beta_product_exists x
specialize beta_product_exists x1
specialize beta_product_exists n
cases beta_product_exists
cases beta_product_exists_witness
cases beta_product_exists_witness_witness
exists x2
exists x
exists x1
split
exact hrange_witness_witness
exists x3
exists x4
exact beta_product_exists_witness_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>59,841</dd></div>
        <div><dt>Distinct objects</dt><dd>4,907</dd></div>
        <div><dt>Reused references</dt><dd>241</dd></div>
        <div><dt>Depth</dt><dd>88</dd></div>
        <div><dt>Cuts</dt><dd>1,795</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="dd6a084e8622993a33acc23bd6dc7de036a0f5d7a3db7b0a1a827891a56a1214">dd6a084e8622…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factorial_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factorial_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_factorial_theorems.py#L84">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factorial_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factorial_functional"
  data-name="factorial_functional" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_range_transport_entry,beta_product_transport_prefix,beta_product_functional"
  data-search="factorial_functional factorial functional the beta-coded relational factorial has a unique value. forall n z w. (exists ff_b_functional_l ff_c_functional_l. ((forall ff_i_functional_l_range. (exists ff_lt_functional_l_range_bound. ff_lt_functional_l_range_bound + s ff_i_functional_l_range = n) -&gt; (((exists ff_h_functional_l_range_decoded. ff_h_functional_l_range_decoded + s (1 + ff_i_functional_l_range) = s ((s (ff_i_functional_l_range)) * ff_c_functional_l)) /\ exists ff_q_functional_l_range_decoded. ff_b_functional_l = ff_q_functional_l_range_decoded * s ((s (ff_i_functional_l_range)) * ff_c_functional_l) + (1 + ff_i_functional_l_range)))) /\ (exists ff_u_functional_l_product ff_v_functional_l_product. ((((exists ff_h_functional_l_product_start. ff_h_functional_l_product_start + s (1) = s ((s (0)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_start. ff_u_functional_l_product = ff_q_functional_l_product_start * s ((s (0)) * ff_v_functional_l_product) + (1))) /\ ((((exists ff_h_functional_l_product_terminal. ff_h_functional_l_product_terminal + s (z) = s ((s (n)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_terminal. ff_u_functional_l_product = ff_q_functional_l_product_terminal * s ((s (n)) * ff_v_functional_l_product) + (z))) /\ forall ff_i_functional_l_product. (exists ff_lt_functional_l_product_bound. ff_lt_functional_l_product_bound + s ff_i_functional_l_product = n) -&gt; exists ff_p_functional_l_product ff_r_functional_l_product ff_s_functional_l_product. ((((exists ff_h_functional_l_product_factor. ff_h_functional_l_product_factor + s (ff_p_functional_l_product) = s ((s (ff_i_functional_l_product)) * ff_c_functional_l)) /\ exists ff_q_functional_l_product_factor. ff_b_functional_l = ff_q_functional_l_product_factor * s ((s (ff_i_functional_l_product)) * ff_c_functional_l) + (ff_p_functional_l_product))) /\ ((((exists ff_h_functional_l_product_partial. ff_h_functional_l_product_partial + s (ff_r_functional_l_product) = s ((s (ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_partial. ff_u_functional_l_product = ff_q_functional_l_product_partial * s ((s (ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_r_functional_l_product))) /\ ((((exists ff_h_functional_l_product_successor. ff_h_functional_l_product_successor + s (ff_s_functional_l_product) = s ((s (s ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_successor. ff_u_functional_l_product = ff_q_functional_l_product_successor * s ((s (s ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_s_functional_l_product))) /\ ff_s_functional_l_product = ff_r_functional_l_product * ff_p_functional_l_product)))))))) -&gt; (exists ff_b_functional_r ff_c_functional_r. ((forall ff_i_functional_r_range. (exists ff_lt_functional_r_range_bound. ff_lt_functional_r_range_bound + s ff_i_functional_r_range = n) -&gt; (((exists ff_h_functional_r_range_decoded. ff_h_functional_r_range_decoded + s (1 + ff_i_functional_r_range) = s ((s (ff_i_functional_r_range)) * ff_c_functional_r)) /\ exists ff_q_functional_r_range_decoded. ff_b_functional_r = ff_q_functional_r_range_decoded * s ((s (ff_i_functional_r_range)) * ff_c_functional_r) + (1 + ff_i_functional_r_range)))) /\ (exists ff_u_functional_r_product ff_v_functional_r_product. ((((exists ff_h_functional_r_product_start. ff_h_functional_r_product_start + s (1) = s ((s (0)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_start. ff_u_functional_r_product = ff_q_functional_r_product_start * s ((s (0)) * ff_v_functional_r_product) + (1))) /\ ((((exists ff_h_functional_r_product_terminal. ff_h_functional_r_product_terminal + s (w) = s ((s (n)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_terminal. ff_u_functional_r_product = ff_q_functional_r_product_terminal * s ((s (n)) * ff_v_functional_r_product) + (w))) /\ forall ff_i_functional_r_product. (exists ff_lt_functional_r_product_bound. ff_lt_functional_r_product_bound + s ff_i_functional_r_product = n) -&gt; exists ff_p_functional_r_product ff_r_functional_r_product ff_s_functional_r_product. ((((exists ff_h_functional_r_product_factor. ff_h_functional_r_product_factor + s (ff_p_functional_r_product) = s ((s (ff_i_functional_r_product)) * ff_c_functional_r)) /\ exists ff_q_functional_r_product_factor. ff_b_functional_r = ff_q_functional_r_product_factor * s ((s (ff_i_functional_r_product)) * ff_c_functional_r) + (ff_p_functional_r_product))) /\ ((((exists ff_h_functional_r_product_partial. ff_h_functional_r_product_partial + s (ff_r_functional_r_product) = s ((s (ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_partial. ff_u_functional_r_product = ff_q_functional_r_product_partial * s ((s (ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_r_functional_r_product))) /\ ((((exists ff_h_functional_r_product_successor. ff_h_functional_r_product_successor + s (ff_s_functional_r_product) = s ((s (s ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_successor. ff_u_functional_r_product = ff_q_functional_r_product_successor * s ((s (s ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_s_functional_r_product))) /\ ff_s_functional_r_product = ff_r_functional_r_product * ff_p_functional_r_product)))))))) -&gt; z = w quadratic_residues beta_range_transport_entry beta_product_transport_prefix beta_product_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>factorial_functional</code><span>Factorial functional</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The beta-coded relational factorial has a unique value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_transport_entry" href="#theorem-beta_range_transport_entry"><code>beta_range_transport_entry</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_transport_prefix" href="#theorem-beta_product_transport_prefix"><code>beta_product_transport_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factorial_functional">Copy statement</button>
        <pre id="statement-factorial_functional"><code>forall n z w. (exists ff_b_functional_l ff_c_functional_l. ((forall ff_i_functional_l_range. (exists ff_lt_functional_l_range_bound. ff_lt_functional_l_range_bound + S ff_i_functional_l_range = n) -&gt; (((exists ff_h_functional_l_range_decoded. ff_h_functional_l_range_decoded + S (1 + ff_i_functional_l_range) = S ((S (ff_i_functional_l_range)) * ff_c_functional_l)) /\ exists ff_q_functional_l_range_decoded. ff_b_functional_l = ff_q_functional_l_range_decoded * S ((S (ff_i_functional_l_range)) * ff_c_functional_l) + (1 + ff_i_functional_l_range)))) /\ (exists ff_u_functional_l_product ff_v_functional_l_product. ((((exists ff_h_functional_l_product_start. ff_h_functional_l_product_start + S (1) = S ((S (0)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_start. ff_u_functional_l_product = ff_q_functional_l_product_start * S ((S (0)) * ff_v_functional_l_product) + (1))) /\ ((((exists ff_h_functional_l_product_terminal. ff_h_functional_l_product_terminal + S (z) = S ((S (n)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_terminal. ff_u_functional_l_product = ff_q_functional_l_product_terminal * S ((S (n)) * ff_v_functional_l_product) + (z))) /\ forall ff_i_functional_l_product. (exists ff_lt_functional_l_product_bound. ff_lt_functional_l_product_bound + S ff_i_functional_l_product = n) -&gt; exists ff_p_functional_l_product ff_r_functional_l_product ff_s_functional_l_product. ((((exists ff_h_functional_l_product_factor. ff_h_functional_l_product_factor + S (ff_p_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_c_functional_l)) /\ exists ff_q_functional_l_product_factor. ff_b_functional_l = ff_q_functional_l_product_factor * S ((S (ff_i_functional_l_product)) * ff_c_functional_l) + (ff_p_functional_l_product))) /\ ((((exists ff_h_functional_l_product_partial. ff_h_functional_l_product_partial + S (ff_r_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_partial. ff_u_functional_l_product = ff_q_functional_l_product_partial * S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_r_functional_l_product))) /\ ((((exists ff_h_functional_l_product_successor. ff_h_functional_l_product_successor + S (ff_s_functional_l_product) = S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_successor. ff_u_functional_l_product = ff_q_functional_l_product_successor * S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_s_functional_l_product))) /\ ff_s_functional_l_product = ff_r_functional_l_product * ff_p_functional_l_product)))))))) -&gt; (exists ff_b_functional_r ff_c_functional_r. ((forall ff_i_functional_r_range. (exists ff_lt_functional_r_range_bound. ff_lt_functional_r_range_bound + S ff_i_functional_r_range = n) -&gt; (((exists ff_h_functional_r_range_decoded. ff_h_functional_r_range_decoded + S (1 + ff_i_functional_r_range) = S ((S (ff_i_functional_r_range)) * ff_c_functional_r)) /\ exists ff_q_functional_r_range_decoded. ff_b_functional_r = ff_q_functional_r_range_decoded * S ((S (ff_i_functional_r_range)) * ff_c_functional_r) + (1 + ff_i_functional_r_range)))) /\ (exists ff_u_functional_r_product ff_v_functional_r_product. ((((exists ff_h_functional_r_product_start. ff_h_functional_r_product_start + S (1) = S ((S (0)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_start. ff_u_functional_r_product = ff_q_functional_r_product_start * S ((S (0)) * ff_v_functional_r_product) + (1))) /\ ((((exists ff_h_functional_r_product_terminal. ff_h_functional_r_product_terminal + S (w) = S ((S (n)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_terminal. ff_u_functional_r_product = ff_q_functional_r_product_terminal * S ((S (n)) * ff_v_functional_r_product) + (w))) /\ forall ff_i_functional_r_product. (exists ff_lt_functional_r_product_bound. ff_lt_functional_r_product_bound + S ff_i_functional_r_product = n) -&gt; exists ff_p_functional_r_product ff_r_functional_r_product ff_s_functional_r_product. ((((exists ff_h_functional_r_product_factor. ff_h_functional_r_product_factor + S (ff_p_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_c_functional_r)) /\ exists ff_q_functional_r_product_factor. ff_b_functional_r = ff_q_functional_r_product_factor * S ((S (ff_i_functional_r_product)) * ff_c_functional_r) + (ff_p_functional_r_product))) /\ ((((exists ff_h_functional_r_product_partial. ff_h_functional_r_product_partial + S (ff_r_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_partial. ff_u_functional_r_product = ff_q_functional_r_product_partial * S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_r_functional_r_product))) /\ ((((exists ff_h_functional_r_product_successor. ff_h_functional_r_product_successor + S (ff_s_functional_r_product) = S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_successor. ff_u_functional_r_product = ff_q_functional_r_product_successor * S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_s_functional_r_product))) /\ ff_s_functional_r_product = ff_r_functional_r_product * ff_p_functional_r_product)))))))) -&gt; z = w</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factorial_functional">Copy proof</button>
        <pre id="proof-factorial_functional"><code>pa prove forall n z w. (exists ff_b_functional_l ff_c_functional_l. ((forall ff_i_functional_l_range. (exists ff_lt_functional_l_range_bound. ff_lt_functional_l_range_bound + S ff_i_functional_l_range = n) -&gt; (((exists ff_h_functional_l_range_decoded. ff_h_functional_l_range_decoded + S (1 + ff_i_functional_l_range) = S ((S (ff_i_functional_l_range)) * ff_c_functional_l)) /\ exists ff_q_functional_l_range_decoded. ff_b_functional_l = ff_q_functional_l_range_decoded * S ((S (ff_i_functional_l_range)) * ff_c_functional_l) + (1 + ff_i_functional_l_range)))) /\ (exists ff_u_functional_l_product ff_v_functional_l_product. ((((exists ff_h_functional_l_product_start. ff_h_functional_l_product_start + S (1) = S ((S (0)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_start. ff_u_functional_l_product = ff_q_functional_l_product_start * S ((S (0)) * ff_v_functional_l_product) + (1))) /\ ((((exists ff_h_functional_l_product_terminal. ff_h_functional_l_product_terminal + S (z) = S ((S (n)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_terminal. ff_u_functional_l_product = ff_q_functional_l_product_terminal * S ((S (n)) * ff_v_functional_l_product) + (z))) /\ forall ff_i_functional_l_product. (exists ff_lt_functional_l_product_bound. ff_lt_functional_l_product_bound + S ff_i_functional_l_product = n) -&gt; exists ff_p_functional_l_product ff_r_functional_l_product ff_s_functional_l_product. ((((exists ff_h_functional_l_product_factor. ff_h_functional_l_product_factor + S (ff_p_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_c_functional_l)) /\ exists ff_q_functional_l_product_factor. ff_b_functional_l = ff_q_functional_l_product_factor * S ((S (ff_i_functional_l_product)) * ff_c_functional_l) + (ff_p_functional_l_product))) /\ ((((exists ff_h_functional_l_product_partial. ff_h_functional_l_product_partial + S (ff_r_functional_l_product) = S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_partial. ff_u_functional_l_product = ff_q_functional_l_product_partial * S ((S (ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_r_functional_l_product))) /\ ((((exists ff_h_functional_l_product_successor. ff_h_functional_l_product_successor + S (ff_s_functional_l_product) = S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product)) /\ exists ff_q_functional_l_product_successor. ff_u_functional_l_product = ff_q_functional_l_product_successor * S ((S (S ff_i_functional_l_product)) * ff_v_functional_l_product) + (ff_s_functional_l_product))) /\ ff_s_functional_l_product = ff_r_functional_l_product * ff_p_functional_l_product)))))))) -&gt; (exists ff_b_functional_r ff_c_functional_r. ((forall ff_i_functional_r_range. (exists ff_lt_functional_r_range_bound. ff_lt_functional_r_range_bound + S ff_i_functional_r_range = n) -&gt; (((exists ff_h_functional_r_range_decoded. ff_h_functional_r_range_decoded + S (1 + ff_i_functional_r_range) = S ((S (ff_i_functional_r_range)) * ff_c_functional_r)) /\ exists ff_q_functional_r_range_decoded. ff_b_functional_r = ff_q_functional_r_range_decoded * S ((S (ff_i_functional_r_range)) * ff_c_functional_r) + (1 + ff_i_functional_r_range)))) /\ (exists ff_u_functional_r_product ff_v_functional_r_product. ((((exists ff_h_functional_r_product_start. ff_h_functional_r_product_start + S (1) = S ((S (0)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_start. ff_u_functional_r_product = ff_q_functional_r_product_start * S ((S (0)) * ff_v_functional_r_product) + (1))) /\ ((((exists ff_h_functional_r_product_terminal. ff_h_functional_r_product_terminal + S (w) = S ((S (n)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_terminal. ff_u_functional_r_product = ff_q_functional_r_product_terminal * S ((S (n)) * ff_v_functional_r_product) + (w))) /\ forall ff_i_functional_r_product. (exists ff_lt_functional_r_product_bound. ff_lt_functional_r_product_bound + S ff_i_functional_r_product = n) -&gt; exists ff_p_functional_r_product ff_r_functional_r_product ff_s_functional_r_product. ((((exists ff_h_functional_r_product_factor. ff_h_functional_r_product_factor + S (ff_p_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_c_functional_r)) /\ exists ff_q_functional_r_product_factor. ff_b_functional_r = ff_q_functional_r_product_factor * S ((S (ff_i_functional_r_product)) * ff_c_functional_r) + (ff_p_functional_r_product))) /\ ((((exists ff_h_functional_r_product_partial. ff_h_functional_r_product_partial + S (ff_r_functional_r_product) = S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_partial. ff_u_functional_r_product = ff_q_functional_r_product_partial * S ((S (ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_r_functional_r_product))) /\ ((((exists ff_h_functional_r_product_successor. ff_h_functional_r_product_successor + S (ff_s_functional_r_product) = S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product)) /\ exists ff_q_functional_r_product_successor. ff_u_functional_r_product = ff_q_functional_r_product_successor * S ((S (S ff_i_functional_r_product)) * ff_v_functional_r_product) + (ff_s_functional_r_product))) /\ ff_s_functional_r_product = ff_r_functional_r_product * ff_p_functional_r_product)))))))) -&gt; z = w
use beta_range_transport_entry
use beta_product_transport_prefix
use beta_product_functional
intro n
intro z
intro w
intro hz
intro hw
cases hz
cases hz_witness
cases hz_witness_witness
cases hw
cases hw_witness
cases hw_witness_witness
have htransport : exists ff_u_factorial_transport ff_v_factorial_transport. ((((exists ff_h_factorial_transport_start. ff_h_factorial_transport_start + S (1) = S ((S (0)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_start. ff_u_factorial_transport = ff_q_factorial_transport_start * S ((S (0)) * ff_v_factorial_transport) + (1))) /\ ((((exists ff_h_factorial_transport_terminal. ff_h_factorial_transport_terminal + S (z) = S ((S (n)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_terminal. ff_u_factorial_transport = ff_q_factorial_transport_terminal * S ((S (n)) * ff_v_factorial_transport) + (z))) /\ forall ff_i_factorial_transport. (exists ff_lt_factorial_transport_bound. ff_lt_factorial_transport_bound + S ff_i_factorial_transport = n) -&gt; exists ff_p_factorial_transport ff_r_factorial_transport ff_s_factorial_transport. ((((exists ff_h_factorial_transport_factor. ff_h_factorial_transport_factor + S (ff_p_factorial_transport) = S ((S (ff_i_factorial_transport)) * x3)) /\ exists ff_q_factorial_transport_factor. x2 = ff_q_factorial_transport_factor * S ((S (ff_i_factorial_transport)) * x3) + (ff_p_factorial_transport))) /\ ((((exists ff_h_factorial_transport_partial. ff_h_factorial_transport_partial + S (ff_r_factorial_transport) = S ((S (ff_i_factorial_transport)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_partial. ff_u_factorial_transport = ff_q_factorial_transport_partial * S ((S (ff_i_factorial_transport)) * ff_v_factorial_transport) + (ff_r_factorial_transport))) /\ ((((exists ff_h_factorial_transport_successor. ff_h_factorial_transport_successor + S (ff_s_factorial_transport) = S ((S (S ff_i_factorial_transport)) * ff_v_factorial_transport)) /\ exists ff_q_factorial_transport_successor. ff_u_factorial_transport = ff_q_factorial_transport_successor * S ((S (S ff_i_factorial_transport)) * ff_v_factorial_transport) + (ff_s_factorial_transport))) /\ ff_s_factorial_transport = ff_r_factorial_transport * ff_p_factorial_transport)))))
specialize beta_product_transport_prefix x
specialize beta_product_transport_prefix x1
specialize beta_product_transport_prefix x2
specialize beta_product_transport_prefix x3
specialize beta_product_transport_prefix n
specialize beta_product_transport_prefix z
apply beta_product_transport_prefix
exact hz_witness_witness_right
intro i
intro p
intro hi
intro hp
specialize beta_range_transport_entry x
specialize beta_range_transport_entry x1
specialize beta_range_transport_entry x2
specialize beta_range_transport_entry x3
specialize beta_range_transport_entry 1
specialize beta_range_transport_entry n
have hentries : forall i p. (exists h. h + S i = n) -&gt; (((exists ff_h_factorial_transport_l. ff_h_factorial_transport_l + S (p) = S ((S (i)) * x1)) /\ exists ff_q_factorial_transport_l. x = ff_q_factorial_transport_l * S ((S (i)) * x1) + (p))) -&gt; (((exists ff_h_factorial_transport_r. ff_h_factorial_transport_r + S (p) = S ((S (i)) * x3)) /\ exists ff_q_factorial_transport_r. x2 = ff_q_factorial_transport_r * S ((S (i)) * x3) + (p)))
apply beta_range_transport_entry
exact hz_witness_witness_left
exact hw_witness_witness_left
specialize hentries i
specialize hentries p
apply hentries
exact hi
exact hp
cases htransport
cases htransport_witness
cases hw_witness_witness_right
cases hw_witness_witness_right_witness
specialize beta_product_functional x2
specialize beta_product_functional x3
specialize beta_product_functional n
specialize beta_product_functional z
specialize beta_product_functional x4
specialize beta_product_functional x5
specialize beta_product_functional w
specialize beta_product_functional x6
specialize beta_product_functional x7
apply beta_product_functional
exact htransport_witness_witness
exact hw_witness_witness_right_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,704</dd></div>
        <div><dt>Distinct objects</dt><dd>1,110</dd></div>
        <div><dt>Reused references</dt><dd>40</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>71</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="53e13da0d0ce1dab3383469dcbda28246d683418bd79e90bb3e3a78e942a0202">53e13da0d0ce…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factorial_functional">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factorial_functional</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_factorial_theorems.py#L116">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factorial_functional.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factorial_zero"
  data-name="factorial_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_product_zero"
  data-search="factorial_zero factorial zero the relational factorial of zero is one. forall n z. n = 0 -&gt; (exists ff_b_zero ff_c_zero. ((forall ff_i_zero_range. (exists ff_lt_zero_range_bound. ff_lt_zero_range_bound + s ff_i_zero_range = n) -&gt; (((exists ff_h_zero_range_decoded. ff_h_zero_range_decoded + s (1 + ff_i_zero_range) = s ((s (ff_i_zero_range)) * ff_c_zero)) /\ exists ff_q_zero_range_decoded. ff_b_zero = ff_q_zero_range_decoded * s ((s (ff_i_zero_range)) * ff_c_zero) + (1 + ff_i_zero_range)))) /\ (exists ff_u_zero_product ff_v_zero_product. ((((exists ff_h_zero_product_start. ff_h_zero_product_start + s (1) = s ((s (0)) * ff_v_zero_product)) /\ exists ff_q_zero_product_start. ff_u_zero_product = ff_q_zero_product_start * s ((s (0)) * ff_v_zero_product) + (1))) /\ ((((exists ff_h_zero_product_terminal. ff_h_zero_product_terminal + s (z) = s ((s (n)) * ff_v_zero_product)) /\ exists ff_q_zero_product_terminal. ff_u_zero_product = ff_q_zero_product_terminal * s ((s (n)) * ff_v_zero_product) + (z))) /\ forall ff_i_zero_product. (exists ff_lt_zero_product_bound. ff_lt_zero_product_bound + s ff_i_zero_product = n) -&gt; exists ff_p_zero_product ff_r_zero_product ff_s_zero_product. ((((exists ff_h_zero_product_factor. ff_h_zero_product_factor + s (ff_p_zero_product) = s ((s (ff_i_zero_product)) * ff_c_zero)) /\ exists ff_q_zero_product_factor. ff_b_zero = ff_q_zero_product_factor * s ((s (ff_i_zero_product)) * ff_c_zero) + (ff_p_zero_product))) /\ ((((exists ff_h_zero_product_partial. ff_h_zero_product_partial + s (ff_r_zero_product) = s ((s (ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_partial. ff_u_zero_product = ff_q_zero_product_partial * s ((s (ff_i_zero_product)) * ff_v_zero_product) + (ff_r_zero_product))) /\ ((((exists ff_h_zero_product_successor. ff_h_zero_product_successor + s (ff_s_zero_product) = s ((s (s ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_successor. ff_u_zero_product = ff_q_zero_product_successor * s ((s (s ff_i_zero_product)) * ff_v_zero_product) + (ff_s_zero_product))) /\ ff_s_zero_product = ff_r_zero_product * ff_p_zero_product)))))))) -&gt; z = 1 quadratic_residues beta_product_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>factorial_zero</code><span>Factorial zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The relational factorial of zero is one.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_zero" href="#theorem-beta_product_zero"><code>beta_product_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factorial_zero">Copy statement</button>
        <pre id="statement-factorial_zero"><code>forall n z. n = 0 -&gt; (exists ff_b_zero ff_c_zero. ((forall ff_i_zero_range. (exists ff_lt_zero_range_bound. ff_lt_zero_range_bound + S ff_i_zero_range = n) -&gt; (((exists ff_h_zero_range_decoded. ff_h_zero_range_decoded + S (1 + ff_i_zero_range) = S ((S (ff_i_zero_range)) * ff_c_zero)) /\ exists ff_q_zero_range_decoded. ff_b_zero = ff_q_zero_range_decoded * S ((S (ff_i_zero_range)) * ff_c_zero) + (1 + ff_i_zero_range)))) /\ (exists ff_u_zero_product ff_v_zero_product. ((((exists ff_h_zero_product_start. ff_h_zero_product_start + S (1) = S ((S (0)) * ff_v_zero_product)) /\ exists ff_q_zero_product_start. ff_u_zero_product = ff_q_zero_product_start * S ((S (0)) * ff_v_zero_product) + (1))) /\ ((((exists ff_h_zero_product_terminal. ff_h_zero_product_terminal + S (z) = S ((S (n)) * ff_v_zero_product)) /\ exists ff_q_zero_product_terminal. ff_u_zero_product = ff_q_zero_product_terminal * S ((S (n)) * ff_v_zero_product) + (z))) /\ forall ff_i_zero_product. (exists ff_lt_zero_product_bound. ff_lt_zero_product_bound + S ff_i_zero_product = n) -&gt; exists ff_p_zero_product ff_r_zero_product ff_s_zero_product. ((((exists ff_h_zero_product_factor. ff_h_zero_product_factor + S (ff_p_zero_product) = S ((S (ff_i_zero_product)) * ff_c_zero)) /\ exists ff_q_zero_product_factor. ff_b_zero = ff_q_zero_product_factor * S ((S (ff_i_zero_product)) * ff_c_zero) + (ff_p_zero_product))) /\ ((((exists ff_h_zero_product_partial. ff_h_zero_product_partial + S (ff_r_zero_product) = S ((S (ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_partial. ff_u_zero_product = ff_q_zero_product_partial * S ((S (ff_i_zero_product)) * ff_v_zero_product) + (ff_r_zero_product))) /\ ((((exists ff_h_zero_product_successor. ff_h_zero_product_successor + S (ff_s_zero_product) = S ((S (S ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_successor. ff_u_zero_product = ff_q_zero_product_successor * S ((S (S ff_i_zero_product)) * ff_v_zero_product) + (ff_s_zero_product))) /\ ff_s_zero_product = ff_r_zero_product * ff_p_zero_product)))))))) -&gt; z = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factorial_zero">Copy proof</button>
        <pre id="proof-factorial_zero"><code>pa prove forall n z. n = 0 -&gt; (exists ff_b_zero ff_c_zero. ((forall ff_i_zero_range. (exists ff_lt_zero_range_bound. ff_lt_zero_range_bound + S ff_i_zero_range = n) -&gt; (((exists ff_h_zero_range_decoded. ff_h_zero_range_decoded + S (1 + ff_i_zero_range) = S ((S (ff_i_zero_range)) * ff_c_zero)) /\ exists ff_q_zero_range_decoded. ff_b_zero = ff_q_zero_range_decoded * S ((S (ff_i_zero_range)) * ff_c_zero) + (1 + ff_i_zero_range)))) /\ (exists ff_u_zero_product ff_v_zero_product. ((((exists ff_h_zero_product_start. ff_h_zero_product_start + S (1) = S ((S (0)) * ff_v_zero_product)) /\ exists ff_q_zero_product_start. ff_u_zero_product = ff_q_zero_product_start * S ((S (0)) * ff_v_zero_product) + (1))) /\ ((((exists ff_h_zero_product_terminal. ff_h_zero_product_terminal + S (z) = S ((S (n)) * ff_v_zero_product)) /\ exists ff_q_zero_product_terminal. ff_u_zero_product = ff_q_zero_product_terminal * S ((S (n)) * ff_v_zero_product) + (z))) /\ forall ff_i_zero_product. (exists ff_lt_zero_product_bound. ff_lt_zero_product_bound + S ff_i_zero_product = n) -&gt; exists ff_p_zero_product ff_r_zero_product ff_s_zero_product. ((((exists ff_h_zero_product_factor. ff_h_zero_product_factor + S (ff_p_zero_product) = S ((S (ff_i_zero_product)) * ff_c_zero)) /\ exists ff_q_zero_product_factor. ff_b_zero = ff_q_zero_product_factor * S ((S (ff_i_zero_product)) * ff_c_zero) + (ff_p_zero_product))) /\ ((((exists ff_h_zero_product_partial. ff_h_zero_product_partial + S (ff_r_zero_product) = S ((S (ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_partial. ff_u_zero_product = ff_q_zero_product_partial * S ((S (ff_i_zero_product)) * ff_v_zero_product) + (ff_r_zero_product))) /\ ((((exists ff_h_zero_product_successor. ff_h_zero_product_successor + S (ff_s_zero_product) = S ((S (S ff_i_zero_product)) * ff_v_zero_product)) /\ exists ff_q_zero_product_successor. ff_u_zero_product = ff_q_zero_product_successor * S ((S (S ff_i_zero_product)) * ff_v_zero_product) + (ff_s_zero_product))) /\ ff_s_zero_product = ff_r_zero_product * ff_p_zero_product)))))))) -&gt; z = 1
use beta_product_zero
intro n
intro z
intro hn
intro hfactorial
rewrite hn at hfactorial
rewrite hn at hfactorial
rewrite hn at hfactorial
rewrite hn at hfactorial
cases hfactorial
cases hfactorial_witness
cases hfactorial_witness_witness
specialize beta_product_zero x
specialize beta_product_zero x1
specialize beta_product_zero z
apply beta_product_zero
exact hfactorial_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,223</dd></div>
        <div><dt>Distinct objects</dt><dd>794</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>32</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="34038cedbd376b1d7766ef2f00ff2d789fa2c47a5c27fdb66f1293333c3dcc89">34038cedbd37…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factorial_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factorial_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_factorial_theorems.py#L183">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factorial_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-factorial_succ_decompose"
  data-name="factorial_succ_decompose" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_product_succ_decompose,beta_range_entry_eq,le_refl,le_succ,add_succ_left,zero_add"
  data-search="factorial_succ_decompose factorial succ decompose a successor factorial is its predecessor factorial times the successor. forall n sn z. sn = s n -&gt; (exists ff_b_successor ff_c_successor. ((forall ff_i_successor_range. (exists ff_lt_successor_range_bound. ff_lt_successor_range_bound + s ff_i_successor_range = sn) -&gt; (((exists ff_h_successor_range_decoded. ff_h_successor_range_decoded + s (1 + ff_i_successor_range) = s ((s (ff_i_successor_range)) * ff_c_successor)) /\ exists ff_q_successor_range_decoded. ff_b_successor = ff_q_successor_range_decoded * s ((s (ff_i_successor_range)) * ff_c_successor) + (1 + ff_i_successor_range)))) /\ (exists ff_u_successor_product ff_v_successor_product. ((((exists ff_h_successor_product_start. ff_h_successor_product_start + s (1) = s ((s (0)) * ff_v_successor_product)) /\ exists ff_q_successor_product_start. ff_u_successor_product = ff_q_successor_product_start * s ((s (0)) * ff_v_successor_product) + (1))) /\ ((((exists ff_h_successor_product_terminal. ff_h_successor_product_terminal + s (z) = s ((s (sn)) * ff_v_successor_product)) /\ exists ff_q_successor_product_terminal. ff_u_successor_product = ff_q_successor_product_terminal * s ((s (sn)) * ff_v_successor_product) + (z))) /\ forall ff_i_successor_product. (exists ff_lt_successor_product_bound. ff_lt_successor_product_bound + s ff_i_successor_product = sn) -&gt; exists ff_p_successor_product ff_r_successor_product ff_s_successor_product. ((((exists ff_h_successor_product_factor. ff_h_successor_product_factor + s (ff_p_successor_product) = s ((s (ff_i_successor_product)) * ff_c_successor)) /\ exists ff_q_successor_product_factor. ff_b_successor = ff_q_successor_product_factor * s ((s (ff_i_successor_product)) * ff_c_successor) + (ff_p_successor_product))) /\ ((((exists ff_h_successor_product_partial. ff_h_successor_product_partial + s (ff_r_successor_product) = s ((s (ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_partial. ff_u_successor_product = ff_q_successor_product_partial * s ((s (ff_i_successor_product)) * ff_v_successor_product) + (ff_r_successor_product))) /\ ((((exists ff_h_successor_product_successor. ff_h_successor_product_successor + s (ff_s_successor_product) = s ((s (s ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_successor. ff_u_successor_product = ff_q_successor_product_successor * s ((s (s ff_i_successor_product)) * ff_v_successor_product) + (ff_s_successor_product))) /\ ff_s_successor_product = ff_r_successor_product * ff_p_successor_product)))))))) -&gt; exists r. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_range. (exists ff_lt_predecessor_range_bound. ff_lt_predecessor_range_bound + s ff_i_predecessor_range = n) -&gt; (((exists ff_h_predecessor_range_decoded. ff_h_predecessor_range_decoded + s (1 + ff_i_predecessor_range) = s ((s (ff_i_predecessor_range)) * ff_c_predecessor)) /\ exists ff_q_predecessor_range_decoded. ff_b_predecessor = ff_q_predecessor_range_decoded * s ((s (ff_i_predecessor_range)) * ff_c_predecessor) + (1 + ff_i_predecessor_range)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + s (1) = s ((s (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * s ((s (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + s (r) = s ((s (n)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * s ((s (n)) * ff_v_predecessor_product) + (r))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + s ff_i_predecessor_product = n) -&gt; exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + s (ff_p_predecessor_product) = s ((s (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * s ((s (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + s (ff_r_predecessor_product) = s ((s (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * s ((s (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + s (ff_s_predecessor_product) = s ((s (s ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * s ((s (s ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = r * s n quadratic_residues beta_product_succ_decompose beta_range_entry_eq le_refl le_succ add_succ_left zero_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>factorial_succ_decompose</code><span>Factorial succ decompose</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor factorial is its predecessor factorial times the successor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_entry_eq" href="#theorem-beta_range_entry_eq"><code>beta_range_entry_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-factorial_succ_decompose">Copy statement</button>
        <pre id="statement-factorial_succ_decompose"><code>forall n sn z. sn = S n -&gt; (exists ff_b_successor ff_c_successor. ((forall ff_i_successor_range. (exists ff_lt_successor_range_bound. ff_lt_successor_range_bound + S ff_i_successor_range = sn) -&gt; (((exists ff_h_successor_range_decoded. ff_h_successor_range_decoded + S (1 + ff_i_successor_range) = S ((S (ff_i_successor_range)) * ff_c_successor)) /\ exists ff_q_successor_range_decoded. ff_b_successor = ff_q_successor_range_decoded * S ((S (ff_i_successor_range)) * ff_c_successor) + (1 + ff_i_successor_range)))) /\ (exists ff_u_successor_product ff_v_successor_product. ((((exists ff_h_successor_product_start. ff_h_successor_product_start + S (1) = S ((S (0)) * ff_v_successor_product)) /\ exists ff_q_successor_product_start. ff_u_successor_product = ff_q_successor_product_start * S ((S (0)) * ff_v_successor_product) + (1))) /\ ((((exists ff_h_successor_product_terminal. ff_h_successor_product_terminal + S (z) = S ((S (sn)) * ff_v_successor_product)) /\ exists ff_q_successor_product_terminal. ff_u_successor_product = ff_q_successor_product_terminal * S ((S (sn)) * ff_v_successor_product) + (z))) /\ forall ff_i_successor_product. (exists ff_lt_successor_product_bound. ff_lt_successor_product_bound + S ff_i_successor_product = sn) -&gt; exists ff_p_successor_product ff_r_successor_product ff_s_successor_product. ((((exists ff_h_successor_product_factor. ff_h_successor_product_factor + S (ff_p_successor_product) = S ((S (ff_i_successor_product)) * ff_c_successor)) /\ exists ff_q_successor_product_factor. ff_b_successor = ff_q_successor_product_factor * S ((S (ff_i_successor_product)) * ff_c_successor) + (ff_p_successor_product))) /\ ((((exists ff_h_successor_product_partial. ff_h_successor_product_partial + S (ff_r_successor_product) = S ((S (ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_partial. ff_u_successor_product = ff_q_successor_product_partial * S ((S (ff_i_successor_product)) * ff_v_successor_product) + (ff_r_successor_product))) /\ ((((exists ff_h_successor_product_successor. ff_h_successor_product_successor + S (ff_s_successor_product) = S ((S (S ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_successor. ff_u_successor_product = ff_q_successor_product_successor * S ((S (S ff_i_successor_product)) * ff_v_successor_product) + (ff_s_successor_product))) /\ ff_s_successor_product = ff_r_successor_product * ff_p_successor_product)))))))) -&gt; exists r. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_range. (exists ff_lt_predecessor_range_bound. ff_lt_predecessor_range_bound + S ff_i_predecessor_range = n) -&gt; (((exists ff_h_predecessor_range_decoded. ff_h_predecessor_range_decoded + S (1 + ff_i_predecessor_range) = S ((S (ff_i_predecessor_range)) * ff_c_predecessor)) /\ exists ff_q_predecessor_range_decoded. ff_b_predecessor = ff_q_predecessor_range_decoded * S ((S (ff_i_predecessor_range)) * ff_c_predecessor) + (1 + ff_i_predecessor_range)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + S (1) = S ((S (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * S ((S (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + S (r) = S ((S (n)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * S ((S (n)) * ff_v_predecessor_product) + (r))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + S ff_i_predecessor_product = n) -&gt; exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + S (ff_p_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * S ((S (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + S (ff_r_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + S (ff_s_predecessor_product) = S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = r * S n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-factorial_succ_decompose">Copy proof</button>
        <pre id="proof-factorial_succ_decompose"><code>pa prove forall n sn z. sn = S n -&gt; (exists ff_b_successor ff_c_successor. ((forall ff_i_successor_range. (exists ff_lt_successor_range_bound. ff_lt_successor_range_bound + S ff_i_successor_range = sn) -&gt; (((exists ff_h_successor_range_decoded. ff_h_successor_range_decoded + S (1 + ff_i_successor_range) = S ((S (ff_i_successor_range)) * ff_c_successor)) /\ exists ff_q_successor_range_decoded. ff_b_successor = ff_q_successor_range_decoded * S ((S (ff_i_successor_range)) * ff_c_successor) + (1 + ff_i_successor_range)))) /\ (exists ff_u_successor_product ff_v_successor_product. ((((exists ff_h_successor_product_start. ff_h_successor_product_start + S (1) = S ((S (0)) * ff_v_successor_product)) /\ exists ff_q_successor_product_start. ff_u_successor_product = ff_q_successor_product_start * S ((S (0)) * ff_v_successor_product) + (1))) /\ ((((exists ff_h_successor_product_terminal. ff_h_successor_product_terminal + S (z) = S ((S (sn)) * ff_v_successor_product)) /\ exists ff_q_successor_product_terminal. ff_u_successor_product = ff_q_successor_product_terminal * S ((S (sn)) * ff_v_successor_product) + (z))) /\ forall ff_i_successor_product. (exists ff_lt_successor_product_bound. ff_lt_successor_product_bound + S ff_i_successor_product = sn) -&gt; exists ff_p_successor_product ff_r_successor_product ff_s_successor_product. ((((exists ff_h_successor_product_factor. ff_h_successor_product_factor + S (ff_p_successor_product) = S ((S (ff_i_successor_product)) * ff_c_successor)) /\ exists ff_q_successor_product_factor. ff_b_successor = ff_q_successor_product_factor * S ((S (ff_i_successor_product)) * ff_c_successor) + (ff_p_successor_product))) /\ ((((exists ff_h_successor_product_partial. ff_h_successor_product_partial + S (ff_r_successor_product) = S ((S (ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_partial. ff_u_successor_product = ff_q_successor_product_partial * S ((S (ff_i_successor_product)) * ff_v_successor_product) + (ff_r_successor_product))) /\ ((((exists ff_h_successor_product_successor. ff_h_successor_product_successor + S (ff_s_successor_product) = S ((S (S ff_i_successor_product)) * ff_v_successor_product)) /\ exists ff_q_successor_product_successor. ff_u_successor_product = ff_q_successor_product_successor * S ((S (S ff_i_successor_product)) * ff_v_successor_product) + (ff_s_successor_product))) /\ ff_s_successor_product = ff_r_successor_product * ff_p_successor_product)))))))) -&gt; exists r. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_range. (exists ff_lt_predecessor_range_bound. ff_lt_predecessor_range_bound + S ff_i_predecessor_range = n) -&gt; (((exists ff_h_predecessor_range_decoded. ff_h_predecessor_range_decoded + S (1 + ff_i_predecessor_range) = S ((S (ff_i_predecessor_range)) * ff_c_predecessor)) /\ exists ff_q_predecessor_range_decoded. ff_b_predecessor = ff_q_predecessor_range_decoded * S ((S (ff_i_predecessor_range)) * ff_c_predecessor) + (1 + ff_i_predecessor_range)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + S (1) = S ((S (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * S ((S (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + S (r) = S ((S (n)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * S ((S (n)) * ff_v_predecessor_product) + (r))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + S ff_i_predecessor_product = n) -&gt; exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + S (ff_p_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * S ((S (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + S (ff_r_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + S (ff_s_predecessor_product) = S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = r * S n
use beta_product_succ_decompose
use beta_range_entry_eq
use le_refl
use le_succ
use add_succ_left
use zero_add
intro n
intro sn
intro z
intro hsn
intro hfactorial
rewrite hsn at hfactorial
rewrite hsn at hfactorial
rewrite hsn at hfactorial
rewrite hsn at hfactorial
cases hfactorial
cases hfactorial_witness
cases hfactorial_witness_witness
have hdecomp : exists p r. (((exists ff_h_factorial_succ_factor. ff_h_factorial_succ_factor + S (p) = S ((S (n)) * x1)) /\ exists ff_q_factorial_succ_factor. x = ff_q_factorial_succ_factor * S ((S (n)) * x1) + (p))) /\ ((exists ff_u_factorial_succ_prefix ff_v_factorial_succ_prefix. ((((exists ff_h_factorial_succ_prefix_start. ff_h_factorial_succ_prefix_start + S (1) = S ((S (0)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_start. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_start * S ((S (0)) * ff_v_factorial_succ_prefix) + (1))) /\ ((((exists ff_h_factorial_succ_prefix_terminal. ff_h_factorial_succ_prefix_terminal + S (r) = S ((S (n)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_terminal. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_terminal * S ((S (n)) * ff_v_factorial_succ_prefix) + (r))) /\ forall ff_i_factorial_succ_prefix. (exists ff_lt_factorial_succ_prefix_bound. ff_lt_factorial_succ_prefix_bound + S ff_i_factorial_succ_prefix = n) -&gt; exists ff_p_factorial_succ_prefix ff_r_factorial_succ_prefix ff_s_factorial_succ_prefix. ((((exists ff_h_factorial_succ_prefix_factor. ff_h_factorial_succ_prefix_factor + S (ff_p_factorial_succ_prefix) = S ((S (ff_i_factorial_succ_prefix)) * x1)) /\ exists ff_q_factorial_succ_prefix_factor. x = ff_q_factorial_succ_prefix_factor * S ((S (ff_i_factorial_succ_prefix)) * x1) + (ff_p_factorial_succ_prefix))) /\ ((((exists ff_h_factorial_succ_prefix_partial. ff_h_factorial_succ_prefix_partial + S (ff_r_factorial_succ_prefix) = S ((S (ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_partial. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_partial * S ((S (ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix) + (ff_r_factorial_succ_prefix))) /\ ((((exists ff_h_factorial_succ_prefix_successor. ff_h_factorial_succ_prefix_successor + S (ff_s_factorial_succ_prefix) = S ((S (S ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix)) /\ exists ff_q_factorial_succ_prefix_successor. ff_u_factorial_succ_prefix = ff_q_factorial_succ_prefix_successor * S ((S (S ff_i_factorial_succ_prefix)) * ff_v_factorial_succ_prefix) + (ff_s_factorial_succ_prefix))) /\ ff_s_factorial_succ_prefix = ff_r_factorial_succ_prefix * ff_p_factorial_succ_prefix)))))) /\ z = r * p)
specialize beta_product_succ_decompose x
specialize beta_product_succ_decompose x1
specialize beta_product_succ_decompose n
specialize beta_product_succ_decompose z
apply beta_product_succ_decompose
exact hfactorial_witness_witness_right
cases hdecomp
cases hdecomp_witness
cases hdecomp_witness_witness
cases hdecomp_witness_witness_right
have hp : x2 = 1 + n
specialize beta_range_entry_eq x
specialize beta_range_entry_eq x1
specialize beta_range_entry_eq 1
specialize beta_range_entry_eq (S n)
specialize beta_range_entry_eq n
specialize beta_range_entry_eq x2
apply beta_range_entry_eq
exact hfactorial_witness_witness_left
specialize le_refl (S n)
exact le_refl
exact hdecomp_witness_witness_left
exists x3
split
exists x
exists x1
split
intro i
intro hi
specialize hfactorial_witness_witness_left i
apply hfactorial_witness_witness_left
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
exact hdecomp_witness_witness_right_left
trans x3 * x2
exact hdecomp_witness_witness_right_right
rewrite hp
congr
refl
specialize add_succ_left 0
specialize add_succ_left n
trans S (0 + n)
exact add_succ_left
congr
apply zero_add
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,594</dd></div>
        <div><dt>Distinct objects</dt><dd>891</dd></div>
        <div><dt>Reused references</dt><dd>44</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>74</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8e876f042ad4c64a11caabfa1a239edd3ac1c2bb4a306daf0e317ca5d69719dc">8e876f042ad4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for factorial_succ_decompose">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib factorial_succ_decompose</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_factorial_theorems.py#L207">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/factorial_succ_decompose.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_one_from_zero_successor"
  data-name="pow_one_from_zero_successor" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_successor_decompose,pow_zero,one_mul"
  data-search="pow_one_from_zero_successor pow one from zero successor a successor of a zero exponent gives the relational first power. forall a z e n. z = 0 -&gt; e = s z -&gt; (exists ff_b_one_carrier ff_c_one_carrier. ((forall ff_i_one_carrier_repeat. (exists ff_lt_one_carrier_repeat_bound. ff_lt_one_carrier_repeat_bound + s ff_i_one_carrier_repeat = e) -&gt; (((exists ff_h_one_carrier_repeat_decoded. ff_h_one_carrier_repeat_decoded + s (a) = s ((s (ff_i_one_carrier_repeat)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_repeat_decoded. ff_b_one_carrier = ff_q_one_carrier_repeat_decoded * s ((s (ff_i_one_carrier_repeat)) * ff_c_one_carrier) + (a)))) /\ (exists ff_u_one_carrier_product ff_v_one_carrier_product. ((((exists ff_h_one_carrier_product_start. ff_h_one_carrier_product_start + s (1) = s ((s (0)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_start. ff_u_one_carrier_product = ff_q_one_carrier_product_start * s ((s (0)) * ff_v_one_carrier_product) + (1))) /\ ((((exists ff_h_one_carrier_product_terminal. ff_h_one_carrier_product_terminal + s (n) = s ((s (e)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_terminal. ff_u_one_carrier_product = ff_q_one_carrier_product_terminal * s ((s (e)) * ff_v_one_carrier_product) + (n))) /\ forall ff_i_one_carrier_product. (exists ff_lt_one_carrier_product_bound. ff_lt_one_carrier_product_bound + s ff_i_one_carrier_product = e) -&gt; exists ff_p_one_carrier_product ff_r_one_carrier_product ff_s_one_carrier_product. ((((exists ff_h_one_carrier_product_factor. ff_h_one_carrier_product_factor + s (ff_p_one_carrier_product) = s ((s (ff_i_one_carrier_product)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_product_factor. ff_b_one_carrier = ff_q_one_carrier_product_factor * s ((s (ff_i_one_carrier_product)) * ff_c_one_carrier) + (ff_p_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_partial. ff_h_one_carrier_product_partial + s (ff_r_one_carrier_product) = s ((s (ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_partial. ff_u_one_carrier_product = ff_q_one_carrier_product_partial * s ((s (ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_r_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_successor. ff_h_one_carrier_product_successor + s (ff_s_one_carrier_product) = s ((s (s ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_successor. ff_u_one_carrier_product = ff_q_one_carrier_product_successor * s ((s (s ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_s_one_carrier_product))) /\ ff_s_one_carrier_product = ff_r_one_carrier_product * ff_p_one_carrier_product)))))))) -&gt; n = a quadratic_residues pow_successor_decompose pow_zero one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_one_from_zero_successor</code><span>Pow one from zero successor</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor of a zero exponent gives the relational first power.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_zero" href="#theorem-pow_zero"><code>pow_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_one" href="#theorem-pow_one"><code>pow_one</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_one_from_zero_successor">Copy statement</button>
        <pre id="statement-pow_one_from_zero_successor"><code>forall a z e n. z = 0 -&gt; e = S z -&gt; (exists ff_b_one_carrier ff_c_one_carrier. ((forall ff_i_one_carrier_repeat. (exists ff_lt_one_carrier_repeat_bound. ff_lt_one_carrier_repeat_bound + S ff_i_one_carrier_repeat = e) -&gt; (((exists ff_h_one_carrier_repeat_decoded. ff_h_one_carrier_repeat_decoded + S (a) = S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_repeat_decoded. ff_b_one_carrier = ff_q_one_carrier_repeat_decoded * S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier) + (a)))) /\ (exists ff_u_one_carrier_product ff_v_one_carrier_product. ((((exists ff_h_one_carrier_product_start. ff_h_one_carrier_product_start + S (1) = S ((S (0)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_start. ff_u_one_carrier_product = ff_q_one_carrier_product_start * S ((S (0)) * ff_v_one_carrier_product) + (1))) /\ ((((exists ff_h_one_carrier_product_terminal. ff_h_one_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_terminal. ff_u_one_carrier_product = ff_q_one_carrier_product_terminal * S ((S (e)) * ff_v_one_carrier_product) + (n))) /\ forall ff_i_one_carrier_product. (exists ff_lt_one_carrier_product_bound. ff_lt_one_carrier_product_bound + S ff_i_one_carrier_product = e) -&gt; exists ff_p_one_carrier_product ff_r_one_carrier_product ff_s_one_carrier_product. ((((exists ff_h_one_carrier_product_factor. ff_h_one_carrier_product_factor + S (ff_p_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_product_factor. ff_b_one_carrier = ff_q_one_carrier_product_factor * S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier) + (ff_p_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_partial. ff_h_one_carrier_product_partial + S (ff_r_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_partial. ff_u_one_carrier_product = ff_q_one_carrier_product_partial * S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_r_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_successor. ff_h_one_carrier_product_successor + S (ff_s_one_carrier_product) = S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_successor. ff_u_one_carrier_product = ff_q_one_carrier_product_successor * S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_s_one_carrier_product))) /\ ff_s_one_carrier_product = ff_r_one_carrier_product * ff_p_one_carrier_product)))))))) -&gt; n = a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_one_from_zero_successor">Copy proof</button>
        <pre id="proof-pow_one_from_zero_successor"><code>pa prove forall a z e n. z = 0 -&gt; e = S z -&gt; (exists ff_b_one_carrier ff_c_one_carrier. ((forall ff_i_one_carrier_repeat. (exists ff_lt_one_carrier_repeat_bound. ff_lt_one_carrier_repeat_bound + S ff_i_one_carrier_repeat = e) -&gt; (((exists ff_h_one_carrier_repeat_decoded. ff_h_one_carrier_repeat_decoded + S (a) = S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_repeat_decoded. ff_b_one_carrier = ff_q_one_carrier_repeat_decoded * S ((S (ff_i_one_carrier_repeat)) * ff_c_one_carrier) + (a)))) /\ (exists ff_u_one_carrier_product ff_v_one_carrier_product. ((((exists ff_h_one_carrier_product_start. ff_h_one_carrier_product_start + S (1) = S ((S (0)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_start. ff_u_one_carrier_product = ff_q_one_carrier_product_start * S ((S (0)) * ff_v_one_carrier_product) + (1))) /\ ((((exists ff_h_one_carrier_product_terminal. ff_h_one_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_terminal. ff_u_one_carrier_product = ff_q_one_carrier_product_terminal * S ((S (e)) * ff_v_one_carrier_product) + (n))) /\ forall ff_i_one_carrier_product. (exists ff_lt_one_carrier_product_bound. ff_lt_one_carrier_product_bound + S ff_i_one_carrier_product = e) -&gt; exists ff_p_one_carrier_product ff_r_one_carrier_product ff_s_one_carrier_product. ((((exists ff_h_one_carrier_product_factor. ff_h_one_carrier_product_factor + S (ff_p_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier)) /\ exists ff_q_one_carrier_product_factor. ff_b_one_carrier = ff_q_one_carrier_product_factor * S ((S (ff_i_one_carrier_product)) * ff_c_one_carrier) + (ff_p_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_partial. ff_h_one_carrier_product_partial + S (ff_r_one_carrier_product) = S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_partial. ff_u_one_carrier_product = ff_q_one_carrier_product_partial * S ((S (ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_r_one_carrier_product))) /\ ((((exists ff_h_one_carrier_product_successor. ff_h_one_carrier_product_successor + S (ff_s_one_carrier_product) = S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product)) /\ exists ff_q_one_carrier_product_successor. ff_u_one_carrier_product = ff_q_one_carrier_product_successor * S ((S (S ff_i_one_carrier_product)) * ff_v_one_carrier_product) + (ff_s_one_carrier_product))) /\ ff_s_one_carrier_product = ff_r_one_carrier_product * ff_p_one_carrier_product)))))))) -&gt; n = a
use pow_successor_decompose
use pow_zero
use one_mul
intro a
intro z
intro e
intro n
intro hz
intro he
intro hpow
have hstep : exists r. (exists ff_b_one_predecessor ff_c_one_predecessor. ((forall ff_i_one_predecessor_repeat. (exists ff_lt_one_predecessor_repeat_bound. ff_lt_one_predecessor_repeat_bound + S ff_i_one_predecessor_repeat = z) -&gt; (((exists ff_h_one_predecessor_repeat_decoded. ff_h_one_predecessor_repeat_decoded + S (a) = S ((S (ff_i_one_predecessor_repeat)) * ff_c_one_predecessor)) /\ exists ff_q_one_predecessor_repeat_decoded. ff_b_one_predecessor = ff_q_one_predecessor_repeat_decoded * S ((S (ff_i_one_predecessor_repeat)) * ff_c_one_predecessor) + (a)))) /\ (exists ff_u_one_predecessor_product ff_v_one_predecessor_product. ((((exists ff_h_one_predecessor_product_start. ff_h_one_predecessor_product_start + S (1) = S ((S (0)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_start. ff_u_one_predecessor_product = ff_q_one_predecessor_product_start * S ((S (0)) * ff_v_one_predecessor_product) + (1))) /\ ((((exists ff_h_one_predecessor_product_terminal. ff_h_one_predecessor_product_terminal + S (r) = S ((S (z)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_terminal. ff_u_one_predecessor_product = ff_q_one_predecessor_product_terminal * S ((S (z)) * ff_v_one_predecessor_product) + (r))) /\ forall ff_i_one_predecessor_product. (exists ff_lt_one_predecessor_product_bound. ff_lt_one_predecessor_product_bound + S ff_i_one_predecessor_product = z) -&gt; exists ff_p_one_predecessor_product ff_r_one_predecessor_product ff_s_one_predecessor_product. ((((exists ff_h_one_predecessor_product_factor. ff_h_one_predecessor_product_factor + S (ff_p_one_predecessor_product) = S ((S (ff_i_one_predecessor_product)) * ff_c_one_predecessor)) /\ exists ff_q_one_predecessor_product_factor. ff_b_one_predecessor = ff_q_one_predecessor_product_factor * S ((S (ff_i_one_predecessor_product)) * ff_c_one_predecessor) + (ff_p_one_predecessor_product))) /\ ((((exists ff_h_one_predecessor_product_partial. ff_h_one_predecessor_product_partial + S (ff_r_one_predecessor_product) = S ((S (ff_i_one_predecessor_product)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_partial. ff_u_one_predecessor_product = ff_q_one_predecessor_product_partial * S ((S (ff_i_one_predecessor_product)) * ff_v_one_predecessor_product) + (ff_r_one_predecessor_product))) /\ ((((exists ff_h_one_predecessor_product_successor. ff_h_one_predecessor_product_successor + S (ff_s_one_predecessor_product) = S ((S (S ff_i_one_predecessor_product)) * ff_v_one_predecessor_product)) /\ exists ff_q_one_predecessor_product_successor. ff_u_one_predecessor_product = ff_q_one_predecessor_product_successor * S ((S (S ff_i_one_predecessor_product)) * ff_v_one_predecessor_product) + (ff_s_one_predecessor_product))) /\ ff_s_one_predecessor_product = ff_r_one_predecessor_product * ff_p_one_predecessor_product)))))))) /\ n = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose z
specialize pow_successor_decompose e
specialize pow_successor_decompose n
apply pow_successor_decompose
exact he
exact hpow
cases hstep
cases hstep_witness
have hr : x = 1
specialize pow_zero a
specialize pow_zero z
specialize pow_zero x
apply pow_zero
exact hz
exact hstep_witness_left
trans x * a
exact hstep_witness_right
rewrite hr
specialize one_mul a
exact one_mul
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,827</dd></div>
        <div><dt>Distinct objects</dt><dd>1,043</dd></div>
        <div><dt>Reused references</dt><dd>47</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>107</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d709c0bb9f53c78a4819f904db0332005a2b37386460ef91f15173d46a194791">d709c0bb9f53…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_one_from_zero_successor">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_one_from_zero_successor</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_congruence_theorems.py#L71">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_one_from_zero_successor.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_one"
  data-name="pow_one" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_one_from_zero_successor"
  data-search="pow_one pow one the relational first power of a natural is the natural itself. forall a e n. e = 1 -&gt; (exists ff_b_one ff_c_one. ((forall ff_i_one_repeat. (exists ff_lt_one_repeat_bound. ff_lt_one_repeat_bound + s ff_i_one_repeat = e) -&gt; (((exists ff_h_one_repeat_decoded. ff_h_one_repeat_decoded + s (a) = s ((s (ff_i_one_repeat)) * ff_c_one)) /\ exists ff_q_one_repeat_decoded. ff_b_one = ff_q_one_repeat_decoded * s ((s (ff_i_one_repeat)) * ff_c_one) + (a)))) /\ (exists ff_u_one_product ff_v_one_product. ((((exists ff_h_one_product_start. ff_h_one_product_start + s (1) = s ((s (0)) * ff_v_one_product)) /\ exists ff_q_one_product_start. ff_u_one_product = ff_q_one_product_start * s ((s (0)) * ff_v_one_product) + (1))) /\ ((((exists ff_h_one_product_terminal. ff_h_one_product_terminal + s (n) = s ((s (e)) * ff_v_one_product)) /\ exists ff_q_one_product_terminal. ff_u_one_product = ff_q_one_product_terminal * s ((s (e)) * ff_v_one_product) + (n))) /\ forall ff_i_one_product. (exists ff_lt_one_product_bound. ff_lt_one_product_bound + s ff_i_one_product = e) -&gt; exists ff_p_one_product ff_r_one_product ff_s_one_product. ((((exists ff_h_one_product_factor. ff_h_one_product_factor + s (ff_p_one_product) = s ((s (ff_i_one_product)) * ff_c_one)) /\ exists ff_q_one_product_factor. ff_b_one = ff_q_one_product_factor * s ((s (ff_i_one_product)) * ff_c_one) + (ff_p_one_product))) /\ ((((exists ff_h_one_product_partial. ff_h_one_product_partial + s (ff_r_one_product) = s ((s (ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_partial. ff_u_one_product = ff_q_one_product_partial * s ((s (ff_i_one_product)) * ff_v_one_product) + (ff_r_one_product))) /\ ((((exists ff_h_one_product_successor. ff_h_one_product_successor + s (ff_s_one_product) = s ((s (s ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_successor. ff_u_one_product = ff_q_one_product_successor * s ((s (s ff_i_one_product)) * ff_v_one_product) + (ff_s_one_product))) /\ ff_s_one_product = ff_r_one_product * ff_p_one_product)))))))) -&gt; n = a quadratic_residues pow_one_from_zero_successor">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_one</code><span>Pow one</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The relational first power of a natural is the natural itself.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_one_from_zero_successor" href="#theorem-pow_one_from_zero_successor"><code>pow_one_from_zero_successor</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_two_from_one_successor" href="#theorem-pow_two_from_one_successor"><code>pow_two_from_one_successor</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_one">Copy statement</button>
        <pre id="statement-pow_one"><code>forall a e n. e = 1 -&gt; (exists ff_b_one ff_c_one. ((forall ff_i_one_repeat. (exists ff_lt_one_repeat_bound. ff_lt_one_repeat_bound + S ff_i_one_repeat = e) -&gt; (((exists ff_h_one_repeat_decoded. ff_h_one_repeat_decoded + S (a) = S ((S (ff_i_one_repeat)) * ff_c_one)) /\ exists ff_q_one_repeat_decoded. ff_b_one = ff_q_one_repeat_decoded * S ((S (ff_i_one_repeat)) * ff_c_one) + (a)))) /\ (exists ff_u_one_product ff_v_one_product. ((((exists ff_h_one_product_start. ff_h_one_product_start + S (1) = S ((S (0)) * ff_v_one_product)) /\ exists ff_q_one_product_start. ff_u_one_product = ff_q_one_product_start * S ((S (0)) * ff_v_one_product) + (1))) /\ ((((exists ff_h_one_product_terminal. ff_h_one_product_terminal + S (n) = S ((S (e)) * ff_v_one_product)) /\ exists ff_q_one_product_terminal. ff_u_one_product = ff_q_one_product_terminal * S ((S (e)) * ff_v_one_product) + (n))) /\ forall ff_i_one_product. (exists ff_lt_one_product_bound. ff_lt_one_product_bound + S ff_i_one_product = e) -&gt; exists ff_p_one_product ff_r_one_product ff_s_one_product. ((((exists ff_h_one_product_factor. ff_h_one_product_factor + S (ff_p_one_product) = S ((S (ff_i_one_product)) * ff_c_one)) /\ exists ff_q_one_product_factor. ff_b_one = ff_q_one_product_factor * S ((S (ff_i_one_product)) * ff_c_one) + (ff_p_one_product))) /\ ((((exists ff_h_one_product_partial. ff_h_one_product_partial + S (ff_r_one_product) = S ((S (ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_partial. ff_u_one_product = ff_q_one_product_partial * S ((S (ff_i_one_product)) * ff_v_one_product) + (ff_r_one_product))) /\ ((((exists ff_h_one_product_successor. ff_h_one_product_successor + S (ff_s_one_product) = S ((S (S ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_successor. ff_u_one_product = ff_q_one_product_successor * S ((S (S ff_i_one_product)) * ff_v_one_product) + (ff_s_one_product))) /\ ff_s_one_product = ff_r_one_product * ff_p_one_product)))))))) -&gt; n = a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_one">Copy proof</button>
        <pre id="proof-pow_one"><code>pa prove forall a e n. e = 1 -&gt; (exists ff_b_one ff_c_one. ((forall ff_i_one_repeat. (exists ff_lt_one_repeat_bound. ff_lt_one_repeat_bound + S ff_i_one_repeat = e) -&gt; (((exists ff_h_one_repeat_decoded. ff_h_one_repeat_decoded + S (a) = S ((S (ff_i_one_repeat)) * ff_c_one)) /\ exists ff_q_one_repeat_decoded. ff_b_one = ff_q_one_repeat_decoded * S ((S (ff_i_one_repeat)) * ff_c_one) + (a)))) /\ (exists ff_u_one_product ff_v_one_product. ((((exists ff_h_one_product_start. ff_h_one_product_start + S (1) = S ((S (0)) * ff_v_one_product)) /\ exists ff_q_one_product_start. ff_u_one_product = ff_q_one_product_start * S ((S (0)) * ff_v_one_product) + (1))) /\ ((((exists ff_h_one_product_terminal. ff_h_one_product_terminal + S (n) = S ((S (e)) * ff_v_one_product)) /\ exists ff_q_one_product_terminal. ff_u_one_product = ff_q_one_product_terminal * S ((S (e)) * ff_v_one_product) + (n))) /\ forall ff_i_one_product. (exists ff_lt_one_product_bound. ff_lt_one_product_bound + S ff_i_one_product = e) -&gt; exists ff_p_one_product ff_r_one_product ff_s_one_product. ((((exists ff_h_one_product_factor. ff_h_one_product_factor + S (ff_p_one_product) = S ((S (ff_i_one_product)) * ff_c_one)) /\ exists ff_q_one_product_factor. ff_b_one = ff_q_one_product_factor * S ((S (ff_i_one_product)) * ff_c_one) + (ff_p_one_product))) /\ ((((exists ff_h_one_product_partial. ff_h_one_product_partial + S (ff_r_one_product) = S ((S (ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_partial. ff_u_one_product = ff_q_one_product_partial * S ((S (ff_i_one_product)) * ff_v_one_product) + (ff_r_one_product))) /\ ((((exists ff_h_one_product_successor. ff_h_one_product_successor + S (ff_s_one_product) = S ((S (S ff_i_one_product)) * ff_v_one_product)) /\ exists ff_q_one_product_successor. ff_u_one_product = ff_q_one_product_successor * S ((S (S ff_i_one_product)) * ff_v_one_product) + (ff_s_one_product))) /\ ff_s_one_product = ff_r_one_product * ff_p_one_product)))))))) -&gt; n = a
use pow_one_from_zero_successor
intro a
intro e
intro n
intro he
intro hpow
specialize pow_one_from_zero_successor a
specialize pow_one_from_zero_successor 0
specialize pow_one_from_zero_successor e
specialize pow_one_from_zero_successor n
apply pow_one_from_zero_successor
refl
exact he
exact hpow
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,856</dd></div>
        <div><dt>Distinct objects</dt><dd>1,072</dd></div>
        <div><dt>Reused references</dt><dd>47</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>108</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="16491d90b740143f121ec9fdfbf6c2adcc1d150f55bbb0735877ace24a9d913a">16491d90b740…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_congruence_theorems.py#L109">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_successor_pair_mul"
  data-name="pow_successor_pair_mul" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_successor_decompose,pow_functional"
  data-search="pow_successor_pair_mul pow successor pair mul a successor power paired with its predecessor equals predecessor times base. forall a e se r n. se = s e -&gt; (exists ff_b_pair_predecessor ff_c_pair_predecessor. ((forall ff_i_pair_predecessor_repeat. (exists ff_lt_pair_predecessor_repeat_bound. ff_lt_pair_predecessor_repeat_bound + s ff_i_pair_predecessor_repeat = e) -&gt; (((exists ff_h_pair_predecessor_repeat_decoded. ff_h_pair_predecessor_repeat_decoded + s (a) = s ((s (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_repeat_decoded. ff_b_pair_predecessor = ff_q_pair_predecessor_repeat_decoded * s ((s (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor) + (a)))) /\ (exists ff_u_pair_predecessor_product ff_v_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_start. ff_h_pair_predecessor_product_start + s (1) = s ((s (0)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_start. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_start * s ((s (0)) * ff_v_pair_predecessor_product) + (1))) /\ ((((exists ff_h_pair_predecessor_product_terminal. ff_h_pair_predecessor_product_terminal + s (r) = s ((s (e)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_terminal. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_terminal * s ((s (e)) * ff_v_pair_predecessor_product) + (r))) /\ forall ff_i_pair_predecessor_product. (exists ff_lt_pair_predecessor_product_bound. ff_lt_pair_predecessor_product_bound + s ff_i_pair_predecessor_product = e) -&gt; exists ff_p_pair_predecessor_product ff_r_pair_predecessor_product ff_s_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_factor. ff_h_pair_predecessor_product_factor + s (ff_p_pair_predecessor_product) = s ((s (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_product_factor. ff_b_pair_predecessor = ff_q_pair_predecessor_product_factor * s ((s (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor) + (ff_p_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_partial. ff_h_pair_predecessor_product_partial + s (ff_r_pair_predecessor_product) = s ((s (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_partial. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_partial * s ((s (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_r_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_successor. ff_h_pair_predecessor_product_successor + s (ff_s_pair_predecessor_product) = s ((s (s ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_successor. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_successor * s ((s (s ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_s_pair_predecessor_product))) /\ ff_s_pair_predecessor_product = ff_r_pair_predecessor_product * ff_p_pair_predecessor_product)))))))) -&gt; (exists ff_b_pair_successor ff_c_pair_successor. ((forall ff_i_pair_successor_repeat. (exists ff_lt_pair_successor_repeat_bound. ff_lt_pair_successor_repeat_bound + s ff_i_pair_successor_repeat = se) -&gt; (((exists ff_h_pair_successor_repeat_decoded. ff_h_pair_successor_repeat_decoded + s (a) = s ((s (ff_i_pair_successor_repeat)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_repeat_decoded. ff_b_pair_successor = ff_q_pair_successor_repeat_decoded * s ((s (ff_i_pair_successor_repeat)) * ff_c_pair_successor) + (a)))) /\ (exists ff_u_pair_successor_product ff_v_pair_successor_product. ((((exists ff_h_pair_successor_product_start. ff_h_pair_successor_product_start + s (1) = s ((s (0)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_start. ff_u_pair_successor_product = ff_q_pair_successor_product_start * s ((s (0)) * ff_v_pair_successor_product) + (1))) /\ ((((exists ff_h_pair_successor_product_terminal. ff_h_pair_successor_product_terminal + s (n) = s ((s (se)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_terminal. ff_u_pair_successor_product = ff_q_pair_successor_product_terminal * s ((s (se)) * ff_v_pair_successor_product) + (n))) /\ forall ff_i_pair_successor_product. (exists ff_lt_pair_successor_product_bound. ff_lt_pair_successor_product_bound + s ff_i_pair_successor_product = se) -&gt; exists ff_p_pair_successor_product ff_r_pair_successor_product ff_s_pair_successor_product. ((((exists ff_h_pair_successor_product_factor. ff_h_pair_successor_product_factor + s (ff_p_pair_successor_product) = s ((s (ff_i_pair_successor_product)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_product_factor. ff_b_pair_successor = ff_q_pair_successor_product_factor * s ((s (ff_i_pair_successor_product)) * ff_c_pair_successor) + (ff_p_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_partial. ff_h_pair_successor_product_partial + s (ff_r_pair_successor_product) = s ((s (ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_partial. ff_u_pair_successor_product = ff_q_pair_successor_product_partial * s ((s (ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_r_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_successor. ff_h_pair_successor_product_successor + s (ff_s_pair_successor_product) = s ((s (s ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_successor. ff_u_pair_successor_product = ff_q_pair_successor_product_successor * s ((s (s ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_s_pair_successor_product))) /\ ff_s_pair_successor_product = ff_r_pair_successor_product * ff_p_pair_successor_product)))))))) -&gt; n = r * a quadratic_residues pow_successor_decompose pow_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_successor_pair_mul</code><span>Pow successor pair mul</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor power paired with its predecessor equals predecessor times base.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_functional" href="#theorem-pow_functional"><code>pow_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_mod_congruent" href="#theorem-pow_mod_congruent"><code>pow_mod_congruent</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_successor_pair_mul">Copy statement</button>
        <pre id="statement-pow_successor_pair_mul"><code>forall a e se r n. se = S e -&gt; (exists ff_b_pair_predecessor ff_c_pair_predecessor. ((forall ff_i_pair_predecessor_repeat. (exists ff_lt_pair_predecessor_repeat_bound. ff_lt_pair_predecessor_repeat_bound + S ff_i_pair_predecessor_repeat = e) -&gt; (((exists ff_h_pair_predecessor_repeat_decoded. ff_h_pair_predecessor_repeat_decoded + S (a) = S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_repeat_decoded. ff_b_pair_predecessor = ff_q_pair_predecessor_repeat_decoded * S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor) + (a)))) /\ (exists ff_u_pair_predecessor_product ff_v_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_start. ff_h_pair_predecessor_product_start + S (1) = S ((S (0)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_start. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_start * S ((S (0)) * ff_v_pair_predecessor_product) + (1))) /\ ((((exists ff_h_pair_predecessor_product_terminal. ff_h_pair_predecessor_product_terminal + S (r) = S ((S (e)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_terminal. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_terminal * S ((S (e)) * ff_v_pair_predecessor_product) + (r))) /\ forall ff_i_pair_predecessor_product. (exists ff_lt_pair_predecessor_product_bound. ff_lt_pair_predecessor_product_bound + S ff_i_pair_predecessor_product = e) -&gt; exists ff_p_pair_predecessor_product ff_r_pair_predecessor_product ff_s_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_factor. ff_h_pair_predecessor_product_factor + S (ff_p_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_product_factor. ff_b_pair_predecessor = ff_q_pair_predecessor_product_factor * S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor) + (ff_p_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_partial. ff_h_pair_predecessor_product_partial + S (ff_r_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_partial. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_partial * S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_r_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_successor. ff_h_pair_predecessor_product_successor + S (ff_s_pair_predecessor_product) = S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_successor. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_successor * S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_s_pair_predecessor_product))) /\ ff_s_pair_predecessor_product = ff_r_pair_predecessor_product * ff_p_pair_predecessor_product)))))))) -&gt; (exists ff_b_pair_successor ff_c_pair_successor. ((forall ff_i_pair_successor_repeat. (exists ff_lt_pair_successor_repeat_bound. ff_lt_pair_successor_repeat_bound + S ff_i_pair_successor_repeat = se) -&gt; (((exists ff_h_pair_successor_repeat_decoded. ff_h_pair_successor_repeat_decoded + S (a) = S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_repeat_decoded. ff_b_pair_successor = ff_q_pair_successor_repeat_decoded * S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor) + (a)))) /\ (exists ff_u_pair_successor_product ff_v_pair_successor_product. ((((exists ff_h_pair_successor_product_start. ff_h_pair_successor_product_start + S (1) = S ((S (0)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_start. ff_u_pair_successor_product = ff_q_pair_successor_product_start * S ((S (0)) * ff_v_pair_successor_product) + (1))) /\ ((((exists ff_h_pair_successor_product_terminal. ff_h_pair_successor_product_terminal + S (n) = S ((S (se)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_terminal. ff_u_pair_successor_product = ff_q_pair_successor_product_terminal * S ((S (se)) * ff_v_pair_successor_product) + (n))) /\ forall ff_i_pair_successor_product. (exists ff_lt_pair_successor_product_bound. ff_lt_pair_successor_product_bound + S ff_i_pair_successor_product = se) -&gt; exists ff_p_pair_successor_product ff_r_pair_successor_product ff_s_pair_successor_product. ((((exists ff_h_pair_successor_product_factor. ff_h_pair_successor_product_factor + S (ff_p_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_product_factor. ff_b_pair_successor = ff_q_pair_successor_product_factor * S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor) + (ff_p_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_partial. ff_h_pair_successor_product_partial + S (ff_r_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_partial. ff_u_pair_successor_product = ff_q_pair_successor_product_partial * S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_r_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_successor. ff_h_pair_successor_product_successor + S (ff_s_pair_successor_product) = S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_successor. ff_u_pair_successor_product = ff_q_pair_successor_product_successor * S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_s_pair_successor_product))) /\ ff_s_pair_successor_product = ff_r_pair_successor_product * ff_p_pair_successor_product)))))))) -&gt; n = r * a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_successor_pair_mul">Copy proof</button>
        <pre id="proof-pow_successor_pair_mul"><code>pa prove forall a e se r n. se = S e -&gt; (exists ff_b_pair_predecessor ff_c_pair_predecessor. ((forall ff_i_pair_predecessor_repeat. (exists ff_lt_pair_predecessor_repeat_bound. ff_lt_pair_predecessor_repeat_bound + S ff_i_pair_predecessor_repeat = e) -&gt; (((exists ff_h_pair_predecessor_repeat_decoded. ff_h_pair_predecessor_repeat_decoded + S (a) = S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_repeat_decoded. ff_b_pair_predecessor = ff_q_pair_predecessor_repeat_decoded * S ((S (ff_i_pair_predecessor_repeat)) * ff_c_pair_predecessor) + (a)))) /\ (exists ff_u_pair_predecessor_product ff_v_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_start. ff_h_pair_predecessor_product_start + S (1) = S ((S (0)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_start. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_start * S ((S (0)) * ff_v_pair_predecessor_product) + (1))) /\ ((((exists ff_h_pair_predecessor_product_terminal. ff_h_pair_predecessor_product_terminal + S (r) = S ((S (e)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_terminal. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_terminal * S ((S (e)) * ff_v_pair_predecessor_product) + (r))) /\ forall ff_i_pair_predecessor_product. (exists ff_lt_pair_predecessor_product_bound. ff_lt_pair_predecessor_product_bound + S ff_i_pair_predecessor_product = e) -&gt; exists ff_p_pair_predecessor_product ff_r_pair_predecessor_product ff_s_pair_predecessor_product. ((((exists ff_h_pair_predecessor_product_factor. ff_h_pair_predecessor_product_factor + S (ff_p_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor)) /\ exists ff_q_pair_predecessor_product_factor. ff_b_pair_predecessor = ff_q_pair_predecessor_product_factor * S ((S (ff_i_pair_predecessor_product)) * ff_c_pair_predecessor) + (ff_p_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_partial. ff_h_pair_predecessor_product_partial + S (ff_r_pair_predecessor_product) = S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_partial. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_partial * S ((S (ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_r_pair_predecessor_product))) /\ ((((exists ff_h_pair_predecessor_product_successor. ff_h_pair_predecessor_product_successor + S (ff_s_pair_predecessor_product) = S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product)) /\ exists ff_q_pair_predecessor_product_successor. ff_u_pair_predecessor_product = ff_q_pair_predecessor_product_successor * S ((S (S ff_i_pair_predecessor_product)) * ff_v_pair_predecessor_product) + (ff_s_pair_predecessor_product))) /\ ff_s_pair_predecessor_product = ff_r_pair_predecessor_product * ff_p_pair_predecessor_product)))))))) -&gt; (exists ff_b_pair_successor ff_c_pair_successor. ((forall ff_i_pair_successor_repeat. (exists ff_lt_pair_successor_repeat_bound. ff_lt_pair_successor_repeat_bound + S ff_i_pair_successor_repeat = se) -&gt; (((exists ff_h_pair_successor_repeat_decoded. ff_h_pair_successor_repeat_decoded + S (a) = S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_repeat_decoded. ff_b_pair_successor = ff_q_pair_successor_repeat_decoded * S ((S (ff_i_pair_successor_repeat)) * ff_c_pair_successor) + (a)))) /\ (exists ff_u_pair_successor_product ff_v_pair_successor_product. ((((exists ff_h_pair_successor_product_start. ff_h_pair_successor_product_start + S (1) = S ((S (0)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_start. ff_u_pair_successor_product = ff_q_pair_successor_product_start * S ((S (0)) * ff_v_pair_successor_product) + (1))) /\ ((((exists ff_h_pair_successor_product_terminal. ff_h_pair_successor_product_terminal + S (n) = S ((S (se)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_terminal. ff_u_pair_successor_product = ff_q_pair_successor_product_terminal * S ((S (se)) * ff_v_pair_successor_product) + (n))) /\ forall ff_i_pair_successor_product. (exists ff_lt_pair_successor_product_bound. ff_lt_pair_successor_product_bound + S ff_i_pair_successor_product = se) -&gt; exists ff_p_pair_successor_product ff_r_pair_successor_product ff_s_pair_successor_product. ((((exists ff_h_pair_successor_product_factor. ff_h_pair_successor_product_factor + S (ff_p_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor)) /\ exists ff_q_pair_successor_product_factor. ff_b_pair_successor = ff_q_pair_successor_product_factor * S ((S (ff_i_pair_successor_product)) * ff_c_pair_successor) + (ff_p_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_partial. ff_h_pair_successor_product_partial + S (ff_r_pair_successor_product) = S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_partial. ff_u_pair_successor_product = ff_q_pair_successor_product_partial * S ((S (ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_r_pair_successor_product))) /\ ((((exists ff_h_pair_successor_product_successor. ff_h_pair_successor_product_successor + S (ff_s_pair_successor_product) = S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product)) /\ exists ff_q_pair_successor_product_successor. ff_u_pair_successor_product = ff_q_pair_successor_product_successor * S ((S (S ff_i_pair_successor_product)) * ff_v_pair_successor_product) + (ff_s_pair_successor_product))) /\ ff_s_pair_successor_product = ff_r_pair_successor_product * ff_p_pair_successor_product)))))))) -&gt; n = r * a
use pow_successor_decompose
use pow_functional
intro a
intro e
intro se
intro r
intro n
intro hse
intro hprevious
intro hsuccessor
have hstep : exists z. (exists ff_b_pair_decomposed ff_c_pair_decomposed. ((forall ff_i_pair_decomposed_repeat. (exists ff_lt_pair_decomposed_repeat_bound. ff_lt_pair_decomposed_repeat_bound + S ff_i_pair_decomposed_repeat = e) -&gt; (((exists ff_h_pair_decomposed_repeat_decoded. ff_h_pair_decomposed_repeat_decoded + S (a) = S ((S (ff_i_pair_decomposed_repeat)) * ff_c_pair_decomposed)) /\ exists ff_q_pair_decomposed_repeat_decoded. ff_b_pair_decomposed = ff_q_pair_decomposed_repeat_decoded * S ((S (ff_i_pair_decomposed_repeat)) * ff_c_pair_decomposed) + (a)))) /\ (exists ff_u_pair_decomposed_product ff_v_pair_decomposed_product. ((((exists ff_h_pair_decomposed_product_start. ff_h_pair_decomposed_product_start + S (1) = S ((S (0)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_start. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_start * S ((S (0)) * ff_v_pair_decomposed_product) + (1))) /\ ((((exists ff_h_pair_decomposed_product_terminal. ff_h_pair_decomposed_product_terminal + S (z) = S ((S (e)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_terminal. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_terminal * S ((S (e)) * ff_v_pair_decomposed_product) + (z))) /\ forall ff_i_pair_decomposed_product. (exists ff_lt_pair_decomposed_product_bound. ff_lt_pair_decomposed_product_bound + S ff_i_pair_decomposed_product = e) -&gt; exists ff_p_pair_decomposed_product ff_r_pair_decomposed_product ff_s_pair_decomposed_product. ((((exists ff_h_pair_decomposed_product_factor. ff_h_pair_decomposed_product_factor + S (ff_p_pair_decomposed_product) = S ((S (ff_i_pair_decomposed_product)) * ff_c_pair_decomposed)) /\ exists ff_q_pair_decomposed_product_factor. ff_b_pair_decomposed = ff_q_pair_decomposed_product_factor * S ((S (ff_i_pair_decomposed_product)) * ff_c_pair_decomposed) + (ff_p_pair_decomposed_product))) /\ ((((exists ff_h_pair_decomposed_product_partial. ff_h_pair_decomposed_product_partial + S (ff_r_pair_decomposed_product) = S ((S (ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_partial. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_partial * S ((S (ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product) + (ff_r_pair_decomposed_product))) /\ ((((exists ff_h_pair_decomposed_product_successor. ff_h_pair_decomposed_product_successor + S (ff_s_pair_decomposed_product) = S ((S (S ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product)) /\ exists ff_q_pair_decomposed_product_successor. ff_u_pair_decomposed_product = ff_q_pair_decomposed_product_successor * S ((S (S ff_i_pair_decomposed_product)) * ff_v_pair_decomposed_product) + (ff_s_pair_decomposed_product))) /\ ff_s_pair_decomposed_product = ff_r_pair_decomposed_product * ff_p_pair_decomposed_product)))))))) /\ n = z * a
specialize pow_successor_decompose a
specialize pow_successor_decompose e
specialize pow_successor_decompose se
specialize pow_successor_decompose n
apply pow_successor_decompose
exact hse
exact hsuccessor
cases hstep
cases hstep_witness
have hz : x = r
specialize pow_functional a
specialize pow_functional e
specialize pow_functional x
specialize pow_functional r
apply pow_functional
exact hstep_witness_left
exact hprevious
trans x * a
exact hstep_witness_right
rewrite hz
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,282</dd></div>
        <div><dt>Distinct objects</dt><dd>1,293</dd></div>
        <div><dt>Reused references</dt><dd>46</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>145</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="be60a3277b36945d017a52111763bbff87e995c0efa27254d7a006126fd7515d">be60a3277b36…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_successor_pair_mul">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_successor_pair_mul</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_congruence_theorems.py#L130">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_successor_pair_mul.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_mod_congruent"
  data-name="pow_mod_congruent" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_zero,pow_successor_decompose,pow_successor_pair_mul,mod_eq_refl,mod_eq_mul"
  data-search="pow_mod_congruent pow mod congruent balanced-congruent bases have congruent relational powers at every exponent. forall m a b e x y. (exists qr_u_base qr_v_base. a + m * qr_u_base = b + m * qr_v_base) -&gt; (exists ff_b_left ff_c_left. ((forall ff_i_left_repeat. (exists ff_lt_left_repeat_bound. ff_lt_left_repeat_bound + s ff_i_left_repeat = e) -&gt; (((exists ff_h_left_repeat_decoded. ff_h_left_repeat_decoded + s (a) = s ((s (ff_i_left_repeat)) * ff_c_left)) /\ exists ff_q_left_repeat_decoded. ff_b_left = ff_q_left_repeat_decoded * s ((s (ff_i_left_repeat)) * ff_c_left) + (a)))) /\ (exists ff_u_left_product ff_v_left_product. ((((exists ff_h_left_product_start. ff_h_left_product_start + s (1) = s ((s (0)) * ff_v_left_product)) /\ exists ff_q_left_product_start. ff_u_left_product = ff_q_left_product_start * s ((s (0)) * ff_v_left_product) + (1))) /\ ((((exists ff_h_left_product_terminal. ff_h_left_product_terminal + s (x) = s ((s (e)) * ff_v_left_product)) /\ exists ff_q_left_product_terminal. ff_u_left_product = ff_q_left_product_terminal * s ((s (e)) * ff_v_left_product) + (x))) /\ forall ff_i_left_product. (exists ff_lt_left_product_bound. ff_lt_left_product_bound + s ff_i_left_product = e) -&gt; exists ff_p_left_product ff_r_left_product ff_s_left_product. ((((exists ff_h_left_product_factor. ff_h_left_product_factor + s (ff_p_left_product) = s ((s (ff_i_left_product)) * ff_c_left)) /\ exists ff_q_left_product_factor. ff_b_left = ff_q_left_product_factor * s ((s (ff_i_left_product)) * ff_c_left) + (ff_p_left_product))) /\ ((((exists ff_h_left_product_partial. ff_h_left_product_partial + s (ff_r_left_product) = s ((s (ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_partial. ff_u_left_product = ff_q_left_product_partial * s ((s (ff_i_left_product)) * ff_v_left_product) + (ff_r_left_product))) /\ ((((exists ff_h_left_product_successor. ff_h_left_product_successor + s (ff_s_left_product) = s ((s (s ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_successor. ff_u_left_product = ff_q_left_product_successor * s ((s (s ff_i_left_product)) * ff_v_left_product) + (ff_s_left_product))) /\ ff_s_left_product = ff_r_left_product * ff_p_left_product)))))))) -&gt; (exists ff_b_right ff_c_right. ((forall ff_i_right_repeat. (exists ff_lt_right_repeat_bound. ff_lt_right_repeat_bound + s ff_i_right_repeat = e) -&gt; (((exists ff_h_right_repeat_decoded. ff_h_right_repeat_decoded + s (b) = s ((s (ff_i_right_repeat)) * ff_c_right)) /\ exists ff_q_right_repeat_decoded. ff_b_right = ff_q_right_repeat_decoded * s ((s (ff_i_right_repeat)) * ff_c_right) + (b)))) /\ (exists ff_u_right_product ff_v_right_product. ((((exists ff_h_right_product_start. ff_h_right_product_start + s (1) = s ((s (0)) * ff_v_right_product)) /\ exists ff_q_right_product_start. ff_u_right_product = ff_q_right_product_start * s ((s (0)) * ff_v_right_product) + (1))) /\ ((((exists ff_h_right_product_terminal. ff_h_right_product_terminal + s (y) = s ((s (e)) * ff_v_right_product)) /\ exists ff_q_right_product_terminal. ff_u_right_product = ff_q_right_product_terminal * s ((s (e)) * ff_v_right_product) + (y))) /\ forall ff_i_right_product. (exists ff_lt_right_product_bound. ff_lt_right_product_bound + s ff_i_right_product = e) -&gt; exists ff_p_right_product ff_r_right_product ff_s_right_product. ((((exists ff_h_right_product_factor. ff_h_right_product_factor + s (ff_p_right_product) = s ((s (ff_i_right_product)) * ff_c_right)) /\ exists ff_q_right_product_factor. ff_b_right = ff_q_right_product_factor * s ((s (ff_i_right_product)) * ff_c_right) + (ff_p_right_product))) /\ ((((exists ff_h_right_product_partial. ff_h_right_product_partial + s (ff_r_right_product) = s ((s (ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_partial. ff_u_right_product = ff_q_right_product_partial * s ((s (ff_i_right_product)) * ff_v_right_product) + (ff_r_right_product))) /\ ((((exists ff_h_right_product_successor. ff_h_right_product_successor + s (ff_s_right_product) = s ((s (s ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_successor. ff_u_right_product = ff_q_right_product_successor * s ((s (s ff_i_right_product)) * ff_v_right_product) + (ff_s_right_product))) /\ ff_s_right_product = ff_r_right_product * ff_p_right_product)))))))) -&gt; (exists qr_u_result qr_v_result. x + m * qr_u_result = y + m * qr_v_result) quadratic_residues pow_zero pow_successor_decompose pow_successor_pair_mul mod_eq_refl mod_eq_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_mod_congruent</code><span>Pow mod congruent</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced-congruent bases have congruent relational powers at every exponent.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_zero" href="#theorem-pow_zero"><code>pow_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_pair_mul" href="#theorem-pow_successor_pair_mul"><code>pow_successor_pair_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul" href="#theorem-mod_eq_mul"><code>mod_eq_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_mod_congruent">Copy statement</button>
        <pre id="statement-pow_mod_congruent"><code>forall m a b e x y. (exists qr_u_base qr_v_base. a + m * qr_u_base = b + m * qr_v_base) -&gt; (exists ff_b_left ff_c_left. ((forall ff_i_left_repeat. (exists ff_lt_left_repeat_bound. ff_lt_left_repeat_bound + S ff_i_left_repeat = e) -&gt; (((exists ff_h_left_repeat_decoded. ff_h_left_repeat_decoded + S (a) = S ((S (ff_i_left_repeat)) * ff_c_left)) /\ exists ff_q_left_repeat_decoded. ff_b_left = ff_q_left_repeat_decoded * S ((S (ff_i_left_repeat)) * ff_c_left) + (a)))) /\ (exists ff_u_left_product ff_v_left_product. ((((exists ff_h_left_product_start. ff_h_left_product_start + S (1) = S ((S (0)) * ff_v_left_product)) /\ exists ff_q_left_product_start. ff_u_left_product = ff_q_left_product_start * S ((S (0)) * ff_v_left_product) + (1))) /\ ((((exists ff_h_left_product_terminal. ff_h_left_product_terminal + S (x) = S ((S (e)) * ff_v_left_product)) /\ exists ff_q_left_product_terminal. ff_u_left_product = ff_q_left_product_terminal * S ((S (e)) * ff_v_left_product) + (x))) /\ forall ff_i_left_product. (exists ff_lt_left_product_bound. ff_lt_left_product_bound + S ff_i_left_product = e) -&gt; exists ff_p_left_product ff_r_left_product ff_s_left_product. ((((exists ff_h_left_product_factor. ff_h_left_product_factor + S (ff_p_left_product) = S ((S (ff_i_left_product)) * ff_c_left)) /\ exists ff_q_left_product_factor. ff_b_left = ff_q_left_product_factor * S ((S (ff_i_left_product)) * ff_c_left) + (ff_p_left_product))) /\ ((((exists ff_h_left_product_partial. ff_h_left_product_partial + S (ff_r_left_product) = S ((S (ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_partial. ff_u_left_product = ff_q_left_product_partial * S ((S (ff_i_left_product)) * ff_v_left_product) + (ff_r_left_product))) /\ ((((exists ff_h_left_product_successor. ff_h_left_product_successor + S (ff_s_left_product) = S ((S (S ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_successor. ff_u_left_product = ff_q_left_product_successor * S ((S (S ff_i_left_product)) * ff_v_left_product) + (ff_s_left_product))) /\ ff_s_left_product = ff_r_left_product * ff_p_left_product)))))))) -&gt; (exists ff_b_right ff_c_right. ((forall ff_i_right_repeat. (exists ff_lt_right_repeat_bound. ff_lt_right_repeat_bound + S ff_i_right_repeat = e) -&gt; (((exists ff_h_right_repeat_decoded. ff_h_right_repeat_decoded + S (b) = S ((S (ff_i_right_repeat)) * ff_c_right)) /\ exists ff_q_right_repeat_decoded. ff_b_right = ff_q_right_repeat_decoded * S ((S (ff_i_right_repeat)) * ff_c_right) + (b)))) /\ (exists ff_u_right_product ff_v_right_product. ((((exists ff_h_right_product_start. ff_h_right_product_start + S (1) = S ((S (0)) * ff_v_right_product)) /\ exists ff_q_right_product_start. ff_u_right_product = ff_q_right_product_start * S ((S (0)) * ff_v_right_product) + (1))) /\ ((((exists ff_h_right_product_terminal. ff_h_right_product_terminal + S (y) = S ((S (e)) * ff_v_right_product)) /\ exists ff_q_right_product_terminal. ff_u_right_product = ff_q_right_product_terminal * S ((S (e)) * ff_v_right_product) + (y))) /\ forall ff_i_right_product. (exists ff_lt_right_product_bound. ff_lt_right_product_bound + S ff_i_right_product = e) -&gt; exists ff_p_right_product ff_r_right_product ff_s_right_product. ((((exists ff_h_right_product_factor. ff_h_right_product_factor + S (ff_p_right_product) = S ((S (ff_i_right_product)) * ff_c_right)) /\ exists ff_q_right_product_factor. ff_b_right = ff_q_right_product_factor * S ((S (ff_i_right_product)) * ff_c_right) + (ff_p_right_product))) /\ ((((exists ff_h_right_product_partial. ff_h_right_product_partial + S (ff_r_right_product) = S ((S (ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_partial. ff_u_right_product = ff_q_right_product_partial * S ((S (ff_i_right_product)) * ff_v_right_product) + (ff_r_right_product))) /\ ((((exists ff_h_right_product_successor. ff_h_right_product_successor + S (ff_s_right_product) = S ((S (S ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_successor. ff_u_right_product = ff_q_right_product_successor * S ((S (S ff_i_right_product)) * ff_v_right_product) + (ff_s_right_product))) /\ ff_s_right_product = ff_r_right_product * ff_p_right_product)))))))) -&gt; (exists qr_u_result qr_v_result. x + m * qr_u_result = y + m * qr_v_result)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_mod_congruent">Copy proof</button>
        <pre id="proof-pow_mod_congruent"><code>pa prove forall m a b e x y. (exists qr_u_base qr_v_base. a + m * qr_u_base = b + m * qr_v_base) -&gt; (exists ff_b_left ff_c_left. ((forall ff_i_left_repeat. (exists ff_lt_left_repeat_bound. ff_lt_left_repeat_bound + S ff_i_left_repeat = e) -&gt; (((exists ff_h_left_repeat_decoded. ff_h_left_repeat_decoded + S (a) = S ((S (ff_i_left_repeat)) * ff_c_left)) /\ exists ff_q_left_repeat_decoded. ff_b_left = ff_q_left_repeat_decoded * S ((S (ff_i_left_repeat)) * ff_c_left) + (a)))) /\ (exists ff_u_left_product ff_v_left_product. ((((exists ff_h_left_product_start. ff_h_left_product_start + S (1) = S ((S (0)) * ff_v_left_product)) /\ exists ff_q_left_product_start. ff_u_left_product = ff_q_left_product_start * S ((S (0)) * ff_v_left_product) + (1))) /\ ((((exists ff_h_left_product_terminal. ff_h_left_product_terminal + S (x) = S ((S (e)) * ff_v_left_product)) /\ exists ff_q_left_product_terminal. ff_u_left_product = ff_q_left_product_terminal * S ((S (e)) * ff_v_left_product) + (x))) /\ forall ff_i_left_product. (exists ff_lt_left_product_bound. ff_lt_left_product_bound + S ff_i_left_product = e) -&gt; exists ff_p_left_product ff_r_left_product ff_s_left_product. ((((exists ff_h_left_product_factor. ff_h_left_product_factor + S (ff_p_left_product) = S ((S (ff_i_left_product)) * ff_c_left)) /\ exists ff_q_left_product_factor. ff_b_left = ff_q_left_product_factor * S ((S (ff_i_left_product)) * ff_c_left) + (ff_p_left_product))) /\ ((((exists ff_h_left_product_partial. ff_h_left_product_partial + S (ff_r_left_product) = S ((S (ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_partial. ff_u_left_product = ff_q_left_product_partial * S ((S (ff_i_left_product)) * ff_v_left_product) + (ff_r_left_product))) /\ ((((exists ff_h_left_product_successor. ff_h_left_product_successor + S (ff_s_left_product) = S ((S (S ff_i_left_product)) * ff_v_left_product)) /\ exists ff_q_left_product_successor. ff_u_left_product = ff_q_left_product_successor * S ((S (S ff_i_left_product)) * ff_v_left_product) + (ff_s_left_product))) /\ ff_s_left_product = ff_r_left_product * ff_p_left_product)))))))) -&gt; (exists ff_b_right ff_c_right. ((forall ff_i_right_repeat. (exists ff_lt_right_repeat_bound. ff_lt_right_repeat_bound + S ff_i_right_repeat = e) -&gt; (((exists ff_h_right_repeat_decoded. ff_h_right_repeat_decoded + S (b) = S ((S (ff_i_right_repeat)) * ff_c_right)) /\ exists ff_q_right_repeat_decoded. ff_b_right = ff_q_right_repeat_decoded * S ((S (ff_i_right_repeat)) * ff_c_right) + (b)))) /\ (exists ff_u_right_product ff_v_right_product. ((((exists ff_h_right_product_start. ff_h_right_product_start + S (1) = S ((S (0)) * ff_v_right_product)) /\ exists ff_q_right_product_start. ff_u_right_product = ff_q_right_product_start * S ((S (0)) * ff_v_right_product) + (1))) /\ ((((exists ff_h_right_product_terminal. ff_h_right_product_terminal + S (y) = S ((S (e)) * ff_v_right_product)) /\ exists ff_q_right_product_terminal. ff_u_right_product = ff_q_right_product_terminal * S ((S (e)) * ff_v_right_product) + (y))) /\ forall ff_i_right_product. (exists ff_lt_right_product_bound. ff_lt_right_product_bound + S ff_i_right_product = e) -&gt; exists ff_p_right_product ff_r_right_product ff_s_right_product. ((((exists ff_h_right_product_factor. ff_h_right_product_factor + S (ff_p_right_product) = S ((S (ff_i_right_product)) * ff_c_right)) /\ exists ff_q_right_product_factor. ff_b_right = ff_q_right_product_factor * S ((S (ff_i_right_product)) * ff_c_right) + (ff_p_right_product))) /\ ((((exists ff_h_right_product_partial. ff_h_right_product_partial + S (ff_r_right_product) = S ((S (ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_partial. ff_u_right_product = ff_q_right_product_partial * S ((S (ff_i_right_product)) * ff_v_right_product) + (ff_r_right_product))) /\ ((((exists ff_h_right_product_successor. ff_h_right_product_successor + S (ff_s_right_product) = S ((S (S ff_i_right_product)) * ff_v_right_product)) /\ exists ff_q_right_product_successor. ff_u_right_product = ff_q_right_product_successor * S ((S (S ff_i_right_product)) * ff_v_right_product) + (ff_s_right_product))) /\ ff_s_right_product = ff_r_right_product * ff_p_right_product)))))))) -&gt; (exists qr_u_result qr_v_result. x + m * qr_u_result = y + m * qr_v_result)
use pow_zero
use pow_successor_decompose
use pow_successor_pair_mul
use mod_eq_refl
use mod_eq_mul
intro m
intro a
intro b
induction e
intro x
intro y
intro hab
intro hx
intro hy
have hx1 : x = 1
specialize pow_zero a
specialize pow_zero 0
specialize pow_zero x
apply pow_zero
refl
exact hx
have hy1 : y = 1
specialize pow_zero b
specialize pow_zero 0
specialize pow_zero y
apply pow_zero
refl
exact hy
rewrite hx1
rewrite hy1
specialize mod_eq_refl m
specialize mod_eq_refl 1
exact mod_eq_refl
intro x
intro y
intro hab
intro hx
intro hy
have hleft : exists r. (exists ff_b_left_step ff_c_left_step. ((forall ff_i_left_step_repeat. (exists ff_lt_left_step_repeat_bound. ff_lt_left_step_repeat_bound + S ff_i_left_step_repeat = e) -&gt; (((exists ff_h_left_step_repeat_decoded. ff_h_left_step_repeat_decoded + S (a) = S ((S (ff_i_left_step_repeat)) * ff_c_left_step)) /\ exists ff_q_left_step_repeat_decoded. ff_b_left_step = ff_q_left_step_repeat_decoded * S ((S (ff_i_left_step_repeat)) * ff_c_left_step) + (a)))) /\ (exists ff_u_left_step_product ff_v_left_step_product. ((((exists ff_h_left_step_product_start. ff_h_left_step_product_start + S (1) = S ((S (0)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_start. ff_u_left_step_product = ff_q_left_step_product_start * S ((S (0)) * ff_v_left_step_product) + (1))) /\ ((((exists ff_h_left_step_product_terminal. ff_h_left_step_product_terminal + S (r) = S ((S (e)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_terminal. ff_u_left_step_product = ff_q_left_step_product_terminal * S ((S (e)) * ff_v_left_step_product) + (r))) /\ forall ff_i_left_step_product. (exists ff_lt_left_step_product_bound. ff_lt_left_step_product_bound + S ff_i_left_step_product = e) -&gt; exists ff_p_left_step_product ff_r_left_step_product ff_s_left_step_product. ((((exists ff_h_left_step_product_factor. ff_h_left_step_product_factor + S (ff_p_left_step_product) = S ((S (ff_i_left_step_product)) * ff_c_left_step)) /\ exists ff_q_left_step_product_factor. ff_b_left_step = ff_q_left_step_product_factor * S ((S (ff_i_left_step_product)) * ff_c_left_step) + (ff_p_left_step_product))) /\ ((((exists ff_h_left_step_product_partial. ff_h_left_step_product_partial + S (ff_r_left_step_product) = S ((S (ff_i_left_step_product)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_partial. ff_u_left_step_product = ff_q_left_step_product_partial * S ((S (ff_i_left_step_product)) * ff_v_left_step_product) + (ff_r_left_step_product))) /\ ((((exists ff_h_left_step_product_successor. ff_h_left_step_product_successor + S (ff_s_left_step_product) = S ((S (S ff_i_left_step_product)) * ff_v_left_step_product)) /\ exists ff_q_left_step_product_successor. ff_u_left_step_product = ff_q_left_step_product_successor * S ((S (S ff_i_left_step_product)) * ff_v_left_step_product) + (ff_s_left_step_product))) /\ ff_s_left_step_product = ff_r_left_step_product * ff_p_left_step_product)))))))) /\ x = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose e
specialize pow_successor_decompose (S e)
specialize pow_successor_decompose x
apply pow_successor_decompose
refl
exact hx
cases hleft
cases hleft_witness
have hright : exists r. (exists ff_b_right_step ff_c_right_step. ((forall ff_i_right_step_repeat. (exists ff_lt_right_step_repeat_bound. ff_lt_right_step_repeat_bound + S ff_i_right_step_repeat = e) -&gt; (((exists ff_h_right_step_repeat_decoded. ff_h_right_step_repeat_decoded + S (b) = S ((S (ff_i_right_step_repeat)) * ff_c_right_step)) /\ exists ff_q_right_step_repeat_decoded. ff_b_right_step = ff_q_right_step_repeat_decoded * S ((S (ff_i_right_step_repeat)) * ff_c_right_step) + (b)))) /\ (exists ff_u_right_step_product ff_v_right_step_product. ((((exists ff_h_right_step_product_start. ff_h_right_step_product_start + S (1) = S ((S (0)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_start. ff_u_right_step_product = ff_q_right_step_product_start * S ((S (0)) * ff_v_right_step_product) + (1))) /\ ((((exists ff_h_right_step_product_terminal. ff_h_right_step_product_terminal + S (r) = S ((S (e)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_terminal. ff_u_right_step_product = ff_q_right_step_product_terminal * S ((S (e)) * ff_v_right_step_product) + (r))) /\ forall ff_i_right_step_product. (exists ff_lt_right_step_product_bound. ff_lt_right_step_product_bound + S ff_i_right_step_product = e) -&gt; exists ff_p_right_step_product ff_r_right_step_product ff_s_right_step_product. ((((exists ff_h_right_step_product_factor. ff_h_right_step_product_factor + S (ff_p_right_step_product) = S ((S (ff_i_right_step_product)) * ff_c_right_step)) /\ exists ff_q_right_step_product_factor. ff_b_right_step = ff_q_right_step_product_factor * S ((S (ff_i_right_step_product)) * ff_c_right_step) + (ff_p_right_step_product))) /\ ((((exists ff_h_right_step_product_partial. ff_h_right_step_product_partial + S (ff_r_right_step_product) = S ((S (ff_i_right_step_product)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_partial. ff_u_right_step_product = ff_q_right_step_product_partial * S ((S (ff_i_right_step_product)) * ff_v_right_step_product) + (ff_r_right_step_product))) /\ ((((exists ff_h_right_step_product_successor. ff_h_right_step_product_successor + S (ff_s_right_step_product) = S ((S (S ff_i_right_step_product)) * ff_v_right_step_product)) /\ exists ff_q_right_step_product_successor. ff_u_right_step_product = ff_q_right_step_product_successor * S ((S (S ff_i_right_step_product)) * ff_v_right_step_product) + (ff_s_right_step_product))) /\ ff_s_right_step_product = ff_r_right_step_product * ff_p_right_step_product)))))))) /\ y = r * b
specialize pow_successor_decompose b
specialize pow_successor_decompose e
specialize pow_successor_decompose (S e)
specialize pow_successor_decompose y
apply pow_successor_decompose
refl
exact hy
cases hright
cases hright_witness
have hxmul : x = x1 * a
specialize pow_successor_pair_mul a
specialize pow_successor_pair_mul e
specialize pow_successor_pair_mul (S e)
specialize pow_successor_pair_mul x1
specialize pow_successor_pair_mul x
apply pow_successor_pair_mul
refl
exact hleft_witness_left
exact hx
have hymul : y = x2 * b
specialize pow_successor_pair_mul b
specialize pow_successor_pair_mul e
specialize pow_successor_pair_mul (S e)
specialize pow_successor_pair_mul x2
specialize pow_successor_pair_mul y
apply pow_successor_pair_mul
refl
exact hright_witness_left
exact hy
have hpre : exists qr_u_predecessors qr_v_predecessors. x1 + m * qr_u_predecessors = x2 + m * qr_v_predecessors
specialize IH x1
specialize IH x2
apply IH
exact hab
exact hleft_witness_left
exact hright_witness_left
have hmul : exists pc_u_products pc_v_products. (x1 * a) + m * pc_u_products = (x2 * b) + m * pc_v_products
specialize mod_eq_mul m
specialize mod_eq_mul x1
specialize mod_eq_mul x2
specialize mod_eq_mul a
specialize mod_eq_mul b
apply mod_eq_mul
exact hpre
exact hab
rewrite hxmul
rewrite hymul
exact hmul
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>10,671</dd></div>
        <div><dt>Distinct objects</dt><dd>1,748</dd></div>
        <div><dt>Reused references</dt><dd>63</dd></div>
        <div><dt>Depth</dt><dd>68</dd></div>
        <div><dt>Cuts</dt><dd>297</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5009e017166c32b27669fbe6dadf1a3174452cec282aef54e25dfd647c82d227">5009e017166c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_mod_congruent">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_mod_congruent</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_congruence_theorems.py#L169">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_mod_congruent.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_three_cases"
  data-name="lt_three_cases" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_eq_or_lt,le_zero"
  data-search="lt_three_cases lt three cases every natural strictly below three is zero, one, or two. forall x. (exists h. h + s x = 3) -&gt; x = 0 \/ x = 1 \/ x = 2 quadratic_residues le_of_succ_le_succ le_eq_or_lt le_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_three_cases</code><span>Lt three cases</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural strictly below three is zero, one, or two.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_zero" href="#theorem-le_zero"><code>le_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_five_cases" href="#theorem-lt_five_cases"><code>lt_five_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod3_classify" href="#theorem-bounded_square_mod3_classify"><code>bounded_square_mod3_classify</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_three_cases">Copy statement</button>
        <pre id="statement-lt_three_cases"><code>forall x. (exists h. h + S x = 3) -&gt; x = 0 \/ x = 1 \/ x = 2</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_three_cases">Copy proof</button>
        <pre id="proof-lt_three_cases"><code>pa prove forall x. (exists h. h + S x = 3) -&gt; x = 0 \/ x = 1 \/ x = 2
use le_of_succ_le_succ
use le_eq_or_lt
use le_zero
intro x
intro hb
have hle2 : exists h. h + x = 2
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 2
apply le_of_succ_le_succ
exact hb
have hc2 : x = 2 \/ exists h. h + S x = 2
specialize le_eq_or_lt x
specialize le_eq_or_lt 2
apply le_eq_or_lt
exact hle2
cases hc2
right
exact hc2_left
left
have hle1 : exists h. h + x = 1
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 1
apply le_of_succ_le_succ
exact hc2_right
have hc1 : x = 1 \/ exists h. h + S x = 1
specialize le_eq_or_lt x
specialize le_eq_or_lt 1
apply le_eq_or_lt
exact hle1
cases hc1
right
exact hc1_left
left
have hle0 : exists h. h + x = 0
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 0
apply le_of_succ_le_succ
exact hc1_right
specialize le_zero x
apply le_zero
exact hle0
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>182</dd></div>
        <div><dt>Distinct objects</dt><dd>178</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>7</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f61975330ce836fec6fdf77c9dada7eabf7074cb31b8cc15e54a32d28acdec17">f61975330ce8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_three_cases">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_three_cases</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L76">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_three_cases.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_five_cases"
  data-name="lt_five_cases" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_eq_or_lt,lt_three_cases"
  data-search="lt_five_cases lt five cases every natural strictly below five is one of its canonical values. forall x. (exists h. h + s x = 5) -&gt; x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 quadratic_residues le_of_succ_le_succ le_eq_or_lt lt_three_cases">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_five_cases</code><span>Lt five cases</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural strictly below five is one of its canonical values.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_three_cases" href="#theorem-lt_three_cases"><code>lt_three_cases</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_seven_cases" href="#theorem-lt_seven_cases"><code>lt_seven_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod5_classify" href="#theorem-bounded_square_mod5_classify"><code>bounded_square_mod5_classify</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_five_cases">Copy statement</button>
        <pre id="statement-lt_five_cases"><code>forall x. (exists h. h + S x = 5) -&gt; x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_five_cases">Copy proof</button>
        <pre id="proof-lt_five_cases"><code>pa prove forall x. (exists h. h + S x = 5) -&gt; x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4
use le_of_succ_le_succ
use le_eq_or_lt
use lt_three_cases
intro x
intro hb
have hle4 : exists h. h + x = 4
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 4
apply le_of_succ_le_succ
exact hb
have hc4 : x = 4 \/ exists h. h + S x = 4
specialize le_eq_or_lt x
specialize le_eq_or_lt 4
apply le_eq_or_lt
exact hle4
cases hc4
right
exact hc4_left
left
have hle3 : exists h. h + x = 3
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 3
apply le_of_succ_le_succ
exact hc4_right
have hc3 : x = 3 \/ exists h. h + S x = 3
specialize le_eq_or_lt x
specialize le_eq_or_lt 3
apply le_eq_or_lt
exact hle3
cases hc3
right
exact hc3_left
left
specialize lt_three_cases x
apply lt_three_cases
exact hc3_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>331</dd></div>
        <div><dt>Distinct objects</dt><dd>213</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>24</dd></div>
        <div><dt>Cuts</dt><dd>13</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f70f1a4e36bb529992b1a998d23628af31d3e9b538a5340b6472ba52f2460f1b">f70f1a4e36bb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_five_cases">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_five_cases</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L163">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_five_cases.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lt_seven_cases"
  data-name="lt_seven_cases" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_eq_or_lt,lt_five_cases"
  data-search="lt_seven_cases lt seven cases every natural strictly below seven is one of its canonical values. forall x. (exists h. h + s x = 7) -&gt; x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 \/ x = 5 \/ x = 6 quadratic_residues le_of_succ_le_succ le_eq_or_lt lt_five_cases">
  <details>
    <summary>
      <span class="pa-card-title"><code>lt_seven_cases</code><span>Lt seven cases</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every natural strictly below seven is one of its canonical values.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_five_cases" href="#theorem-lt_five_cases"><code>lt_five_cases</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="bounded_square_mod7_classify" href="#theorem-bounded_square_mod7_classify"><code>bounded_square_mod7_classify</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lt_seven_cases">Copy statement</button>
        <pre id="statement-lt_seven_cases"><code>forall x. (exists h. h + S x = 7) -&gt; x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 \/ x = 5 \/ x = 6</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lt_seven_cases">Copy proof</button>
        <pre id="proof-lt_seven_cases"><code>pa prove forall x. (exists h. h + S x = 7) -&gt; x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 \/ x = 5 \/ x = 6
use le_of_succ_le_succ
use le_eq_or_lt
use lt_five_cases
intro x
intro hb
have hle6 : exists h. h + x = 6
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 6
apply le_of_succ_le_succ
exact hb
have hc6 : x = 6 \/ exists h. h + S x = 6
specialize le_eq_or_lt x
specialize le_eq_or_lt 6
apply le_eq_or_lt
exact hle6
cases hc6
right
exact hc6_left
left
have hle5 : exists h. h + x = 5
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ 5
apply le_of_succ_le_succ
exact hc6_right
have hc5 : x = 5 \/ exists h. h + S x = 5
specialize le_eq_or_lt x
specialize le_eq_or_lt 5
apply le_eq_or_lt
exact hle5
cases hc5
right
exact hc5_left
left
specialize lt_five_cases x
apply lt_five_cases
exact hc5_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>480</dd></div>
        <div><dt>Distinct objects</dt><dd>248</dd></div>
        <div><dt>Reused references</dt><dd>8</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>19</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="60a0e0ace6b659c1694ab7719af2dfcf7c60741993aa868f6b837aa22bf1373d">60a0e0ace6b6…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lt_seven_cases">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lt_seven_cases</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L163">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lt_seven_cases.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_square_mod3_classify"
  data-name="bounded_square_mod3_classify" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="lt_three_cases,mod_eq_trans,mod_eq_bounded_unique"
  data-search="bounded_square_mod3_classify bounded square mod3 classify a bounded square modulo 3 has exactly a canonical square residue. forall a. (exists h. h + s a = 3) -&gt; (exists sm_x_bc3. (exists sm_h_bc3. sm_h_bc3 + s sm_x_bc3 = 3) /\ exists sm_u_bc3 sm_v_bc3. sm_x_bc3 * sm_x_bc3 + 3 * sm_u_bc3 = a + 3 * sm_v_bc3) -&gt; (a = 0 \/ a = 1) quadratic_residues lt_three_cases mod_eq_trans mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_square_mod3_classify</code><span>Bounded square mod3 classify</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded square modulo 3 has exactly a canonical square residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_three_cases" href="#theorem-lt_three_cases"><code>lt_three_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod3_canonical_iff" href="#theorem-qres_mod3_canonical_iff"><code>qres_mod3_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_square_mod3_classify">Copy statement</button>
        <pre id="statement-bounded_square_mod3_classify"><code>forall a. (exists h. h + S a = 3) -&gt; (exists sm_x_bc3. (exists sm_h_bc3. sm_h_bc3 + S sm_x_bc3 = 3) /\ exists sm_u_bc3 sm_v_bc3. sm_x_bc3 * sm_x_bc3 + 3 * sm_u_bc3 = a + 3 * sm_v_bc3) -&gt; (a = 0 \/ a = 1)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_square_mod3_classify">Copy proof</button>
        <pre id="proof-bounded_square_mod3_classify"><code>pa prove forall a. (exists h. h + S a = 3) -&gt; (exists sm_x_bc3. (exists sm_h_bc3. sm_h_bc3 + S sm_x_bc3 = 3) /\ exists sm_u_bc3 sm_v_bc3. sm_x_bc3 * sm_x_bc3 + 3 * sm_u_bc3 = a + 3 * sm_v_bc3) -&gt; (a = 0 \/ a = 1)
use lt_three_cases
use mod_eq_trans
use mod_eq_bounded_unique
intro a
intro ha
intro hb
cases hb
cases hb_witness
have hroots : x = 0 \/ x = 1 \/ x = 2
specialize lt_three_cases x
apply lt_three_cases
exact hb_witness_left
cases hroots
cases hroots_left
have hsq : exists u v. 0 * 0 + 3 * u = a + 3 * v
rewrite hroots_left_left at hb_witness_right
rewrite hroots_left_left at hb_witness_right
exact hb_witness_right
have hc : exists u v. 0 + 3 * u = (0 * 0) + 3 * v
exists 0
exists 0
norm_num
have hra : exists u v. 0 + 3 * u = a + 3 * v
specialize mod_eq_trans 3
specialize mod_eq_trans 0
specialize mod_eq_trans (0 * 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 0 = 3
exists 2
norm_num
have heq : 0 = a
specialize mod_eq_bounded_unique 3
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
symm
exact heq
have hsq : exists u v. 1 * 1 + 3 * u = a + 3 * v
rewrite hroots_left_right at hb_witness_right
rewrite hroots_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 3 * u = (1 * 1) + 3 * v
exists 0
exists 0
norm_num
have hra : exists u v. 1 + 3 * u = a + 3 * v
specialize mod_eq_trans 3
specialize mod_eq_trans 1
specialize mod_eq_trans (1 * 1)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 3
exists 1
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 3
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 2 * 2 + 3 * u = a + 3 * v
rewrite hroots_right at hb_witness_right
rewrite hroots_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 3 * u = (2 * 2) + 3 * v
exists 1
exists 0
norm_num
have hra : exists u v. 1 + 3 * u = a + 3 * v
specialize mod_eq_trans 3
specialize mod_eq_trans 1
specialize mod_eq_trans (2 * 2)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 3
exists 1
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 3
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,767</dd></div>
        <div><dt>Distinct objects</dt><dd>1,149</dd></div>
        <div><dt>Reused references</dt><dd>29</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>42</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2a8ba2241f725e07b29d626460fbe9afaebb28e588ad23d34a33add3b500b2e1">2a8ba2241f72…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_square_mod3_classify">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_square_mod3_classify</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L260">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_square_mod3_classify.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_square_mod5_classify"
  data-name="bounded_square_mod5_classify" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="lt_five_cases,mod_eq_trans,mod_eq_bounded_unique"
  data-search="bounded_square_mod5_classify bounded square mod5 classify a bounded square modulo 5 has exactly a canonical square residue. forall a. (exists h. h + s a = 5) -&gt; (exists sm_x_bc5. (exists sm_h_bc5. sm_h_bc5 + s sm_x_bc5 = 5) /\ exists sm_u_bc5 sm_v_bc5. sm_x_bc5 * sm_x_bc5 + 5 * sm_u_bc5 = a + 5 * sm_v_bc5) -&gt; (a = 0 \/ a = 1 \/ a = 4) quadratic_residues lt_five_cases mod_eq_trans mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_square_mod5_classify</code><span>Bounded square mod5 classify</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded square modulo 5 has exactly a canonical square residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_five_cases" href="#theorem-lt_five_cases"><code>lt_five_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_square_mod5_classify">Copy statement</button>
        <pre id="statement-bounded_square_mod5_classify"><code>forall a. (exists h. h + S a = 5) -&gt; (exists sm_x_bc5. (exists sm_h_bc5. sm_h_bc5 + S sm_x_bc5 = 5) /\ exists sm_u_bc5 sm_v_bc5. sm_x_bc5 * sm_x_bc5 + 5 * sm_u_bc5 = a + 5 * sm_v_bc5) -&gt; (a = 0 \/ a = 1 \/ a = 4)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_square_mod5_classify">Copy proof</button>
        <pre id="proof-bounded_square_mod5_classify"><code>pa prove forall a. (exists h. h + S a = 5) -&gt; (exists sm_x_bc5. (exists sm_h_bc5. sm_h_bc5 + S sm_x_bc5 = 5) /\ exists sm_u_bc5 sm_v_bc5. sm_x_bc5 * sm_x_bc5 + 5 * sm_u_bc5 = a + 5 * sm_v_bc5) -&gt; (a = 0 \/ a = 1 \/ a = 4)
use lt_five_cases
use mod_eq_trans
use mod_eq_bounded_unique
intro a
intro ha
intro hb
cases hb
cases hb_witness
have hroots : x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4
specialize lt_five_cases x
apply lt_five_cases
exact hb_witness_left
cases hroots
cases hroots_left
cases hroots_left_left
cases hroots_left_left_left
have hsq : exists u v. 0 * 0 + 5 * u = a + 5 * v
rewrite hroots_left_left_left_left at hb_witness_right
rewrite hroots_left_left_left_left at hb_witness_right
exact hb_witness_right
have hc : exists u v. 0 + 5 * u = (0 * 0) + 5 * v
exists 0
exists 0
norm_num
have hra : exists u v. 0 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 0
specialize mod_eq_trans (0 * 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 0 = 5
exists 4
norm_num
have heq : 0 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
symm
exact heq
have hsq : exists u v. 1 * 1 + 5 * u = a + 5 * v
rewrite hroots_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 5 * u = (1 * 1) + 5 * v
exists 0
exists 0
norm_num
have hra : exists u v. 1 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 1
specialize mod_eq_trans (1 * 1)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 5
exists 3
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
have hsq : exists u v. 2 * 2 + 5 * u = a + 5 * v
rewrite hroots_left_left_right at hb_witness_right
rewrite hroots_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 5 * u = (2 * 2) + 5 * v
exists 0
exists 0
norm_num
have hra : exists u v. 4 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 4
specialize mod_eq_trans (2 * 2)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 5
exists 0
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 3 * 3 + 5 * u = a + 5 * v
rewrite hroots_left_right at hb_witness_right
rewrite hroots_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 5 * u = (3 * 3) + 5 * v
exists 1
exists 0
norm_num
have hra : exists u v. 4 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 4
specialize mod_eq_trans (3 * 3)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 5
exists 0
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 4 * 4 + 5 * u = a + 5 * v
rewrite hroots_right at hb_witness_right
rewrite hroots_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 5 * u = (4 * 4) + 5 * v
exists 3
exists 0
norm_num
have hra : exists u v. 1 + 5 * u = a + 5 * v
specialize mod_eq_trans 5
specialize mod_eq_trans 1
specialize mod_eq_trans (4 * 4)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 5
exists 3
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 5
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,567</dd></div>
        <div><dt>Distinct objects</dt><dd>1,835</dd></div>
        <div><dt>Reused references</dt><dd>31</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>48</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ae64803ac8fb9a14c875fbfa8565fb3360fca72fb9b06e98cee4ccee42827e58">ae64803ac8fb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_square_mod5_classify">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_square_mod5_classify</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L260">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_square_mod5_classify.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_square_mod7_classify"
  data-name="bounded_square_mod7_classify" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="lt_seven_cases,mod_eq_trans,mod_eq_bounded_unique"
  data-search="bounded_square_mod7_classify bounded square mod7 classify a bounded square modulo 7 has exactly a canonical square residue. forall a. (exists h. h + s a = 7) -&gt; (exists sm_x_bc7. (exists sm_h_bc7. sm_h_bc7 + s sm_x_bc7 = 7) /\ exists sm_u_bc7 sm_v_bc7. sm_x_bc7 * sm_x_bc7 + 7 * sm_u_bc7 = a + 7 * sm_v_bc7) -&gt; (a = 0 \/ a = 1 \/ a = 2 \/ a = 4) quadratic_residues lt_seven_cases mod_eq_trans mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_square_mod7_classify</code><span>Bounded square mod7 classify</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded square modulo 7 has exactly a canonical square residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lt_seven_cases" href="#theorem-lt_seven_cases"><code>lt_seven_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_square_mod7_classify">Copy statement</button>
        <pre id="statement-bounded_square_mod7_classify"><code>forall a. (exists h. h + S a = 7) -&gt; (exists sm_x_bc7. (exists sm_h_bc7. sm_h_bc7 + S sm_x_bc7 = 7) /\ exists sm_u_bc7 sm_v_bc7. sm_x_bc7 * sm_x_bc7 + 7 * sm_u_bc7 = a + 7 * sm_v_bc7) -&gt; (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_square_mod7_classify">Copy proof</button>
        <pre id="proof-bounded_square_mod7_classify"><code>pa prove forall a. (exists h. h + S a = 7) -&gt; (exists sm_x_bc7. (exists sm_h_bc7. sm_h_bc7 + S sm_x_bc7 = 7) /\ exists sm_u_bc7 sm_v_bc7. sm_x_bc7 * sm_x_bc7 + 7 * sm_u_bc7 = a + 7 * sm_v_bc7) -&gt; (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)
use lt_seven_cases
use mod_eq_trans
use mod_eq_bounded_unique
intro a
intro ha
intro hb
cases hb
cases hb_witness
have hroots : x = 0 \/ x = 1 \/ x = 2 \/ x = 3 \/ x = 4 \/ x = 5 \/ x = 6
specialize lt_seven_cases x
apply lt_seven_cases
exact hb_witness_left
cases hroots
cases hroots_left
cases hroots_left_left
cases hroots_left_left_left
cases hroots_left_left_left_left
cases hroots_left_left_left_left_left
have hsq : exists u v. 0 * 0 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_left_left_left at hb_witness_right
rewrite hroots_left_left_left_left_left_left at hb_witness_right
exact hb_witness_right
have hc : exists u v. 0 + 7 * u = (0 * 0) + 7 * v
exists 0
exists 0
norm_num
have hra : exists u v. 0 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 0
specialize mod_eq_trans (0 * 0)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 0 = 7
exists 6
norm_num
have heq : 0 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
left
symm
exact heq
have hsq : exists u v. 1 * 1 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 7 * u = (1 * 1) + 7 * v
exists 0
exists 0
norm_num
have hra : exists u v. 1 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 1
specialize mod_eq_trans (1 * 1)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 7
exists 5
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
right
symm
exact heq
have hsq : exists u v. 2 * 2 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 7 * u = (2 * 2) + 7 * v
exists 0
exists 0
norm_num
have hra : exists u v. 4 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 4
specialize mod_eq_trans (2 * 2)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 7
exists 2
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 3 * 3 + 7 * u = a + 7 * v
rewrite hroots_left_left_left_right at hb_witness_right
rewrite hroots_left_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 2 + 7 * u = (3 * 3) + 7 * v
exists 1
exists 0
norm_num
have hra : exists u v. 2 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 2
specialize mod_eq_trans (3 * 3)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 2 = 7
exists 4
norm_num
have heq : 2 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 2
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
have hsq : exists u v. 4 * 4 + 7 * u = a + 7 * v
rewrite hroots_left_left_right at hb_witness_right
rewrite hroots_left_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 2 + 7 * u = (4 * 4) + 7 * v
exists 2
exists 0
norm_num
have hra : exists u v. 2 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 2
specialize mod_eq_trans (4 * 4)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 2 = 7
exists 4
norm_num
have heq : 2 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 2
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
right
symm
exact heq
have hsq : exists u v. 5 * 5 + 7 * u = a + 7 * v
rewrite hroots_left_right at hb_witness_right
rewrite hroots_left_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 4 + 7 * u = (5 * 5) + 7 * v
exists 3
exists 0
norm_num
have hra : exists u v. 4 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 4
specialize mod_eq_trans (5 * 5)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 4 = 7
exists 2
norm_num
have heq : 4 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 4
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
right
symm
exact heq
have hsq : exists u v. 6 * 6 + 7 * u = a + 7 * v
rewrite hroots_right at hb_witness_right
rewrite hroots_right at hb_witness_right
exact hb_witness_right
have hc : exists u v. 1 + 7 * u = (6 * 6) + 7 * v
exists 5
exists 0
norm_num
have hra : exists u v. 1 + 7 * u = a + 7 * v
specialize mod_eq_trans 7
specialize mod_eq_trans 1
specialize mod_eq_trans (6 * 6)
specialize mod_eq_trans a
apply mod_eq_trans
exact hc
exact hsq
have hrb : exists h. h + S 1 = 7
exists 5
norm_num
have heq : 1 = a
specialize mod_eq_bounded_unique 7
specialize mod_eq_bounded_unique 1
specialize mod_eq_bounded_unique a
apply mod_eq_bounded_unique
exact hrb
exact ha
exact hra
left
left
right
symm
exact heq
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,033</dd></div>
        <div><dt>Distinct objects</dt><dd>3,187</dd></div>
        <div><dt>Reused references</dt><dd>33</dd></div>
        <div><dt>Depth</dt><dd>91</dd></div>
        <div><dt>Cuts</dt><dd>54</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="474234f13310b0463bc419f9f156cf62b2346714f90ebd7b71802f385fbe3416">474234f13310…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_square_mod7_classify">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_square_mod7_classify</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L260">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_square_mod7_classify.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod3_zero"
  data-name="qres_mod3_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod3_zero qres mod3 zero the canonical value 0 is a quadratic residue modulo 3. exists sm_x_p3_0. exists sm_u_p3_0 sm_v_p3_0. sm_x_p3_0 * sm_x_p3_0 + 3 * sm_u_p3_0 = 0 + 3 * sm_v_p3_0 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod3_zero</code><span>Qres mod3 zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 0 is a quadratic residue modulo 3.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod3_canonical_iff" href="#theorem-qres_mod3_canonical_iff"><code>qres_mod3_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod3_zero">Copy statement</button>
        <pre id="statement-qres_mod3_zero"><code>exists sm_x_p3_0. exists sm_u_p3_0 sm_v_p3_0. sm_x_p3_0 * sm_x_p3_0 + 3 * sm_u_p3_0 = 0 + 3 * sm_v_p3_0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod3_zero">Copy proof</button>
        <pre id="proof-qres_mod3_zero"><code>pa prove exists sm_x_p3_0. exists sm_u_p3_0 sm_v_p3_0. sm_x_p3_0 * sm_x_p3_0 + 3 * sm_u_p3_0 = 0 + 3 * sm_v_p3_0
exists 0
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>40</dd></div>
        <div><dt>Distinct objects</dt><dd>40</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>14</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="28a067d3acd7a9ed183528188f905231d41abcbb51729dd4c9936b6433f17d89">28a067d3acd7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod3_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod3_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod3_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod3_one"
  data-name="qres_mod3_one" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod3_one qres mod3 one the canonical value 1 is a quadratic residue modulo 3. exists sm_x_p3_1. exists sm_u_p3_1 sm_v_p3_1. sm_x_p3_1 * sm_x_p3_1 + 3 * sm_u_p3_1 = 1 + 3 * sm_v_p3_1 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod3_one</code><span>Qres mod3 one</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 1 is a quadratic residue modulo 3.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod3_canonical_iff" href="#theorem-qres_mod3_canonical_iff"><code>qres_mod3_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod3_one">Copy statement</button>
        <pre id="statement-qres_mod3_one"><code>exists sm_x_p3_1. exists sm_u_p3_1 sm_v_p3_1. sm_x_p3_1 * sm_x_p3_1 + 3 * sm_u_p3_1 = 1 + 3 * sm_v_p3_1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod3_one">Copy proof</button>
        <pre id="proof-qres_mod3_one"><code>pa prove exists sm_x_p3_1. exists sm_u_p3_1 sm_v_p3_1. sm_x_p3_1 * sm_x_p3_1 + 3 * sm_u_p3_1 = 1 + 3 * sm_v_p3_1
exists 1
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>57</dd></div>
        <div><dt>Distinct objects</dt><dd>57</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>14</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="01a0e94a6526ea923de85edeec61ecaaf363f8550a59bc919956fb039caec882">01a0e94a6526…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod3_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod3_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod3_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod5_zero"
  data-name="qres_mod5_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod5_zero qres mod5 zero the canonical value 0 is a quadratic residue modulo 5. exists sm_x_p5_0. exists sm_u_p5_0 sm_v_p5_0. sm_x_p5_0 * sm_x_p5_0 + 5 * sm_u_p5_0 = 0 + 5 * sm_v_p5_0 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod5_zero</code><span>Qres mod5 zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 0 is a quadratic residue modulo 5.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod5_zero">Copy statement</button>
        <pre id="statement-qres_mod5_zero"><code>exists sm_x_p5_0. exists sm_u_p5_0 sm_v_p5_0. sm_x_p5_0 * sm_x_p5_0 + 5 * sm_u_p5_0 = 0 + 5 * sm_v_p5_0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod5_zero">Copy proof</button>
        <pre id="proof-qres_mod5_zero"><code>pa prove exists sm_x_p5_0. exists sm_u_p5_0 sm_v_p5_0. sm_x_p5_0 * sm_x_p5_0 + 5 * sm_u_p5_0 = 0 + 5 * sm_v_p5_0
exists 0
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>44</dd></div>
        <div><dt>Distinct objects</dt><dd>44</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c81ed7cded0d2cbac1cea298e6832d15a0332426d96e36a6215c66f9fa45c826">c81ed7cded0d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod5_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod5_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod5_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod5_one"
  data-name="qres_mod5_one" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod5_one qres mod5 one the canonical value 1 is a quadratic residue modulo 5. exists sm_x_p5_1. exists sm_u_p5_1 sm_v_p5_1. sm_x_p5_1 * sm_x_p5_1 + 5 * sm_u_p5_1 = 1 + 5 * sm_v_p5_1 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod5_one</code><span>Qres mod5 one</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 1 is a quadratic residue modulo 5.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod5_one">Copy statement</button>
        <pre id="statement-qres_mod5_one"><code>exists sm_x_p5_1. exists sm_u_p5_1 sm_v_p5_1. sm_x_p5_1 * sm_x_p5_1 + 5 * sm_u_p5_1 = 1 + 5 * sm_v_p5_1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod5_one">Copy proof</button>
        <pre id="proof-qres_mod5_one"><code>pa prove exists sm_x_p5_1. exists sm_u_p5_1 sm_v_p5_1. sm_x_p5_1 * sm_x_p5_1 + 5 * sm_u_p5_1 = 1 + 5 * sm_v_p5_1
exists 1
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>61</dd></div>
        <div><dt>Distinct objects</dt><dd>61</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="53992204c10b01b8b90f887084497aa90a4cc39a3ccdbe32342b79310278d16d">53992204c10b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod5_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod5_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod5_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod5_four"
  data-name="qres_mod5_four" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod5_four qres mod5 four the canonical value 4 is a quadratic residue modulo 5. exists sm_x_p5_4. exists sm_u_p5_4 sm_v_p5_4. sm_x_p5_4 * sm_x_p5_4 + 5 * sm_u_p5_4 = 4 + 5 * sm_v_p5_4 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod5_four</code><span>Qres mod5 four</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 4 is a quadratic residue modulo 5.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod5_four">Copy statement</button>
        <pre id="statement-qres_mod5_four"><code>exists sm_x_p5_4. exists sm_u_p5_4 sm_v_p5_4. sm_x_p5_4 * sm_x_p5_4 + 5 * sm_u_p5_4 = 4 + 5 * sm_v_p5_4</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod5_four">Copy proof</button>
        <pre id="proof-qres_mod5_four"><code>pa prove exists sm_x_p5_4. exists sm_u_p5_4 sm_v_p5_4. sm_x_p5_4 * sm_x_p5_4 + 5 * sm_u_p5_4 = 4 + 5 * sm_v_p5_4
exists 2
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>90</dd></div>
        <div><dt>Distinct objects</dt><dd>90</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="108c167d7c36532b15c85279db5ab8da36858e67d6f29c6d3c5b1cf2b07ce6d6">108c167d7c36…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod5_four">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod5_four</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod5_four.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod7_zero"
  data-name="qres_mod7_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod7_zero qres mod7 zero the canonical value 0 is a quadratic residue modulo 7. exists sm_x_p7_0. exists sm_u_p7_0 sm_v_p7_0. sm_x_p7_0 * sm_x_p7_0 + 7 * sm_u_p7_0 = 0 + 7 * sm_v_p7_0 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod7_zero</code><span>Qres mod7 zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 0 is a quadratic residue modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod7_zero">Copy statement</button>
        <pre id="statement-qres_mod7_zero"><code>exists sm_x_p7_0. exists sm_u_p7_0 sm_v_p7_0. sm_x_p7_0 * sm_x_p7_0 + 7 * sm_u_p7_0 = 0 + 7 * sm_v_p7_0</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod7_zero">Copy proof</button>
        <pre id="proof-qres_mod7_zero"><code>pa prove exists sm_x_p7_0. exists sm_u_p7_0 sm_v_p7_0. sm_x_p7_0 * sm_x_p7_0 + 7 * sm_u_p7_0 = 0 + 7 * sm_v_p7_0
exists 0
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>48</dd></div>
        <div><dt>Distinct objects</dt><dd>48</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9c4e083aa20a6d44bc86aa59b93de9efcd1322dffed799a5eb3d12cecf1d2779">9c4e083aa20a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod7_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod7_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod7_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod7_one"
  data-name="qres_mod7_one" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod7_one qres mod7 one the canonical value 1 is a quadratic residue modulo 7. exists sm_x_p7_1. exists sm_u_p7_1 sm_v_p7_1. sm_x_p7_1 * sm_x_p7_1 + 7 * sm_u_p7_1 = 1 + 7 * sm_v_p7_1 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod7_one</code><span>Qres mod7 one</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 1 is a quadratic residue modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod7_one">Copy statement</button>
        <pre id="statement-qres_mod7_one"><code>exists sm_x_p7_1. exists sm_u_p7_1 sm_v_p7_1. sm_x_p7_1 * sm_x_p7_1 + 7 * sm_u_p7_1 = 1 + 7 * sm_v_p7_1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod7_one">Copy proof</button>
        <pre id="proof-qres_mod7_one"><code>pa prove exists sm_x_p7_1. exists sm_u_p7_1 sm_v_p7_1. sm_x_p7_1 * sm_x_p7_1 + 7 * sm_u_p7_1 = 1 + 7 * sm_v_p7_1
exists 1
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>65</dd></div>
        <div><dt>Distinct objects</dt><dd>65</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="dd095ced1763fab55617b3faa816a63bda0c4e0ce5d5536bd189548025419efb">dd095ced1763…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod7_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod7_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod7_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod7_two"
  data-name="qres_mod7_two" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod7_two qres mod7 two the canonical value 2 is a quadratic residue modulo 7. exists sm_x_p7_2. exists sm_u_p7_2 sm_v_p7_2. sm_x_p7_2 * sm_x_p7_2 + 7 * sm_u_p7_2 = 2 + 7 * sm_v_p7_2 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod7_two</code><span>Qres mod7 two</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 2 is a quadratic residue modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod7_two">Copy statement</button>
        <pre id="statement-qres_mod7_two"><code>exists sm_x_p7_2. exists sm_u_p7_2 sm_v_p7_2. sm_x_p7_2 * sm_x_p7_2 + 7 * sm_u_p7_2 = 2 + 7 * sm_v_p7_2</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod7_two">Copy proof</button>
        <pre id="proof-qres_mod7_two"><code>pa prove exists sm_x_p7_2. exists sm_u_p7_2 sm_v_p7_2. sm_x_p7_2 * sm_x_p7_2 + 7 * sm_u_p7_2 = 2 + 7 * sm_v_p7_2
exists 3
exists 0
exists 1
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>208</dd></div>
        <div><dt>Distinct objects</dt><dd>208</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="09fb90ef9c88a795a8fa86c32efe4b8aa18a5d2a76d9d9d09e88eeff3f5baa8b">09fb90ef9c88…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod7_two">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod7_two</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod7_two.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod7_four"
  data-name="qres_mod7_four" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies=""
  data-search="qres_mod7_four qres mod7 four the canonical value 4 is a quadratic residue modulo 7. exists sm_x_p7_4. exists sm_u_p7_4 sm_v_p7_4. sm_x_p7_4 * sm_x_p7_4 + 7 * sm_u_p7_4 = 4 + 7 * sm_v_p7_4 quadratic_residues">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod7_four</code><span>Qres mod7 four</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 4 is a quadratic residue modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod7_four">Copy statement</button>
        <pre id="statement-qres_mod7_four"><code>exists sm_x_p7_4. exists sm_u_p7_4 sm_v_p7_4. sm_x_p7_4 * sm_x_p7_4 + 7 * sm_u_p7_4 = 4 + 7 * sm_v_p7_4</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod7_four">Copy proof</button>
        <pre id="proof-qres_mod7_four"><code>pa prove exists sm_x_p7_4. exists sm_u_p7_4 sm_v_p7_4. sm_x_p7_4 * sm_x_p7_4 + 7 * sm_u_p7_4 = 4 + 7 * sm_v_p7_4
exists 2
exists 0
exists 0
norm_num
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>94</dd></div>
        <div><dt>Distinct objects</dt><dd>94</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>18</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="799fce5f8cc708936ecc0d616a1819ef298c7df9382cf8414e4c68a511f1a8cd">799fce5f8cc7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod7_four">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod7_four</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L290">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod7_four.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod3_canonical_iff"
  data-name="qres_mod3_canonical_iff" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="quadratic_residue_bounded_equiv,succ_ne_zero,bounded_square_mod3_classify,qres_mod3_zero,qres_mod3_one"
  data-search="qres_mod3_canonical_iff qres mod3 canonical iff for canonical values, the displayed list is exactly qres modulo 3. forall a. (exists h. h + s a = 3) -&gt; (((exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3) -&gt; (a = 0 \/ a = 1)) /\ ((a = 0 \/ a = 1) -&gt; (exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3))) quadratic_residues quadratic_residue_bounded_equiv succ_ne_zero bounded_square_mod3_classify qres_mod3_zero qres_mod3_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod3_canonical_iff</code><span>Qres mod3 canonical iff</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">For canonical values, the displayed list is exactly QRes modulo 3.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod3_classify" href="#theorem-bounded_square_mod3_classify"><code>bounded_square_mod3_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod3_zero" href="#theorem-qres_mod3_zero"><code>qres_mod3_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod3_one" href="#theorem-qres_mod3_one"><code>qres_mod3_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="not_qres_mod3_two" href="#theorem-not_qres_mod3_two"><code>not_qres_mod3_two</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod3_canonical_iff">Copy statement</button>
        <pre id="statement-qres_mod3_canonical_iff"><code>forall a. (exists h. h + S a = 3) -&gt; (((exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3) -&gt; (a = 0 \/ a = 1)) /\ ((a = 0 \/ a = 1) -&gt; (exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod3_canonical_iff">Copy proof</button>
        <pre id="proof-qres_mod3_canonical_iff"><code>pa prove forall a. (exists h. h + S a = 3) -&gt; (((exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3) -&gt; (a = 0 \/ a = 1)) /\ ((a = 0 \/ a = 1) -&gt; (exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3)))
use quadratic_residue_bounded_equiv
use succ_ne_zero
use bounded_square_mod3_classify
use qres_mod3_zero
use qres_mod3_one
intro a
intro ha
split
intro hq
have hequiv : ((exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3) -&gt; (exists sm_x_iffb3. (exists sm_h_iffb3. sm_h_iffb3 + S sm_x_iffb3 = 3) /\ exists sm_u_iffb3 sm_v_iffb3. sm_x_iffb3 * sm_x_iffb3 + 3 * sm_u_iffb3 = a + 3 * sm_v_iffb3)) /\ ((exists sm_x_iffb3. (exists sm_h_iffb3. sm_h_iffb3 + S sm_x_iffb3 = 3) /\ exists sm_u_iffb3 sm_v_iffb3. sm_x_iffb3 * sm_x_iffb3 + 3 * sm_u_iffb3 = a + 3 * sm_v_iffb3) -&gt; (exists sm_x_iffq3. exists sm_u_iffq3 sm_v_iffq3. sm_x_iffq3 * sm_x_iffq3 + 3 * sm_u_iffq3 = a + 3 * sm_v_iffq3))
specialize quadratic_residue_bounded_equiv 3
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
specialize succ_ne_zero 2
exact succ_ne_zero
cases hequiv
have hb : exists sm_x_iffb3. (exists sm_h_iffb3. sm_h_iffb3 + S sm_x_iffb3 = 3) /\ exists sm_u_iffb3 sm_v_iffb3. sm_x_iffb3 * sm_x_iffb3 + 3 * sm_u_iffb3 = a + 3 * sm_v_iffb3
apply hequiv_left
exact hq
specialize bounded_square_mod3_classify a
apply bounded_square_mod3_classify
exact ha
exact hb
intro hcases
cases hcases
rewrite hcases_left
exact qres_mod3_zero
rewrite hcases_right
exact qres_mod3_one
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,050</dd></div>
        <div><dt>Distinct objects</dt><dd>1,850</dd></div>
        <div><dt>Reused references</dt><dd>81</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>110</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9149885aeda4e4daf2c5b912f93007e07b08e9c31b0d7854b4cdf19a12d7df44">9149885aeda4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod3_canonical_iff">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod3_canonical_iff</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L345">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod3_canonical_iff.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod5_canonical_iff"
  data-name="qres_mod5_canonical_iff" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="quadratic_residue_bounded_equiv,succ_ne_zero,bounded_square_mod5_classify,qres_mod5_zero,qres_mod5_one,qres_mod5_four"
  data-search="qres_mod5_canonical_iff qres mod5 canonical iff for canonical values, the displayed list is exactly qres modulo 5. forall a. (exists h. h + s a = 5) -&gt; (((exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5) -&gt; (a = 0 \/ a = 1 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 4) -&gt; (exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5))) quadratic_residues quadratic_residue_bounded_equiv succ_ne_zero bounded_square_mod5_classify qres_mod5_zero qres_mod5_one qres_mod5_four">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod5_canonical_iff</code><span>Qres mod5 canonical iff</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">For canonical values, the displayed list is exactly QRes modulo 5.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod5_classify" href="#theorem-bounded_square_mod5_classify"><code>bounded_square_mod5_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod5_zero" href="#theorem-qres_mod5_zero"><code>qres_mod5_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod5_one" href="#theorem-qres_mod5_one"><code>qres_mod5_one</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod5_four" href="#theorem-qres_mod5_four"><code>qres_mod5_four</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="not_qres_mod5_two" href="#theorem-not_qres_mod5_two"><code>not_qres_mod5_two</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod5_three" href="#theorem-not_qres_mod5_three"><code>not_qres_mod5_three</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod5_canonical_iff">Copy statement</button>
        <pre id="statement-qres_mod5_canonical_iff"><code>forall a. (exists h. h + S a = 5) -&gt; (((exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5) -&gt; (a = 0 \/ a = 1 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 4) -&gt; (exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod5_canonical_iff">Copy proof</button>
        <pre id="proof-qres_mod5_canonical_iff"><code>pa prove forall a. (exists h. h + S a = 5) -&gt; (((exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5) -&gt; (a = 0 \/ a = 1 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 4) -&gt; (exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5)))
use quadratic_residue_bounded_equiv
use succ_ne_zero
use bounded_square_mod5_classify
use qres_mod5_zero
use qres_mod5_one
use qres_mod5_four
intro a
intro ha
split
intro hq
have hequiv : ((exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5) -&gt; (exists sm_x_iffb5. (exists sm_h_iffb5. sm_h_iffb5 + S sm_x_iffb5 = 5) /\ exists sm_u_iffb5 sm_v_iffb5. sm_x_iffb5 * sm_x_iffb5 + 5 * sm_u_iffb5 = a + 5 * sm_v_iffb5)) /\ ((exists sm_x_iffb5. (exists sm_h_iffb5. sm_h_iffb5 + S sm_x_iffb5 = 5) /\ exists sm_u_iffb5 sm_v_iffb5. sm_x_iffb5 * sm_x_iffb5 + 5 * sm_u_iffb5 = a + 5 * sm_v_iffb5) -&gt; (exists sm_x_iffq5. exists sm_u_iffq5 sm_v_iffq5. sm_x_iffq5 * sm_x_iffq5 + 5 * sm_u_iffq5 = a + 5 * sm_v_iffq5))
specialize quadratic_residue_bounded_equiv 5
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
specialize succ_ne_zero 4
exact succ_ne_zero
cases hequiv
have hb : exists sm_x_iffb5. (exists sm_h_iffb5. sm_h_iffb5 + S sm_x_iffb5 = 5) /\ exists sm_u_iffb5 sm_v_iffb5. sm_x_iffb5 * sm_x_iffb5 + 5 * sm_u_iffb5 = a + 5 * sm_v_iffb5
apply hequiv_left
exact hq
specialize bounded_square_mod5_classify a
apply bounded_square_mod5_classify
exact ha
exact hb
intro hcases
cases hcases
cases hcases_left
rewrite hcases_left_left
exact qres_mod5_zero
rewrite hcases_left_right
exact qres_mod5_one
rewrite hcases_right
exact qres_mod5_four
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,955</dd></div>
        <div><dt>Distinct objects</dt><dd>2,641</dd></div>
        <div><dt>Reused references</dt><dd>83</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>117</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d169f89bd8a78b311ca4bc4b924fea9796964a421770cd3c3d8a9d484ae157a8">d169f89bd8a7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod5_canonical_iff">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod5_canonical_iff</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L345">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod5_canonical_iff.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-qres_mod7_canonical_iff"
  data-name="qres_mod7_canonical_iff" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="quadratic_residue_bounded_equiv,succ_ne_zero,bounded_square_mod7_classify,qres_mod7_zero,qres_mod7_one,qres_mod7_two,qres_mod7_four"
  data-search="qres_mod7_canonical_iff qres mod7 canonical iff for canonical values, the displayed list is exactly qres modulo 7. forall a. (exists h. h + s a = 7) -&gt; (((exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7) -&gt; (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 2 \/ a = 4) -&gt; (exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7))) quadratic_residues quadratic_residue_bounded_equiv succ_ne_zero bounded_square_mod7_classify qres_mod7_zero qres_mod7_one qres_mod7_two qres_mod7_four">
  <details>
    <summary>
      <span class="pa-card-title"><code>qres_mod7_canonical_iff</code><span>Qres mod7 canonical iff</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">For canonical values, the displayed list is exactly QRes modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="quadratic_residue_bounded_equiv" href="#theorem-quadratic_residue_bounded_equiv"><code>quadratic_residue_bounded_equiv</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_square_mod7_classify" href="#theorem-bounded_square_mod7_classify"><code>bounded_square_mod7_classify</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod7_zero" href="#theorem-qres_mod7_zero"><code>qres_mod7_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod7_one" href="#theorem-qres_mod7_one"><code>qres_mod7_one</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod7_two" href="#theorem-qres_mod7_two"><code>qres_mod7_two</code></a> <a class="pa-theorem-chip" data-theorem-link="qres_mod7_four" href="#theorem-qres_mod7_four"><code>qres_mod7_four</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="not_qres_mod7_three" href="#theorem-not_qres_mod7_three"><code>not_qres_mod7_three</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod7_five" href="#theorem-not_qres_mod7_five"><code>not_qres_mod7_five</code></a> <a class="pa-theorem-chip" data-theorem-link="not_qres_mod7_six" href="#theorem-not_qres_mod7_six"><code>not_qres_mod7_six</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-qres_mod7_canonical_iff">Copy statement</button>
        <pre id="statement-qres_mod7_canonical_iff"><code>forall a. (exists h. h + S a = 7) -&gt; (((exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7) -&gt; (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 2 \/ a = 4) -&gt; (exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-qres_mod7_canonical_iff">Copy proof</button>
        <pre id="proof-qres_mod7_canonical_iff"><code>pa prove forall a. (exists h. h + S a = 7) -&gt; (((exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7) -&gt; (a = 0 \/ a = 1 \/ a = 2 \/ a = 4)) /\ ((a = 0 \/ a = 1 \/ a = 2 \/ a = 4) -&gt; (exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7)))
use quadratic_residue_bounded_equiv
use succ_ne_zero
use bounded_square_mod7_classify
use qres_mod7_zero
use qres_mod7_one
use qres_mod7_two
use qres_mod7_four
intro a
intro ha
split
intro hq
have hequiv : ((exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7) -&gt; (exists sm_x_iffb7. (exists sm_h_iffb7. sm_h_iffb7 + S sm_x_iffb7 = 7) /\ exists sm_u_iffb7 sm_v_iffb7. sm_x_iffb7 * sm_x_iffb7 + 7 * sm_u_iffb7 = a + 7 * sm_v_iffb7)) /\ ((exists sm_x_iffb7. (exists sm_h_iffb7. sm_h_iffb7 + S sm_x_iffb7 = 7) /\ exists sm_u_iffb7 sm_v_iffb7. sm_x_iffb7 * sm_x_iffb7 + 7 * sm_u_iffb7 = a + 7 * sm_v_iffb7) -&gt; (exists sm_x_iffq7. exists sm_u_iffq7 sm_v_iffq7. sm_x_iffq7 * sm_x_iffq7 + 7 * sm_u_iffq7 = a + 7 * sm_v_iffq7))
specialize quadratic_residue_bounded_equiv 7
specialize quadratic_residue_bounded_equiv a
apply quadratic_residue_bounded_equiv
specialize succ_ne_zero 6
exact succ_ne_zero
cases hequiv
have hb : exists sm_x_iffb7. (exists sm_h_iffb7. sm_h_iffb7 + S sm_x_iffb7 = 7) /\ exists sm_u_iffb7 sm_v_iffb7. sm_x_iffb7 * sm_x_iffb7 + 7 * sm_u_iffb7 = a + 7 * sm_v_iffb7
apply hequiv_left
exact hq
specialize bounded_square_mod7_classify a
apply bounded_square_mod7_classify
exact ha
exact hb
intro hcases
cases hcases
cases hcases_left
cases hcases_left_left
rewrite hcases_left_left_left
exact qres_mod7_zero
rewrite hcases_left_left_right
exact qres_mod7_one
rewrite hcases_left_right
exact qres_mod7_two
rewrite hcases_right
exact qres_mod7_four
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,648</dd></div>
        <div><dt>Distinct objects</dt><dd>4,220</dd></div>
        <div><dt>Reused references</dt><dd>85</dd></div>
        <div><dt>Depth</dt><dd>94</dd></div>
        <div><dt>Cuts</dt><dd>124</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="dfcdeffddc5d6fc6b2d7487722dbf3543db0856f74ca82bdbbfabb26c8c346be">dfcdeffddc5d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for qres_mod7_canonical_iff">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib qres_mod7_canonical_iff</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L345">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/qres_mod7_canonical_iff.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_qres_mod3_two"
  data-name="not_qres_mod3_two" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="qres_mod3_canonical_iff,succ_injective"
  data-search="not_qres_mod3_two not qres mod3 two the canonical value 2 is not a quadratic residue modulo 3. ~(exists sm_x_n3_2. exists sm_u_n3_2 sm_v_n3_2. sm_x_n3_2 * sm_x_n3_2 + 3 * sm_u_n3_2 = 2 + 3 * sm_v_n3_2) quadratic_residues qres_mod3_canonical_iff succ_injective">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_qres_mod3_two</code><span>Not qres mod3 two</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 2 is not a quadratic residue modulo 3.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod3_canonical_iff" href="#theorem-qres_mod3_canonical_iff"><code>qres_mod3_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_injective" href="#theorem-succ_injective"><code>succ_injective</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_qres_mod3_two">Copy statement</button>
        <pre id="statement-not_qres_mod3_two"><code>~(exists sm_x_n3_2. exists sm_u_n3_2 sm_v_n3_2. sm_x_n3_2 * sm_x_n3_2 + 3 * sm_u_n3_2 = 2 + 3 * sm_v_n3_2)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_qres_mod3_two">Copy proof</button>
        <pre id="proof-not_qres_mod3_two"><code>pa prove ~(exists sm_x_n3_2. exists sm_u_n3_2 sm_v_n3_2. sm_x_n3_2 * sm_x_n3_2 + 3 * sm_u_n3_2 = 2 + 3 * sm_v_n3_2)
use qres_mod3_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 2 = 3
exists 0
norm_num
have hiff : (((exists sm_x_ni3_2. exists sm_u_ni3_2 sm_v_ni3_2. sm_x_ni3_2 * sm_x_ni3_2 + 3 * sm_u_ni3_2 = 2 + 3 * sm_v_ni3_2) -&gt; (2 = 0 \/ 2 = 1)) /\ ((2 = 0 \/ 2 = 1) -&gt; (exists sm_x_ni3_2. exists sm_u_ni3_2 sm_v_ni3_2. sm_x_ni3_2 * sm_x_ni3_2 + 3 * sm_u_ni3_2 = 2 + 3 * sm_v_ni3_2)))
specialize qres_mod3_canonical_iff 2
apply qres_mod3_canonical_iff
exact ha
cases hiff
have hcases : 2 = 0 \/ 2 = 1
apply hiff_left
exact hq
cases hcases
apply PA1
exact hcases_left
have hne_3_2_1_0 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hcases_right
apply PA1
exact hne_3_2_1_0
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,103</dd></div>
        <div><dt>Distinct objects</dt><dd>1,903</dd></div>
        <div><dt>Reused references</dt><dd>81</dd></div>
        <div><dt>Depth</dt><dd>66</dd></div>
        <div><dt>Cuts</dt><dd>112</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ca0da90b4e2eb943f9b1695f8d8619d78d6f4e9ece22fdbbb11763bd9570fdc6">ca0da90b4e2e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_qres_mod3_two">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_qres_mod3_two</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L434">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_qres_mod3_two.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_qres_mod5_two"
  data-name="not_qres_mod5_two" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="qres_mod5_canonical_iff,succ_injective"
  data-search="not_qres_mod5_two not qres mod5 two the canonical value 2 is not a quadratic residue modulo 5. ~(exists sm_x_n5_2. exists sm_u_n5_2 sm_v_n5_2. sm_x_n5_2 * sm_x_n5_2 + 5 * sm_u_n5_2 = 2 + 5 * sm_v_n5_2) quadratic_residues qres_mod5_canonical_iff succ_injective">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_qres_mod5_two</code><span>Not qres mod5 two</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 2 is not a quadratic residue modulo 5.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_injective" href="#theorem-succ_injective"><code>succ_injective</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_qres_mod5_two">Copy statement</button>
        <pre id="statement-not_qres_mod5_two"><code>~(exists sm_x_n5_2. exists sm_u_n5_2 sm_v_n5_2. sm_x_n5_2 * sm_x_n5_2 + 5 * sm_u_n5_2 = 2 + 5 * sm_v_n5_2)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_qres_mod5_two">Copy proof</button>
        <pre id="proof-not_qres_mod5_two"><code>pa prove ~(exists sm_x_n5_2. exists sm_u_n5_2 sm_v_n5_2. sm_x_n5_2 * sm_x_n5_2 + 5 * sm_u_n5_2 = 2 + 5 * sm_v_n5_2)
use qres_mod5_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 2 = 5
exists 2
norm_num
have hiff : (((exists sm_x_ni5_2. exists sm_u_ni5_2 sm_v_ni5_2. sm_x_ni5_2 * sm_x_ni5_2 + 5 * sm_u_ni5_2 = 2 + 5 * sm_v_ni5_2) -&gt; (2 = 0 \/ 2 = 1 \/ 2 = 4)) /\ ((2 = 0 \/ 2 = 1 \/ 2 = 4) -&gt; (exists sm_x_ni5_2. exists sm_u_ni5_2 sm_v_ni5_2. sm_x_ni5_2 * sm_x_ni5_2 + 5 * sm_u_ni5_2 = 2 + 5 * sm_v_ni5_2)))
specialize qres_mod5_canonical_iff 2
apply qres_mod5_canonical_iff
exact ha
cases hiff
have hcases : 2 = 0 \/ 2 = 1 \/ 2 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
apply PA1
exact hcases_left_left
have hne_5_2_1_0 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hcases_left_right
apply PA1
exact hne_5_2_1_0
have hne_5_2_4_0 : 1 = 3
specialize succ_injective 1
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_5_2_4_1 : 0 = 2
specialize succ_injective 0
specialize succ_injective 2
apply succ_injective
exact hne_5_2_4_0
apply PA1
symm
exact hne_5_2_4_1
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,025</dd></div>
        <div><dt>Distinct objects</dt><dd>2,711</dd></div>
        <div><dt>Reused references</dt><dd>83</dd></div>
        <div><dt>Depth</dt><dd>66</dd></div>
        <div><dt>Cuts</dt><dd>119</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="68ff6335aa920b1d05503484cc39e21ed525e23256e82cbe6fb04caa404fdfb7">68ff6335aa92…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_qres_mod5_two">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_qres_mod5_two</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L434">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_qres_mod5_two.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_qres_mod5_three"
  data-name="not_qres_mod5_three" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="qres_mod5_canonical_iff,succ_injective"
  data-search="not_qres_mod5_three not qres mod5 three the canonical value 3 is not a quadratic residue modulo 5. ~(exists sm_x_n5_3. exists sm_u_n5_3 sm_v_n5_3. sm_x_n5_3 * sm_x_n5_3 + 5 * sm_u_n5_3 = 3 + 5 * sm_v_n5_3) quadratic_residues qres_mod5_canonical_iff succ_injective">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_qres_mod5_three</code><span>Not qres mod5 three</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 3 is not a quadratic residue modulo 5.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod5_canonical_iff" href="#theorem-qres_mod5_canonical_iff"><code>qres_mod5_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_injective" href="#theorem-succ_injective"><code>succ_injective</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_qres_mod5_three">Copy statement</button>
        <pre id="statement-not_qres_mod5_three"><code>~(exists sm_x_n5_3. exists sm_u_n5_3 sm_v_n5_3. sm_x_n5_3 * sm_x_n5_3 + 5 * sm_u_n5_3 = 3 + 5 * sm_v_n5_3)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_qres_mod5_three">Copy proof</button>
        <pre id="proof-not_qres_mod5_three"><code>pa prove ~(exists sm_x_n5_3. exists sm_u_n5_3 sm_v_n5_3. sm_x_n5_3 * sm_x_n5_3 + 5 * sm_u_n5_3 = 3 + 5 * sm_v_n5_3)
use qres_mod5_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 3 = 5
exists 1
norm_num
have hiff : (((exists sm_x_ni5_3. exists sm_u_ni5_3 sm_v_ni5_3. sm_x_ni5_3 * sm_x_ni5_3 + 5 * sm_u_ni5_3 = 3 + 5 * sm_v_ni5_3) -&gt; (3 = 0 \/ 3 = 1 \/ 3 = 4)) /\ ((3 = 0 \/ 3 = 1 \/ 3 = 4) -&gt; (exists sm_x_ni5_3. exists sm_u_ni5_3 sm_v_ni5_3. sm_x_ni5_3 * sm_x_ni5_3 + 5 * sm_u_ni5_3 = 3 + 5 * sm_v_ni5_3)))
specialize qres_mod5_canonical_iff 3
apply qres_mod5_canonical_iff
exact ha
cases hiff
have hcases : 3 = 0 \/ 3 = 1 \/ 3 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
apply PA1
exact hcases_left_left
have hne_5_3_1_0 : 2 = 0
specialize succ_injective 2
specialize succ_injective 0
apply succ_injective
exact hcases_left_right
apply PA1
exact hne_5_3_1_0
have hne_5_3_4_0 : 2 = 3
specialize succ_injective 2
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_5_3_4_1 : 1 = 2
specialize succ_injective 1
specialize succ_injective 2
apply succ_injective
exact hne_5_3_4_0
have hne_5_3_4_2 : 0 = 1
specialize succ_injective 0
specialize succ_injective 1
apply succ_injective
exact hne_5_3_4_1
apply PA1
symm
exact hne_5_3_4_2
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,034</dd></div>
        <div><dt>Distinct objects</dt><dd>2,720</dd></div>
        <div><dt>Reused references</dt><dd>83</dd></div>
        <div><dt>Depth</dt><dd>66</dd></div>
        <div><dt>Cuts</dt><dd>119</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="18527b818202a676473e4f31c1cd7c9be4df08b5a5f1037061568d92aeabcd09">18527b818202…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_qres_mod5_three">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_qres_mod5_three</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L434">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_qres_mod5_three.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_qres_mod7_three"
  data-name="not_qres_mod7_three" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="qres_mod7_canonical_iff,succ_injective"
  data-search="not_qres_mod7_three not qres mod7 three the canonical value 3 is not a quadratic residue modulo 7. ~(exists sm_x_n7_3. exists sm_u_n7_3 sm_v_n7_3. sm_x_n7_3 * sm_x_n7_3 + 7 * sm_u_n7_3 = 3 + 7 * sm_v_n7_3) quadratic_residues qres_mod7_canonical_iff succ_injective">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_qres_mod7_three</code><span>Not qres mod7 three</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 3 is not a quadratic residue modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_injective" href="#theorem-succ_injective"><code>succ_injective</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_qres_mod7_three">Copy statement</button>
        <pre id="statement-not_qres_mod7_three"><code>~(exists sm_x_n7_3. exists sm_u_n7_3 sm_v_n7_3. sm_x_n7_3 * sm_x_n7_3 + 7 * sm_u_n7_3 = 3 + 7 * sm_v_n7_3)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_qres_mod7_three">Copy proof</button>
        <pre id="proof-not_qres_mod7_three"><code>pa prove ~(exists sm_x_n7_3. exists sm_u_n7_3 sm_v_n7_3. sm_x_n7_3 * sm_x_n7_3 + 7 * sm_u_n7_3 = 3 + 7 * sm_v_n7_3)
use qres_mod7_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 3 = 7
exists 3
norm_num
have hiff : (((exists sm_x_ni7_3. exists sm_u_ni7_3 sm_v_ni7_3. sm_x_ni7_3 * sm_x_ni7_3 + 7 * sm_u_ni7_3 = 3 + 7 * sm_v_ni7_3) -&gt; (3 = 0 \/ 3 = 1 \/ 3 = 2 \/ 3 = 4)) /\ ((3 = 0 \/ 3 = 1 \/ 3 = 2 \/ 3 = 4) -&gt; (exists sm_x_ni7_3. exists sm_u_ni7_3 sm_v_ni7_3. sm_x_ni7_3 * sm_x_ni7_3 + 7 * sm_u_ni7_3 = 3 + 7 * sm_v_ni7_3)))
specialize qres_mod7_canonical_iff 3
apply qres_mod7_canonical_iff
exact ha
cases hiff
have hcases : 3 = 0 \/ 3 = 1 \/ 3 = 2 \/ 3 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
cases hcases_left_left
apply PA1
exact hcases_left_left_left
have hne_7_3_1_0 : 2 = 0
specialize succ_injective 2
specialize succ_injective 0
apply succ_injective
exact hcases_left_left_right
apply PA1
exact hne_7_3_1_0
have hne_7_3_2_0 : 2 = 1
specialize succ_injective 2
specialize succ_injective 1
apply succ_injective
exact hcases_left_right
have hne_7_3_2_1 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hne_7_3_2_0
apply PA1
exact hne_7_3_2_1
have hne_7_3_4_0 : 2 = 3
specialize succ_injective 2
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_7_3_4_1 : 1 = 2
specialize succ_injective 1
specialize succ_injective 2
apply succ_injective
exact hne_7_3_4_0
have hne_7_3_4_2 : 0 = 1
specialize succ_injective 0
specialize succ_injective 1
apply succ_injective
exact hne_7_3_4_1
apply PA1
symm
exact hne_7_3_4_2
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,743</dd></div>
        <div><dt>Distinct objects</dt><dd>4,315</dd></div>
        <div><dt>Reused references</dt><dd>85</dd></div>
        <div><dt>Depth</dt><dd>95</dd></div>
        <div><dt>Cuts</dt><dd>126</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f745ebc507142f7a53696095715f249a005419bd583bf530c765bef9b4ac167d">f745ebc50714…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_qres_mod7_three">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_qres_mod7_three</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L434">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_qres_mod7_three.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_qres_mod7_five"
  data-name="not_qres_mod7_five" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="qres_mod7_canonical_iff,succ_injective"
  data-search="not_qres_mod7_five not qres mod7 five the canonical value 5 is not a quadratic residue modulo 7. ~(exists sm_x_n7_5. exists sm_u_n7_5 sm_v_n7_5. sm_x_n7_5 * sm_x_n7_5 + 7 * sm_u_n7_5 = 5 + 7 * sm_v_n7_5) quadratic_residues qres_mod7_canonical_iff succ_injective">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_qres_mod7_five</code><span>Not qres mod7 five</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 5 is not a quadratic residue modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_injective" href="#theorem-succ_injective"><code>succ_injective</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_qres_mod7_five">Copy statement</button>
        <pre id="statement-not_qres_mod7_five"><code>~(exists sm_x_n7_5. exists sm_u_n7_5 sm_v_n7_5. sm_x_n7_5 * sm_x_n7_5 + 7 * sm_u_n7_5 = 5 + 7 * sm_v_n7_5)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_qres_mod7_five">Copy proof</button>
        <pre id="proof-not_qres_mod7_five"><code>pa prove ~(exists sm_x_n7_5. exists sm_u_n7_5 sm_v_n7_5. sm_x_n7_5 * sm_x_n7_5 + 7 * sm_u_n7_5 = 5 + 7 * sm_v_n7_5)
use qres_mod7_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 5 = 7
exists 1
norm_num
have hiff : (((exists sm_x_ni7_5. exists sm_u_ni7_5 sm_v_ni7_5. sm_x_ni7_5 * sm_x_ni7_5 + 7 * sm_u_ni7_5 = 5 + 7 * sm_v_ni7_5) -&gt; (5 = 0 \/ 5 = 1 \/ 5 = 2 \/ 5 = 4)) /\ ((5 = 0 \/ 5 = 1 \/ 5 = 2 \/ 5 = 4) -&gt; (exists sm_x_ni7_5. exists sm_u_ni7_5 sm_v_ni7_5. sm_x_ni7_5 * sm_x_ni7_5 + 7 * sm_u_ni7_5 = 5 + 7 * sm_v_ni7_5)))
specialize qres_mod7_canonical_iff 5
apply qres_mod7_canonical_iff
exact ha
cases hiff
have hcases : 5 = 0 \/ 5 = 1 \/ 5 = 2 \/ 5 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
cases hcases_left_left
apply PA1
exact hcases_left_left_left
have hne_7_5_1_0 : 4 = 0
specialize succ_injective 4
specialize succ_injective 0
apply succ_injective
exact hcases_left_left_right
apply PA1
exact hne_7_5_1_0
have hne_7_5_2_0 : 4 = 1
specialize succ_injective 4
specialize succ_injective 1
apply succ_injective
exact hcases_left_right
have hne_7_5_2_1 : 3 = 0
specialize succ_injective 3
specialize succ_injective 0
apply succ_injective
exact hne_7_5_2_0
apply PA1
exact hne_7_5_2_1
have hne_7_5_4_0 : 4 = 3
specialize succ_injective 4
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_7_5_4_1 : 3 = 2
specialize succ_injective 3
specialize succ_injective 2
apply succ_injective
exact hne_7_5_4_0
have hne_7_5_4_2 : 2 = 1
specialize succ_injective 2
specialize succ_injective 1
apply succ_injective
exact hne_7_5_4_1
have hne_7_5_4_3 : 1 = 0
specialize succ_injective 1
specialize succ_injective 0
apply succ_injective
exact hne_7_5_4_2
apply PA1
exact hne_7_5_4_3
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,756</dd></div>
        <div><dt>Distinct objects</dt><dd>4,328</dd></div>
        <div><dt>Reused references</dt><dd>85</dd></div>
        <div><dt>Depth</dt><dd>95</dd></div>
        <div><dt>Cuts</dt><dd>126</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="04d3f09358e5cdccce517af3266ca8a4efe5a907b4ae56d6c434e9c48022ca40">04d3f09358e5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_qres_mod7_five">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_qres_mod7_five</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L434">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_qres_mod7_five.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-not_qres_mod7_six"
  data-name="not_qres_mod7_six" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="qres_mod7_canonical_iff,succ_injective"
  data-search="not_qres_mod7_six not qres mod7 six the canonical value 6 is not a quadratic residue modulo 7. ~(exists sm_x_n7_6. exists sm_u_n7_6 sm_v_n7_6. sm_x_n7_6 * sm_x_n7_6 + 7 * sm_u_n7_6 = 6 + 7 * sm_v_n7_6) quadratic_residues qres_mod7_canonical_iff succ_injective">
  <details>
    <summary>
      <span class="pa-card-title"><code>not_qres_mod7_six</code><span>Not qres mod7 six</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical value 6 is not a quadratic residue modulo 7.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="qres_mod7_canonical_iff" href="#theorem-qres_mod7_canonical_iff"><code>qres_mod7_canonical_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_injective" href="#theorem-succ_injective"><code>succ_injective</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-not_qres_mod7_six">Copy statement</button>
        <pre id="statement-not_qres_mod7_six"><code>~(exists sm_x_n7_6. exists sm_u_n7_6 sm_v_n7_6. sm_x_n7_6 * sm_x_n7_6 + 7 * sm_u_n7_6 = 6 + 7 * sm_v_n7_6)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-not_qres_mod7_six">Copy proof</button>
        <pre id="proof-not_qres_mod7_six"><code>pa prove ~(exists sm_x_n7_6. exists sm_u_n7_6 sm_v_n7_6. sm_x_n7_6 * sm_x_n7_6 + 7 * sm_u_n7_6 = 6 + 7 * sm_v_n7_6)
use qres_mod7_canonical_iff
use succ_injective
intro hq
have ha : exists h. h + S 6 = 7
exists 0
norm_num
have hiff : (((exists sm_x_ni7_6. exists sm_u_ni7_6 sm_v_ni7_6. sm_x_ni7_6 * sm_x_ni7_6 + 7 * sm_u_ni7_6 = 6 + 7 * sm_v_ni7_6) -&gt; (6 = 0 \/ 6 = 1 \/ 6 = 2 \/ 6 = 4)) /\ ((6 = 0 \/ 6 = 1 \/ 6 = 2 \/ 6 = 4) -&gt; (exists sm_x_ni7_6. exists sm_u_ni7_6 sm_v_ni7_6. sm_x_ni7_6 * sm_x_ni7_6 + 7 * sm_u_ni7_6 = 6 + 7 * sm_v_ni7_6)))
specialize qres_mod7_canonical_iff 6
apply qres_mod7_canonical_iff
exact ha
cases hiff
have hcases : 6 = 0 \/ 6 = 1 \/ 6 = 2 \/ 6 = 4
apply hiff_left
exact hq
cases hcases
cases hcases_left
cases hcases_left_left
apply PA1
exact hcases_left_left_left
have hne_7_6_1_0 : 5 = 0
specialize succ_injective 5
specialize succ_injective 0
apply succ_injective
exact hcases_left_left_right
apply PA1
exact hne_7_6_1_0
have hne_7_6_2_0 : 5 = 1
specialize succ_injective 5
specialize succ_injective 1
apply succ_injective
exact hcases_left_right
have hne_7_6_2_1 : 4 = 0
specialize succ_injective 4
specialize succ_injective 0
apply succ_injective
exact hne_7_6_2_0
apply PA1
exact hne_7_6_2_1
have hne_7_6_4_0 : 5 = 3
specialize succ_injective 5
specialize succ_injective 3
apply succ_injective
exact hcases_right
have hne_7_6_4_1 : 4 = 2
specialize succ_injective 4
specialize succ_injective 2
apply succ_injective
exact hne_7_6_4_0
have hne_7_6_4_2 : 3 = 1
specialize succ_injective 3
specialize succ_injective 1
apply succ_injective
exact hne_7_6_4_1
have hne_7_6_4_3 : 2 = 0
specialize succ_injective 2
specialize succ_injective 0
apply succ_injective
exact hne_7_6_4_2
apply PA1
exact hne_7_6_4_3
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,761</dd></div>
        <div><dt>Distinct objects</dt><dd>4,333</dd></div>
        <div><dt>Reused references</dt><dd>85</dd></div>
        <div><dt>Depth</dt><dd>95</dd></div>
        <div><dt>Cuts</dt><dd>126</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2792d0f8a79a2d25c08b70c93268c1931e34503b22c336c79f8b937127348577">2792d0f8a79a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for not_qres_mod7_six">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib not_qres_mod7_six</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_small_moduli.py#L434">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/not_qres_mod7_six.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_two_from_one_successor"
  data-name="pow_two_from_one_successor" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_successor_decompose,pow_one"
  data-search="pow_two_from_one_successor pow two from one successor a successor of exponent one gives the relational square. forall a o e n. o = 1 -&gt; e = s o -&gt; (exists ff_b_two_carrier ff_c_two_carrier. ((forall ff_i_two_carrier_repeat. (exists ff_lt_two_carrier_repeat_bound. ff_lt_two_carrier_repeat_bound + s ff_i_two_carrier_repeat = e) -&gt; (((exists ff_h_two_carrier_repeat_decoded. ff_h_two_carrier_repeat_decoded + s (a) = s ((s (ff_i_two_carrier_repeat)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_repeat_decoded. ff_b_two_carrier = ff_q_two_carrier_repeat_decoded * s ((s (ff_i_two_carrier_repeat)) * ff_c_two_carrier) + (a)))) /\ (exists ff_u_two_carrier_product ff_v_two_carrier_product. ((((exists ff_h_two_carrier_product_start. ff_h_two_carrier_product_start + s (1) = s ((s (0)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_start. ff_u_two_carrier_product = ff_q_two_carrier_product_start * s ((s (0)) * ff_v_two_carrier_product) + (1))) /\ ((((exists ff_h_two_carrier_product_terminal. ff_h_two_carrier_product_terminal + s (n) = s ((s (e)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_terminal. ff_u_two_carrier_product = ff_q_two_carrier_product_terminal * s ((s (e)) * ff_v_two_carrier_product) + (n))) /\ forall ff_i_two_carrier_product. (exists ff_lt_two_carrier_product_bound. ff_lt_two_carrier_product_bound + s ff_i_two_carrier_product = e) -&gt; exists ff_p_two_carrier_product ff_r_two_carrier_product ff_s_two_carrier_product. ((((exists ff_h_two_carrier_product_factor. ff_h_two_carrier_product_factor + s (ff_p_two_carrier_product) = s ((s (ff_i_two_carrier_product)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_product_factor. ff_b_two_carrier = ff_q_two_carrier_product_factor * s ((s (ff_i_two_carrier_product)) * ff_c_two_carrier) + (ff_p_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_partial. ff_h_two_carrier_product_partial + s (ff_r_two_carrier_product) = s ((s (ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_partial. ff_u_two_carrier_product = ff_q_two_carrier_product_partial * s ((s (ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_r_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_successor. ff_h_two_carrier_product_successor + s (ff_s_two_carrier_product) = s ((s (s ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_successor. ff_u_two_carrier_product = ff_q_two_carrier_product_successor * s ((s (s ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_s_two_carrier_product))) /\ ff_s_two_carrier_product = ff_r_two_carrier_product * ff_p_two_carrier_product)))))))) -&gt; n = a * a quadratic_residues pow_successor_decompose pow_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_two_from_one_successor</code><span>Pow two from one successor</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A successor of exponent one gives the relational square.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_one" href="#theorem-pow_one"><code>pow_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_two" href="#theorem-pow_two"><code>pow_two</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_two_from_one_successor">Copy statement</button>
        <pre id="statement-pow_two_from_one_successor"><code>forall a o e n. o = 1 -&gt; e = S o -&gt; (exists ff_b_two_carrier ff_c_two_carrier. ((forall ff_i_two_carrier_repeat. (exists ff_lt_two_carrier_repeat_bound. ff_lt_two_carrier_repeat_bound + S ff_i_two_carrier_repeat = e) -&gt; (((exists ff_h_two_carrier_repeat_decoded. ff_h_two_carrier_repeat_decoded + S (a) = S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_repeat_decoded. ff_b_two_carrier = ff_q_two_carrier_repeat_decoded * S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier) + (a)))) /\ (exists ff_u_two_carrier_product ff_v_two_carrier_product. ((((exists ff_h_two_carrier_product_start. ff_h_two_carrier_product_start + S (1) = S ((S (0)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_start. ff_u_two_carrier_product = ff_q_two_carrier_product_start * S ((S (0)) * ff_v_two_carrier_product) + (1))) /\ ((((exists ff_h_two_carrier_product_terminal. ff_h_two_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_terminal. ff_u_two_carrier_product = ff_q_two_carrier_product_terminal * S ((S (e)) * ff_v_two_carrier_product) + (n))) /\ forall ff_i_two_carrier_product. (exists ff_lt_two_carrier_product_bound. ff_lt_two_carrier_product_bound + S ff_i_two_carrier_product = e) -&gt; exists ff_p_two_carrier_product ff_r_two_carrier_product ff_s_two_carrier_product. ((((exists ff_h_two_carrier_product_factor. ff_h_two_carrier_product_factor + S (ff_p_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_product_factor. ff_b_two_carrier = ff_q_two_carrier_product_factor * S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier) + (ff_p_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_partial. ff_h_two_carrier_product_partial + S (ff_r_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_partial. ff_u_two_carrier_product = ff_q_two_carrier_product_partial * S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_r_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_successor. ff_h_two_carrier_product_successor + S (ff_s_two_carrier_product) = S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_successor. ff_u_two_carrier_product = ff_q_two_carrier_product_successor * S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_s_two_carrier_product))) /\ ff_s_two_carrier_product = ff_r_two_carrier_product * ff_p_two_carrier_product)))))))) -&gt; n = a * a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_two_from_one_successor">Copy proof</button>
        <pre id="proof-pow_two_from_one_successor"><code>pa prove forall a o e n. o = 1 -&gt; e = S o -&gt; (exists ff_b_two_carrier ff_c_two_carrier. ((forall ff_i_two_carrier_repeat. (exists ff_lt_two_carrier_repeat_bound. ff_lt_two_carrier_repeat_bound + S ff_i_two_carrier_repeat = e) -&gt; (((exists ff_h_two_carrier_repeat_decoded. ff_h_two_carrier_repeat_decoded + S (a) = S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_repeat_decoded. ff_b_two_carrier = ff_q_two_carrier_repeat_decoded * S ((S (ff_i_two_carrier_repeat)) * ff_c_two_carrier) + (a)))) /\ (exists ff_u_two_carrier_product ff_v_two_carrier_product. ((((exists ff_h_two_carrier_product_start. ff_h_two_carrier_product_start + S (1) = S ((S (0)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_start. ff_u_two_carrier_product = ff_q_two_carrier_product_start * S ((S (0)) * ff_v_two_carrier_product) + (1))) /\ ((((exists ff_h_two_carrier_product_terminal. ff_h_two_carrier_product_terminal + S (n) = S ((S (e)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_terminal. ff_u_two_carrier_product = ff_q_two_carrier_product_terminal * S ((S (e)) * ff_v_two_carrier_product) + (n))) /\ forall ff_i_two_carrier_product. (exists ff_lt_two_carrier_product_bound. ff_lt_two_carrier_product_bound + S ff_i_two_carrier_product = e) -&gt; exists ff_p_two_carrier_product ff_r_two_carrier_product ff_s_two_carrier_product. ((((exists ff_h_two_carrier_product_factor. ff_h_two_carrier_product_factor + S (ff_p_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier)) /\ exists ff_q_two_carrier_product_factor. ff_b_two_carrier = ff_q_two_carrier_product_factor * S ((S (ff_i_two_carrier_product)) * ff_c_two_carrier) + (ff_p_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_partial. ff_h_two_carrier_product_partial + S (ff_r_two_carrier_product) = S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_partial. ff_u_two_carrier_product = ff_q_two_carrier_product_partial * S ((S (ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_r_two_carrier_product))) /\ ((((exists ff_h_two_carrier_product_successor. ff_h_two_carrier_product_successor + S (ff_s_two_carrier_product) = S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product)) /\ exists ff_q_two_carrier_product_successor. ff_u_two_carrier_product = ff_q_two_carrier_product_successor * S ((S (S ff_i_two_carrier_product)) * ff_v_two_carrier_product) + (ff_s_two_carrier_product))) /\ ff_s_two_carrier_product = ff_r_two_carrier_product * ff_p_two_carrier_product)))))))) -&gt; n = a * a
use pow_successor_decompose
use pow_one
intro a
intro o
intro e
intro n
intro ho
intro he
intro hpow
have hstep : exists r. (exists ff_b_two_predecessor ff_c_two_predecessor. ((forall ff_i_two_predecessor_repeat. (exists ff_lt_two_predecessor_repeat_bound. ff_lt_two_predecessor_repeat_bound + S ff_i_two_predecessor_repeat = o) -&gt; (((exists ff_h_two_predecessor_repeat_decoded. ff_h_two_predecessor_repeat_decoded + S (a) = S ((S (ff_i_two_predecessor_repeat)) * ff_c_two_predecessor)) /\ exists ff_q_two_predecessor_repeat_decoded. ff_b_two_predecessor = ff_q_two_predecessor_repeat_decoded * S ((S (ff_i_two_predecessor_repeat)) * ff_c_two_predecessor) + (a)))) /\ (exists ff_u_two_predecessor_product ff_v_two_predecessor_product. ((((exists ff_h_two_predecessor_product_start. ff_h_two_predecessor_product_start + S (1) = S ((S (0)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_start. ff_u_two_predecessor_product = ff_q_two_predecessor_product_start * S ((S (0)) * ff_v_two_predecessor_product) + (1))) /\ ((((exists ff_h_two_predecessor_product_terminal. ff_h_two_predecessor_product_terminal + S (r) = S ((S (o)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_terminal. ff_u_two_predecessor_product = ff_q_two_predecessor_product_terminal * S ((S (o)) * ff_v_two_predecessor_product) + (r))) /\ forall ff_i_two_predecessor_product. (exists ff_lt_two_predecessor_product_bound. ff_lt_two_predecessor_product_bound + S ff_i_two_predecessor_product = o) -&gt; exists ff_p_two_predecessor_product ff_r_two_predecessor_product ff_s_two_predecessor_product. ((((exists ff_h_two_predecessor_product_factor. ff_h_two_predecessor_product_factor + S (ff_p_two_predecessor_product) = S ((S (ff_i_two_predecessor_product)) * ff_c_two_predecessor)) /\ exists ff_q_two_predecessor_product_factor. ff_b_two_predecessor = ff_q_two_predecessor_product_factor * S ((S (ff_i_two_predecessor_product)) * ff_c_two_predecessor) + (ff_p_two_predecessor_product))) /\ ((((exists ff_h_two_predecessor_product_partial. ff_h_two_predecessor_product_partial + S (ff_r_two_predecessor_product) = S ((S (ff_i_two_predecessor_product)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_partial. ff_u_two_predecessor_product = ff_q_two_predecessor_product_partial * S ((S (ff_i_two_predecessor_product)) * ff_v_two_predecessor_product) + (ff_r_two_predecessor_product))) /\ ((((exists ff_h_two_predecessor_product_successor. ff_h_two_predecessor_product_successor + S (ff_s_two_predecessor_product) = S ((S (S ff_i_two_predecessor_product)) * ff_v_two_predecessor_product)) /\ exists ff_q_two_predecessor_product_successor. ff_u_two_predecessor_product = ff_q_two_predecessor_product_successor * S ((S (S ff_i_two_predecessor_product)) * ff_v_two_predecessor_product) + (ff_s_two_predecessor_product))) /\ ff_s_two_predecessor_product = ff_r_two_predecessor_product * ff_p_two_predecessor_product)))))))) /\ n = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose o
specialize pow_successor_decompose e
specialize pow_successor_decompose n
apply pow_successor_decompose
exact he
exact hpow
cases hstep
cases hstep_witness
have hr : x = a
specialize pow_one a
specialize pow_one o
specialize pow_one x
apply pow_one
exact ho
exact hstep_witness_left
trans x * a
exact hstep_witness_right
rewrite hr
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,431</dd></div>
        <div><dt>Distinct objects</dt><dd>1,106</dd></div>
        <div><dt>Reused references</dt><dd>48</dd></div>
        <div><dt>Depth</dt><dd>67</dd></div>
        <div><dt>Cuts</dt><dd>182</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ebb79888472aec12959627ebb435c0207c2faa12dfe45be3fe7547ad525cdbb6">ebb79888472a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_two_from_one_successor">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_two_from_one_successor</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_algebra_theorems.py#L122">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_two_from_one_successor.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_two"
  data-name="pow_two" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_two_from_one_successor"
  data-search="pow_two pow two the relational second power is exactly the square. forall a e n. e = 2 -&gt; (exists ff_b_two ff_c_two. ((forall ff_i_two_repeat. (exists ff_lt_two_repeat_bound. ff_lt_two_repeat_bound + s ff_i_two_repeat = e) -&gt; (((exists ff_h_two_repeat_decoded. ff_h_two_repeat_decoded + s (a) = s ((s (ff_i_two_repeat)) * ff_c_two)) /\ exists ff_q_two_repeat_decoded. ff_b_two = ff_q_two_repeat_decoded * s ((s (ff_i_two_repeat)) * ff_c_two) + (a)))) /\ (exists ff_u_two_product ff_v_two_product. ((((exists ff_h_two_product_start. ff_h_two_product_start + s (1) = s ((s (0)) * ff_v_two_product)) /\ exists ff_q_two_product_start. ff_u_two_product = ff_q_two_product_start * s ((s (0)) * ff_v_two_product) + (1))) /\ ((((exists ff_h_two_product_terminal. ff_h_two_product_terminal + s (n) = s ((s (e)) * ff_v_two_product)) /\ exists ff_q_two_product_terminal. ff_u_two_product = ff_q_two_product_terminal * s ((s (e)) * ff_v_two_product) + (n))) /\ forall ff_i_two_product. (exists ff_lt_two_product_bound. ff_lt_two_product_bound + s ff_i_two_product = e) -&gt; exists ff_p_two_product ff_r_two_product ff_s_two_product. ((((exists ff_h_two_product_factor. ff_h_two_product_factor + s (ff_p_two_product) = s ((s (ff_i_two_product)) * ff_c_two)) /\ exists ff_q_two_product_factor. ff_b_two = ff_q_two_product_factor * s ((s (ff_i_two_product)) * ff_c_two) + (ff_p_two_product))) /\ ((((exists ff_h_two_product_partial. ff_h_two_product_partial + s (ff_r_two_product) = s ((s (ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_partial. ff_u_two_product = ff_q_two_product_partial * s ((s (ff_i_two_product)) * ff_v_two_product) + (ff_r_two_product))) /\ ((((exists ff_h_two_product_successor. ff_h_two_product_successor + s (ff_s_two_product) = s ((s (s ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_successor. ff_u_two_product = ff_q_two_product_successor * s ((s (s ff_i_two_product)) * ff_v_two_product) + (ff_s_two_product))) /\ ff_s_two_product = ff_r_two_product * ff_p_two_product)))))))) -&gt; n = a * a quadratic_residues pow_two_from_one_successor">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_two</code><span>Pow two</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The relational second power is exactly the square.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_two_from_one_successor" href="#theorem-pow_two_from_one_successor"><code>pow_two_from_one_successor</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_two">Copy statement</button>
        <pre id="statement-pow_two"><code>forall a e n. e = 2 -&gt; (exists ff_b_two ff_c_two. ((forall ff_i_two_repeat. (exists ff_lt_two_repeat_bound. ff_lt_two_repeat_bound + S ff_i_two_repeat = e) -&gt; (((exists ff_h_two_repeat_decoded. ff_h_two_repeat_decoded + S (a) = S ((S (ff_i_two_repeat)) * ff_c_two)) /\ exists ff_q_two_repeat_decoded. ff_b_two = ff_q_two_repeat_decoded * S ((S (ff_i_two_repeat)) * ff_c_two) + (a)))) /\ (exists ff_u_two_product ff_v_two_product. ((((exists ff_h_two_product_start. ff_h_two_product_start + S (1) = S ((S (0)) * ff_v_two_product)) /\ exists ff_q_two_product_start. ff_u_two_product = ff_q_two_product_start * S ((S (0)) * ff_v_two_product) + (1))) /\ ((((exists ff_h_two_product_terminal. ff_h_two_product_terminal + S (n) = S ((S (e)) * ff_v_two_product)) /\ exists ff_q_two_product_terminal. ff_u_two_product = ff_q_two_product_terminal * S ((S (e)) * ff_v_two_product) + (n))) /\ forall ff_i_two_product. (exists ff_lt_two_product_bound. ff_lt_two_product_bound + S ff_i_two_product = e) -&gt; exists ff_p_two_product ff_r_two_product ff_s_two_product. ((((exists ff_h_two_product_factor. ff_h_two_product_factor + S (ff_p_two_product) = S ((S (ff_i_two_product)) * ff_c_two)) /\ exists ff_q_two_product_factor. ff_b_two = ff_q_two_product_factor * S ((S (ff_i_two_product)) * ff_c_two) + (ff_p_two_product))) /\ ((((exists ff_h_two_product_partial. ff_h_two_product_partial + S (ff_r_two_product) = S ((S (ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_partial. ff_u_two_product = ff_q_two_product_partial * S ((S (ff_i_two_product)) * ff_v_two_product) + (ff_r_two_product))) /\ ((((exists ff_h_two_product_successor. ff_h_two_product_successor + S (ff_s_two_product) = S ((S (S ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_successor. ff_u_two_product = ff_q_two_product_successor * S ((S (S ff_i_two_product)) * ff_v_two_product) + (ff_s_two_product))) /\ ff_s_two_product = ff_r_two_product * ff_p_two_product)))))))) -&gt; n = a * a</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_two">Copy proof</button>
        <pre id="proof-pow_two"><code>pa prove forall a e n. e = 2 -&gt; (exists ff_b_two ff_c_two. ((forall ff_i_two_repeat. (exists ff_lt_two_repeat_bound. ff_lt_two_repeat_bound + S ff_i_two_repeat = e) -&gt; (((exists ff_h_two_repeat_decoded. ff_h_two_repeat_decoded + S (a) = S ((S (ff_i_two_repeat)) * ff_c_two)) /\ exists ff_q_two_repeat_decoded. ff_b_two = ff_q_two_repeat_decoded * S ((S (ff_i_two_repeat)) * ff_c_two) + (a)))) /\ (exists ff_u_two_product ff_v_two_product. ((((exists ff_h_two_product_start. ff_h_two_product_start + S (1) = S ((S (0)) * ff_v_two_product)) /\ exists ff_q_two_product_start. ff_u_two_product = ff_q_two_product_start * S ((S (0)) * ff_v_two_product) + (1))) /\ ((((exists ff_h_two_product_terminal. ff_h_two_product_terminal + S (n) = S ((S (e)) * ff_v_two_product)) /\ exists ff_q_two_product_terminal. ff_u_two_product = ff_q_two_product_terminal * S ((S (e)) * ff_v_two_product) + (n))) /\ forall ff_i_two_product. (exists ff_lt_two_product_bound. ff_lt_two_product_bound + S ff_i_two_product = e) -&gt; exists ff_p_two_product ff_r_two_product ff_s_two_product. ((((exists ff_h_two_product_factor. ff_h_two_product_factor + S (ff_p_two_product) = S ((S (ff_i_two_product)) * ff_c_two)) /\ exists ff_q_two_product_factor. ff_b_two = ff_q_two_product_factor * S ((S (ff_i_two_product)) * ff_c_two) + (ff_p_two_product))) /\ ((((exists ff_h_two_product_partial. ff_h_two_product_partial + S (ff_r_two_product) = S ((S (ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_partial. ff_u_two_product = ff_q_two_product_partial * S ((S (ff_i_two_product)) * ff_v_two_product) + (ff_r_two_product))) /\ ((((exists ff_h_two_product_successor. ff_h_two_product_successor + S (ff_s_two_product) = S ((S (S ff_i_two_product)) * ff_v_two_product)) /\ exists ff_q_two_product_successor. ff_u_two_product = ff_q_two_product_successor * S ((S (S ff_i_two_product)) * ff_v_two_product) + (ff_s_two_product))) /\ ff_s_two_product = ff_r_two_product * ff_p_two_product)))))))) -&gt; n = a * a
use pow_two_from_one_successor
intro a
intro e
intro n
intro he
intro hpow
specialize pow_two_from_one_successor a
specialize pow_two_from_one_successor 1
specialize pow_two_from_one_successor e
specialize pow_two_from_one_successor n
apply pow_two_from_one_successor
refl
exact he
exact hpow
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,460</dd></div>
        <div><dt>Distinct objects</dt><dd>1,135</dd></div>
        <div><dt>Reused references</dt><dd>48</dd></div>
        <div><dt>Depth</dt><dd>68</dd></div>
        <div><dt>Cuts</dt><dd>183</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="87df55f94fa5e3e20bcd4a349cd7dabc6c1d1553fe6d89ce67044f6f52e1ee45">87df55f94fa5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_two">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_two</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_algebra_theorems.py#L159">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_two.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_add"
  data-name="pow_add" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_zero,pow_functional,pow_successor_decompose,mul_one,mul_assoc"
  data-search="pow_add pow add relational powers turn addition of exponents into multiplication. forall a e f s x y z. s = e + f -&gt; (exists ff_b_add_left ff_c_add_left. ((forall ff_i_add_left_repeat. (exists ff_lt_add_left_repeat_bound. ff_lt_add_left_repeat_bound + s ff_i_add_left_repeat = e) -&gt; (((exists ff_h_add_left_repeat_decoded. ff_h_add_left_repeat_decoded + s (a) = s ((s (ff_i_add_left_repeat)) * ff_c_add_left)) /\ exists ff_q_add_left_repeat_decoded. ff_b_add_left = ff_q_add_left_repeat_decoded * s ((s (ff_i_add_left_repeat)) * ff_c_add_left) + (a)))) /\ (exists ff_u_add_left_product ff_v_add_left_product. ((((exists ff_h_add_left_product_start. ff_h_add_left_product_start + s (1) = s ((s (0)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_start. ff_u_add_left_product = ff_q_add_left_product_start * s ((s (0)) * ff_v_add_left_product) + (1))) /\ ((((exists ff_h_add_left_product_terminal. ff_h_add_left_product_terminal + s (x) = s ((s (e)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_terminal. ff_u_add_left_product = ff_q_add_left_product_terminal * s ((s (e)) * ff_v_add_left_product) + (x))) /\ forall ff_i_add_left_product. (exists ff_lt_add_left_product_bound. ff_lt_add_left_product_bound + s ff_i_add_left_product = e) -&gt; exists ff_p_add_left_product ff_r_add_left_product ff_s_add_left_product. ((((exists ff_h_add_left_product_factor. ff_h_add_left_product_factor + s (ff_p_add_left_product) = s ((s (ff_i_add_left_product)) * ff_c_add_left)) /\ exists ff_q_add_left_product_factor. ff_b_add_left = ff_q_add_left_product_factor * s ((s (ff_i_add_left_product)) * ff_c_add_left) + (ff_p_add_left_product))) /\ ((((exists ff_h_add_left_product_partial. ff_h_add_left_product_partial + s (ff_r_add_left_product) = s ((s (ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_partial. ff_u_add_left_product = ff_q_add_left_product_partial * s ((s (ff_i_add_left_product)) * ff_v_add_left_product) + (ff_r_add_left_product))) /\ ((((exists ff_h_add_left_product_successor. ff_h_add_left_product_successor + s (ff_s_add_left_product) = s ((s (s ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_successor. ff_u_add_left_product = ff_q_add_left_product_successor * s ((s (s ff_i_add_left_product)) * ff_v_add_left_product) + (ff_s_add_left_product))) /\ ff_s_add_left_product = ff_r_add_left_product * ff_p_add_left_product)))))))) -&gt; (exists ff_b_add_right ff_c_add_right. ((forall ff_i_add_right_repeat. (exists ff_lt_add_right_repeat_bound. ff_lt_add_right_repeat_bound + s ff_i_add_right_repeat = f) -&gt; (((exists ff_h_add_right_repeat_decoded. ff_h_add_right_repeat_decoded + s (a) = s ((s (ff_i_add_right_repeat)) * ff_c_add_right)) /\ exists ff_q_add_right_repeat_decoded. ff_b_add_right = ff_q_add_right_repeat_decoded * s ((s (ff_i_add_right_repeat)) * ff_c_add_right) + (a)))) /\ (exists ff_u_add_right_product ff_v_add_right_product. ((((exists ff_h_add_right_product_start. ff_h_add_right_product_start + s (1) = s ((s (0)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_start. ff_u_add_right_product = ff_q_add_right_product_start * s ((s (0)) * ff_v_add_right_product) + (1))) /\ ((((exists ff_h_add_right_product_terminal. ff_h_add_right_product_terminal + s (y) = s ((s (f)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_terminal. ff_u_add_right_product = ff_q_add_right_product_terminal * s ((s (f)) * ff_v_add_right_product) + (y))) /\ forall ff_i_add_right_product. (exists ff_lt_add_right_product_bound. ff_lt_add_right_product_bound + s ff_i_add_right_product = f) -&gt; exists ff_p_add_right_product ff_r_add_right_product ff_s_add_right_product. ((((exists ff_h_add_right_product_factor. ff_h_add_right_product_factor + s (ff_p_add_right_product) = s ((s (ff_i_add_right_product)) * ff_c_add_right)) /\ exists ff_q_add_right_product_factor. ff_b_add_right = ff_q_add_right_product_factor * s ((s (ff_i_add_right_product)) * ff_c_add_right) + (ff_p_add_right_product))) /\ ((((exists ff_h_add_right_product_partial. ff_h_add_right_product_partial + s (ff_r_add_right_product) = s ((s (ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_partial. ff_u_add_right_product = ff_q_add_right_product_partial * s ((s (ff_i_add_right_product)) * ff_v_add_right_product) + (ff_r_add_right_product))) /\ ((((exists ff_h_add_right_product_successor. ff_h_add_right_product_successor + s (ff_s_add_right_product) = s ((s (s ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_successor. ff_u_add_right_product = ff_q_add_right_product_successor * s ((s (s ff_i_add_right_product)) * ff_v_add_right_product) + (ff_s_add_right_product))) /\ ff_s_add_right_product = ff_r_add_right_product * ff_p_add_right_product)))))))) -&gt; (exists ff_b_add_total ff_c_add_total. ((forall ff_i_add_total_repeat. (exists ff_lt_add_total_repeat_bound. ff_lt_add_total_repeat_bound + s ff_i_add_total_repeat = s) -&gt; (((exists ff_h_add_total_repeat_decoded. ff_h_add_total_repeat_decoded + s (a) = s ((s (ff_i_add_total_repeat)) * ff_c_add_total)) /\ exists ff_q_add_total_repeat_decoded. ff_b_add_total = ff_q_add_total_repeat_decoded * s ((s (ff_i_add_total_repeat)) * ff_c_add_total) + (a)))) /\ (exists ff_u_add_total_product ff_v_add_total_product. ((((exists ff_h_add_total_product_start. ff_h_add_total_product_start + s (1) = s ((s (0)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_start. ff_u_add_total_product = ff_q_add_total_product_start * s ((s (0)) * ff_v_add_total_product) + (1))) /\ ((((exists ff_h_add_total_product_terminal. ff_h_add_total_product_terminal + s (z) = s ((s (s)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_terminal. ff_u_add_total_product = ff_q_add_total_product_terminal * s ((s (s)) * ff_v_add_total_product) + (z))) /\ forall ff_i_add_total_product. (exists ff_lt_add_total_product_bound. ff_lt_add_total_product_bound + s ff_i_add_total_product = s) -&gt; exists ff_p_add_total_product ff_r_add_total_product ff_s_add_total_product. ((((exists ff_h_add_total_product_factor. ff_h_add_total_product_factor + s (ff_p_add_total_product) = s ((s (ff_i_add_total_product)) * ff_c_add_total)) /\ exists ff_q_add_total_product_factor. ff_b_add_total = ff_q_add_total_product_factor * s ((s (ff_i_add_total_product)) * ff_c_add_total) + (ff_p_add_total_product))) /\ ((((exists ff_h_add_total_product_partial. ff_h_add_total_product_partial + s (ff_r_add_total_product) = s ((s (ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_partial. ff_u_add_total_product = ff_q_add_total_product_partial * s ((s (ff_i_add_total_product)) * ff_v_add_total_product) + (ff_r_add_total_product))) /\ ((((exists ff_h_add_total_product_successor. ff_h_add_total_product_successor + s (ff_s_add_total_product) = s ((s (s ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_successor. ff_u_add_total_product = ff_q_add_total_product_successor * s ((s (s ff_i_add_total_product)) * ff_v_add_total_product) + (ff_s_add_total_product))) /\ ff_s_add_total_product = ff_r_add_total_product * ff_p_add_total_product)))))))) -&gt; z = x * y quadratic_residues pow_zero pow_functional pow_successor_decompose mul_one mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_add</code><span>Pow add</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Relational powers turn addition of exponents into multiplication.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_zero" href="#theorem-pow_zero"><code>pow_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_functional" href="#theorem-pow_functional"><code>pow_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_mul_exp" href="#theorem-pow_mul_exp"><code>pow_mul_exp</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_add">Copy statement</button>
        <pre id="statement-pow_add"><code>forall a e f s x y z. s = e + f -&gt; (exists ff_b_add_left ff_c_add_left. ((forall ff_i_add_left_repeat. (exists ff_lt_add_left_repeat_bound. ff_lt_add_left_repeat_bound + S ff_i_add_left_repeat = e) -&gt; (((exists ff_h_add_left_repeat_decoded. ff_h_add_left_repeat_decoded + S (a) = S ((S (ff_i_add_left_repeat)) * ff_c_add_left)) /\ exists ff_q_add_left_repeat_decoded. ff_b_add_left = ff_q_add_left_repeat_decoded * S ((S (ff_i_add_left_repeat)) * ff_c_add_left) + (a)))) /\ (exists ff_u_add_left_product ff_v_add_left_product. ((((exists ff_h_add_left_product_start. ff_h_add_left_product_start + S (1) = S ((S (0)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_start. ff_u_add_left_product = ff_q_add_left_product_start * S ((S (0)) * ff_v_add_left_product) + (1))) /\ ((((exists ff_h_add_left_product_terminal. ff_h_add_left_product_terminal + S (x) = S ((S (e)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_terminal. ff_u_add_left_product = ff_q_add_left_product_terminal * S ((S (e)) * ff_v_add_left_product) + (x))) /\ forall ff_i_add_left_product. (exists ff_lt_add_left_product_bound. ff_lt_add_left_product_bound + S ff_i_add_left_product = e) -&gt; exists ff_p_add_left_product ff_r_add_left_product ff_s_add_left_product. ((((exists ff_h_add_left_product_factor. ff_h_add_left_product_factor + S (ff_p_add_left_product) = S ((S (ff_i_add_left_product)) * ff_c_add_left)) /\ exists ff_q_add_left_product_factor. ff_b_add_left = ff_q_add_left_product_factor * S ((S (ff_i_add_left_product)) * ff_c_add_left) + (ff_p_add_left_product))) /\ ((((exists ff_h_add_left_product_partial. ff_h_add_left_product_partial + S (ff_r_add_left_product) = S ((S (ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_partial. ff_u_add_left_product = ff_q_add_left_product_partial * S ((S (ff_i_add_left_product)) * ff_v_add_left_product) + (ff_r_add_left_product))) /\ ((((exists ff_h_add_left_product_successor. ff_h_add_left_product_successor + S (ff_s_add_left_product) = S ((S (S ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_successor. ff_u_add_left_product = ff_q_add_left_product_successor * S ((S (S ff_i_add_left_product)) * ff_v_add_left_product) + (ff_s_add_left_product))) /\ ff_s_add_left_product = ff_r_add_left_product * ff_p_add_left_product)))))))) -&gt; (exists ff_b_add_right ff_c_add_right. ((forall ff_i_add_right_repeat. (exists ff_lt_add_right_repeat_bound. ff_lt_add_right_repeat_bound + S ff_i_add_right_repeat = f) -&gt; (((exists ff_h_add_right_repeat_decoded. ff_h_add_right_repeat_decoded + S (a) = S ((S (ff_i_add_right_repeat)) * ff_c_add_right)) /\ exists ff_q_add_right_repeat_decoded. ff_b_add_right = ff_q_add_right_repeat_decoded * S ((S (ff_i_add_right_repeat)) * ff_c_add_right) + (a)))) /\ (exists ff_u_add_right_product ff_v_add_right_product. ((((exists ff_h_add_right_product_start. ff_h_add_right_product_start + S (1) = S ((S (0)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_start. ff_u_add_right_product = ff_q_add_right_product_start * S ((S (0)) * ff_v_add_right_product) + (1))) /\ ((((exists ff_h_add_right_product_terminal. ff_h_add_right_product_terminal + S (y) = S ((S (f)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_terminal. ff_u_add_right_product = ff_q_add_right_product_terminal * S ((S (f)) * ff_v_add_right_product) + (y))) /\ forall ff_i_add_right_product. (exists ff_lt_add_right_product_bound. ff_lt_add_right_product_bound + S ff_i_add_right_product = f) -&gt; exists ff_p_add_right_product ff_r_add_right_product ff_s_add_right_product. ((((exists ff_h_add_right_product_factor. ff_h_add_right_product_factor + S (ff_p_add_right_product) = S ((S (ff_i_add_right_product)) * ff_c_add_right)) /\ exists ff_q_add_right_product_factor. ff_b_add_right = ff_q_add_right_product_factor * S ((S (ff_i_add_right_product)) * ff_c_add_right) + (ff_p_add_right_product))) /\ ((((exists ff_h_add_right_product_partial. ff_h_add_right_product_partial + S (ff_r_add_right_product) = S ((S (ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_partial. ff_u_add_right_product = ff_q_add_right_product_partial * S ((S (ff_i_add_right_product)) * ff_v_add_right_product) + (ff_r_add_right_product))) /\ ((((exists ff_h_add_right_product_successor. ff_h_add_right_product_successor + S (ff_s_add_right_product) = S ((S (S ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_successor. ff_u_add_right_product = ff_q_add_right_product_successor * S ((S (S ff_i_add_right_product)) * ff_v_add_right_product) + (ff_s_add_right_product))) /\ ff_s_add_right_product = ff_r_add_right_product * ff_p_add_right_product)))))))) -&gt; (exists ff_b_add_total ff_c_add_total. ((forall ff_i_add_total_repeat. (exists ff_lt_add_total_repeat_bound. ff_lt_add_total_repeat_bound + S ff_i_add_total_repeat = s) -&gt; (((exists ff_h_add_total_repeat_decoded. ff_h_add_total_repeat_decoded + S (a) = S ((S (ff_i_add_total_repeat)) * ff_c_add_total)) /\ exists ff_q_add_total_repeat_decoded. ff_b_add_total = ff_q_add_total_repeat_decoded * S ((S (ff_i_add_total_repeat)) * ff_c_add_total) + (a)))) /\ (exists ff_u_add_total_product ff_v_add_total_product. ((((exists ff_h_add_total_product_start. ff_h_add_total_product_start + S (1) = S ((S (0)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_start. ff_u_add_total_product = ff_q_add_total_product_start * S ((S (0)) * ff_v_add_total_product) + (1))) /\ ((((exists ff_h_add_total_product_terminal. ff_h_add_total_product_terminal + S (z) = S ((S (s)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_terminal. ff_u_add_total_product = ff_q_add_total_product_terminal * S ((S (s)) * ff_v_add_total_product) + (z))) /\ forall ff_i_add_total_product. (exists ff_lt_add_total_product_bound. ff_lt_add_total_product_bound + S ff_i_add_total_product = s) -&gt; exists ff_p_add_total_product ff_r_add_total_product ff_s_add_total_product. ((((exists ff_h_add_total_product_factor. ff_h_add_total_product_factor + S (ff_p_add_total_product) = S ((S (ff_i_add_total_product)) * ff_c_add_total)) /\ exists ff_q_add_total_product_factor. ff_b_add_total = ff_q_add_total_product_factor * S ((S (ff_i_add_total_product)) * ff_c_add_total) + (ff_p_add_total_product))) /\ ((((exists ff_h_add_total_product_partial. ff_h_add_total_product_partial + S (ff_r_add_total_product) = S ((S (ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_partial. ff_u_add_total_product = ff_q_add_total_product_partial * S ((S (ff_i_add_total_product)) * ff_v_add_total_product) + (ff_r_add_total_product))) /\ ((((exists ff_h_add_total_product_successor. ff_h_add_total_product_successor + S (ff_s_add_total_product) = S ((S (S ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_successor. ff_u_add_total_product = ff_q_add_total_product_successor * S ((S (S ff_i_add_total_product)) * ff_v_add_total_product) + (ff_s_add_total_product))) /\ ff_s_add_total_product = ff_r_add_total_product * ff_p_add_total_product)))))))) -&gt; z = x * y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_add">Copy proof</button>
        <pre id="proof-pow_add"><code>pa prove forall a e f s x y z. s = e + f -&gt; (exists ff_b_add_left ff_c_add_left. ((forall ff_i_add_left_repeat. (exists ff_lt_add_left_repeat_bound. ff_lt_add_left_repeat_bound + S ff_i_add_left_repeat = e) -&gt; (((exists ff_h_add_left_repeat_decoded. ff_h_add_left_repeat_decoded + S (a) = S ((S (ff_i_add_left_repeat)) * ff_c_add_left)) /\ exists ff_q_add_left_repeat_decoded. ff_b_add_left = ff_q_add_left_repeat_decoded * S ((S (ff_i_add_left_repeat)) * ff_c_add_left) + (a)))) /\ (exists ff_u_add_left_product ff_v_add_left_product. ((((exists ff_h_add_left_product_start. ff_h_add_left_product_start + S (1) = S ((S (0)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_start. ff_u_add_left_product = ff_q_add_left_product_start * S ((S (0)) * ff_v_add_left_product) + (1))) /\ ((((exists ff_h_add_left_product_terminal. ff_h_add_left_product_terminal + S (x) = S ((S (e)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_terminal. ff_u_add_left_product = ff_q_add_left_product_terminal * S ((S (e)) * ff_v_add_left_product) + (x))) /\ forall ff_i_add_left_product. (exists ff_lt_add_left_product_bound. ff_lt_add_left_product_bound + S ff_i_add_left_product = e) -&gt; exists ff_p_add_left_product ff_r_add_left_product ff_s_add_left_product. ((((exists ff_h_add_left_product_factor. ff_h_add_left_product_factor + S (ff_p_add_left_product) = S ((S (ff_i_add_left_product)) * ff_c_add_left)) /\ exists ff_q_add_left_product_factor. ff_b_add_left = ff_q_add_left_product_factor * S ((S (ff_i_add_left_product)) * ff_c_add_left) + (ff_p_add_left_product))) /\ ((((exists ff_h_add_left_product_partial. ff_h_add_left_product_partial + S (ff_r_add_left_product) = S ((S (ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_partial. ff_u_add_left_product = ff_q_add_left_product_partial * S ((S (ff_i_add_left_product)) * ff_v_add_left_product) + (ff_r_add_left_product))) /\ ((((exists ff_h_add_left_product_successor. ff_h_add_left_product_successor + S (ff_s_add_left_product) = S ((S (S ff_i_add_left_product)) * ff_v_add_left_product)) /\ exists ff_q_add_left_product_successor. ff_u_add_left_product = ff_q_add_left_product_successor * S ((S (S ff_i_add_left_product)) * ff_v_add_left_product) + (ff_s_add_left_product))) /\ ff_s_add_left_product = ff_r_add_left_product * ff_p_add_left_product)))))))) -&gt; (exists ff_b_add_right ff_c_add_right. ((forall ff_i_add_right_repeat. (exists ff_lt_add_right_repeat_bound. ff_lt_add_right_repeat_bound + S ff_i_add_right_repeat = f) -&gt; (((exists ff_h_add_right_repeat_decoded. ff_h_add_right_repeat_decoded + S (a) = S ((S (ff_i_add_right_repeat)) * ff_c_add_right)) /\ exists ff_q_add_right_repeat_decoded. ff_b_add_right = ff_q_add_right_repeat_decoded * S ((S (ff_i_add_right_repeat)) * ff_c_add_right) + (a)))) /\ (exists ff_u_add_right_product ff_v_add_right_product. ((((exists ff_h_add_right_product_start. ff_h_add_right_product_start + S (1) = S ((S (0)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_start. ff_u_add_right_product = ff_q_add_right_product_start * S ((S (0)) * ff_v_add_right_product) + (1))) /\ ((((exists ff_h_add_right_product_terminal. ff_h_add_right_product_terminal + S (y) = S ((S (f)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_terminal. ff_u_add_right_product = ff_q_add_right_product_terminal * S ((S (f)) * ff_v_add_right_product) + (y))) /\ forall ff_i_add_right_product. (exists ff_lt_add_right_product_bound. ff_lt_add_right_product_bound + S ff_i_add_right_product = f) -&gt; exists ff_p_add_right_product ff_r_add_right_product ff_s_add_right_product. ((((exists ff_h_add_right_product_factor. ff_h_add_right_product_factor + S (ff_p_add_right_product) = S ((S (ff_i_add_right_product)) * ff_c_add_right)) /\ exists ff_q_add_right_product_factor. ff_b_add_right = ff_q_add_right_product_factor * S ((S (ff_i_add_right_product)) * ff_c_add_right) + (ff_p_add_right_product))) /\ ((((exists ff_h_add_right_product_partial. ff_h_add_right_product_partial + S (ff_r_add_right_product) = S ((S (ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_partial. ff_u_add_right_product = ff_q_add_right_product_partial * S ((S (ff_i_add_right_product)) * ff_v_add_right_product) + (ff_r_add_right_product))) /\ ((((exists ff_h_add_right_product_successor. ff_h_add_right_product_successor + S (ff_s_add_right_product) = S ((S (S ff_i_add_right_product)) * ff_v_add_right_product)) /\ exists ff_q_add_right_product_successor. ff_u_add_right_product = ff_q_add_right_product_successor * S ((S (S ff_i_add_right_product)) * ff_v_add_right_product) + (ff_s_add_right_product))) /\ ff_s_add_right_product = ff_r_add_right_product * ff_p_add_right_product)))))))) -&gt; (exists ff_b_add_total ff_c_add_total. ((forall ff_i_add_total_repeat. (exists ff_lt_add_total_repeat_bound. ff_lt_add_total_repeat_bound + S ff_i_add_total_repeat = s) -&gt; (((exists ff_h_add_total_repeat_decoded. ff_h_add_total_repeat_decoded + S (a) = S ((S (ff_i_add_total_repeat)) * ff_c_add_total)) /\ exists ff_q_add_total_repeat_decoded. ff_b_add_total = ff_q_add_total_repeat_decoded * S ((S (ff_i_add_total_repeat)) * ff_c_add_total) + (a)))) /\ (exists ff_u_add_total_product ff_v_add_total_product. ((((exists ff_h_add_total_product_start. ff_h_add_total_product_start + S (1) = S ((S (0)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_start. ff_u_add_total_product = ff_q_add_total_product_start * S ((S (0)) * ff_v_add_total_product) + (1))) /\ ((((exists ff_h_add_total_product_terminal. ff_h_add_total_product_terminal + S (z) = S ((S (s)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_terminal. ff_u_add_total_product = ff_q_add_total_product_terminal * S ((S (s)) * ff_v_add_total_product) + (z))) /\ forall ff_i_add_total_product. (exists ff_lt_add_total_product_bound. ff_lt_add_total_product_bound + S ff_i_add_total_product = s) -&gt; exists ff_p_add_total_product ff_r_add_total_product ff_s_add_total_product. ((((exists ff_h_add_total_product_factor. ff_h_add_total_product_factor + S (ff_p_add_total_product) = S ((S (ff_i_add_total_product)) * ff_c_add_total)) /\ exists ff_q_add_total_product_factor. ff_b_add_total = ff_q_add_total_product_factor * S ((S (ff_i_add_total_product)) * ff_c_add_total) + (ff_p_add_total_product))) /\ ((((exists ff_h_add_total_product_partial. ff_h_add_total_product_partial + S (ff_r_add_total_product) = S ((S (ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_partial. ff_u_add_total_product = ff_q_add_total_product_partial * S ((S (ff_i_add_total_product)) * ff_v_add_total_product) + (ff_r_add_total_product))) /\ ((((exists ff_h_add_total_product_successor. ff_h_add_total_product_successor + S (ff_s_add_total_product) = S ((S (S ff_i_add_total_product)) * ff_v_add_total_product)) /\ exists ff_q_add_total_product_successor. ff_u_add_total_product = ff_q_add_total_product_successor * S ((S (S ff_i_add_total_product)) * ff_v_add_total_product) + (ff_s_add_total_product))) /\ ff_s_add_total_product = ff_r_add_total_product * ff_p_add_total_product)))))))) -&gt; z = x * y
use pow_zero
use pow_functional
use pow_successor_decompose
use mul_one
use mul_assoc
intro a
intro e
induction f
intro s
intro x
intro y
intro z
intro hs
intro hx
intro hy
intro hz
rewrite PA3 at hs
rewrite hs at hz
rewrite hs at hz
rewrite hs at hz
rewrite hs at hz
have hzx : z = x
specialize pow_functional a
specialize pow_functional e
specialize pow_functional z
specialize pow_functional x
apply pow_functional
exact hz
exact hx
have hy1 : y = 1
specialize pow_zero a
specialize pow_zero 0
specialize pow_zero y
apply pow_zero
refl
exact hy
rewrite hzx
rewrite hy1
specialize mul_one x
symm
exact mul_one
intro s
intro x
intro y
intro z
intro hs
intro hx
intro hy
intro hz
have hy_step : exists r. (exists ff_b_add_y_prefix ff_c_add_y_prefix. ((forall ff_i_add_y_prefix_repeat. (exists ff_lt_add_y_prefix_repeat_bound. ff_lt_add_y_prefix_repeat_bound + S ff_i_add_y_prefix_repeat = f) -&gt; (((exists ff_h_add_y_prefix_repeat_decoded. ff_h_add_y_prefix_repeat_decoded + S (a) = S ((S (ff_i_add_y_prefix_repeat)) * ff_c_add_y_prefix)) /\ exists ff_q_add_y_prefix_repeat_decoded. ff_b_add_y_prefix = ff_q_add_y_prefix_repeat_decoded * S ((S (ff_i_add_y_prefix_repeat)) * ff_c_add_y_prefix) + (a)))) /\ (exists ff_u_add_y_prefix_product ff_v_add_y_prefix_product. ((((exists ff_h_add_y_prefix_product_start. ff_h_add_y_prefix_product_start + S (1) = S ((S (0)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_start. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_start * S ((S (0)) * ff_v_add_y_prefix_product) + (1))) /\ ((((exists ff_h_add_y_prefix_product_terminal. ff_h_add_y_prefix_product_terminal + S (r) = S ((S (f)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_terminal. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_terminal * S ((S (f)) * ff_v_add_y_prefix_product) + (r))) /\ forall ff_i_add_y_prefix_product. (exists ff_lt_add_y_prefix_product_bound. ff_lt_add_y_prefix_product_bound + S ff_i_add_y_prefix_product = f) -&gt; exists ff_p_add_y_prefix_product ff_r_add_y_prefix_product ff_s_add_y_prefix_product. ((((exists ff_h_add_y_prefix_product_factor. ff_h_add_y_prefix_product_factor + S (ff_p_add_y_prefix_product) = S ((S (ff_i_add_y_prefix_product)) * ff_c_add_y_prefix)) /\ exists ff_q_add_y_prefix_product_factor. ff_b_add_y_prefix = ff_q_add_y_prefix_product_factor * S ((S (ff_i_add_y_prefix_product)) * ff_c_add_y_prefix) + (ff_p_add_y_prefix_product))) /\ ((((exists ff_h_add_y_prefix_product_partial. ff_h_add_y_prefix_product_partial + S (ff_r_add_y_prefix_product) = S ((S (ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_partial. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_partial * S ((S (ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product) + (ff_r_add_y_prefix_product))) /\ ((((exists ff_h_add_y_prefix_product_successor. ff_h_add_y_prefix_product_successor + S (ff_s_add_y_prefix_product) = S ((S (S ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product)) /\ exists ff_q_add_y_prefix_product_successor. ff_u_add_y_prefix_product = ff_q_add_y_prefix_product_successor * S ((S (S ff_i_add_y_prefix_product)) * ff_v_add_y_prefix_product) + (ff_s_add_y_prefix_product))) /\ ff_s_add_y_prefix_product = ff_r_add_y_prefix_product * ff_p_add_y_prefix_product)))))))) /\ y = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose f
specialize pow_successor_decompose (S f)
specialize pow_successor_decompose y
apply pow_successor_decompose
refl
exact hy
cases hy_step
cases hy_step_witness
have hst : s = S (e + f)
trans e + S f
exact hs
apply PA4
have hz_step : exists r. (exists pa_b_add_z_prefix pa_c_add_z_prefix. ((forall pa_i_add_z_prefix_repeat. (exists pa_lt_add_z_prefix_repeat_bound. pa_lt_add_z_prefix_repeat_bound + S pa_i_add_z_prefix_repeat = e + f) -&gt; (((exists pa_h_add_z_prefix_repeat_decoded. pa_h_add_z_prefix_repeat_decoded + S (a) = S ((S (pa_i_add_z_prefix_repeat)) * pa_c_add_z_prefix)) /\ exists pa_q_add_z_prefix_repeat_decoded. pa_b_add_z_prefix = pa_q_add_z_prefix_repeat_decoded * S ((S (pa_i_add_z_prefix_repeat)) * pa_c_add_z_prefix) + (a)))) /\ (exists pa_u_add_z_prefix_product pa_v_add_z_prefix_product. ((((exists pa_h_add_z_prefix_product_start. pa_h_add_z_prefix_product_start + S (1) = S ((S (0)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_start. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_start * S ((S (0)) * pa_v_add_z_prefix_product) + (1))) /\ ((((exists pa_h_add_z_prefix_product_terminal. pa_h_add_z_prefix_product_terminal + S (r) = S ((S (e + f)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_terminal. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_terminal * S ((S (e + f)) * pa_v_add_z_prefix_product) + (r))) /\ forall pa_i_add_z_prefix_product. (exists pa_lt_add_z_prefix_product_bound. pa_lt_add_z_prefix_product_bound + S pa_i_add_z_prefix_product = e + f) -&gt; exists pa_p_add_z_prefix_product pa_r_add_z_prefix_product pa_s_add_z_prefix_product. ((((exists pa_h_add_z_prefix_product_factor. pa_h_add_z_prefix_product_factor + S (pa_p_add_z_prefix_product) = S ((S (pa_i_add_z_prefix_product)) * pa_c_add_z_prefix)) /\ exists pa_q_add_z_prefix_product_factor. pa_b_add_z_prefix = pa_q_add_z_prefix_product_factor * S ((S (pa_i_add_z_prefix_product)) * pa_c_add_z_prefix) + (pa_p_add_z_prefix_product))) /\ ((((exists pa_h_add_z_prefix_product_partial. pa_h_add_z_prefix_product_partial + S (pa_r_add_z_prefix_product) = S ((S (pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_partial. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_partial * S ((S (pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product) + (pa_r_add_z_prefix_product))) /\ ((((exists pa_h_add_z_prefix_product_successor. pa_h_add_z_prefix_product_successor + S (pa_s_add_z_prefix_product) = S ((S (S pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product)) /\ exists pa_q_add_z_prefix_product_successor. pa_u_add_z_prefix_product = pa_q_add_z_prefix_product_successor * S ((S (S pa_i_add_z_prefix_product)) * pa_v_add_z_prefix_product) + (pa_s_add_z_prefix_product))) /\ pa_s_add_z_prefix_product = pa_r_add_z_prefix_product * pa_p_add_z_prefix_product)))))))) /\ z = r * a
specialize pow_successor_decompose a
specialize pow_successor_decompose (e + f)
specialize pow_successor_decompose s
specialize pow_successor_decompose z
apply pow_successor_decompose
exact hst
exact hz
cases hz_step
cases hz_step_witness
have hprefix : x2 = x * x1
specialize IH (e + f)
specialize IH x
specialize IH x1
specialize IH x2
apply IH
refl
exact hx
exact hy_step_witness_left
exact hz_step_witness_left
trans x2 * a
exact hz_step_witness_right
trans (x * x1) * a
congr
exact hprefix
refl
trans x * (x1 * a)
apply mul_assoc
congr
refl
symm
exact hy_step_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>6,744</dd></div>
        <div><dt>Distinct objects</dt><dd>1,530</dd></div>
        <div><dt>Reused references</dt><dd>59</dd></div>
        <div><dt>Depth</dt><dd>66</dd></div>
        <div><dt>Cuts</dt><dd>183</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e7260f892c412b64d44eb7275736be30338be6313efc7127bd12e18effb2391e">e7260f892c41…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_add">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_add</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_algebra_theorems.py#L180">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_add.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_mul_exp"
  data-name="pow_mul_exp" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_zero,pow_successor_decompose,pow_exists,pow_add"
  data-search="pow_mul_exp pow mul exp iterated relational powers multiply their exponents. forall a e f p x y z. p = e * f -&gt; (exists ff_b_mul_base ff_c_mul_base. ((forall ff_i_mul_base_repeat. (exists ff_lt_mul_base_repeat_bound. ff_lt_mul_base_repeat_bound + s ff_i_mul_base_repeat = e) -&gt; (((exists ff_h_mul_base_repeat_decoded. ff_h_mul_base_repeat_decoded + s (a) = s ((s (ff_i_mul_base_repeat)) * ff_c_mul_base)) /\ exists ff_q_mul_base_repeat_decoded. ff_b_mul_base = ff_q_mul_base_repeat_decoded * s ((s (ff_i_mul_base_repeat)) * ff_c_mul_base) + (a)))) /\ (exists ff_u_mul_base_product ff_v_mul_base_product. ((((exists ff_h_mul_base_product_start. ff_h_mul_base_product_start + s (1) = s ((s (0)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_start. ff_u_mul_base_product = ff_q_mul_base_product_start * s ((s (0)) * ff_v_mul_base_product) + (1))) /\ ((((exists ff_h_mul_base_product_terminal. ff_h_mul_base_product_terminal + s (x) = s ((s (e)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_terminal. ff_u_mul_base_product = ff_q_mul_base_product_terminal * s ((s (e)) * ff_v_mul_base_product) + (x))) /\ forall ff_i_mul_base_product. (exists ff_lt_mul_base_product_bound. ff_lt_mul_base_product_bound + s ff_i_mul_base_product = e) -&gt; exists ff_p_mul_base_product ff_r_mul_base_product ff_s_mul_base_product. ((((exists ff_h_mul_base_product_factor. ff_h_mul_base_product_factor + s (ff_p_mul_base_product) = s ((s (ff_i_mul_base_product)) * ff_c_mul_base)) /\ exists ff_q_mul_base_product_factor. ff_b_mul_base = ff_q_mul_base_product_factor * s ((s (ff_i_mul_base_product)) * ff_c_mul_base) + (ff_p_mul_base_product))) /\ ((((exists ff_h_mul_base_product_partial. ff_h_mul_base_product_partial + s (ff_r_mul_base_product) = s ((s (ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_partial. ff_u_mul_base_product = ff_q_mul_base_product_partial * s ((s (ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_r_mul_base_product))) /\ ((((exists ff_h_mul_base_product_successor. ff_h_mul_base_product_successor + s (ff_s_mul_base_product) = s ((s (s ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_successor. ff_u_mul_base_product = ff_q_mul_base_product_successor * s ((s (s ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_s_mul_base_product))) /\ ff_s_mul_base_product = ff_r_mul_base_product * ff_p_mul_base_product)))))))) -&gt; (exists ff_b_mul_outer ff_c_mul_outer. ((forall ff_i_mul_outer_repeat. (exists ff_lt_mul_outer_repeat_bound. ff_lt_mul_outer_repeat_bound + s ff_i_mul_outer_repeat = f) -&gt; (((exists ff_h_mul_outer_repeat_decoded. ff_h_mul_outer_repeat_decoded + s (x) = s ((s (ff_i_mul_outer_repeat)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_repeat_decoded. ff_b_mul_outer = ff_q_mul_outer_repeat_decoded * s ((s (ff_i_mul_outer_repeat)) * ff_c_mul_outer) + (x)))) /\ (exists ff_u_mul_outer_product ff_v_mul_outer_product. ((((exists ff_h_mul_outer_product_start. ff_h_mul_outer_product_start + s (1) = s ((s (0)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_start. ff_u_mul_outer_product = ff_q_mul_outer_product_start * s ((s (0)) * ff_v_mul_outer_product) + (1))) /\ ((((exists ff_h_mul_outer_product_terminal. ff_h_mul_outer_product_terminal + s (y) = s ((s (f)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_terminal. ff_u_mul_outer_product = ff_q_mul_outer_product_terminal * s ((s (f)) * ff_v_mul_outer_product) + (y))) /\ forall ff_i_mul_outer_product. (exists ff_lt_mul_outer_product_bound. ff_lt_mul_outer_product_bound + s ff_i_mul_outer_product = f) -&gt; exists ff_p_mul_outer_product ff_r_mul_outer_product ff_s_mul_outer_product. ((((exists ff_h_mul_outer_product_factor. ff_h_mul_outer_product_factor + s (ff_p_mul_outer_product) = s ((s (ff_i_mul_outer_product)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_product_factor. ff_b_mul_outer = ff_q_mul_outer_product_factor * s ((s (ff_i_mul_outer_product)) * ff_c_mul_outer) + (ff_p_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_partial. ff_h_mul_outer_product_partial + s (ff_r_mul_outer_product) = s ((s (ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_partial. ff_u_mul_outer_product = ff_q_mul_outer_product_partial * s ((s (ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_r_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_successor. ff_h_mul_outer_product_successor + s (ff_s_mul_outer_product) = s ((s (s ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_successor. ff_u_mul_outer_product = ff_q_mul_outer_product_successor * s ((s (s ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_s_mul_outer_product))) /\ ff_s_mul_outer_product = ff_r_mul_outer_product * ff_p_mul_outer_product)))))))) -&gt; (exists ff_b_mul_total ff_c_mul_total. ((forall ff_i_mul_total_repeat. (exists ff_lt_mul_total_repeat_bound. ff_lt_mul_total_repeat_bound + s ff_i_mul_total_repeat = p) -&gt; (((exists ff_h_mul_total_repeat_decoded. ff_h_mul_total_repeat_decoded + s (a) = s ((s (ff_i_mul_total_repeat)) * ff_c_mul_total)) /\ exists ff_q_mul_total_repeat_decoded. ff_b_mul_total = ff_q_mul_total_repeat_decoded * s ((s (ff_i_mul_total_repeat)) * ff_c_mul_total) + (a)))) /\ (exists ff_u_mul_total_product ff_v_mul_total_product. ((((exists ff_h_mul_total_product_start. ff_h_mul_total_product_start + s (1) = s ((s (0)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_start. ff_u_mul_total_product = ff_q_mul_total_product_start * s ((s (0)) * ff_v_mul_total_product) + (1))) /\ ((((exists ff_h_mul_total_product_terminal. ff_h_mul_total_product_terminal + s (z) = s ((s (p)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_terminal. ff_u_mul_total_product = ff_q_mul_total_product_terminal * s ((s (p)) * ff_v_mul_total_product) + (z))) /\ forall ff_i_mul_total_product. (exists ff_lt_mul_total_product_bound. ff_lt_mul_total_product_bound + s ff_i_mul_total_product = p) -&gt; exists ff_p_mul_total_product ff_r_mul_total_product ff_s_mul_total_product. ((((exists ff_h_mul_total_product_factor. ff_h_mul_total_product_factor + s (ff_p_mul_total_product) = s ((s (ff_i_mul_total_product)) * ff_c_mul_total)) /\ exists ff_q_mul_total_product_factor. ff_b_mul_total = ff_q_mul_total_product_factor * s ((s (ff_i_mul_total_product)) * ff_c_mul_total) + (ff_p_mul_total_product))) /\ ((((exists ff_h_mul_total_product_partial. ff_h_mul_total_product_partial + s (ff_r_mul_total_product) = s ((s (ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_partial. ff_u_mul_total_product = ff_q_mul_total_product_partial * s ((s (ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_r_mul_total_product))) /\ ((((exists ff_h_mul_total_product_successor. ff_h_mul_total_product_successor + s (ff_s_mul_total_product) = s ((s (s ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_successor. ff_u_mul_total_product = ff_q_mul_total_product_successor * s ((s (s ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_s_mul_total_product))) /\ ff_s_mul_total_product = ff_r_mul_total_product * ff_p_mul_total_product)))))))) -&gt; y = z quadratic_residues pow_zero pow_successor_decompose pow_exists pow_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_mul_exp</code><span>Pow mul exp</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Iterated relational powers multiply their exponents.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_zero" href="#theorem-pow_zero"><code>pow_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_exists" href="#theorem-pow_exists"><code>pow_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_add" href="#theorem-pow_add"><code>pow_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_mul_exp">Copy statement</button>
        <pre id="statement-pow_mul_exp"><code>forall a e f p x y z. p = e * f -&gt; (exists ff_b_mul_base ff_c_mul_base. ((forall ff_i_mul_base_repeat. (exists ff_lt_mul_base_repeat_bound. ff_lt_mul_base_repeat_bound + S ff_i_mul_base_repeat = e) -&gt; (((exists ff_h_mul_base_repeat_decoded. ff_h_mul_base_repeat_decoded + S (a) = S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base)) /\ exists ff_q_mul_base_repeat_decoded. ff_b_mul_base = ff_q_mul_base_repeat_decoded * S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base) + (a)))) /\ (exists ff_u_mul_base_product ff_v_mul_base_product. ((((exists ff_h_mul_base_product_start. ff_h_mul_base_product_start + S (1) = S ((S (0)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_start. ff_u_mul_base_product = ff_q_mul_base_product_start * S ((S (0)) * ff_v_mul_base_product) + (1))) /\ ((((exists ff_h_mul_base_product_terminal. ff_h_mul_base_product_terminal + S (x) = S ((S (e)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_terminal. ff_u_mul_base_product = ff_q_mul_base_product_terminal * S ((S (e)) * ff_v_mul_base_product) + (x))) /\ forall ff_i_mul_base_product. (exists ff_lt_mul_base_product_bound. ff_lt_mul_base_product_bound + S ff_i_mul_base_product = e) -&gt; exists ff_p_mul_base_product ff_r_mul_base_product ff_s_mul_base_product. ((((exists ff_h_mul_base_product_factor. ff_h_mul_base_product_factor + S (ff_p_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_c_mul_base)) /\ exists ff_q_mul_base_product_factor. ff_b_mul_base = ff_q_mul_base_product_factor * S ((S (ff_i_mul_base_product)) * ff_c_mul_base) + (ff_p_mul_base_product))) /\ ((((exists ff_h_mul_base_product_partial. ff_h_mul_base_product_partial + S (ff_r_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_partial. ff_u_mul_base_product = ff_q_mul_base_product_partial * S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_r_mul_base_product))) /\ ((((exists ff_h_mul_base_product_successor. ff_h_mul_base_product_successor + S (ff_s_mul_base_product) = S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_successor. ff_u_mul_base_product = ff_q_mul_base_product_successor * S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_s_mul_base_product))) /\ ff_s_mul_base_product = ff_r_mul_base_product * ff_p_mul_base_product)))))))) -&gt; (exists ff_b_mul_outer ff_c_mul_outer. ((forall ff_i_mul_outer_repeat. (exists ff_lt_mul_outer_repeat_bound. ff_lt_mul_outer_repeat_bound + S ff_i_mul_outer_repeat = f) -&gt; (((exists ff_h_mul_outer_repeat_decoded. ff_h_mul_outer_repeat_decoded + S (x) = S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_repeat_decoded. ff_b_mul_outer = ff_q_mul_outer_repeat_decoded * S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer) + (x)))) /\ (exists ff_u_mul_outer_product ff_v_mul_outer_product. ((((exists ff_h_mul_outer_product_start. ff_h_mul_outer_product_start + S (1) = S ((S (0)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_start. ff_u_mul_outer_product = ff_q_mul_outer_product_start * S ((S (0)) * ff_v_mul_outer_product) + (1))) /\ ((((exists ff_h_mul_outer_product_terminal. ff_h_mul_outer_product_terminal + S (y) = S ((S (f)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_terminal. ff_u_mul_outer_product = ff_q_mul_outer_product_terminal * S ((S (f)) * ff_v_mul_outer_product) + (y))) /\ forall ff_i_mul_outer_product. (exists ff_lt_mul_outer_product_bound. ff_lt_mul_outer_product_bound + S ff_i_mul_outer_product = f) -&gt; exists ff_p_mul_outer_product ff_r_mul_outer_product ff_s_mul_outer_product. ((((exists ff_h_mul_outer_product_factor. ff_h_mul_outer_product_factor + S (ff_p_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_product_factor. ff_b_mul_outer = ff_q_mul_outer_product_factor * S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer) + (ff_p_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_partial. ff_h_mul_outer_product_partial + S (ff_r_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_partial. ff_u_mul_outer_product = ff_q_mul_outer_product_partial * S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_r_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_successor. ff_h_mul_outer_product_successor + S (ff_s_mul_outer_product) = S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_successor. ff_u_mul_outer_product = ff_q_mul_outer_product_successor * S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_s_mul_outer_product))) /\ ff_s_mul_outer_product = ff_r_mul_outer_product * ff_p_mul_outer_product)))))))) -&gt; (exists ff_b_mul_total ff_c_mul_total. ((forall ff_i_mul_total_repeat. (exists ff_lt_mul_total_repeat_bound. ff_lt_mul_total_repeat_bound + S ff_i_mul_total_repeat = p) -&gt; (((exists ff_h_mul_total_repeat_decoded. ff_h_mul_total_repeat_decoded + S (a) = S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total)) /\ exists ff_q_mul_total_repeat_decoded. ff_b_mul_total = ff_q_mul_total_repeat_decoded * S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total) + (a)))) /\ (exists ff_u_mul_total_product ff_v_mul_total_product. ((((exists ff_h_mul_total_product_start. ff_h_mul_total_product_start + S (1) = S ((S (0)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_start. ff_u_mul_total_product = ff_q_mul_total_product_start * S ((S (0)) * ff_v_mul_total_product) + (1))) /\ ((((exists ff_h_mul_total_product_terminal. ff_h_mul_total_product_terminal + S (z) = S ((S (p)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_terminal. ff_u_mul_total_product = ff_q_mul_total_product_terminal * S ((S (p)) * ff_v_mul_total_product) + (z))) /\ forall ff_i_mul_total_product. (exists ff_lt_mul_total_product_bound. ff_lt_mul_total_product_bound + S ff_i_mul_total_product = p) -&gt; exists ff_p_mul_total_product ff_r_mul_total_product ff_s_mul_total_product. ((((exists ff_h_mul_total_product_factor. ff_h_mul_total_product_factor + S (ff_p_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_c_mul_total)) /\ exists ff_q_mul_total_product_factor. ff_b_mul_total = ff_q_mul_total_product_factor * S ((S (ff_i_mul_total_product)) * ff_c_mul_total) + (ff_p_mul_total_product))) /\ ((((exists ff_h_mul_total_product_partial. ff_h_mul_total_product_partial + S (ff_r_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_partial. ff_u_mul_total_product = ff_q_mul_total_product_partial * S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_r_mul_total_product))) /\ ((((exists ff_h_mul_total_product_successor. ff_h_mul_total_product_successor + S (ff_s_mul_total_product) = S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_successor. ff_u_mul_total_product = ff_q_mul_total_product_successor * S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_s_mul_total_product))) /\ ff_s_mul_total_product = ff_r_mul_total_product * ff_p_mul_total_product)))))))) -&gt; y = z</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_mul_exp">Copy proof</button>
        <pre id="proof-pow_mul_exp"><code>pa prove forall a e f p x y z. p = e * f -&gt; (exists ff_b_mul_base ff_c_mul_base. ((forall ff_i_mul_base_repeat. (exists ff_lt_mul_base_repeat_bound. ff_lt_mul_base_repeat_bound + S ff_i_mul_base_repeat = e) -&gt; (((exists ff_h_mul_base_repeat_decoded. ff_h_mul_base_repeat_decoded + S (a) = S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base)) /\ exists ff_q_mul_base_repeat_decoded. ff_b_mul_base = ff_q_mul_base_repeat_decoded * S ((S (ff_i_mul_base_repeat)) * ff_c_mul_base) + (a)))) /\ (exists ff_u_mul_base_product ff_v_mul_base_product. ((((exists ff_h_mul_base_product_start. ff_h_mul_base_product_start + S (1) = S ((S (0)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_start. ff_u_mul_base_product = ff_q_mul_base_product_start * S ((S (0)) * ff_v_mul_base_product) + (1))) /\ ((((exists ff_h_mul_base_product_terminal. ff_h_mul_base_product_terminal + S (x) = S ((S (e)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_terminal. ff_u_mul_base_product = ff_q_mul_base_product_terminal * S ((S (e)) * ff_v_mul_base_product) + (x))) /\ forall ff_i_mul_base_product. (exists ff_lt_mul_base_product_bound. ff_lt_mul_base_product_bound + S ff_i_mul_base_product = e) -&gt; exists ff_p_mul_base_product ff_r_mul_base_product ff_s_mul_base_product. ((((exists ff_h_mul_base_product_factor. ff_h_mul_base_product_factor + S (ff_p_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_c_mul_base)) /\ exists ff_q_mul_base_product_factor. ff_b_mul_base = ff_q_mul_base_product_factor * S ((S (ff_i_mul_base_product)) * ff_c_mul_base) + (ff_p_mul_base_product))) /\ ((((exists ff_h_mul_base_product_partial. ff_h_mul_base_product_partial + S (ff_r_mul_base_product) = S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_partial. ff_u_mul_base_product = ff_q_mul_base_product_partial * S ((S (ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_r_mul_base_product))) /\ ((((exists ff_h_mul_base_product_successor. ff_h_mul_base_product_successor + S (ff_s_mul_base_product) = S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product)) /\ exists ff_q_mul_base_product_successor. ff_u_mul_base_product = ff_q_mul_base_product_successor * S ((S (S ff_i_mul_base_product)) * ff_v_mul_base_product) + (ff_s_mul_base_product))) /\ ff_s_mul_base_product = ff_r_mul_base_product * ff_p_mul_base_product)))))))) -&gt; (exists ff_b_mul_outer ff_c_mul_outer. ((forall ff_i_mul_outer_repeat. (exists ff_lt_mul_outer_repeat_bound. ff_lt_mul_outer_repeat_bound + S ff_i_mul_outer_repeat = f) -&gt; (((exists ff_h_mul_outer_repeat_decoded. ff_h_mul_outer_repeat_decoded + S (x) = S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_repeat_decoded. ff_b_mul_outer = ff_q_mul_outer_repeat_decoded * S ((S (ff_i_mul_outer_repeat)) * ff_c_mul_outer) + (x)))) /\ (exists ff_u_mul_outer_product ff_v_mul_outer_product. ((((exists ff_h_mul_outer_product_start. ff_h_mul_outer_product_start + S (1) = S ((S (0)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_start. ff_u_mul_outer_product = ff_q_mul_outer_product_start * S ((S (0)) * ff_v_mul_outer_product) + (1))) /\ ((((exists ff_h_mul_outer_product_terminal. ff_h_mul_outer_product_terminal + S (y) = S ((S (f)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_terminal. ff_u_mul_outer_product = ff_q_mul_outer_product_terminal * S ((S (f)) * ff_v_mul_outer_product) + (y))) /\ forall ff_i_mul_outer_product. (exists ff_lt_mul_outer_product_bound. ff_lt_mul_outer_product_bound + S ff_i_mul_outer_product = f) -&gt; exists ff_p_mul_outer_product ff_r_mul_outer_product ff_s_mul_outer_product. ((((exists ff_h_mul_outer_product_factor. ff_h_mul_outer_product_factor + S (ff_p_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer)) /\ exists ff_q_mul_outer_product_factor. ff_b_mul_outer = ff_q_mul_outer_product_factor * S ((S (ff_i_mul_outer_product)) * ff_c_mul_outer) + (ff_p_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_partial. ff_h_mul_outer_product_partial + S (ff_r_mul_outer_product) = S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_partial. ff_u_mul_outer_product = ff_q_mul_outer_product_partial * S ((S (ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_r_mul_outer_product))) /\ ((((exists ff_h_mul_outer_product_successor. ff_h_mul_outer_product_successor + S (ff_s_mul_outer_product) = S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product)) /\ exists ff_q_mul_outer_product_successor. ff_u_mul_outer_product = ff_q_mul_outer_product_successor * S ((S (S ff_i_mul_outer_product)) * ff_v_mul_outer_product) + (ff_s_mul_outer_product))) /\ ff_s_mul_outer_product = ff_r_mul_outer_product * ff_p_mul_outer_product)))))))) -&gt; (exists ff_b_mul_total ff_c_mul_total. ((forall ff_i_mul_total_repeat. (exists ff_lt_mul_total_repeat_bound. ff_lt_mul_total_repeat_bound + S ff_i_mul_total_repeat = p) -&gt; (((exists ff_h_mul_total_repeat_decoded. ff_h_mul_total_repeat_decoded + S (a) = S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total)) /\ exists ff_q_mul_total_repeat_decoded. ff_b_mul_total = ff_q_mul_total_repeat_decoded * S ((S (ff_i_mul_total_repeat)) * ff_c_mul_total) + (a)))) /\ (exists ff_u_mul_total_product ff_v_mul_total_product. ((((exists ff_h_mul_total_product_start. ff_h_mul_total_product_start + S (1) = S ((S (0)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_start. ff_u_mul_total_product = ff_q_mul_total_product_start * S ((S (0)) * ff_v_mul_total_product) + (1))) /\ ((((exists ff_h_mul_total_product_terminal. ff_h_mul_total_product_terminal + S (z) = S ((S (p)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_terminal. ff_u_mul_total_product = ff_q_mul_total_product_terminal * S ((S (p)) * ff_v_mul_total_product) + (z))) /\ forall ff_i_mul_total_product. (exists ff_lt_mul_total_product_bound. ff_lt_mul_total_product_bound + S ff_i_mul_total_product = p) -&gt; exists ff_p_mul_total_product ff_r_mul_total_product ff_s_mul_total_product. ((((exists ff_h_mul_total_product_factor. ff_h_mul_total_product_factor + S (ff_p_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_c_mul_total)) /\ exists ff_q_mul_total_product_factor. ff_b_mul_total = ff_q_mul_total_product_factor * S ((S (ff_i_mul_total_product)) * ff_c_mul_total) + (ff_p_mul_total_product))) /\ ((((exists ff_h_mul_total_product_partial. ff_h_mul_total_product_partial + S (ff_r_mul_total_product) = S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_partial. ff_u_mul_total_product = ff_q_mul_total_product_partial * S ((S (ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_r_mul_total_product))) /\ ((((exists ff_h_mul_total_product_successor. ff_h_mul_total_product_successor + S (ff_s_mul_total_product) = S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product)) /\ exists ff_q_mul_total_product_successor. ff_u_mul_total_product = ff_q_mul_total_product_successor * S ((S (S ff_i_mul_total_product)) * ff_v_mul_total_product) + (ff_s_mul_total_product))) /\ ff_s_mul_total_product = ff_r_mul_total_product * ff_p_mul_total_product)))))))) -&gt; y = z
use pow_zero
use pow_successor_decompose
use pow_exists
use pow_add
intro a
intro e
induction f
intro p
intro x
intro y
intro z
intro hp
intro hx
intro hy
intro hz
rewrite PA5 at hp
rewrite hp at hz
rewrite hp at hz
rewrite hp at hz
rewrite hp at hz
have hy1 : y = 1
specialize pow_zero x
specialize pow_zero 0
specialize pow_zero y
apply pow_zero
refl
exact hy
have hz1 : z = 1
specialize pow_zero a
specialize pow_zero 0
specialize pow_zero z
apply pow_zero
refl
exact hz
trans 1
exact hy1
symm
exact hz1
intro p
intro x
intro y
intro z
intro hp
intro hx
intro hy
intro hz
have hy_step : exists r. (exists ff_b_mul_y_prefix ff_c_mul_y_prefix. ((forall ff_i_mul_y_prefix_repeat. (exists ff_lt_mul_y_prefix_repeat_bound. ff_lt_mul_y_prefix_repeat_bound + S ff_i_mul_y_prefix_repeat = f) -&gt; (((exists ff_h_mul_y_prefix_repeat_decoded. ff_h_mul_y_prefix_repeat_decoded + S (x) = S ((S (ff_i_mul_y_prefix_repeat)) * ff_c_mul_y_prefix)) /\ exists ff_q_mul_y_prefix_repeat_decoded. ff_b_mul_y_prefix = ff_q_mul_y_prefix_repeat_decoded * S ((S (ff_i_mul_y_prefix_repeat)) * ff_c_mul_y_prefix) + (x)))) /\ (exists ff_u_mul_y_prefix_product ff_v_mul_y_prefix_product. ((((exists ff_h_mul_y_prefix_product_start. ff_h_mul_y_prefix_product_start + S (1) = S ((S (0)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_start. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_start * S ((S (0)) * ff_v_mul_y_prefix_product) + (1))) /\ ((((exists ff_h_mul_y_prefix_product_terminal. ff_h_mul_y_prefix_product_terminal + S (r) = S ((S (f)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_terminal. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_terminal * S ((S (f)) * ff_v_mul_y_prefix_product) + (r))) /\ forall ff_i_mul_y_prefix_product. (exists ff_lt_mul_y_prefix_product_bound. ff_lt_mul_y_prefix_product_bound + S ff_i_mul_y_prefix_product = f) -&gt; exists ff_p_mul_y_prefix_product ff_r_mul_y_prefix_product ff_s_mul_y_prefix_product. ((((exists ff_h_mul_y_prefix_product_factor. ff_h_mul_y_prefix_product_factor + S (ff_p_mul_y_prefix_product) = S ((S (ff_i_mul_y_prefix_product)) * ff_c_mul_y_prefix)) /\ exists ff_q_mul_y_prefix_product_factor. ff_b_mul_y_prefix = ff_q_mul_y_prefix_product_factor * S ((S (ff_i_mul_y_prefix_product)) * ff_c_mul_y_prefix) + (ff_p_mul_y_prefix_product))) /\ ((((exists ff_h_mul_y_prefix_product_partial. ff_h_mul_y_prefix_product_partial + S (ff_r_mul_y_prefix_product) = S ((S (ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_partial. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_partial * S ((S (ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product) + (ff_r_mul_y_prefix_product))) /\ ((((exists ff_h_mul_y_prefix_product_successor. ff_h_mul_y_prefix_product_successor + S (ff_s_mul_y_prefix_product) = S ((S (S ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product)) /\ exists ff_q_mul_y_prefix_product_successor. ff_u_mul_y_prefix_product = ff_q_mul_y_prefix_product_successor * S ((S (S ff_i_mul_y_prefix_product)) * ff_v_mul_y_prefix_product) + (ff_s_mul_y_prefix_product))) /\ ff_s_mul_y_prefix_product = ff_r_mul_y_prefix_product * ff_p_mul_y_prefix_product)))))))) /\ y = r * x
specialize pow_successor_decompose x
specialize pow_successor_decompose f
specialize pow_successor_decompose (S f)
specialize pow_successor_decompose y
apply pow_successor_decompose
refl
exact hy
cases hy_step
cases hy_step_witness
have hqpow : exists r. (exists pa_b_mul_total_prefix pa_c_mul_total_prefix. ((forall pa_i_mul_total_prefix_repeat. (exists pa_lt_mul_total_prefix_repeat_bound. pa_lt_mul_total_prefix_repeat_bound + S pa_i_mul_total_prefix_repeat = e * f) -&gt; (((exists pa_h_mul_total_prefix_repeat_decoded. pa_h_mul_total_prefix_repeat_decoded + S (a) = S ((S (pa_i_mul_total_prefix_repeat)) * pa_c_mul_total_prefix)) /\ exists pa_q_mul_total_prefix_repeat_decoded. pa_b_mul_total_prefix = pa_q_mul_total_prefix_repeat_decoded * S ((S (pa_i_mul_total_prefix_repeat)) * pa_c_mul_total_prefix) + (a)))) /\ (exists pa_u_mul_total_prefix_product pa_v_mul_total_prefix_product. ((((exists pa_h_mul_total_prefix_product_start. pa_h_mul_total_prefix_product_start + S (1) = S ((S (0)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_start. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_start * S ((S (0)) * pa_v_mul_total_prefix_product) + (1))) /\ ((((exists pa_h_mul_total_prefix_product_terminal. pa_h_mul_total_prefix_product_terminal + S (r) = S ((S (e * f)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_terminal. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_terminal * S ((S (e * f)) * pa_v_mul_total_prefix_product) + (r))) /\ forall pa_i_mul_total_prefix_product. (exists pa_lt_mul_total_prefix_product_bound. pa_lt_mul_total_prefix_product_bound + S pa_i_mul_total_prefix_product = e * f) -&gt; exists pa_p_mul_total_prefix_product pa_r_mul_total_prefix_product pa_s_mul_total_prefix_product. ((((exists pa_h_mul_total_prefix_product_factor. pa_h_mul_total_prefix_product_factor + S (pa_p_mul_total_prefix_product) = S ((S (pa_i_mul_total_prefix_product)) * pa_c_mul_total_prefix)) /\ exists pa_q_mul_total_prefix_product_factor. pa_b_mul_total_prefix = pa_q_mul_total_prefix_product_factor * S ((S (pa_i_mul_total_prefix_product)) * pa_c_mul_total_prefix) + (pa_p_mul_total_prefix_product))) /\ ((((exists pa_h_mul_total_prefix_product_partial. pa_h_mul_total_prefix_product_partial + S (pa_r_mul_total_prefix_product) = S ((S (pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_partial. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_partial * S ((S (pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product) + (pa_r_mul_total_prefix_product))) /\ ((((exists pa_h_mul_total_prefix_product_successor. pa_h_mul_total_prefix_product_successor + S (pa_s_mul_total_prefix_product) = S ((S (S pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product)) /\ exists pa_q_mul_total_prefix_product_successor. pa_u_mul_total_prefix_product = pa_q_mul_total_prefix_product_successor * S ((S (S pa_i_mul_total_prefix_product)) * pa_v_mul_total_prefix_product) + (pa_s_mul_total_prefix_product))) /\ pa_s_mul_total_prefix_product = pa_r_mul_total_prefix_product * pa_p_mul_total_prefix_product))))))))
specialize pow_exists a
specialize pow_exists (e * f)
exact pow_exists
cases hqpow
have hprefix : x1 = x2
specialize IH (e * f)
specialize IH x
specialize IH x1
specialize IH x2
apply IH
refl
exact hx
exact hy_step_witness_left
exact hqpow_witness
have hpsum : p = (e * f) + e
trans e * S f
exact hp
apply PA6
have htotal : z = x2 * x
specialize pow_add a
specialize pow_add (e * f)
specialize pow_add e
specialize pow_add p
specialize pow_add x2
specialize pow_add x
specialize pow_add z
apply pow_add
exact hpsum
exact hqpow_witness
exact hx
exact hz
trans x1 * x
exact hy_step_witness_right
trans x2 * x
congr
exact hprefix
refl
symm
exact htotal
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>70,463</dd></div>
        <div><dt>Distinct objects</dt><dd>5,786</dd></div>
        <div><dt>Reused references</dt><dd>262</dd></div>
        <div><dt>Depth</dt><dd>91</dd></div>
        <div><dt>Cuts</dt><dd>2,086</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="95115103d3c2362e3b6ab669782ce4c613ce5226c791a55eec8963a3fb2a5b1a">95115103d3c2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_mul_exp">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_mul_exp</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/power_algebra_theorems.py#L288">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_mul_exp.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-predecessor_square_mod_one"
  data-name="predecessor_square_mod_one" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="mul_one,mul_succ_left,add_assoc,add_comm,zero_add,add_succ_left"
  data-search="predecessor_square_mod_one predecessor square mod one the predecessor of a successor squares to one modulo that successor. forall p r. p = s r -&gt; exists gs_u_square gs_v_square. (r * r) + p * gs_u_square = (1) + p * gs_v_square quadratic_residues mul_one mul_succ_left add_assoc add_comm zero_add add_succ_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>predecessor_square_mod_one</code><span>Predecessor square mod one</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The predecessor of a successor squares to one modulo that successor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-predecessor_square_mod_one">Copy statement</button>
        <pre id="statement-predecessor_square_mod_one"><code>forall p r. p = S r -&gt; exists gs_u_square gs_v_square. (r * r) + p * gs_u_square = (1) + p * gs_v_square</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-predecessor_square_mod_one">Copy proof</button>
        <pre id="proof-predecessor_square_mod_one"><code>pa prove forall p r. p = S r -&gt; exists gs_u_square gs_v_square. (r * r) + p * gs_u_square = (1) + p * gs_v_square
use mul_one
use mul_succ_left
use add_assoc
use add_comm
use zero_add
use add_succ_left
intro p
intro r
intro hp
exists 1
exists r
rewrite hp
rewrite hp
simp [mul_one, mul_succ_left, add_assoc, add_comm, zero_add, add_succ_left]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>426</dd></div>
        <div><dt>Distinct objects</dt><dd>234</dd></div>
        <div><dt>Reused references</dt><dd>30</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>13</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="47f8ce741b546648ba938c6f11a5e7a5cb777bd61d0c9960f955b882e6fe8574">47f8ce741b54…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for predecessor_square_mod_one">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib predecessor_square_mod_one</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_sign_bridge.py#L64">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/predecessor_square_mod_one.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-even_successor_to_odd"
  data-name="even_successor_to_odd" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="parity_cases,successor_odd_of_even,even_not_odd"
  data-search="even_successor_to_odd even successor to odd if a successor is even, its predecessor is odd. forall n. (exists a. s n = 2 * a) -&gt; exists b. n = 2 * b + 1 quadratic_residues parity_cases successor_odd_of_even even_not_odd">
  <details>
    <summary>
      <span class="pa-card-title"><code>even_successor_to_odd</code><span>Even successor to odd</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">If a successor is even, its predecessor is odd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="parity_cases" href="#theorem-parity_cases"><code>parity_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="successor_odd_of_even" href="#theorem-successor_odd_of_even"><code>successor_odd_of_even</code></a> <a class="pa-theorem-chip" data-theorem-link="even_not_odd" href="#theorem-even_not_odd"><code>even_not_odd</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-even_successor_to_odd">Copy statement</button>
        <pre id="statement-even_successor_to_odd"><code>forall n. (exists a. S n = 2 * a) -&gt; exists b. n = 2 * b + 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-even_successor_to_odd">Copy proof</button>
        <pre id="proof-even_successor_to_odd"><code>pa prove forall n. (exists a. S n = 2 * a) -&gt; exists b. n = 2 * b + 1
use parity_cases
use successor_odd_of_even
use even_not_odd
intro n
intro hse
specialize parity_cases n
cases parity_cases
cases parity_cases_witness
exfalso
have hso : exists b. S n = 2 * b + 1
specialize successor_odd_of_even n
apply successor_odd_of_even
exists x
exact parity_cases_witness_left
specialize even_not_odd (S n)
apply even_not_odd
exact hse
exact hso
exists x
exact parity_cases_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,074</dd></div>
        <div><dt>Distinct objects</dt><dd>751</dd></div>
        <div><dt>Reused references</dt><dd>35</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>27</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6d559c9eca8b663bb20a5ecd3b8e55004e9cfb2bb49c75a232085c787d4711f7">6d559c9eca8b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for even_successor_to_odd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib even_successor_to_odd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_sign_bridge.py#L88">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/even_successor_to_odd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-odd_successor_to_even"
  data-name="odd_successor_to_even" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="parity_cases,successor_even_of_odd,odd_not_even"
  data-search="odd_successor_to_even odd successor to even if a successor is odd, its predecessor is even. forall n. (exists a. s n = 2 * a + 1) -&gt; exists b. n = 2 * b quadratic_residues parity_cases successor_even_of_odd odd_not_even">
  <details>
    <summary>
      <span class="pa-card-title"><code>odd_successor_to_even</code><span>Odd successor to even</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">If a successor is odd, its predecessor is even.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="parity_cases" href="#theorem-parity_cases"><code>parity_cases</code></a> <a class="pa-theorem-chip" data-theorem-link="successor_even_of_odd" href="#theorem-successor_even_of_odd"><code>successor_even_of_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_not_even" href="#theorem-odd_not_even"><code>odd_not_even</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_predecessor_parity_mod" href="#theorem-pow_predecessor_parity_mod"><code>pow_predecessor_parity_mod</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-odd_successor_to_even">Copy statement</button>
        <pre id="statement-odd_successor_to_even"><code>forall n. (exists a. S n = 2 * a + 1) -&gt; exists b. n = 2 * b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-odd_successor_to_even">Copy proof</button>
        <pre id="proof-odd_successor_to_even"><code>pa prove forall n. (exists a. S n = 2 * a + 1) -&gt; exists b. n = 2 * b
use parity_cases
use successor_even_of_odd
use odd_not_even
intro n
intro hso
specialize parity_cases n
cases parity_cases
cases parity_cases_witness
exists x
exact parity_cases_witness_left
exfalso
have hse : exists b. S n = 2 * b
specialize successor_even_of_odd n
apply successor_even_of_odd
exists x
exact parity_cases_witness_right
specialize odd_not_even (S n)
apply odd_not_even
exact hso
exact hse
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,102</dd></div>
        <div><dt>Distinct objects</dt><dd>773</dd></div>
        <div><dt>Reused references</dt><dd>41</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>27</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fe3e17a0fce8ae4bdeb45cfd99ace0790f49604a6dac481bcac70285c0e30883">fe3e17a0fce8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for odd_successor_to_even">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib odd_successor_to_even</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_sign_bridge.py#L114">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/odd_successor_to_even.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-pow_predecessor_parity_mod"
  data-name="pow_predecessor_parity_mod" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="pow_zero,pow_successor_decompose,odd_not_even,even_successor_to_odd,odd_successor_to_even,predecessor_square_mod_one,mod_eq_refl,mod_eq_mul,mod_eq_trans,one_mul"
  data-search="pow_predecessor_parity_mod pow predecessor parity mod powers of the predecessor of p alternate between one and the predecessor modulo p. forall p r e z. p = s r -&gt; (exists ff_b_main ff_c_main. ((forall ff_i_main_repeat. (exists ff_lt_main_repeat_bound. ff_lt_main_repeat_bound + s ff_i_main_repeat = e) -&gt; (((exists ff_h_main_repeat_decoded. ff_h_main_repeat_decoded + s (r) = s ((s (ff_i_main_repeat)) * ff_c_main)) /\ exists ff_q_main_repeat_decoded. ff_b_main = ff_q_main_repeat_decoded * s ((s (ff_i_main_repeat)) * ff_c_main) + (r)))) /\ (exists ff_u_main_product ff_v_main_product. ((((exists ff_h_main_product_start. ff_h_main_product_start + s (1) = s ((s (0)) * ff_v_main_product)) /\ exists ff_q_main_product_start. ff_u_main_product = ff_q_main_product_start * s ((s (0)) * ff_v_main_product) + (1))) /\ ((((exists ff_h_main_product_terminal. ff_h_main_product_terminal + s (z) = s ((s (e)) * ff_v_main_product)) /\ exists ff_q_main_product_terminal. ff_u_main_product = ff_q_main_product_terminal * s ((s (e)) * ff_v_main_product) + (z))) /\ forall ff_i_main_product. (exists ff_lt_main_product_bound. ff_lt_main_product_bound + s ff_i_main_product = e) -&gt; exists ff_p_main_product ff_r_main_product ff_s_main_product. ((((exists ff_h_main_product_factor. ff_h_main_product_factor + s (ff_p_main_product) = s ((s (ff_i_main_product)) * ff_c_main)) /\ exists ff_q_main_product_factor. ff_b_main = ff_q_main_product_factor * s ((s (ff_i_main_product)) * ff_c_main) + (ff_p_main_product))) /\ ((((exists ff_h_main_product_partial. ff_h_main_product_partial + s (ff_r_main_product) = s ((s (ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_partial. ff_u_main_product = ff_q_main_product_partial * s ((s (ff_i_main_product)) * ff_v_main_product) + (ff_r_main_product))) /\ ((((exists ff_h_main_product_successor. ff_h_main_product_successor + s (ff_s_main_product) = s ((s (s ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_successor. ff_u_main_product = ff_q_main_product_successor * s ((s (s ff_i_main_product)) * ff_v_main_product) + (ff_s_main_product))) /\ ff_s_main_product = ff_r_main_product * ff_p_main_product)))))))) -&gt; (((exists gs_even_main. e = 2 * gs_even_main) -&gt; (exists gs_u_result_even gs_v_result_even. (z) + p * gs_u_result_even = (1) + p * gs_v_result_even)) /\ ((exists gs_odd_main. e = 2 * gs_odd_main + 1) -&gt; (exists gs_u_result_odd gs_v_result_odd. (z) + p * gs_u_result_odd = (r) + p * gs_v_result_odd))) quadratic_residues pow_zero pow_successor_decompose odd_not_even even_successor_to_odd odd_successor_to_even predecessor_square_mod_one mod_eq_refl mod_eq_mul mod_eq_trans one_mul">
  <details>
    <summary>
      <span class="pa-card-title"><code>pow_predecessor_parity_mod</code><span>Pow predecessor parity mod</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Powers of the predecessor of p alternate between one and the predecessor modulo p.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="pow_zero" href="#theorem-pow_zero"><code>pow_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="pow_successor_decompose" href="#theorem-pow_successor_decompose"><code>pow_successor_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_not_even" href="#theorem-odd_not_even"><code>odd_not_even</code></a> <a class="pa-theorem-chip" data-theorem-link="even_successor_to_odd" href="#theorem-even_successor_to_odd"><code>even_successor_to_odd</code></a> <a class="pa-theorem-chip" data-theorem-link="odd_successor_to_even" href="#theorem-odd_successor_to_even"><code>odd_successor_to_even</code></a> <a class="pa-theorem-chip" data-theorem-link="predecessor_square_mod_one" href="#theorem-predecessor_square_mod_one"><code>predecessor_square_mod_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul" href="#theorem-mod_eq_mul"><code>mod_eq_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-pow_predecessor_parity_mod">Copy statement</button>
        <pre id="statement-pow_predecessor_parity_mod"><code>forall p r e z. p = S r -&gt; (exists ff_b_main ff_c_main. ((forall ff_i_main_repeat. (exists ff_lt_main_repeat_bound. ff_lt_main_repeat_bound + S ff_i_main_repeat = e) -&gt; (((exists ff_h_main_repeat_decoded. ff_h_main_repeat_decoded + S (r) = S ((S (ff_i_main_repeat)) * ff_c_main)) /\ exists ff_q_main_repeat_decoded. ff_b_main = ff_q_main_repeat_decoded * S ((S (ff_i_main_repeat)) * ff_c_main) + (r)))) /\ (exists ff_u_main_product ff_v_main_product. ((((exists ff_h_main_product_start. ff_h_main_product_start + S (1) = S ((S (0)) * ff_v_main_product)) /\ exists ff_q_main_product_start. ff_u_main_product = ff_q_main_product_start * S ((S (0)) * ff_v_main_product) + (1))) /\ ((((exists ff_h_main_product_terminal. ff_h_main_product_terminal + S (z) = S ((S (e)) * ff_v_main_product)) /\ exists ff_q_main_product_terminal. ff_u_main_product = ff_q_main_product_terminal * S ((S (e)) * ff_v_main_product) + (z))) /\ forall ff_i_main_product. (exists ff_lt_main_product_bound. ff_lt_main_product_bound + S ff_i_main_product = e) -&gt; exists ff_p_main_product ff_r_main_product ff_s_main_product. ((((exists ff_h_main_product_factor. ff_h_main_product_factor + S (ff_p_main_product) = S ((S (ff_i_main_product)) * ff_c_main)) /\ exists ff_q_main_product_factor. ff_b_main = ff_q_main_product_factor * S ((S (ff_i_main_product)) * ff_c_main) + (ff_p_main_product))) /\ ((((exists ff_h_main_product_partial. ff_h_main_product_partial + S (ff_r_main_product) = S ((S (ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_partial. ff_u_main_product = ff_q_main_product_partial * S ((S (ff_i_main_product)) * ff_v_main_product) + (ff_r_main_product))) /\ ((((exists ff_h_main_product_successor. ff_h_main_product_successor + S (ff_s_main_product) = S ((S (S ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_successor. ff_u_main_product = ff_q_main_product_successor * S ((S (S ff_i_main_product)) * ff_v_main_product) + (ff_s_main_product))) /\ ff_s_main_product = ff_r_main_product * ff_p_main_product)))))))) -&gt; (((exists gs_even_main. e = 2 * gs_even_main) -&gt; (exists gs_u_result_even gs_v_result_even. (z) + p * gs_u_result_even = (1) + p * gs_v_result_even)) /\ ((exists gs_odd_main. e = 2 * gs_odd_main + 1) -&gt; (exists gs_u_result_odd gs_v_result_odd. (z) + p * gs_u_result_odd = (r) + p * gs_v_result_odd)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-pow_predecessor_parity_mod">Copy proof</button>
        <pre id="proof-pow_predecessor_parity_mod"><code>pa prove forall p r e z. p = S r -&gt; (exists ff_b_main ff_c_main. ((forall ff_i_main_repeat. (exists ff_lt_main_repeat_bound. ff_lt_main_repeat_bound + S ff_i_main_repeat = e) -&gt; (((exists ff_h_main_repeat_decoded. ff_h_main_repeat_decoded + S (r) = S ((S (ff_i_main_repeat)) * ff_c_main)) /\ exists ff_q_main_repeat_decoded. ff_b_main = ff_q_main_repeat_decoded * S ((S (ff_i_main_repeat)) * ff_c_main) + (r)))) /\ (exists ff_u_main_product ff_v_main_product. ((((exists ff_h_main_product_start. ff_h_main_product_start + S (1) = S ((S (0)) * ff_v_main_product)) /\ exists ff_q_main_product_start. ff_u_main_product = ff_q_main_product_start * S ((S (0)) * ff_v_main_product) + (1))) /\ ((((exists ff_h_main_product_terminal. ff_h_main_product_terminal + S (z) = S ((S (e)) * ff_v_main_product)) /\ exists ff_q_main_product_terminal. ff_u_main_product = ff_q_main_product_terminal * S ((S (e)) * ff_v_main_product) + (z))) /\ forall ff_i_main_product. (exists ff_lt_main_product_bound. ff_lt_main_product_bound + S ff_i_main_product = e) -&gt; exists ff_p_main_product ff_r_main_product ff_s_main_product. ((((exists ff_h_main_product_factor. ff_h_main_product_factor + S (ff_p_main_product) = S ((S (ff_i_main_product)) * ff_c_main)) /\ exists ff_q_main_product_factor. ff_b_main = ff_q_main_product_factor * S ((S (ff_i_main_product)) * ff_c_main) + (ff_p_main_product))) /\ ((((exists ff_h_main_product_partial. ff_h_main_product_partial + S (ff_r_main_product) = S ((S (ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_partial. ff_u_main_product = ff_q_main_product_partial * S ((S (ff_i_main_product)) * ff_v_main_product) + (ff_r_main_product))) /\ ((((exists ff_h_main_product_successor. ff_h_main_product_successor + S (ff_s_main_product) = S ((S (S ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_successor. ff_u_main_product = ff_q_main_product_successor * S ((S (S ff_i_main_product)) * ff_v_main_product) + (ff_s_main_product))) /\ ff_s_main_product = ff_r_main_product * ff_p_main_product)))))))) -&gt; (((exists gs_even_main. e = 2 * gs_even_main) -&gt; (exists gs_u_result_even gs_v_result_even. (z) + p * gs_u_result_even = (1) + p * gs_v_result_even)) /\ ((exists gs_odd_main. e = 2 * gs_odd_main + 1) -&gt; (exists gs_u_result_odd gs_v_result_odd. (z) + p * gs_u_result_odd = (r) + p * gs_v_result_odd)))
use pow_zero
use pow_successor_decompose
use odd_not_even
use even_successor_to_odd
use odd_successor_to_even
use predecessor_square_mod_one
use mod_eq_refl
use mod_eq_mul
use mod_eq_trans
use one_mul
intro p
intro r
induction e
intro z
intro hp
intro hpow
split
intro he
have hz : z = 1
specialize pow_zero r
specialize pow_zero 0
specialize pow_zero z
apply pow_zero
refl
exact hpow
rewrite hz
specialize mod_eq_refl p
specialize mod_eq_refl 1
exact mod_eq_refl
intro ho
exfalso
specialize odd_not_even 0
apply odd_not_even
exact ho
exists 0
norm_num
intro z
intro hp
intro hpow
have hstep : exists w. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_repeat. (exists ff_lt_predecessor_repeat_bound. ff_lt_predecessor_repeat_bound + S ff_i_predecessor_repeat = e) -&gt; (((exists ff_h_predecessor_repeat_decoded. ff_h_predecessor_repeat_decoded + S (r) = S ((S (ff_i_predecessor_repeat)) * ff_c_predecessor)) /\ exists ff_q_predecessor_repeat_decoded. ff_b_predecessor = ff_q_predecessor_repeat_decoded * S ((S (ff_i_predecessor_repeat)) * ff_c_predecessor) + (r)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + S (1) = S ((S (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * S ((S (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + S (w) = S ((S (e)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * S ((S (e)) * ff_v_predecessor_product) + (w))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + S ff_i_predecessor_product = e) -&gt; exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + S (ff_p_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * S ((S (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + S (ff_r_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + S (ff_s_predecessor_product) = S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = w * r
specialize pow_successor_decompose r
specialize pow_successor_decompose e
specialize pow_successor_decompose (S e)
specialize pow_successor_decompose z
apply pow_successor_decompose
refl
exact hpow
cases hstep
cases hstep_witness
have hinv : (((exists gs_even_ih. e = 2 * gs_even_ih) -&gt; (exists gs_u_ih_even gs_v_ih_even. (x) + p * gs_u_ih_even = (1) + p * gs_v_ih_even)) /\ ((exists gs_odd_ih. e = 2 * gs_odd_ih + 1) -&gt; (exists gs_u_ih_odd gs_v_ih_odd. (x) + p * gs_u_ih_odd = (r) + p * gs_v_ih_odd)))
specialize IH x
apply IH
exact hp
exact hstep_witness_left
cases hinv
split
intro hse
have heo : exists a. e = 2 * a + 1
specialize even_successor_to_odd e
apply even_successor_to_odd
exact hse
have hwr : exists u v. x + p * u = r + p * v
apply hinv_right
exact heo
have hrr : exists u v. r + p * u = r + p * v
specialize mod_eq_refl p
specialize mod_eq_refl r
exact mod_eq_refl
have hmul : exists u v. (x * r) + p * u = (r * r) + p * v
specialize mod_eq_mul p
specialize mod_eq_mul x
specialize mod_eq_mul r
specialize mod_eq_mul r
specialize mod_eq_mul r
apply mod_eq_mul
exact hwr
exact hrr
have hsq : exists u v. (r * r) + p * u = 1 + p * v
specialize predecessor_square_mod_one p
specialize predecessor_square_mod_one r
apply predecessor_square_mod_one
exact hp
have hfinal : exists u v. (x * r) + p * u = 1 + p * v
specialize mod_eq_trans p
specialize mod_eq_trans (x * r)
specialize mod_eq_trans (r * r)
specialize mod_eq_trans 1
apply mod_eq_trans
exact hmul
exact hsq
rewrite hstep_witness_right
exact hfinal
intro hso
have hee : exists a. e = 2 * a
specialize odd_successor_to_even e
apply odd_successor_to_even
exact hso
have hw1 : exists u v. x + p * u = 1 + p * v
apply hinv_left
exact hee
have hrr : exists u v. r + p * u = r + p * v
specialize mod_eq_refl p
specialize mod_eq_refl r
exact mod_eq_refl
have hmul : exists u v. (x * r) + p * u = (1 * r) + p * v
specialize mod_eq_mul p
specialize mod_eq_mul x
specialize mod_eq_mul 1
specialize mod_eq_mul r
specialize mod_eq_mul r
apply mod_eq_mul
exact hw1
exact hrr
specialize one_mul r
rewrite one_mul at hmul
rewrite hstep_witness_right
exact hmul
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9,249</dd></div>
        <div><dt>Distinct objects</dt><dd>1,758</dd></div>
        <div><dt>Reused references</dt><dd>102</dd></div>
        <div><dt>Depth</dt><dd>67</dd></div>
        <div><dt>Cuts</dt><dd>254</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="85d62b696a8789c5f7ccabf8e10b8a44825b92cdc3a8467d980ae93c6e1172eb">85d62b696a87…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for pow_predecessor_parity_mod">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib pow_predecessor_parity_mod</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_sign_bridge.py#L140">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/pow_predecessor_parity_mod.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_range_injective"
  data-name="beta_range_injective" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_range_entry_eq,add_left_cancel"
  data-search="beta_range_injective beta range injective equal decoded values in one consecutive range have equal indices. forall b c a l i j x y. (forall ff_i_generic. (exists ff_lt_generic_bound. ff_lt_generic_bound + s ff_i_generic = l) -&gt; (((exists ff_h_generic_decoded. ff_h_generic_decoded + s (a + ff_i_generic) = s ((s (ff_i_generic)) * c)) /\ exists ff_q_generic_decoded. b = ff_q_generic_decoded * s ((s (ff_i_generic)) * c) + (a + ff_i_generic)))) -&gt; (exists gh_lt_generic_i. gh_lt_generic_i + s i = l) -&gt; (exists gh_lt_generic_j. gh_lt_generic_j + s j = l) -&gt; (((exists ff_h_generic_i. ff_h_generic_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_generic_i. b = ff_q_generic_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_generic_j. ff_h_generic_j + s (y) = s ((s (j)) * c)) /\ exists ff_q_generic_j. b = ff_q_generic_j * s ((s (j)) * c) + (y))) -&gt; x = y -&gt; i = j quadratic_residues beta_range_entry_eq add_left_cancel">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_range_injective</code><span>Beta range injective</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Equal decoded values in one consecutive range have equal indices.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_entry_eq" href="#theorem-beta_range_entry_eq"><code>beta_range_entry_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="add_left_cancel" href="#theorem-add_left_cancel"><code>add_left_cancel</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_half_range_mod_injective" href="#theorem-beta_half_range_mod_injective"><code>beta_half_range_mod_injective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_range_injective">Copy statement</button>
        <pre id="statement-beta_range_injective"><code>forall b c a l i j x y. (forall ff_i_generic. (exists ff_lt_generic_bound. ff_lt_generic_bound + S ff_i_generic = l) -&gt; (((exists ff_h_generic_decoded. ff_h_generic_decoded + S (a + ff_i_generic) = S ((S (ff_i_generic)) * c)) /\ exists ff_q_generic_decoded. b = ff_q_generic_decoded * S ((S (ff_i_generic)) * c) + (a + ff_i_generic)))) -&gt; (exists gh_lt_generic_i. gh_lt_generic_i + S i = l) -&gt; (exists gh_lt_generic_j. gh_lt_generic_j + S j = l) -&gt; (((exists ff_h_generic_i. ff_h_generic_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_generic_i. b = ff_q_generic_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_generic_j. ff_h_generic_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_generic_j. b = ff_q_generic_j * S ((S (j)) * c) + (y))) -&gt; x = y -&gt; i = j</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_range_injective">Copy proof</button>
        <pre id="proof-beta_range_injective"><code>pa prove forall b c a l i j x y. (forall ff_i_generic. (exists ff_lt_generic_bound. ff_lt_generic_bound + S ff_i_generic = l) -&gt; (((exists ff_h_generic_decoded. ff_h_generic_decoded + S (a + ff_i_generic) = S ((S (ff_i_generic)) * c)) /\ exists ff_q_generic_decoded. b = ff_q_generic_decoded * S ((S (ff_i_generic)) * c) + (a + ff_i_generic)))) -&gt; (exists gh_lt_generic_i. gh_lt_generic_i + S i = l) -&gt; (exists gh_lt_generic_j. gh_lt_generic_j + S j = l) -&gt; (((exists ff_h_generic_i. ff_h_generic_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_generic_i. b = ff_q_generic_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_generic_j. ff_h_generic_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_generic_j. b = ff_q_generic_j * S ((S (j)) * c) + (y))) -&gt; x = y -&gt; i = j
use beta_range_entry_eq
use add_left_cancel
intro b
intro c
intro a
intro l
intro i
intro j
intro x
intro y
intro hrange
intro hi
intro hj
intro hxi
intro hyj
intro hxy
have hxia : x = a + i
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq a
specialize beta_range_entry_eq l
specialize beta_range_entry_eq i
specialize beta_range_entry_eq x
apply beta_range_entry_eq
exact hrange
exact hi
exact hxi
have hyja : y = a + j
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq a
specialize beta_range_entry_eq l
specialize beta_range_entry_eq j
specialize beta_range_entry_eq y
apply beta_range_entry_eq
exact hrange
exact hj
exact hyj
have haij : a + i = a + j
trans x
symm
exact hxia
trans y
exact hxy
exact hyja
specialize add_left_cancel a
specialize add_left_cancel i
specialize add_left_cancel j
apply add_left_cancel
exact haij
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,338</dd></div>
        <div><dt>Distinct objects</dt><dd>766</dd></div>
        <div><dt>Reused references</dt><dd>38</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>37</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b2fab09a4ed708d1f18f0f8b87797ecdc7cafe8d1665be07741b95068ac54d78">b2fab09a4ed7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_range_injective">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_range_injective</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_half_range.py#L77">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_range_injective.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_half_range_entry_bounds"
  data-name="beta_half_range_entry_bounds" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_range_entry_eq,zero_add,add_succ_left,mul_succ_left,mul_zero_left,add_assoc,lt_of_le_of_lt"
  data-search="beta_half_range_entry_bounds beta half range entry bounds entries 1 through h in an odd half-range are nonzero and below p. forall p h b c i x. p = 2 * h + 1 -&gt; (forall gh_i_half. (exists gh_lt_half_bound. gh_lt_half_bound + s gh_i_half = h) -&gt; (((exists gh_h_half. gh_h_half + s (1 + gh_i_half) = s ((s gh_i_half) * c)) /\ exists gh_q_half. b = gh_q_half * s ((s gh_i_half) * c) + (1 + gh_i_half)))) -&gt; (exists gh_lt_half_i. gh_lt_half_i + s i = h) -&gt; (((exists ff_h_half_i. ff_h_half_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_half_i. b = ff_q_half_i * s ((s (i)) * c) + (x))) -&gt; (~(x = 0) /\ (exists gh_lt_half_value. gh_lt_half_value + s x = p)) quadratic_residues beta_range_entry_eq zero_add add_succ_left mul_succ_left mul_zero_left add_assoc lt_of_le_of_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_half_range_entry_bounds</code><span>Beta half range entry bounds</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Entries 1 through h in an odd half-range are nonzero and below p.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_range_entry_eq" href="#theorem-beta_range_entry_eq"><code>beta_range_entry_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="add_succ_left" href="#theorem-add_succ_left"><code>add_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_succ_left" href="#theorem-mul_succ_left"><code>mul_succ_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_of_le_of_lt" href="#theorem-lt_of_le_of_lt"><code>lt_of_le_of_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_half_range_mod_eq_value" href="#theorem-beta_half_range_mod_eq_value"><code>beta_half_range_mod_eq_value</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_half_range_entry_bounds">Copy statement</button>
        <pre id="statement-beta_half_range_entry_bounds"><code>forall p h b c i x. p = 2 * h + 1 -&gt; (forall gh_i_half. (exists gh_lt_half_bound. gh_lt_half_bound + S gh_i_half = h) -&gt; (((exists gh_h_half. gh_h_half + S (1 + gh_i_half) = S ((S gh_i_half) * c)) /\ exists gh_q_half. b = gh_q_half * S ((S gh_i_half) * c) + (1 + gh_i_half)))) -&gt; (exists gh_lt_half_i. gh_lt_half_i + S i = h) -&gt; (((exists ff_h_half_i. ff_h_half_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_half_i. b = ff_q_half_i * S ((S (i)) * c) + (x))) -&gt; (~(x = 0) /\ (exists gh_lt_half_value. gh_lt_half_value + S x = p))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_half_range_entry_bounds">Copy proof</button>
        <pre id="proof-beta_half_range_entry_bounds"><code>pa prove forall p h b c i x. p = 2 * h + 1 -&gt; (forall gh_i_half. (exists gh_lt_half_bound. gh_lt_half_bound + S gh_i_half = h) -&gt; (((exists gh_h_half. gh_h_half + S (1 + gh_i_half) = S ((S gh_i_half) * c)) /\ exists gh_q_half. b = gh_q_half * S ((S gh_i_half) * c) + (1 + gh_i_half)))) -&gt; (exists gh_lt_half_i. gh_lt_half_i + S i = h) -&gt; (((exists ff_h_half_i. ff_h_half_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_half_i. b = ff_q_half_i * S ((S (i)) * c) + (x))) -&gt; (~(x = 0) /\ (exists gh_lt_half_value. gh_lt_half_value + S x = p))
use beta_range_entry_eq
use zero_add
use add_succ_left
use mul_succ_left
use mul_zero_left
use add_assoc
use lt_of_le_of_lt
intro p
intro h
intro b
intro c
intro i
intro x
intro hp
intro hrange
intro hi
intro hxi
have hx : x = 1 + i
specialize beta_range_entry_eq b
specialize beta_range_entry_eq c
specialize beta_range_entry_eq 1
specialize beta_range_entry_eq h
specialize beta_range_entry_eq i
specialize beta_range_entry_eq x
apply beta_range_entry_eq
exact hrange
exact hi
exact hxi
have hone : 1 + i = S i
trans S (0 + i)
specialize add_succ_left 0
specialize add_succ_left i
exact add_succ_left
congr
specialize zero_add i
exact zero_add
have hxsi : x = S i
trans 1 + i
exact hx
exact hone
split
intro hx0
apply PA1
trans x
symm
exact hxsi
exact hx0
have hxh : exists k. k + x = h
rewrite hxsi
exact hi
have hhp : exists k. k + S h = p
exists h
rewrite hp
simp [mul_succ_left, mul_zero_left, add_succ_left, zero_add, add_assoc]
specialize lt_of_le_of_lt x
specialize lt_of_le_of_lt h
specialize lt_of_le_of_lt p
apply lt_of_le_of_lt
exact hxh
exact hhp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,585</dd></div>
        <div><dt>Distinct objects</dt><dd>850</dd></div>
        <div><dt>Reused references</dt><dd>46</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>43</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3752530cd637d2b5e2b905a3284d46701b36191f1f51c4cfb858a7a105a26c23">3752530cd637…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_half_range_entry_bounds">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_half_range_entry_bounds</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_half_range.py#L133">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_half_range_entry_bounds.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_half_range_mod_eq_value"
  data-name="beta_half_range_mod_eq_value" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_half_range_entry_bounds,mod_eq_bounded_unique"
  data-search="beta_half_range_mod_eq_value beta half range mod eq value congruent entries in the odd half-range are equal as bounded residues. forall p h b c i j x y. p = 2 * h + 1 -&gt; (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + s gh_i_pair = h) -&gt; (((exists gh_h_pair. gh_h_pair + s (1 + gh_i_pair) = s ((s gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * s ((s gh_i_pair) * c) + (1 + gh_i_pair)))) -&gt; (exists gh_lt_pair_i. gh_lt_pair_i + s i = h) -&gt; (exists gh_lt_pair_j. gh_lt_pair_j + s j = h) -&gt; (((exists ff_h_pair_i. ff_h_pair_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_pair_j. ff_h_pair_j + s (y) = s ((s (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * s ((s (j)) * c) + (y))) -&gt; (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -&gt; x = y quadratic_residues beta_half_range_entry_bounds mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_half_range_mod_eq_value</code><span>Beta half range mod eq value</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Congruent entries in the odd half-range are equal as bounded residues.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_half_range_entry_bounds" href="#theorem-beta_half_range_entry_bounds"><code>beta_half_range_entry_bounds</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_half_range_mod_injective" href="#theorem-beta_half_range_mod_injective"><code>beta_half_range_mod_injective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_half_range_mod_eq_value">Copy statement</button>
        <pre id="statement-beta_half_range_mod_eq_value"><code>forall p h b c i j x y. p = 2 * h + 1 -&gt; (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -&gt; (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -&gt; (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -&gt; (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -&gt; (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -&gt; (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -&gt; x = y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_half_range_mod_eq_value">Copy proof</button>
        <pre id="proof-beta_half_range_mod_eq_value"><code>pa prove forall p h b c i j x y. p = 2 * h + 1 -&gt; (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -&gt; (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -&gt; (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -&gt; (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -&gt; (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -&gt; (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -&gt; x = y
use beta_half_range_entry_bounds
use mod_eq_bounded_unique
intro p
intro h
intro b
intro c
intro i
intro j
intro x
intro y
intro hp
intro hrange
intro hi
intro hj
intro hxi
intro hyj
intro hxy
have hxb : ~(x = 0) /\ exists k. k + S x = p
specialize beta_half_range_entry_bounds p
specialize beta_half_range_entry_bounds h
specialize beta_half_range_entry_bounds b
specialize beta_half_range_entry_bounds c
specialize beta_half_range_entry_bounds i
specialize beta_half_range_entry_bounds x
apply beta_half_range_entry_bounds
exact hp
exact hrange
exact hi
exact hxi
have hyb : ~(y = 0) /\ exists k. k + S y = p
specialize beta_half_range_entry_bounds p
specialize beta_half_range_entry_bounds h
specialize beta_half_range_entry_bounds b
specialize beta_half_range_entry_bounds c
specialize beta_half_range_entry_bounds j
specialize beta_half_range_entry_bounds y
apply beta_half_range_entry_bounds
exact hp
exact hrange
exact hj
exact hyj
cases hxb
cases hyb
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique x
specialize mod_eq_bounded_unique y
apply mod_eq_bounded_unique
exact hxb_right
exact hyb_right
exact hxy
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,603</dd></div>
        <div><dt>Distinct objects</dt><dd>941</dd></div>
        <div><dt>Reused references</dt><dd>48</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>71</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a3c337b1d50f7c9cc39f8cf3e148351ae533151f86d3a996921de1ef8d3385b9">a3c337b1d50f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_half_range_mod_eq_value">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_half_range_mod_eq_value</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_half_range.py#L203">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_half_range_mod_eq_value.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_half_range_mod_injective"
  data-name="beta_half_range_mod_injective" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_half_range_mod_eq_value,beta_range_injective"
  data-search="beta_half_range_mod_injective beta half range mod injective the odd half-range is injective modulo p at the level of indices. forall p h b c i j x y. p = 2 * h + 1 -&gt; (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + s gh_i_pair = h) -&gt; (((exists gh_h_pair. gh_h_pair + s (1 + gh_i_pair) = s ((s gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * s ((s gh_i_pair) * c) + (1 + gh_i_pair)))) -&gt; (exists gh_lt_pair_i. gh_lt_pair_i + s i = h) -&gt; (exists gh_lt_pair_j. gh_lt_pair_j + s j = h) -&gt; (((exists ff_h_pair_i. ff_h_pair_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_pair_j. ff_h_pair_j + s (y) = s ((s (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * s ((s (j)) * c) + (y))) -&gt; (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -&gt; i = j quadratic_residues beta_half_range_mod_eq_value beta_range_injective">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_half_range_mod_injective</code><span>Beta half range mod injective</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The odd half-range is injective modulo p at the level of indices.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_half_range_mod_eq_value" href="#theorem-beta_half_range_mod_eq_value"><code>beta_half_range_mod_eq_value</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_range_injective" href="#theorem-beta_range_injective"><code>beta_range_injective</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_half_range_mod_injective">Copy statement</button>
        <pre id="statement-beta_half_range_mod_injective"><code>forall p h b c i j x y. p = 2 * h + 1 -&gt; (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -&gt; (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -&gt; (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -&gt; (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -&gt; (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -&gt; (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -&gt; i = j</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_half_range_mod_injective">Copy proof</button>
        <pre id="proof-beta_half_range_mod_injective"><code>pa prove forall p h b c i j x y. p = 2 * h + 1 -&gt; (forall gh_i_pair. (exists gh_lt_pair_bound. gh_lt_pair_bound + S gh_i_pair = h) -&gt; (((exists gh_h_pair. gh_h_pair + S (1 + gh_i_pair) = S ((S gh_i_pair) * c)) /\ exists gh_q_pair. b = gh_q_pair * S ((S gh_i_pair) * c) + (1 + gh_i_pair)))) -&gt; (exists gh_lt_pair_i. gh_lt_pair_i + S i = h) -&gt; (exists gh_lt_pair_j. gh_lt_pair_j + S j = h) -&gt; (((exists ff_h_pair_i. ff_h_pair_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_pair_i. b = ff_q_pair_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_pair_j. ff_h_pair_j + S (y) = S ((S (j)) * c)) /\ exists ff_q_pair_j. b = ff_q_pair_j * S ((S (j)) * c) + (y))) -&gt; (exists gh_u_pair gh_v_pair. x + p * gh_u_pair = y + p * gh_v_pair) -&gt; i = j
use beta_half_range_mod_eq_value
use beta_range_injective
intro p
intro h
intro b
intro c
intro i
intro j
intro x
intro y
intro hp
intro hrange
intro hi
intro hj
intro hxi
intro hyj
intro hxy
have hvalue : x = y
specialize beta_half_range_mod_eq_value p
specialize beta_half_range_mod_eq_value h
specialize beta_half_range_mod_eq_value b
specialize beta_half_range_mod_eq_value c
specialize beta_half_range_mod_eq_value i
specialize beta_half_range_mod_eq_value j
specialize beta_half_range_mod_eq_value x
specialize beta_half_range_mod_eq_value y
apply beta_half_range_mod_eq_value
exact hp
exact hrange
exact hi
exact hj
exact hxi
exact hyj
exact hxy
specialize beta_range_injective b
specialize beta_range_injective c
specialize beta_range_injective 1
specialize beta_range_injective h
specialize beta_range_injective i
specialize beta_range_injective j
specialize beta_range_injective x
specialize beta_range_injective y
apply beta_range_injective
exact hrange
exact hi
exact hj
exact hxi
exact hyj
exact hvalue
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,001</dd></div>
        <div><dt>Distinct objects</dt><dd>1,052</dd></div>
        <div><dt>Reused references</dt><dd>50</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>110</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="9497e9ce70f548931a3649e80e6f1176750749d167090b9abfdc820ff9ef7302">9497e9ce70f5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_half_range_mod_injective">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_half_range_mod_injective</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/gauss_half_range.py#L259">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_half_range_mod_injective.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_surjective_zero"
  data-name="finite_surjective_zero" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero"
  data-search="finite_surjective_zero finite surjective zero the empty decoded prefix is surjective onto the empty interval. forall b c n. n = 0 -&gt; (forall fp_value_zero. (exists fp_gap_zero_value. fp_gap_zero_value + s fp_value_zero = n) -&gt; exists fp_i_zero. ((exists fp_gap_zero_index. fp_gap_zero_index + s fp_i_zero = n) /\ (((exists ff_h_zero_entry. ff_h_zero_entry + s (fp_value_zero) = s ((s (fp_i_zero)) * c)) /\ exists ff_q_zero_entry. b = ff_q_zero_entry * s ((s (fp_i_zero)) * c) + (fp_value_zero))))) quadratic_residues add_eq_zero_right succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_surjective_zero</code><span>Finite surjective zero</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The empty decoded prefix is surjective onto the empty interval.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_surjective_zero">Copy statement</button>
        <pre id="statement-finite_surjective_zero"><code>forall b c n. n = 0 -&gt; (forall fp_value_zero. (exists fp_gap_zero_value. fp_gap_zero_value + S fp_value_zero = n) -&gt; exists fp_i_zero. ((exists fp_gap_zero_index. fp_gap_zero_index + S fp_i_zero = n) /\ (((exists ff_h_zero_entry. ff_h_zero_entry + S (fp_value_zero) = S ((S (fp_i_zero)) * c)) /\ exists ff_q_zero_entry. b = ff_q_zero_entry * S ((S (fp_i_zero)) * c) + (fp_value_zero)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_surjective_zero">Copy proof</button>
        <pre id="proof-finite_surjective_zero"><code>pa prove forall b c n. n = 0 -&gt; (forall fp_value_zero. (exists fp_gap_zero_value. fp_gap_zero_value + S fp_value_zero = n) -&gt; exists fp_i_zero. ((exists fp_gap_zero_index. fp_gap_zero_index + S fp_i_zero = n) /\ (((exists ff_h_zero_entry. ff_h_zero_entry + S (fp_value_zero) = S ((S (fp_i_zero)) * c)) /\ exists ff_q_zero_entry. b = ff_q_zero_entry * S ((S (fp_i_zero)) * c) + (fp_value_zero)))))
use add_eq_zero_right
use succ_ne_zero
intro b
intro c
intro n
intro hn
intro y
intro hy
rewrite hn at hy
exfalso
cases hy
have hsy : S y = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S y)
apply add_eq_zero_right
exact hy_witness
specialize succ_ne_zero y
apply succ_ne_zero
exact hsy
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>41</dd></div>
        <div><dt>Distinct objects</dt><dd>41</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>15</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5784eb55a356e25effb52aad2f5730e75f0b237c199fdf97e6c305a6021469ad">5784eb55a356…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_surjective_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_surjective_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L370">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_surjective_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_injective_prefix_succ"
  data-name="finite_injective_prefix_succ" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_succ"
  data-search="finite_injective_prefix_succ finite injective prefix succ injectivity of a successor prefix restricts to its old prefix. forall b c n sn. sn = s n -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + s fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + s fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + s (fp_value_inj_succ) = s ((s (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * s ((s (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + s (fp_value_inj_succ) = s ((s (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * s ((s (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + s fp_i_inj_prefix = n) -&gt; (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + s fp_j_inj_prefix = n) -&gt; (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + s (fp_value_inj_prefix) = s ((s (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * s ((s (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + s (fp_value_inj_prefix) = s ((s (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * s ((s (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; fp_i_inj_prefix = fp_j_inj_prefix) quadratic_residues le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_injective_prefix_succ</code><span>Finite injective prefix succ</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Injectivity of a successor prefix restricts to its old prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_no_top_successor_gate" href="#theorem-finite_no_top_successor_gate"><code>finite_no_top_successor_gate</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_injective_prefix_succ">Copy statement</button>
        <pre id="statement-finite_injective_prefix_succ"><code>forall b c n sn. sn = S n -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -&gt; (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -&gt; (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; fp_i_inj_prefix = fp_j_inj_prefix)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_injective_prefix_succ">Copy proof</button>
        <pre id="proof-finite_injective_prefix_succ"><code>pa prove forall b c n sn. sn = S n -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -&gt; (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -&gt; (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; fp_i_inj_prefix = fp_j_inj_prefix)
use le_succ
intro b
intro c
intro n
intro sn
intro hsn
intro hinj
rewrite hsn at hinj
rewrite hsn at hinj
intro i
intro j
intro x
intro hi
intro hj
intro hxi
intro hxj
specialize hinj i
specialize hinj j
specialize hinj x
apply hinj
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
specialize le_succ (S j)
specialize le_succ n
apply le_succ
exact hj
exact hxi
exact hxj
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>105</dd></div>
        <div><dt>Distinct objects</dt><dd>103</dd></div>
        <div><dt>Reused references</dt><dd>2</dd></div>
        <div><dt>Depth</dt><dd>34</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="6e9e1361005b92b1b1c2ca6bc9d356d651da77052e52172b37c51c59e4125e9e">6e9e1361005b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_injective_prefix_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_injective_prefix_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L395">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_injective_prefix_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_lt_succ_eq_or_lt"
  data-name="finite_lt_succ_eq_or_lt" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_of_succ_le_succ,le_eq_or_lt"
  data-search="finite_lt_succ_eq_or_lt finite lt succ eq or lt a value below a successor is the predecessor or lies below it. forall n x. (exists h. h + s x = s n) -&gt; x = n \/ exists h. h + s x = n quadratic_residues le_of_succ_le_succ le_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_lt_succ_eq_or_lt</code><span>Finite lt succ eq or lt</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A value below a successor is the predecessor or lies below it.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_of_succ_le_succ" href="#theorem-le_of_succ_le_succ"><code>le_of_succ_le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_eq_or_lt" href="#theorem-le_eq_or_lt"><code>le_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_exists" href="#theorem-beta_prefix_replace_exists"><code>beta_prefix_replace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_prefix_without_top" href="#theorem-finite_bounded_prefix_without_top"><code>finite_bounded_prefix_without_top</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_intro" href="#theorem-finite_surjective_succ_intro"><code>finite_surjective_succ_intro</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_last_is_top_from_prefix_surjective" href="#theorem-finite_last_is_top_from_prefix_surjective"><code>finite_last_is_top_from_prefix_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_lt_succ_eq_or_lt">Copy statement</button>
        <pre id="statement-finite_lt_succ_eq_or_lt"><code>forall n x. (exists h. h + S x = S n) -&gt; x = n \/ exists h. h + S x = n</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_lt_succ_eq_or_lt">Copy proof</button>
        <pre id="proof-finite_lt_succ_eq_or_lt"><code>pa prove forall n x. (exists h. h + S x = S n) -&gt; x = n \/ exists h. h + S x = n
use le_of_succ_le_succ
use le_eq_or_lt
intro n
intro x
intro hlt
have hle : exists h. h + x = n
specialize le_of_succ_le_succ x
specialize le_of_succ_le_succ n
apply le_of_succ_le_succ
exact hlt
specialize le_eq_or_lt x
specialize le_eq_or_lt n
apply le_eq_or_lt
exact hle
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>128</dd></div>
        <div><dt>Distinct objects</dt><dd>124</dd></div>
        <div><dt>Reused references</dt><dd>4</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="5d2bc17aeec879bb01923f7b212993dd95bafd098c611c0953d5e4c00303926e">5d2bc17aeec8…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_lt_succ_eq_or_lt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_lt_succ_eq_or_lt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L433">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_lt_succ_eq_or_lt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_bounded_entry_lt"
  data-name="finite_bounded_entry_lt" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_at_unique"
  data-search="finite_bounded_entry_lt finite bounded entry lt every explicitly decoded entry of a bounded prefix satisfies its value bound. forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + s fp_i_entry_bound = l) -&gt; exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + s (fp_value_entry_bound) = s ((s (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * s ((s (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + s fp_value_entry_bound = l))) -&gt; (exists h. h + s i = l) -&gt; (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + s (x) = s ((s (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * s ((s (i)) * c) + (x))) -&gt; exists h. h + s x = l quadratic_residues beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_bounded_entry_lt</code><span>Finite bounded entry lt</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every explicitly decoded entry of a bounded prefix satisfies its value bound.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_swap_last_bounded" href="#theorem-finite_swap_last_bounded"><code>finite_swap_last_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_bounded_entry_lt">Copy statement</button>
        <pre id="statement-finite_bounded_entry_lt"><code>forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -&gt; exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -&gt; exists h. h + S x = l</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_bounded_entry_lt">Copy proof</button>
        <pre id="proof-finite_bounded_entry_lt"><code>pa prove forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -&gt; exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -&gt; exists h. h + S x = l
use beta_at_unique
intro b
intro c
intro l
intro i
intro x
intro hbounded
intro hi
intro hentry
specialize hbounded i
have hdecoded : exists a. (((exists h. h + S a = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + a) /\ exists h. h + S a = l)
apply hbounded
exact hi
cases hdecoded
cases hdecoded_witness
have hxa : x = x1
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique i
specialize beta_at_unique x
specialize beta_at_unique x1
apply beta_at_unique
exact hentry
exact hdecoded_witness_left
rewrite hxa
exact hdecoded_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,150</dd></div>
        <div><dt>Distinct objects</dt><dd>721</dd></div>
        <div><dt>Reused references</dt><dd>37</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>31</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a17f66fcd8783211364c695fc8d664eac4249bf793df88a6cb74b1aadc858b5f">a17f66fcd878…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_bounded_entry_lt">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_bounded_entry_lt</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L454">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_bounded_entry_lt.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_replace_exists"
  data-name="beta_prefix_replace_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero,finite_lt_succ_eq_or_lt,beta_prefix_extend,beta_at_exists,beta_at_unique"
  data-search="beta_prefix_replace_exists beta prefix replace exists recode a finite beta prefix while replacing one interior entry. forall b c i s k. (exists h. h + s i = k) -&gt; exists z d. ((((exists ff_h_replace_entry. ff_h_replace_entry + s (s) = s ((s (i)) * d)) /\ exists ff_q_replace_entry. z = ff_q_replace_entry * s ((s (i)) * d) + (s))) /\ forall j a. (exists h. h + s j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_replace_old. ff_h_replace_old + s (a) = s ((s (j)) * c)) /\ exists ff_q_replace_old. b = ff_q_replace_old * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_replace_new. ff_h_replace_new + s (a) = s ((s (j)) * d)) /\ exists ff_q_replace_new. z = ff_q_replace_new * s ((s (j)) * d) + (a)))) quadratic_residues add_eq_zero_right succ_ne_zero finite_lt_succ_eq_or_lt beta_prefix_extend beta_at_exists beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_replace_exists</code><span>Beta prefix replace exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Recode a finite beta prefix while replacing one interior entry.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_extend" href="#theorem-beta_prefix_extend"><code>beta_prefix_extend</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_from_entries" href="#theorem-beta_prefix_swap_last_from_entries"><code>beta_prefix_swap_last_from_entries</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_replace_exists">Copy statement</button>
        <pre id="statement-beta_prefix_replace_exists"><code>forall b c i s k. (exists h. h + S i = k) -&gt; exists z d. ((((exists ff_h_replace_entry. ff_h_replace_entry + S (s) = S ((S (i)) * d)) /\ exists ff_q_replace_entry. z = ff_q_replace_entry * S ((S (i)) * d) + (s))) /\ forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_replace_old. ff_h_replace_old + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_old. b = ff_q_replace_old * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_replace_new. ff_h_replace_new + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_new. z = ff_q_replace_new * S ((S (j)) * d) + (a))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_replace_exists">Copy proof</button>
        <pre id="proof-beta_prefix_replace_exists"><code>pa prove forall b c i s k. (exists h. h + S i = k) -&gt; exists z d. ((((exists ff_h_replace_entry. ff_h_replace_entry + S (s) = S ((S (i)) * d)) /\ exists ff_q_replace_entry. z = ff_q_replace_entry * S ((S (i)) * d) + (s))) /\ forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_replace_old. ff_h_replace_old + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_old. b = ff_q_replace_old * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_replace_new. ff_h_replace_new + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_new. z = ff_q_replace_new * S ((S (j)) * d) + (a))))
use add_eq_zero_right
use succ_ne_zero
use finite_lt_succ_eq_or_lt
use beta_prefix_extend
use beta_at_exists
use beta_at_unique
intro b
intro c
intro i
intro s
induction k
intro hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
intro hi
have hisplit : i = k \/ exists h. h + S i = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt i
apply finite_lt_succ_eq_or_lt
exact hi
cases hisplit
specialize beta_prefix_extend k
specialize beta_prefix_extend b
specialize beta_prefix_extend c
specialize beta_prefix_extend s
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x
exists x1
split
rewrite hisplit_left
rewrite hisplit_left
exact beta_prefix_extend_witness_witness_left
intro j
intro a
intro hj
intro hji
intro hold
have hjsplit : j = k \/ exists h. h + S j = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt j
apply finite_lt_succ_eq_or_lt
exact hj
cases hjsplit
exfalso
apply hji
trans k
exact hjsplit_left
symm
exact hisplit_left
specialize beta_prefix_extend_witness_witness_right j
specialize beta_prefix_extend_witness_witness_right a
apply beta_prefix_extend_witness_witness_right
exact hjsplit_right
exact hold
have hreplaced : exists z d. (((exists h. h + S s = S ((S i) * d)) /\ exists q. z = q * S ((S i) * d) + s) /\ forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) -&gt; ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
apply IH
exact hisplit_right
cases hreplaced
cases hreplaced_witness
cases hreplaced_witness_witness
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists k
cases beta_at_exists
specialize beta_prefix_extend k
specialize beta_prefix_extend x
specialize beta_prefix_extend x1
specialize beta_prefix_extend x2
cases beta_prefix_extend
cases beta_prefix_extend_witness
cases beta_prefix_extend_witness_witness
exists x3
exists x4
split
specialize beta_prefix_extend_witness_witness_right i
specialize beta_prefix_extend_witness_witness_right s
apply beta_prefix_extend_witness_witness_right
exact hisplit_right
exact hreplaced_witness_witness_left
intro j
intro a
intro hj
intro hji
intro hold
have hjsplit : j = k \/ exists h. h + S j = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt j
apply finite_lt_succ_eq_or_lt
exact hj
cases hjsplit
have hax : a = x2
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique k
specialize beta_at_unique a
specialize beta_at_unique x2
apply beta_at_unique
rewrite hjsplit_left at hold
rewrite hjsplit_left at hold
exact hold
exact beta_at_exists_witness
rewrite hjsplit_left
rewrite hjsplit_left
rewrite hax
rewrite hax
exact beta_prefix_extend_witness_witness_left
have hmiddle : ((exists h. h + S a = S ((S j) * x1)) /\ exists q. x = q * S ((S j) * x1) + a)
specialize hreplaced_witness_witness_right j
specialize hreplaced_witness_witness_right a
apply hreplaced_witness_witness_right
exact hjsplit_right
exact hji
exact hold
specialize beta_prefix_extend_witness_witness_right j
specialize beta_prefix_extend_witness_witness_right a
apply beta_prefix_extend_witness_witness_right
exact hjsplit_right
exact hmiddle
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>30,981</dd></div>
        <div><dt>Distinct objects</dt><dd>4,698</dd></div>
        <div><dt>Reused references</dt><dd>231</dd></div>
        <div><dt>Depth</dt><dd>84</dd></div>
        <div><dt>Cuts</dt><dd>923</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0bce1fe4a8442ba6e1370871cbeaa67acbefd442109bb14edfc8ef3b650e8387">0bce1fe4a844…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_replace_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_replace_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L492">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_replace_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_swap_last_from_entries"
  data-name="beta_prefix_swap_last_from_entries" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_prefix_replace_exists,le_succ,le_refl,lt_irrefl_expanded"
  data-search="beta_prefix_swap_last_from_entries beta prefix swap last from entries swap a chosen interior beta entry with the last entry, given both decoded values. forall b c n i x y. (exists h. h + s i = n) -&gt; (((exists ff_h_swap_old_i. ff_h_swap_old_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_swap_old_i. b = ff_q_swap_old_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_swap_old_n. ff_h_swap_old_n + s (y) = s ((s (n)) * c)) /\ exists ff_q_swap_old_n. b = ff_q_swap_old_n * s ((s (n)) * c) + (y))) -&gt; exists z d. ((((exists ff_h_swap_new_i. ff_h_swap_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_swap_new_i. z = ff_q_swap_new_i * s ((s (i)) * d) + (y))) /\ ((((exists ff_h_swap_new_n. ff_h_swap_new_n + s (x) = s ((s (n)) * d)) /\ exists ff_q_swap_new_n. z = ff_q_swap_new_n * s ((s (n)) * d) + (x))) /\ forall j a. (exists h. h + s j = s n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_old_j. ff_h_swap_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_swap_old_j. b = ff_q_swap_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_swap_new_j. ff_h_swap_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_swap_new_j. z = ff_q_swap_new_j * s ((s (j)) * d) + (a))))) quadratic_residues beta_prefix_replace_exists le_succ le_refl lt_irrefl_expanded">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_swap_last_from_entries</code><span>Beta prefix swap last from entries</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Swap a chosen interior beta entry with the last entry, given both decoded values.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_replace_exists" href="#theorem-beta_prefix_replace_exists"><code>beta_prefix_replace_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_exists" href="#theorem-beta_prefix_swap_last_exists"><code>beta_prefix_swap_last_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_swap_last_from_entries">Copy statement</button>
        <pre id="statement-beta_prefix_swap_last_from_entries"><code>forall b c n i x y. (exists h. h + S i = n) -&gt; (((exists ff_h_swap_old_i. ff_h_swap_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_old_i. b = ff_q_swap_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_old_n. ff_h_swap_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_old_n. b = ff_q_swap_old_n * S ((S (n)) * c) + (y))) -&gt; exists z d. ((((exists ff_h_swap_new_i. ff_h_swap_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_new_i. z = ff_q_swap_new_i * S ((S (i)) * d) + (y))) /\ ((((exists ff_h_swap_new_n. ff_h_swap_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_new_n. z = ff_q_swap_new_n * S ((S (n)) * d) + (x))) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_old_j. ff_h_swap_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_old_j. b = ff_q_swap_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_new_j. ff_h_swap_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_new_j. z = ff_q_swap_new_j * S ((S (j)) * d) + (a)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_swap_last_from_entries">Copy proof</button>
        <pre id="proof-beta_prefix_swap_last_from_entries"><code>pa prove forall b c n i x y. (exists h. h + S i = n) -&gt; (((exists ff_h_swap_old_i. ff_h_swap_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_old_i. b = ff_q_swap_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_old_n. ff_h_swap_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_old_n. b = ff_q_swap_old_n * S ((S (n)) * c) + (y))) -&gt; exists z d. ((((exists ff_h_swap_new_i. ff_h_swap_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_new_i. z = ff_q_swap_new_i * S ((S (i)) * d) + (y))) /\ ((((exists ff_h_swap_new_n. ff_h_swap_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_new_n. z = ff_q_swap_new_n * S ((S (n)) * d) + (x))) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_old_j. ff_h_swap_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_old_j. b = ff_q_swap_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_new_j. ff_h_swap_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_new_j. z = ff_q_swap_new_j * S ((S (j)) * d) + (a)))))
use beta_prefix_replace_exists
use le_succ
use le_refl
use lt_irrefl_expanded
intro b
intro c
intro n
intro i
intro x
intro y
intro hi
intro hxi
intro hyn
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hin : ~(i = n)
intro hin_eq
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hin_eq at hi
exact hi
have hni : ~(n = i)
intro hni_eq
apply hin
symm
exact hni_eq
have hfirst : exists z d. (((exists h. h + S y = S ((S i) * d)) /\ exists q. z = q * S ((S i) * d) + y) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) -&gt; ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
specialize beta_prefix_replace_exists b
specialize beta_prefix_replace_exists c
specialize beta_prefix_replace_exists i
specialize beta_prefix_replace_exists y
specialize beta_prefix_replace_exists (S n)
apply beta_prefix_replace_exists
exact hisn
cases hfirst
cases hfirst_witness
cases hfirst_witness_witness
have hfirst_n : ((exists h. h + S y = S ((S n) * x2)) /\ exists q. x1 = q * S ((S n) * x2) + y)
specialize hfirst_witness_witness_right n
specialize hfirst_witness_witness_right y
apply hfirst_witness_witness_right
exact hnsn
exact hni
exact hyn
have hsecond : exists z d. (((exists h. h + S x = S ((S n) * d)) /\ exists q. z = q * S ((S n) * d) + x) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = n) -&gt; ((exists h. h + S a = S ((S j) * x2)) /\ exists q. x1 = q * S ((S j) * x2) + a) -&gt; ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
specialize beta_prefix_replace_exists x1
specialize beta_prefix_replace_exists x2
specialize beta_prefix_replace_exists n
specialize beta_prefix_replace_exists x
specialize beta_prefix_replace_exists (S n)
apply beta_prefix_replace_exists
exact hnsn
cases hsecond
cases hsecond_witness
cases hsecond_witness_witness
exists x3
exists x4
split
specialize hsecond_witness_witness_right i
specialize hsecond_witness_witness_right y
apply hsecond_witness_witness_right
exact hisn
exact hin
exact hfirst_witness_witness_left
split
exact hsecond_witness_witness_left
intro j
intro a
intro hj
intro hji
intro hjn
intro hold
have hmiddle : ((exists h. h + S a = S ((S j) * x2)) /\ exists q. x1 = q * S ((S j) * x2) + a)
specialize hfirst_witness_witness_right j
specialize hfirst_witness_witness_right a
apply hfirst_witness_witness_right
exact hj
exact hji
exact hold
specialize hsecond_witness_witness_right j
specialize hsecond_witness_witness_right a
apply hsecond_witness_witness_right
exact hj
exact hjn
exact hmiddle
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>31,221</dd></div>
        <div><dt>Distinct objects</dt><dd>4,790</dd></div>
        <div><dt>Reused references</dt><dd>234</dd></div>
        <div><dt>Depth</dt><dd>85</dd></div>
        <div><dt>Cuts</dt><dd>931</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c89cd33df597f8660790ddd42dff63a4324e8e59af86595069473772ad1b44a8">c89cd33df597…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_swap_last_from_entries">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_swap_last_from_entries</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L640">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_swap_last_from_entries.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_swap_last_exists"
  data-name="beta_prefix_swap_last_exists" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_at_exists,beta_prefix_swap_last_from_entries"
  data-search="beta_prefix_swap_last_exists beta prefix swap last exists construct an extensional beta code with an interior entry swapped with the last. forall b c n i. (exists h. h + s i = n) -&gt; exists z d x y. ((((exists ff_h_swap_exists_old_i. ff_h_swap_exists_old_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_swap_exists_old_i. b = ff_q_swap_exists_old_i * s ((s (i)) * c) + (x))) /\ ((((exists ff_h_swap_exists_old_n. ff_h_swap_exists_old_n + s (y) = s ((s (n)) * c)) /\ exists ff_q_swap_exists_old_n. b = ff_q_swap_exists_old_n * s ((s (n)) * c) + (y))) /\ ((((exists ff_h_swap_exists_new_i. ff_h_swap_exists_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_swap_exists_new_i. z = ff_q_swap_exists_new_i * s ((s (i)) * d) + (y))) /\ ((((exists ff_h_swap_exists_new_n. ff_h_swap_exists_new_n + s (x) = s ((s (n)) * d)) /\ exists ff_q_swap_exists_new_n. z = ff_q_swap_exists_new_n * s ((s (n)) * d) + (x))) /\ forall j a. (exists h. h + s j = s n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_exists_old_j. ff_h_swap_exists_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_swap_exists_old_j. b = ff_q_swap_exists_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_swap_exists_new_j. ff_h_swap_exists_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_swap_exists_new_j. z = ff_q_swap_exists_new_j * s ((s (j)) * d) + (a))))))) quadratic_residues beta_at_exists beta_prefix_swap_last_from_entries">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_swap_last_exists</code><span>Beta prefix swap last exists</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Construct an extensional beta code with an interior entry swapped with the last.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_from_entries" href="#theorem-beta_prefix_swap_last_from_entries"><code>beta_prefix_swap_last_from_entries</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_swap_last_exists">Copy statement</button>
        <pre id="statement-beta_prefix_swap_last_exists"><code>forall b c n i. (exists h. h + S i = n) -&gt; exists z d x y. ((((exists ff_h_swap_exists_old_i. ff_h_swap_exists_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_exists_old_i. b = ff_q_swap_exists_old_i * S ((S (i)) * c) + (x))) /\ ((((exists ff_h_swap_exists_old_n. ff_h_swap_exists_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_exists_old_n. b = ff_q_swap_exists_old_n * S ((S (n)) * c) + (y))) /\ ((((exists ff_h_swap_exists_new_i. ff_h_swap_exists_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_exists_new_i. z = ff_q_swap_exists_new_i * S ((S (i)) * d) + (y))) /\ ((((exists ff_h_swap_exists_new_n. ff_h_swap_exists_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_exists_new_n. z = ff_q_swap_exists_new_n * S ((S (n)) * d) + (x))) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_exists_old_j. ff_h_swap_exists_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_exists_old_j. b = ff_q_swap_exists_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_exists_new_j. ff_h_swap_exists_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_exists_new_j. z = ff_q_swap_exists_new_j * S ((S (j)) * d) + (a)))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_swap_last_exists">Copy proof</button>
        <pre id="proof-beta_prefix_swap_last_exists"><code>pa prove forall b c n i. (exists h. h + S i = n) -&gt; exists z d x y. ((((exists ff_h_swap_exists_old_i. ff_h_swap_exists_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_exists_old_i. b = ff_q_swap_exists_old_i * S ((S (i)) * c) + (x))) /\ ((((exists ff_h_swap_exists_old_n. ff_h_swap_exists_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_exists_old_n. b = ff_q_swap_exists_old_n * S ((S (n)) * c) + (y))) /\ ((((exists ff_h_swap_exists_new_i. ff_h_swap_exists_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_exists_new_i. z = ff_q_swap_exists_new_i * S ((S (i)) * d) + (y))) /\ ((((exists ff_h_swap_exists_new_n. ff_h_swap_exists_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_exists_new_n. z = ff_q_swap_exists_new_n * S ((S (n)) * d) + (x))) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_exists_old_j. ff_h_swap_exists_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_exists_old_j. b = ff_q_swap_exists_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_exists_new_j. ff_h_swap_exists_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_exists_new_j. z = ff_q_swap_exists_new_j * S ((S (j)) * d) + (a)))))))
use beta_at_exists
use beta_prefix_swap_last_from_entries
intro b
intro c
intro n
intro i
intro hi
have hdecode_i : forall u v k. exists a. ((exists h. h + S a = S ((S k) * v)) /\ exists q. u = q * S ((S k) * v) + a)
exact beta_at_exists
have hdecode_n : forall u v k. exists a. ((exists h. h + S a = S ((S k) * v)) /\ exists q. u = q * S ((S k) * v) + a)
exact beta_at_exists
specialize hdecode_i b
specialize hdecode_i c
specialize hdecode_i i
cases hdecode_i
specialize hdecode_n b
specialize hdecode_n c
specialize hdecode_n n
cases hdecode_n
have hswap : exists z d. (((exists h. h + S x1 = S ((S i) * d)) /\ exists q. z = q * S ((S i) * d) + x1) /\ (((exists h. h + S x = S ((S n) * d)) /\ exists q. z = q * S ((S n) * d) + x) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) -&gt; ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a)))
specialize beta_prefix_swap_last_from_entries b
specialize beta_prefix_swap_last_from_entries c
specialize beta_prefix_swap_last_from_entries n
specialize beta_prefix_swap_last_from_entries i
specialize beta_prefix_swap_last_from_entries x
specialize beta_prefix_swap_last_from_entries x1
apply beta_prefix_swap_last_from_entries
exact hi
exact hdecode_i_witness
exact hdecode_n_witness
cases hswap
cases hswap_witness
exists x2
exists x3
exists x
exists x1
split
exact hdecode_i_witness
split
exact hdecode_n_witness
exact hswap_witness_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>31,742</dd></div>
        <div><dt>Distinct objects</dt><dd>4,832</dd></div>
        <div><dt>Reused references</dt><dd>235</dd></div>
        <div><dt>Depth</dt><dd>87</dd></div>
        <div><dt>Cuts</dt><dd>948</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b1e5c90f043eaf0bcce4eea7740dd0e9883894d7f589282800ce3c39d3bc412c">b1e5c90f043e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_swap_last_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_swap_last_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L760">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_swap_last_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_swap_last_reflect"
  data-name="beta_prefix_swap_last_reflect" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="eq_decidable,beta_at_exists,beta_at_unique"
  data-search="beta_prefix_swap_last_reflect beta prefix swap last reflect every decoded swapped entry reflects to one of the two moved entries or the original index. forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * s ((s (i)) * d) + (y))) -&gt; (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + s (x) = s ((s (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * s ((s (n)) * d) + (x))) -&gt; (forall k v. (exists h. h + s k = s n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + s (v) = s ((s (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * s ((s (k)) * c) + (v))) -&gt; (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + s (v) = s ((s (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * s ((s (k)) * d) + (v)))) -&gt; forall j a. (exists h. h + s j = s n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * s ((s (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * s ((s (j)) * c) + (a))))))) quadratic_residues eq_decidable beta_at_exists beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_swap_last_reflect</code><span>Beta prefix swap last reflect</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every decoded swapped entry reflects to one of the two moved entries or the original index.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_swap_last_injective" href="#theorem-finite_swap_last_injective"><code>finite_swap_last_injective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_surjective_back" href="#theorem-finite_swap_last_surjective_back"><code>finite_swap_last_surjective_back</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_reindex_alignment_swap_last" href="#theorem-beta_reindex_alignment_swap_last"><code>beta_reindex_alignment_swap_last</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_swap_last_reflect">Copy statement</button>
        <pre id="statement-beta_prefix_swap_last_reflect"><code>forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -&gt; (forall k v. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -&gt; (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -&gt; forall j a. (exists h. h + S j = S n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_swap_last_reflect">Copy proof</button>
        <pre id="proof-beta_prefix_swap_last_reflect"><code>pa prove forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -&gt; (forall k v. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -&gt; (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -&gt; forall j a. (exists h. h + S j = S n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
use eq_decidable
use beta_at_exists
use beta_at_unique
intro b
intro c
intro z
intro d
intro n
intro i
intro x
intro y
intro hnew_i
intro hnew_n
intro hpreserve
intro j
intro a
intro hj
intro hnew
specialize eq_decidable j
specialize eq_decidable i
cases eq_decidable
left
split
exact eq_decidable_left
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique i
specialize beta_at_unique a
specialize beta_at_unique y
apply beta_at_unique
rewrite eq_decidable_left at hnew
rewrite eq_decidable_left at hnew
exact hnew
exact hnew_i
specialize eq_decidable_before2 n
cases eq_decidable_before2
right
left
split
exact eq_decidable_before2_left
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique n
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
rewrite eq_decidable_before2_left at hnew
rewrite eq_decidable_before2_left at hnew
exact hnew
exact hnew_n
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists j
cases beta_at_exists
have htransport : ((exists h. h + S x1 = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + x1)
specialize hpreserve j
specialize hpreserve x1
apply hpreserve
exact hj
exact eq_decidable_right
exact eq_decidable_before2_right
exact beta_at_exists_witness
have hav : a = x1
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique j
specialize beta_at_unique a
specialize beta_at_unique x1
apply beta_at_unique
exact hnew
exact htransport
right
right
split
exact eq_decidable_right
split
exact eq_decidable_before2_right
rewrite hav
rewrite hav
exact beta_at_exists_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,765</dd></div>
        <div><dt>Distinct objects</dt><dd>1,041</dd></div>
        <div><dt>Reused references</dt><dd>55</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>48</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="da963c32a931b5040e9cbd73e1cc9b4f2fed155b36e05cd6888fe0a265277fa9">da963c32a931…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_swap_last_reflect">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_swap_last_reflect</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L826">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_swap_last_reflect.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_swap_last_bounded"
  data-name="finite_swap_last_bounded" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="finite_bounded_entry_lt,eq_decidable,le_succ,le_refl"
  data-search="finite_swap_last_bounded finite swap last bounded a swap-last recoding preserves boundedness of the full successor prefix. forall b c z d n sn i x y. sn = s n -&gt; (exists h. h + s i = n) -&gt; (forall fp_i_swap_bound_old. (exists fp_gap_swap_bound_old_index. fp_gap_swap_bound_old_index + s fp_i_swap_bound_old = sn) -&gt; exists fp_value_swap_bound_old. ((((exists ff_h_swap_bound_old_entry. ff_h_swap_bound_old_entry + s (fp_value_swap_bound_old) = s ((s (fp_i_swap_bound_old)) * c)) /\ exists ff_q_swap_bound_old_entry. b = ff_q_swap_bound_old_entry * s ((s (fp_i_swap_bound_old)) * c) + (fp_value_swap_bound_old))) /\ (exists fp_gap_swap_bound_old_value. fp_gap_swap_bound_old_value + s fp_value_swap_bound_old = sn))) -&gt; (((exists ff_h_swap_bound_old_i. ff_h_swap_bound_old_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_swap_bound_old_i. b = ff_q_swap_bound_old_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_swap_bound_old_n. ff_h_swap_bound_old_n + s (y) = s ((s (n)) * c)) /\ exists ff_q_swap_bound_old_n. b = ff_q_swap_bound_old_n * s ((s (n)) * c) + (y))) -&gt; (((exists ff_h_swap_bound_new_i. ff_h_swap_bound_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_swap_bound_new_i. z = ff_q_swap_bound_new_i * s ((s (i)) * d) + (y))) -&gt; (((exists ff_h_swap_bound_new_n. ff_h_swap_bound_new_n + s (x) = s ((s (n)) * d)) /\ exists ff_q_swap_bound_new_n. z = ff_q_swap_bound_new_n * s ((s (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + s j = s n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_bound_old_j. ff_h_swap_bound_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_swap_bound_old_j. b = ff_q_swap_bound_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_swap_bound_new_j. ff_h_swap_bound_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_swap_bound_new_j. z = ff_q_swap_bound_new_j * s ((s (j)) * d) + (a)))) -&gt; (forall fp_i_swap_bound_new. (exists fp_gap_swap_bound_new_index. fp_gap_swap_bound_new_index + s fp_i_swap_bound_new = sn) -&gt; exists fp_value_swap_bound_new. ((((exists ff_h_swap_bound_new_entry. ff_h_swap_bound_new_entry + s (fp_value_swap_bound_new) = s ((s (fp_i_swap_bound_new)) * d)) /\ exists ff_q_swap_bound_new_entry. z = ff_q_swap_bound_new_entry * s ((s (fp_i_swap_bound_new)) * d) + (fp_value_swap_bound_new))) /\ (exists fp_gap_swap_bound_new_value. fp_gap_swap_bound_new_value + s fp_value_swap_bound_new = sn))) quadratic_residues finite_bounded_entry_lt eq_decidable le_succ le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_swap_last_bounded</code><span>Finite swap last bounded</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A swap-last recoding preserves boundedness of the full successor prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_entry_lt" href="#theorem-finite_bounded_entry_lt"><code>finite_bounded_entry_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_swap_last_bounded">Copy statement</button>
        <pre id="statement-finite_swap_last_bounded"><code>forall b c z d n sn i x y. sn = S n -&gt; (exists h. h + S i = n) -&gt; (forall fp_i_swap_bound_old. (exists fp_gap_swap_bound_old_index. fp_gap_swap_bound_old_index + S fp_i_swap_bound_old = sn) -&gt; exists fp_value_swap_bound_old. ((((exists ff_h_swap_bound_old_entry. ff_h_swap_bound_old_entry + S (fp_value_swap_bound_old) = S ((S (fp_i_swap_bound_old)) * c)) /\ exists ff_q_swap_bound_old_entry. b = ff_q_swap_bound_old_entry * S ((S (fp_i_swap_bound_old)) * c) + (fp_value_swap_bound_old))) /\ (exists fp_gap_swap_bound_old_value. fp_gap_swap_bound_old_value + S fp_value_swap_bound_old = sn))) -&gt; (((exists ff_h_swap_bound_old_i. ff_h_swap_bound_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_bound_old_i. b = ff_q_swap_bound_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_bound_old_n. ff_h_swap_bound_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_bound_old_n. b = ff_q_swap_bound_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_swap_bound_new_i. ff_h_swap_bound_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_bound_new_i. z = ff_q_swap_bound_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_swap_bound_new_n. ff_h_swap_bound_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_bound_new_n. z = ff_q_swap_bound_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_bound_old_j. ff_h_swap_bound_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_bound_old_j. b = ff_q_swap_bound_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_bound_new_j. ff_h_swap_bound_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_bound_new_j. z = ff_q_swap_bound_new_j * S ((S (j)) * d) + (a)))) -&gt; (forall fp_i_swap_bound_new. (exists fp_gap_swap_bound_new_index. fp_gap_swap_bound_new_index + S fp_i_swap_bound_new = sn) -&gt; exists fp_value_swap_bound_new. ((((exists ff_h_swap_bound_new_entry. ff_h_swap_bound_new_entry + S (fp_value_swap_bound_new) = S ((S (fp_i_swap_bound_new)) * d)) /\ exists ff_q_swap_bound_new_entry. z = ff_q_swap_bound_new_entry * S ((S (fp_i_swap_bound_new)) * d) + (fp_value_swap_bound_new))) /\ (exists fp_gap_swap_bound_new_value. fp_gap_swap_bound_new_value + S fp_value_swap_bound_new = sn)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_swap_last_bounded">Copy proof</button>
        <pre id="proof-finite_swap_last_bounded"><code>pa prove forall b c z d n sn i x y. sn = S n -&gt; (exists h. h + S i = n) -&gt; (forall fp_i_swap_bound_old. (exists fp_gap_swap_bound_old_index. fp_gap_swap_bound_old_index + S fp_i_swap_bound_old = sn) -&gt; exists fp_value_swap_bound_old. ((((exists ff_h_swap_bound_old_entry. ff_h_swap_bound_old_entry + S (fp_value_swap_bound_old) = S ((S (fp_i_swap_bound_old)) * c)) /\ exists ff_q_swap_bound_old_entry. b = ff_q_swap_bound_old_entry * S ((S (fp_i_swap_bound_old)) * c) + (fp_value_swap_bound_old))) /\ (exists fp_gap_swap_bound_old_value. fp_gap_swap_bound_old_value + S fp_value_swap_bound_old = sn))) -&gt; (((exists ff_h_swap_bound_old_i. ff_h_swap_bound_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_bound_old_i. b = ff_q_swap_bound_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_bound_old_n. ff_h_swap_bound_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_bound_old_n. b = ff_q_swap_bound_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_swap_bound_new_i. ff_h_swap_bound_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_bound_new_i. z = ff_q_swap_bound_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_swap_bound_new_n. ff_h_swap_bound_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_bound_new_n. z = ff_q_swap_bound_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_bound_old_j. ff_h_swap_bound_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_bound_old_j. b = ff_q_swap_bound_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_bound_new_j. ff_h_swap_bound_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_bound_new_j. z = ff_q_swap_bound_new_j * S ((S (j)) * d) + (a)))) -&gt; (forall fp_i_swap_bound_new. (exists fp_gap_swap_bound_new_index. fp_gap_swap_bound_new_index + S fp_i_swap_bound_new = sn) -&gt; exists fp_value_swap_bound_new. ((((exists ff_h_swap_bound_new_entry. ff_h_swap_bound_new_entry + S (fp_value_swap_bound_new) = S ((S (fp_i_swap_bound_new)) * d)) /\ exists ff_q_swap_bound_new_entry. z = ff_q_swap_bound_new_entry * S ((S (fp_i_swap_bound_new)) * d) + (fp_value_swap_bound_new))) /\ (exists fp_gap_swap_bound_new_value. fp_gap_swap_bound_new_value + S fp_value_swap_bound_new = sn)))
use finite_bounded_entry_lt
use eq_decidable
use le_succ
use le_refl
intro b
intro c
intro z
intro d
intro n
intro sn
intro i
intro x
intro y
intro hsn
intro hi
intro hbounded
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
rewrite hsn at hbounded
rewrite hsn at hbounded
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hentry_bound_i : forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -&gt; exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -&gt; exists h. h + S x = l
exact finite_bounded_entry_lt
have hentry_bound_n : forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -&gt; exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -&gt; (exists h. h + S i = l) -&gt; (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -&gt; exists h. h + S x = l
exact finite_bounded_entry_lt
have hxb : exists h. h + S x = S n
specialize hentry_bound_i b
specialize hentry_bound_i c
specialize hentry_bound_i (S n)
specialize hentry_bound_i i
specialize hentry_bound_i x
apply hentry_bound_i
exact hbounded
exact hisn
exact hold_i
have hyb : exists h. h + S y = S n
specialize hentry_bound_n b
specialize hentry_bound_n c
specialize hentry_bound_n (S n)
specialize hentry_bound_n n
specialize hentry_bound_n y
apply hentry_bound_n
exact hbounded
exact hnsn
exact hold_n
have heq_i : forall u v. u = v \/ ~(u = v)
exact eq_decidable
have heq_n : forall u v. u = v \/ ~(u = v)
exact eq_decidable
rewrite hsn
rewrite hsn
intro j
intro hj
specialize heq_i j
specialize heq_i i
cases heq_i
exists y
split
rewrite heq_i_left
rewrite heq_i_left
exact hnew_i
exact hyb
specialize heq_n j
specialize heq_n n
cases heq_n
exists x
split
rewrite heq_n_left
rewrite heq_n_left
exact hnew_n
exact hxb
specialize hbounded j
have hold : exists a. (((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) /\ exists h. h + S a = S n)
apply hbounded
exact hj
cases hold
cases hold_witness
exists x1
split
specialize hpreserve j
specialize hpreserve x1
apply hpreserve
exact hj
exact heq_i_right
exact heq_n_right
exact hold_witness_left
exact hold_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,380</dd></div>
        <div><dt>Distinct objects</dt><dd>907</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>37</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d379ada457c52810d4cd93911481c101a84f7cc81f821da9e18c5250f5d4c0a1">d379ada457c5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_swap_last_bounded">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_swap_last_bounded</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L912">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_swap_last_bounded.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_swap_last_injective"
  data-name="finite_swap_last_injective" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_prefix_swap_last_reflect,le_succ,le_refl"
  data-search="finite_swap_last_injective finite swap last injective a swap-last recoding preserves injectivity of the full successor prefix. forall b c z d n sn i x y. sn = s n -&gt; (exists h. h + s i = n) -&gt; (forall fp_i_swap_inj_old fp_j_swap_inj_old fp_value_swap_inj_old. (exists fp_gap_swap_inj_old_i. fp_gap_swap_inj_old_i + s fp_i_swap_inj_old = sn) -&gt; (exists fp_gap_swap_inj_old_j. fp_gap_swap_inj_old_j + s fp_j_swap_inj_old = sn) -&gt; (((exists ff_h_swap_inj_old_left. ff_h_swap_inj_old_left + s (fp_value_swap_inj_old) = s ((s (fp_i_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_left. b = ff_q_swap_inj_old_left * s ((s (fp_i_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -&gt; (((exists ff_h_swap_inj_old_right. ff_h_swap_inj_old_right + s (fp_value_swap_inj_old) = s ((s (fp_j_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_right. b = ff_q_swap_inj_old_right * s ((s (fp_j_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -&gt; fp_i_swap_inj_old = fp_j_swap_inj_old) -&gt; (((exists ff_h_swap_inj_old_i. ff_h_swap_inj_old_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_swap_inj_old_i. b = ff_q_swap_inj_old_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_swap_inj_old_n. ff_h_swap_inj_old_n + s (y) = s ((s (n)) * c)) /\ exists ff_q_swap_inj_old_n. b = ff_q_swap_inj_old_n * s ((s (n)) * c) + (y))) -&gt; (((exists ff_h_swap_inj_new_i. ff_h_swap_inj_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_swap_inj_new_i. z = ff_q_swap_inj_new_i * s ((s (i)) * d) + (y))) -&gt; (((exists ff_h_swap_inj_new_n. ff_h_swap_inj_new_n + s (x) = s ((s (n)) * d)) /\ exists ff_q_swap_inj_new_n. z = ff_q_swap_inj_new_n * s ((s (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + s j = s n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_inj_old_j. ff_h_swap_inj_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_swap_inj_old_j. b = ff_q_swap_inj_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_swap_inj_new_j. ff_h_swap_inj_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_swap_inj_new_j. z = ff_q_swap_inj_new_j * s ((s (j)) * d) + (a)))) -&gt; (forall fp_i_swap_inj_new fp_j_swap_inj_new fp_value_swap_inj_new. (exists fp_gap_swap_inj_new_i. fp_gap_swap_inj_new_i + s fp_i_swap_inj_new = sn) -&gt; (exists fp_gap_swap_inj_new_j. fp_gap_swap_inj_new_j + s fp_j_swap_inj_new = sn) -&gt; (((exists ff_h_swap_inj_new_left. ff_h_swap_inj_new_left + s (fp_value_swap_inj_new) = s ((s (fp_i_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_left. z = ff_q_swap_inj_new_left * s ((s (fp_i_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -&gt; (((exists ff_h_swap_inj_new_right. ff_h_swap_inj_new_right + s (fp_value_swap_inj_new) = s ((s (fp_j_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_right. z = ff_q_swap_inj_new_right * s ((s (fp_j_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -&gt; fp_i_swap_inj_new = fp_j_swap_inj_new) quadratic_residues beta_prefix_swap_last_reflect le_succ le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_swap_last_injective</code><span>Finite swap last injective</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A swap-last recoding preserves injectivity of the full successor prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_reflect" href="#theorem-beta_prefix_swap_last_reflect"><code>beta_prefix_swap_last_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_swap_last_injective">Copy statement</button>
        <pre id="statement-finite_swap_last_injective"><code>forall b c z d n sn i x y. sn = S n -&gt; (exists h. h + S i = n) -&gt; (forall fp_i_swap_inj_old fp_j_swap_inj_old fp_value_swap_inj_old. (exists fp_gap_swap_inj_old_i. fp_gap_swap_inj_old_i + S fp_i_swap_inj_old = sn) -&gt; (exists fp_gap_swap_inj_old_j. fp_gap_swap_inj_old_j + S fp_j_swap_inj_old = sn) -&gt; (((exists ff_h_swap_inj_old_left. ff_h_swap_inj_old_left + S (fp_value_swap_inj_old) = S ((S (fp_i_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_left. b = ff_q_swap_inj_old_left * S ((S (fp_i_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -&gt; (((exists ff_h_swap_inj_old_right. ff_h_swap_inj_old_right + S (fp_value_swap_inj_old) = S ((S (fp_j_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_right. b = ff_q_swap_inj_old_right * S ((S (fp_j_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -&gt; fp_i_swap_inj_old = fp_j_swap_inj_old) -&gt; (((exists ff_h_swap_inj_old_i. ff_h_swap_inj_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_inj_old_i. b = ff_q_swap_inj_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_inj_old_n. ff_h_swap_inj_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_inj_old_n. b = ff_q_swap_inj_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_swap_inj_new_i. ff_h_swap_inj_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_inj_new_i. z = ff_q_swap_inj_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_swap_inj_new_n. ff_h_swap_inj_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_inj_new_n. z = ff_q_swap_inj_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_inj_old_j. ff_h_swap_inj_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_inj_old_j. b = ff_q_swap_inj_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_inj_new_j. ff_h_swap_inj_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_inj_new_j. z = ff_q_swap_inj_new_j * S ((S (j)) * d) + (a)))) -&gt; (forall fp_i_swap_inj_new fp_j_swap_inj_new fp_value_swap_inj_new. (exists fp_gap_swap_inj_new_i. fp_gap_swap_inj_new_i + S fp_i_swap_inj_new = sn) -&gt; (exists fp_gap_swap_inj_new_j. fp_gap_swap_inj_new_j + S fp_j_swap_inj_new = sn) -&gt; (((exists ff_h_swap_inj_new_left. ff_h_swap_inj_new_left + S (fp_value_swap_inj_new) = S ((S (fp_i_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_left. z = ff_q_swap_inj_new_left * S ((S (fp_i_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -&gt; (((exists ff_h_swap_inj_new_right. ff_h_swap_inj_new_right + S (fp_value_swap_inj_new) = S ((S (fp_j_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_right. z = ff_q_swap_inj_new_right * S ((S (fp_j_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -&gt; fp_i_swap_inj_new = fp_j_swap_inj_new)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_swap_last_injective">Copy proof</button>
        <pre id="proof-finite_swap_last_injective"><code>pa prove forall b c z d n sn i x y. sn = S n -&gt; (exists h. h + S i = n) -&gt; (forall fp_i_swap_inj_old fp_j_swap_inj_old fp_value_swap_inj_old. (exists fp_gap_swap_inj_old_i. fp_gap_swap_inj_old_i + S fp_i_swap_inj_old = sn) -&gt; (exists fp_gap_swap_inj_old_j. fp_gap_swap_inj_old_j + S fp_j_swap_inj_old = sn) -&gt; (((exists ff_h_swap_inj_old_left. ff_h_swap_inj_old_left + S (fp_value_swap_inj_old) = S ((S (fp_i_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_left. b = ff_q_swap_inj_old_left * S ((S (fp_i_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -&gt; (((exists ff_h_swap_inj_old_right. ff_h_swap_inj_old_right + S (fp_value_swap_inj_old) = S ((S (fp_j_swap_inj_old)) * c)) /\ exists ff_q_swap_inj_old_right. b = ff_q_swap_inj_old_right * S ((S (fp_j_swap_inj_old)) * c) + (fp_value_swap_inj_old))) -&gt; fp_i_swap_inj_old = fp_j_swap_inj_old) -&gt; (((exists ff_h_swap_inj_old_i. ff_h_swap_inj_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_inj_old_i. b = ff_q_swap_inj_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_inj_old_n. ff_h_swap_inj_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_inj_old_n. b = ff_q_swap_inj_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_swap_inj_new_i. ff_h_swap_inj_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_inj_new_i. z = ff_q_swap_inj_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_swap_inj_new_n. ff_h_swap_inj_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_inj_new_n. z = ff_q_swap_inj_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_inj_old_j. ff_h_swap_inj_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_inj_old_j. b = ff_q_swap_inj_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_inj_new_j. ff_h_swap_inj_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_inj_new_j. z = ff_q_swap_inj_new_j * S ((S (j)) * d) + (a)))) -&gt; (forall fp_i_swap_inj_new fp_j_swap_inj_new fp_value_swap_inj_new. (exists fp_gap_swap_inj_new_i. fp_gap_swap_inj_new_i + S fp_i_swap_inj_new = sn) -&gt; (exists fp_gap_swap_inj_new_j. fp_gap_swap_inj_new_j + S fp_j_swap_inj_new = sn) -&gt; (((exists ff_h_swap_inj_new_left. ff_h_swap_inj_new_left + S (fp_value_swap_inj_new) = S ((S (fp_i_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_left. z = ff_q_swap_inj_new_left * S ((S (fp_i_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -&gt; (((exists ff_h_swap_inj_new_right. ff_h_swap_inj_new_right + S (fp_value_swap_inj_new) = S ((S (fp_j_swap_inj_new)) * d)) /\ exists ff_q_swap_inj_new_right. z = ff_q_swap_inj_new_right * S ((S (fp_j_swap_inj_new)) * d) + (fp_value_swap_inj_new))) -&gt; fp_i_swap_inj_new = fp_j_swap_inj_new)
use beta_prefix_swap_last_reflect
use le_succ
use le_refl
intro b
intro c
intro z
intro d
intro n
intro sn
intro i
intro x
intro y
intro hsn
intro hi
intro hinjective
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
rewrite hsn at hinjective
rewrite hsn at hinjective
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hreflect_j : forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -&gt; (forall k v. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -&gt; (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -&gt; forall j a. (exists h. h + S j = S n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
exact beta_prefix_swap_last_reflect
have hreflect_k : forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -&gt; (forall k v. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -&gt; (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -&gt; forall j a. (exists h. h + S j = S n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
exact beta_prefix_swap_last_reflect
rewrite hsn
rewrite hsn
intro j
intro k
intro a
intro hj
intro hk
intro hnew_j
intro hnew_k
specialize hreflect_j b
specialize hreflect_j c
specialize hreflect_j z
specialize hreflect_j d
specialize hreflect_j n
specialize hreflect_j i
specialize hreflect_j x
specialize hreflect_j y
have hreflect_entries_j : forall j a. (exists h. h + S j = S n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
apply hreflect_j
exact hnew_i
exact hnew_n
exact hpreserve
specialize hreflect_entries_j j
specialize hreflect_entries_j a
have hclass_j : ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a)))))
apply hreflect_entries_j
exact hj
exact hnew_j
specialize hreflect_k b
specialize hreflect_k c
specialize hreflect_k z
specialize hreflect_k d
specialize hreflect_k n
specialize hreflect_k i
specialize hreflect_k x
specialize hreflect_k y
have hreflect_entries_k : forall j a. (exists h. h + S j = S n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
apply hreflect_k
exact hnew_i
exact hnew_n
exact hpreserve
specialize hreflect_entries_k k
specialize hreflect_entries_k a
have hclass_k : ((k = i /\ a = y) \/ ((k = n /\ a = x) \/ (~(k = i) /\ (~(k = n) /\ ((exists h. h + S a = S ((S k) * c)) /\ exists q. b = q * S ((S k) * c) + a)))))
apply hreflect_entries_k
exact hk
exact hnew_k
cases hclass_j
cases hclass_j_left
cases hclass_k
cases hclass_k_left
trans i
exact hclass_j_left_left
symm
exact hclass_k_left_left
cases hclass_k_right
cases hclass_k_right_left
have hxy : x = y
trans a
symm
exact hclass_k_right_left_right
exact hclass_j_left_right
have hin : i = n
specialize hinjective i
specialize hinjective n
specialize hinjective x
apply hinjective
exact hisn
exact hnsn
exact hold_i
rewrite hxy
rewrite hxy
exact hold_n
trans i
exact hclass_j_left_left
trans n
exact hin
symm
exact hclass_k_right_left_left
cases hclass_k_right_right
cases hclass_k_right_right_right
have hnk : n = k
specialize hinjective n
specialize hinjective k
specialize hinjective y
apply hinjective
exact hnsn
exact hk
exact hold_n
rewrite &lt;- hclass_j_left_right
rewrite &lt;- hclass_j_left_right
exact hclass_k_right_right_right_right
exfalso
apply hclass_k_right_right_right_left
symm
exact hnk
cases hclass_j_right
cases hclass_j_right_left
cases hclass_k
cases hclass_k_left
have hxy2 : x = y
trans a
symm
exact hclass_j_right_left_right
exact hclass_k_left_right
have hin2 : n = i
specialize hinjective n
specialize hinjective i
specialize hinjective y
apply hinjective
exact hnsn
exact hisn
exact hold_n
rewrite &lt;- hxy2
rewrite &lt;- hxy2
exact hold_i
trans n
exact hclass_j_right_left_left
trans i
exact hin2
symm
exact hclass_k_left_left
cases hclass_k_right
cases hclass_k_right_left
trans n
exact hclass_j_right_left_left
symm
exact hclass_k_right_left_left
cases hclass_k_right_right
cases hclass_k_right_right_right
have hik : i = k
specialize hinjective i
specialize hinjective k
specialize hinjective x
apply hinjective
exact hisn
exact hk
exact hold_i
rewrite &lt;- hclass_j_right_left_right
rewrite &lt;- hclass_j_right_left_right
exact hclass_k_right_right_right_right
exfalso
apply hclass_k_right_right_left
symm
exact hik
cases hclass_j_right_right
cases hclass_j_right_right_right
cases hclass_k
cases hclass_k_left
have hjn : j = n
specialize hinjective j
specialize hinjective n
specialize hinjective y
apply hinjective
exact hj
exact hnsn
rewrite &lt;- hclass_k_left_right
rewrite &lt;- hclass_k_left_right
exact hclass_j_right_right_right_right
exact hold_n
exfalso
apply hclass_j_right_right_right_left
exact hjn
cases hclass_k_right
cases hclass_k_right_left
have hji : j = i
specialize hinjective j
specialize hinjective i
specialize hinjective x
apply hinjective
exact hj
exact hisn
rewrite &lt;- hclass_k_right_left_right
rewrite &lt;- hclass_k_right_left_right
exact hclass_j_right_right_right_right
exact hold_i
exfalso
apply hclass_j_right_right_left
exact hji
cases hclass_k_right_right
cases hclass_k_right_right_right
specialize hinjective j
specialize hinjective k
specialize hinjective a
apply hinjective
exact hj
exact hk
exact hclass_j_right_right_right_right
exact hclass_k_right_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,203</dd></div>
        <div><dt>Distinct objects</dt><dd>1,435</dd></div>
        <div><dt>Reused references</dt><dd>57</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>53</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="b9a49da8fb88f30576f93b62a3bac1f5dc9149dc5e8666351d1bec645c7e2212">b9a49da8fb88…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_swap_last_injective">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_swap_last_injective</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1031">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_swap_last_injective.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_swap_last_surjective_back"
  data-name="finite_swap_last_surjective_back" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_prefix_swap_last_reflect,le_succ,le_refl"
  data-search="finite_swap_last_surjective_back finite swap last surjective back surjectivity of a swapped successor prefix transports back to the original code. forall b c z d n sn i x y. sn = s n -&gt; (exists h. h + s i = n) -&gt; (((exists ff_h_swap_surj_old_i. ff_h_swap_surj_old_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_swap_surj_old_i. b = ff_q_swap_surj_old_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_swap_surj_old_n. ff_h_swap_surj_old_n + s (y) = s ((s (n)) * c)) /\ exists ff_q_swap_surj_old_n. b = ff_q_swap_surj_old_n * s ((s (n)) * c) + (y))) -&gt; (((exists ff_h_swap_surj_new_i. ff_h_swap_surj_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_swap_surj_new_i. z = ff_q_swap_surj_new_i * s ((s (i)) * d) + (y))) -&gt; (((exists ff_h_swap_surj_new_n. ff_h_swap_surj_new_n + s (x) = s ((s (n)) * d)) /\ exists ff_q_swap_surj_new_n. z = ff_q_swap_surj_new_n * s ((s (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + s j = s n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_surj_old_j. ff_h_swap_surj_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_swap_surj_old_j. b = ff_q_swap_surj_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_swap_surj_new_j. ff_h_swap_surj_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_swap_surj_new_j. z = ff_q_swap_surj_new_j * s ((s (j)) * d) + (a)))) -&gt; (forall fp_value_swap_surj_new. (exists fp_gap_swap_surj_new_value. fp_gap_swap_surj_new_value + s fp_value_swap_surj_new = sn) -&gt; exists fp_i_swap_surj_new. ((exists fp_gap_swap_surj_new_index. fp_gap_swap_surj_new_index + s fp_i_swap_surj_new = sn) /\ (((exists ff_h_swap_surj_new_entry. ff_h_swap_surj_new_entry + s (fp_value_swap_surj_new) = s ((s (fp_i_swap_surj_new)) * d)) /\ exists ff_q_swap_surj_new_entry. z = ff_q_swap_surj_new_entry * s ((s (fp_i_swap_surj_new)) * d) + (fp_value_swap_surj_new))))) -&gt; (forall fp_value_swap_surj_old. (exists fp_gap_swap_surj_old_value. fp_gap_swap_surj_old_value + s fp_value_swap_surj_old = sn) -&gt; exists fp_i_swap_surj_old. ((exists fp_gap_swap_surj_old_index. fp_gap_swap_surj_old_index + s fp_i_swap_surj_old = sn) /\ (((exists ff_h_swap_surj_old_entry. ff_h_swap_surj_old_entry + s (fp_value_swap_surj_old) = s ((s (fp_i_swap_surj_old)) * c)) /\ exists ff_q_swap_surj_old_entry. b = ff_q_swap_surj_old_entry * s ((s (fp_i_swap_surj_old)) * c) + (fp_value_swap_surj_old))))) quadratic_residues beta_prefix_swap_last_reflect le_succ le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_swap_last_surjective_back</code><span>Finite swap last surjective back</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Surjectivity of a swapped successor prefix transports back to the original code.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_reflect" href="#theorem-beta_prefix_swap_last_reflect"><code>beta_prefix_swap_last_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_swap_last_surjective_back">Copy statement</button>
        <pre id="statement-finite_swap_last_surjective_back"><code>forall b c z d n sn i x y. sn = S n -&gt; (exists h. h + S i = n) -&gt; (((exists ff_h_swap_surj_old_i. ff_h_swap_surj_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_surj_old_i. b = ff_q_swap_surj_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_surj_old_n. ff_h_swap_surj_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_surj_old_n. b = ff_q_swap_surj_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_swap_surj_new_i. ff_h_swap_surj_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_surj_new_i. z = ff_q_swap_surj_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_swap_surj_new_n. ff_h_swap_surj_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_surj_new_n. z = ff_q_swap_surj_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_surj_old_j. ff_h_swap_surj_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_surj_old_j. b = ff_q_swap_surj_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_surj_new_j. ff_h_swap_surj_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_surj_new_j. z = ff_q_swap_surj_new_j * S ((S (j)) * d) + (a)))) -&gt; (forall fp_value_swap_surj_new. (exists fp_gap_swap_surj_new_value. fp_gap_swap_surj_new_value + S fp_value_swap_surj_new = sn) -&gt; exists fp_i_swap_surj_new. ((exists fp_gap_swap_surj_new_index. fp_gap_swap_surj_new_index + S fp_i_swap_surj_new = sn) /\ (((exists ff_h_swap_surj_new_entry. ff_h_swap_surj_new_entry + S (fp_value_swap_surj_new) = S ((S (fp_i_swap_surj_new)) * d)) /\ exists ff_q_swap_surj_new_entry. z = ff_q_swap_surj_new_entry * S ((S (fp_i_swap_surj_new)) * d) + (fp_value_swap_surj_new))))) -&gt; (forall fp_value_swap_surj_old. (exists fp_gap_swap_surj_old_value. fp_gap_swap_surj_old_value + S fp_value_swap_surj_old = sn) -&gt; exists fp_i_swap_surj_old. ((exists fp_gap_swap_surj_old_index. fp_gap_swap_surj_old_index + S fp_i_swap_surj_old = sn) /\ (((exists ff_h_swap_surj_old_entry. ff_h_swap_surj_old_entry + S (fp_value_swap_surj_old) = S ((S (fp_i_swap_surj_old)) * c)) /\ exists ff_q_swap_surj_old_entry. b = ff_q_swap_surj_old_entry * S ((S (fp_i_swap_surj_old)) * c) + (fp_value_swap_surj_old)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_swap_last_surjective_back">Copy proof</button>
        <pre id="proof-finite_swap_last_surjective_back"><code>pa prove forall b c z d n sn i x y. sn = S n -&gt; (exists h. h + S i = n) -&gt; (((exists ff_h_swap_surj_old_i. ff_h_swap_surj_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_surj_old_i. b = ff_q_swap_surj_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_swap_surj_old_n. ff_h_swap_surj_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_surj_old_n. b = ff_q_swap_surj_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_swap_surj_new_i. ff_h_swap_surj_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_surj_new_i. z = ff_q_swap_surj_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_swap_surj_new_n. ff_h_swap_surj_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_surj_new_n. z = ff_q_swap_surj_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_swap_surj_old_j. ff_h_swap_surj_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_surj_old_j. b = ff_q_swap_surj_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_swap_surj_new_j. ff_h_swap_surj_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_surj_new_j. z = ff_q_swap_surj_new_j * S ((S (j)) * d) + (a)))) -&gt; (forall fp_value_swap_surj_new. (exists fp_gap_swap_surj_new_value. fp_gap_swap_surj_new_value + S fp_value_swap_surj_new = sn) -&gt; exists fp_i_swap_surj_new. ((exists fp_gap_swap_surj_new_index. fp_gap_swap_surj_new_index + S fp_i_swap_surj_new = sn) /\ (((exists ff_h_swap_surj_new_entry. ff_h_swap_surj_new_entry + S (fp_value_swap_surj_new) = S ((S (fp_i_swap_surj_new)) * d)) /\ exists ff_q_swap_surj_new_entry. z = ff_q_swap_surj_new_entry * S ((S (fp_i_swap_surj_new)) * d) + (fp_value_swap_surj_new))))) -&gt; (forall fp_value_swap_surj_old. (exists fp_gap_swap_surj_old_value. fp_gap_swap_surj_old_value + S fp_value_swap_surj_old = sn) -&gt; exists fp_i_swap_surj_old. ((exists fp_gap_swap_surj_old_index. fp_gap_swap_surj_old_index + S fp_i_swap_surj_old = sn) /\ (((exists ff_h_swap_surj_old_entry. ff_h_swap_surj_old_entry + S (fp_value_swap_surj_old) = S ((S (fp_i_swap_surj_old)) * c)) /\ exists ff_q_swap_surj_old_entry. b = ff_q_swap_surj_old_entry * S ((S (fp_i_swap_surj_old)) * c) + (fp_value_swap_surj_old)))))
use beta_prefix_swap_last_reflect
use le_succ
use le_refl
intro b
intro c
intro z
intro d
intro n
intro sn
intro i
intro x
intro y
intro hsn
intro hi
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
intro hsurjective
rewrite hsn at hsurjective
rewrite hsn at hsurjective
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hreflect : forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -&gt; (forall k v. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -&gt; (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -&gt; forall j a. (exists h. h + S j = S n) -&gt; (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a)))))))
exact beta_prefix_swap_last_reflect
specialize hreflect b
specialize hreflect c
specialize hreflect z
specialize hreflect d
specialize hreflect n
specialize hreflect i
specialize hreflect x
specialize hreflect y
have hreflect_entries : forall j a. (exists h. h + S j = S n) -&gt; ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a) -&gt; ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a)))))
apply hreflect
exact hnew_i
exact hnew_n
exact hpreserve
rewrite hsn
rewrite hsn
intro a
intro ha
specialize hsurjective a
have hoccurs : exists j. ((exists h. h + S j = S n) /\ ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a))
apply hsurjective
exact ha
cases hoccurs
cases hoccurs_witness
specialize hreflect_entries x1
specialize hreflect_entries a
have hsource : ((x1 = i /\ a = y) \/ ((x1 = n /\ a = x) \/ (~(x1 = i) /\ (~(x1 = n) /\ ((exists h. h + S a = S ((S x1) * c)) /\ exists q. b = q * S ((S x1) * c) + a)))))
apply hreflect_entries
exact hoccurs_witness_left
exact hoccurs_witness_right
cases hsource
cases hsource_left
exists n
split
exact hnsn
rewrite hsource_left_right
rewrite hsource_left_right
exact hold_n
cases hsource_right
cases hsource_right_left
exists i
split
exact hisn
rewrite hsource_right_left_right
rewrite hsource_right_left_right
exact hold_i
cases hsource_right_right
cases hsource_right_right_right
exists x1
split
exact hoccurs_witness_left
exact hsource_right_right_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,929</dd></div>
        <div><dt>Distinct objects</dt><dd>1,161</dd></div>
        <div><dt>Reused references</dt><dd>57</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>53</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="689f32aef19d5615385b9a8afa366bc4c6651bcac8c27d5e27591df89330b158">689f32aef19d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_swap_last_surjective_back">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_swap_last_surjective_back</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1271">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_swap_last_surjective_back.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_contains_decidable"
  data-name="finite_contains_decidable" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero,finite_lt_succ_eq_or_lt,beta_at_exists,beta_at_unique,eq_decidable,le_refl,le_succ"
  data-search="finite_contains_decidable finite contains decidable occurrence of a value in a nonempty decoded prefix is constructively decidable. forall b c l y. ((exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + s fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + s (y) = s ((s (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * s ((s (fp_i_contains_l)) * c) + (y))))) \/ ~(exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + s fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + s (y) = s ((s (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * s ((s (fp_i_contains_l)) * c) + (y)))))) quadratic_residues add_eq_zero_right succ_ne_zero finite_lt_succ_eq_or_lt beta_at_exists beta_at_unique eq_decidable le_refl le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_contains_decidable</code><span>Finite contains decidable</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Occurrence of a value in a nonempty decoded prefix is constructively decidable.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_contains_decidable">Copy statement</button>
        <pre id="statement-finite_contains_decidable"><code>forall b c l y. ((exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + S fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + S (y) = S ((S (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * S ((S (fp_i_contains_l)) * c) + (y))))) \/ ~(exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + S fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + S (y) = S ((S (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * S ((S (fp_i_contains_l)) * c) + (y))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_contains_decidable">Copy proof</button>
        <pre id="proof-finite_contains_decidable"><code>pa prove forall b c l y. ((exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + S fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + S (y) = S ((S (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * S ((S (fp_i_contains_l)) * c) + (y))))) \/ ~(exists fp_i_contains_l. ((exists fp_gap_contains_l_index. fp_gap_contains_l_index + S fp_i_contains_l = l) /\ (((exists ff_h_contains_l_entry. ff_h_contains_l_entry + S (y) = S ((S (fp_i_contains_l)) * c)) /\ exists ff_q_contains_l_entry. b = ff_q_contains_l_entry * S ((S (fp_i_contains_l)) * c) + (y))))))
use add_eq_zero_right
use succ_ne_zero
use finite_lt_succ_eq_or_lt
use beta_at_exists
use beta_at_unique
use eq_decidable
use le_refl
use le_succ
intro b
intro c
induction l
intro y
right
intro hcontains
cases hcontains
cases hcontains_witness
cases hcontains_witness_left
have hsi : S x = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right (S x)
apply add_eq_zero_right
exact hcontains_witness_left_witness
specialize succ_ne_zero x
apply succ_ne_zero
exact hsi
intro y
have hpresent : (exists i. ((exists h. h + S i = l) /\ ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y))) \/ ~(exists i. ((exists h. h + S i = l) /\ ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y)))
specialize IH y
exact IH
cases hpresent
left
cases hpresent_left
cases hpresent_left_witness
exists x
split
specialize le_succ (S x)
specialize le_succ l
apply le_succ
exact hpresent_left_witness_left
exact hpresent_left_witness_right
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists l
cases beta_at_exists
specialize eq_decidable x
specialize eq_decidable y
cases eq_decidable
left
exists l
split
specialize le_refl (S l)
exact le_refl
rewrite eq_decidable_left at beta_at_exists_witness
rewrite eq_decidable_left at beta_at_exists_witness
exact beta_at_exists_witness
right
intro hfull
cases hfull
cases hfull_witness
have hindex : x1 = l \/ exists h. h + S x1 = l
specialize finite_lt_succ_eq_or_lt l
specialize finite_lt_succ_eq_or_lt x1
apply finite_lt_succ_eq_or_lt
exact hfull_witness_left
cases hindex
have hentry : ((exists h. h + S y = S ((S l) * c)) /\ exists q. b = q * S ((S l) * c) + y)
rewrite hindex_left at hfull_witness_right
rewrite hindex_left at hfull_witness_right
exact hfull_witness_right
have hxy : x = y
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique l
specialize beta_at_unique x
specialize beta_at_unique y
apply beta_at_unique
exact beta_at_exists_witness
exact hentry
apply eq_decidable_right
exact hxy
apply hpresent_right
exists x1
split
exact hindex_right
exact hfull_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,961</dd></div>
        <div><dt>Distinct objects</dt><dd>1,140</dd></div>
        <div><dt>Reused references</dt><dd>61</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>60</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="264b86a40d0a53815676d1f9066b012e2701ac578e369e7cd5b44ae72822aa0e">264b86a40d0a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_contains_decidable">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_contains_decidable</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1379">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_contains_decidable.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_bounded_prefix_without_top"
  data-name="finite_bounded_prefix_without_top" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_succ,finite_lt_succ_eq_or_lt"
  data-search="finite_bounded_prefix_without_top finite bounded prefix without top if a successor prefix omits its top value, its old prefix is bounded by the predecessor. forall b c n sn. sn = s n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + s fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + s (fp_value_bounded_succ) = s ((s (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * s ((s (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + s fp_value_bounded_succ = sn))) -&gt; (forall i. (exists h. h + s i = n) -&gt; ~(((exists ff_h_top_i. ff_h_top_i + s (n) = s ((s (i)) * c)) /\ exists ff_q_top_i. b = ff_q_top_i * s ((s (i)) * c) + (n)))) -&gt; (forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + s fp_i_bounded_prefix = n) -&gt; exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + s (fp_value_bounded_prefix) = s ((s (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * s ((s (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + s fp_value_bounded_prefix = n))) quadratic_residues le_succ finite_lt_succ_eq_or_lt">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_bounded_prefix_without_top</code><span>Finite bounded prefix without top</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">If a successor prefix omits its top value, its old prefix is bounded by the predecessor.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_no_top_successor_gate" href="#theorem-finite_no_top_successor_gate"><code>finite_no_top_successor_gate</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_fixed_last_prefix_bounded" href="#theorem-finite_fixed_last_prefix_bounded"><code>finite_fixed_last_prefix_bounded</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_bounded_prefix_without_top">Copy statement</button>
        <pre id="statement-finite_bounded_prefix_without_top"><code>forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall i. (exists h. h + S i = n) -&gt; ~(((exists ff_h_top_i. ff_h_top_i + S (n) = S ((S (i)) * c)) /\ exists ff_q_top_i. b = ff_q_top_i * S ((S (i)) * c) + (n)))) -&gt; (forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -&gt; exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_bounded_prefix_without_top">Copy proof</button>
        <pre id="proof-finite_bounded_prefix_without_top"><code>pa prove forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall i. (exists h. h + S i = n) -&gt; ~(((exists ff_h_top_i. ff_h_top_i + S (n) = S ((S (i)) * c)) /\ exists ff_q_top_i. b = ff_q_top_i * S ((S (i)) * c) + (n)))) -&gt; (forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -&gt; exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n)))
use le_succ
use finite_lt_succ_eq_or_lt
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hnotop
rewrite hsn at hbounded
rewrite hsn at hbounded
intro i
intro hi
specialize hbounded i
have hfull : exists x. (((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x) /\ exists h. h + S x = S n)
apply hbounded
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
cases hfull
cases hfull_witness
have hsplit : x = n \/ exists h. h + S x = n
specialize finite_lt_succ_eq_or_lt n
specialize finite_lt_succ_eq_or_lt x
apply finite_lt_succ_eq_or_lt
exact hfull_witness_right
cases hsplit
exfalso
specialize hnotop i
apply hnotop
exact hi
rewrite &lt;- hsplit_left
rewrite &lt;- hsplit_left
exact hfull_witness_left
exists x
split
exact hfull_witness_left
exact hsplit_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>216</dd></div>
        <div><dt>Distinct objects</dt><dd>185</dd></div>
        <div><dt>Reused references</dt><dd>5</dd></div>
        <div><dt>Depth</dt><dd>23</dd></div>
        <div><dt>Cuts</dt><dd>8</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="994ca043b11bb83ec7ebc21ac19f2bd3655ac19cf7de5ed4741863937e0d7276">994ca043b11b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_bounded_prefix_without_top">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_bounded_prefix_without_top</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1480">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_bounded_prefix_without_top.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_bounded_last_succ"
  data-name="finite_bounded_last_succ" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="le_refl"
  data-search="finite_bounded_last_succ finite bounded last succ a bounded successor prefix exposes a bounded final decoded value. forall b c n sn. sn = s n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + s fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + s (fp_value_bounded_succ) = s ((s (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * s ((s (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + s fp_value_bounded_succ = sn))) -&gt; exists x. ((((exists ff_h_last_x. ff_h_last_x + s (x) = s ((s (n)) * c)) /\ exists ff_q_last_x. b = ff_q_last_x * s ((s (n)) * c) + (x))) /\ exists h. h + s x = s n) quadratic_residues le_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_bounded_last_succ</code><span>Finite bounded last succ</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded successor prefix exposes a bounded final decoded value.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_last_is_top_from_prefix_surjective" href="#theorem-finite_last_is_top_from_prefix_surjective"><code>finite_last_is_top_from_prefix_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_bounded_last_succ">Copy statement</button>
        <pre id="statement-finite_bounded_last_succ"><code>forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; exists x. ((((exists ff_h_last_x. ff_h_last_x + S (x) = S ((S (n)) * c)) /\ exists ff_q_last_x. b = ff_q_last_x * S ((S (n)) * c) + (x))) /\ exists h. h + S x = S n)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_bounded_last_succ">Copy proof</button>
        <pre id="proof-finite_bounded_last_succ"><code>pa prove forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; exists x. ((((exists ff_h_last_x. ff_h_last_x + S (x) = S ((S (n)) * c)) /\ exists ff_q_last_x. b = ff_q_last_x * S ((S (n)) * c) + (x))) /\ exists h. h + S x = S n)
use le_refl
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
rewrite hsn at hbounded
rewrite hsn at hbounded
specialize hbounded n
apply hbounded
specialize le_refl (S n)
exact le_refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>53</dd></div>
        <div><dt>Distinct objects</dt><dd>53</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>17</dd></div>
        <div><dt>Cuts</dt><dd>2</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ac7f1147afe238149d7332bcd33f8a0300de15113b6c82a241a8c1d515727d44">ac7f1147afe2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_bounded_last_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_bounded_last_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1530">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_bounded_last_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_surjective_succ_intro"
  data-name="finite_surjective_succ_intro" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="finite_lt_succ_eq_or_lt,le_refl,le_succ"
  data-search="finite_surjective_succ_intro finite surjective succ intro a surjective prefix plus its new top value is surjective at successor length. forall b c n sn. sn = s n -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + s fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + s fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + s (fp_value_surj_n) = s ((s (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * s ((s (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (((exists ff_h_last_n. ff_h_last_n + s (n) = s ((s (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * s ((s (n)) * c) + (n))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + s fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + s fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + s (fp_value_surj_succ) = s ((s (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * s ((s (fp_i_surj_succ)) * c) + (fp_value_surj_succ))))) quadratic_residues finite_lt_succ_eq_or_lt le_refl le_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_surjective_succ_intro</code><span>Finite surjective succ intro</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A surjective prefix plus its new top value is surjective at successor length.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_from_prefix" href="#theorem-finite_surjective_succ_from_prefix"><code>finite_surjective_succ_from_prefix</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_surjective_succ_intro">Copy statement</button>
        <pre id="statement-finite_surjective_succ_intro"><code>forall b c n sn. sn = S n -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_surjective_succ_intro">Copy proof</button>
        <pre id="proof-finite_surjective_succ_intro"><code>pa prove forall b c n sn. sn = S n -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))
use finite_lt_succ_eq_or_lt
use le_refl
use le_succ
intro b
intro c
intro n
intro sn
intro hsn
intro hsurj
intro hlast
rewrite hsn
rewrite hsn
intro y
intro hy
have hsplit : y = n \/ exists h. h + S y = n
specialize finite_lt_succ_eq_or_lt n
specialize finite_lt_succ_eq_or_lt y
apply finite_lt_succ_eq_or_lt
exact hy
cases hsplit
exists n
split
specialize le_refl (S n)
exact le_refl
rewrite hsplit_left
rewrite hsplit_left
exact hlast
specialize hsurj y
have hpre : exists i. ((exists h. h + S i = n) /\ ((exists h. h + S y = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + y))
apply hsurj
exact hsplit_right
cases hpre
cases hpre_witness
exists x
split
specialize le_succ (S x)
specialize le_succ n
apply le_succ
exact hpre_witness_left
exact hpre_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>243</dd></div>
        <div><dt>Distinct objects</dt><dd>195</dd></div>
        <div><dt>Reused references</dt><dd>6</dd></div>
        <div><dt>Depth</dt><dd>22</dd></div>
        <div><dt>Cuts</dt><dd>10</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c2ee0348b812ca134496f14d0a88fcb7fa113073ad6799cc09b3f910799381f5">c2ee0348b812…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_surjective_succ_intro">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_surjective_succ_intro</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1551">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_surjective_succ_intro.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_last_is_top_from_prefix_surjective"
  data-name="finite_last_is_top_from_prefix_surjective" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="finite_bounded_last_succ,finite_lt_succ_eq_or_lt,le_refl,le_succ,lt_irrefl_expanded"
  data-search="finite_last_is_top_from_prefix_surjective finite last is top from prefix surjective a bounded injective successor sequence must place the new value last once its prefix is surjective. forall b c n sn. sn = s n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + s fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + s (fp_value_bounded_succ) = s ((s (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * s ((s (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + s fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + s fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + s fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + s (fp_value_inj_succ) = s ((s (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * s ((s (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + s (fp_value_inj_succ) = s ((s (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * s ((s (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + s fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + s fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + s (fp_value_surj_n) = s ((s (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * s ((s (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (((exists ff_h_last_n. ff_h_last_n + s (n) = s ((s (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * s ((s (n)) * c) + (n))) quadratic_residues finite_bounded_last_succ finite_lt_succ_eq_or_lt le_refl le_succ lt_irrefl_expanded">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_last_is_top_from_prefix_surjective</code><span>Finite last is top from prefix surjective</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded injective successor sequence must place the new value last once its prefix is surjective.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_last_succ" href="#theorem-finite_bounded_last_succ"><code>finite_bounded_last_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_from_prefix" href="#theorem-finite_surjective_succ_from_prefix"><code>finite_surjective_succ_from_prefix</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_last_is_top_from_prefix_surjective">Copy statement</button>
        <pre id="statement-finite_last_is_top_from_prefix_surjective"><code>forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_last_is_top_from_prefix_surjective">Copy proof</button>
        <pre id="proof-finite_last_is_top_from_prefix_surjective"><code>pa prove forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n)))
use finite_bounded_last_succ
use finite_lt_succ_eq_or_lt
use le_refl
use le_succ
use lt_irrefl_expanded
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hinj
intro hsurj
rewrite hsn at hinj
rewrite hsn at hinj
have hlast : exists x. (((exists h. h + S x = S ((S n) * c)) /\ exists q. b = q * S ((S n) * c) + x) /\ exists h. h + S x = S n)
specialize finite_bounded_last_succ b
specialize finite_bounded_last_succ c
specialize finite_bounded_last_succ n
specialize finite_bounded_last_succ sn
apply finite_bounded_last_succ
exact hsn
exact hbounded
cases hlast
cases hlast_witness
have hsplit : x = n \/ exists h. h + S x = n
specialize finite_lt_succ_eq_or_lt n
specialize finite_lt_succ_eq_or_lt x
apply finite_lt_succ_eq_or_lt
exact hlast_witness_right
cases hsplit
rewrite hsplit_left at hlast_witness_left
rewrite hsplit_left at hlast_witness_left
exact hlast_witness_left
specialize hsurj x
have hpre : exists i. ((exists h. h + S i = n) /\ ((exists h. h + S x = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + x))
apply hsurj
exact hsplit_right
cases hpre
cases hpre_witness
have hni : n = x1
specialize hinj n
specialize hinj x1
specialize hinj x
apply hinj
specialize le_refl (S n)
exact le_refl
specialize le_succ (S x1)
specialize le_succ n
apply le_succ
exact hpre_witness_left
exact hlast_witness_left
exact hpre_witness_right
exfalso
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hni
exact hpre_witness_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>402</dd></div>
        <div><dt>Distinct objects</dt><dd>302</dd></div>
        <div><dt>Reused references</dt><dd>8</dd></div>
        <div><dt>Depth</dt><dd>30</dd></div>
        <div><dt>Cuts</dt><dd>16</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0a7e3280cd99a50f01b97f56b47053e45ed26a4d1c92864e1627b887d2a6bcda">0a7e3280cd99…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_last_is_top_from_prefix_surjective">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_last_is_top_from_prefix_surjective</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1600">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_last_is_top_from_prefix_surjective.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_surjective_succ_from_prefix"
  data-name="finite_surjective_succ_from_prefix" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="finite_last_is_top_from_prefix_surjective,finite_surjective_succ_intro"
  data-search="finite_surjective_succ_from_prefix finite surjective succ from prefix the available successor branch extends prefix surjectivity to the full prefix. forall b c n sn. sn = s n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + s fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + s (fp_value_bounded_succ) = s ((s (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * s ((s (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + s fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + s fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + s fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + s (fp_value_inj_succ) = s ((s (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * s ((s (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + s (fp_value_inj_succ) = s ((s (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * s ((s (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + s fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + s fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + s (fp_value_surj_n) = s ((s (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * s ((s (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + s fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + s fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + s (fp_value_surj_succ) = s ((s (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * s ((s (fp_i_surj_succ)) * c) + (fp_value_surj_succ))))) quadratic_residues finite_last_is_top_from_prefix_surjective finite_surjective_succ_intro">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_surjective_succ_from_prefix</code><span>Finite surjective succ from prefix</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The available successor branch extends prefix surjectivity to the full prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_last_is_top_from_prefix_surjective" href="#theorem-finite_last_is_top_from_prefix_surjective"><code>finite_last_is_top_from_prefix_surjective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_intro" href="#theorem-finite_surjective_succ_intro"><code>finite_surjective_succ_intro</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_no_top_successor_gate" href="#theorem-finite_no_top_successor_gate"><code>finite_no_top_successor_gate</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_surjective_succ_from_prefix">Copy statement</button>
        <pre id="statement-finite_surjective_succ_from_prefix"><code>forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_surjective_succ_from_prefix">Copy proof</button>
        <pre id="proof-finite_surjective_succ_from_prefix"><code>pa prove forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))
use finite_last_is_top_from_prefix_surjective
use finite_surjective_succ_intro
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hinj
intro hsurj
have hlast : ((exists ff_h_last_n. ff_h_last_n + S (n) = S ((S (n)) * c)) /\ exists ff_q_last_n. b = ff_q_last_n * S ((S (n)) * c) + (n))
specialize finite_last_is_top_from_prefix_surjective b
specialize finite_last_is_top_from_prefix_surjective c
specialize finite_last_is_top_from_prefix_surjective n
specialize finite_last_is_top_from_prefix_surjective sn
apply finite_last_is_top_from_prefix_surjective
exact hsn
exact hbounded
exact hinj
exact hsurj
specialize finite_surjective_succ_intro b
specialize finite_surjective_succ_intro c
specialize finite_surjective_succ_intro n
specialize finite_surjective_succ_intro sn
apply finite_surjective_succ_intro
exact hsn
exact hsurj
exact hlast
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>678</dd></div>
        <div><dt>Distinct objects</dt><dd>385</dd></div>
        <div><dt>Reused references</dt><dd>11</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>28</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="78bdcadaa47a156c08d300346827c1799b006a89197259dd4d58bdc4ca985e87">78bdcadaa47a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_surjective_succ_from_prefix">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_surjective_succ_from_prefix</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1674">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_surjective_succ_from_prefix.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_no_top_successor_gate"
  data-name="finite_no_top_successor_gate" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="finite_bounded_prefix_without_top,finite_injective_prefix_succ,finite_surjective_succ_from_prefix"
  data-search="finite_no_top_successor_gate finite no top successor gate the no-top branch of the constructive successor induction is complete. forall b c n sn. sn = s n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + s fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + s (fp_value_bounded_succ) = s ((s (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * s ((s (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + s fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + s fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + s fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + s (fp_value_inj_succ) = s ((s (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * s ((s (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + s (fp_value_inj_succ) = s ((s (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * s ((s (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; ~(exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + s fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + s (n) = s ((s (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * s ((s (fp_i_contains_top)) * c) + (n))))) -&gt; ((forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + s fp_i_bounded_prefix = n) -&gt; exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + s (fp_value_bounded_prefix) = s ((s (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * s ((s (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + s fp_value_bounded_prefix = n))) -&gt; (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + s fp_i_inj_prefix = n) -&gt; (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + s fp_j_inj_prefix = n) -&gt; (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + s (fp_value_inj_prefix) = s ((s (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * s ((s (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + s (fp_value_inj_prefix) = s ((s (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * s ((s (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; fp_i_inj_prefix = fp_j_inj_prefix) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + s fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + s fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + s (fp_value_surj_n) = s ((s (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * s ((s (fp_i_surj_n)) * c) + (fp_value_surj_n)))))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + s fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + s fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + s (fp_value_surj_succ) = s ((s (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * s ((s (fp_i_surj_succ)) * c) + (fp_value_surj_succ))))) quadratic_residues finite_bounded_prefix_without_top finite_injective_prefix_succ finite_surjective_succ_from_prefix">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_no_top_successor_gate</code><span>Finite no top successor gate</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The no-top branch of the constructive successor induction is complete.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_prefix_without_top" href="#theorem-finite_bounded_prefix_without_top"><code>finite_bounded_prefix_without_top</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_injective_prefix_succ" href="#theorem-finite_injective_prefix_succ"><code>finite_injective_prefix_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_from_prefix" href="#theorem-finite_surjective_succ_from_prefix"><code>finite_surjective_succ_from_prefix</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_injective_surjective" href="#theorem-finite_bounded_injective_surjective"><code>finite_bounded_injective_surjective</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_no_top_successor_gate">Copy statement</button>
        <pre id="statement-finite_no_top_successor_gate"><code>forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; ~(exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n))))) -&gt; ((forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -&gt; exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n))) -&gt; (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -&gt; (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -&gt; (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; fp_i_inj_prefix = fp_j_inj_prefix) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n)))))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_no_top_successor_gate">Copy proof</button>
        <pre id="proof-finite_no_top_successor_gate"><code>pa prove forall b c n sn. sn = S n -&gt; (forall fp_i_bounded_succ. (exists fp_gap_bounded_succ_index. fp_gap_bounded_succ_index + S fp_i_bounded_succ = sn) -&gt; exists fp_value_bounded_succ. ((((exists ff_h_bounded_succ_entry. ff_h_bounded_succ_entry + S (fp_value_bounded_succ) = S ((S (fp_i_bounded_succ)) * c)) /\ exists ff_q_bounded_succ_entry. b = ff_q_bounded_succ_entry * S ((S (fp_i_bounded_succ)) * c) + (fp_value_bounded_succ))) /\ (exists fp_gap_bounded_succ_value. fp_gap_bounded_succ_value + S fp_value_bounded_succ = sn))) -&gt; (forall fp_i_inj_succ fp_j_inj_succ fp_value_inj_succ. (exists fp_gap_inj_succ_i. fp_gap_inj_succ_i + S fp_i_inj_succ = sn) -&gt; (exists fp_gap_inj_succ_j. fp_gap_inj_succ_j + S fp_j_inj_succ = sn) -&gt; (((exists ff_h_inj_succ_left. ff_h_inj_succ_left + S (fp_value_inj_succ) = S ((S (fp_i_inj_succ)) * c)) /\ exists ff_q_inj_succ_left. b = ff_q_inj_succ_left * S ((S (fp_i_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; (((exists ff_h_inj_succ_right. ff_h_inj_succ_right + S (fp_value_inj_succ) = S ((S (fp_j_inj_succ)) * c)) /\ exists ff_q_inj_succ_right. b = ff_q_inj_succ_right * S ((S (fp_j_inj_succ)) * c) + (fp_value_inj_succ))) -&gt; fp_i_inj_succ = fp_j_inj_succ) -&gt; ~(exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n))))) -&gt; ((forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -&gt; exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n))) -&gt; (forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -&gt; (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -&gt; (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; fp_i_inj_prefix = fp_j_inj_prefix) -&gt; (forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n)))))) -&gt; (forall fp_value_surj_succ. (exists fp_gap_surj_succ_value. fp_gap_surj_succ_value + S fp_value_surj_succ = sn) -&gt; exists fp_i_surj_succ. ((exists fp_gap_surj_succ_index. fp_gap_surj_succ_index + S fp_i_surj_succ = sn) /\ (((exists ff_h_surj_succ_entry. ff_h_surj_succ_entry + S (fp_value_surj_succ) = S ((S (fp_i_surj_succ)) * c)) /\ exists ff_q_surj_succ_entry. b = ff_q_surj_succ_entry * S ((S (fp_i_surj_succ)) * c) + (fp_value_surj_succ)))))
use finite_bounded_prefix_without_top
use finite_injective_prefix_succ
use finite_surjective_succ_from_prefix
intro b
intro c
intro n
intro sn
intro hsn
intro hbounded
intro hinj
intro hmissing
intro hinduction
have hnotop : forall i. (exists h. h + S i = n) -&gt; ~((exists h. h + S n = S ((S i) * c)) /\ exists q. b = q * S ((S i) * c) + n)
intro i
intro hi
intro hentry
apply hmissing
exists i
split
exact hi
exact hentry
have hprefix_bounded : forall fp_i_bounded_prefix. (exists fp_gap_bounded_prefix_index. fp_gap_bounded_prefix_index + S fp_i_bounded_prefix = n) -&gt; exists fp_value_bounded_prefix. ((((exists ff_h_bounded_prefix_entry. ff_h_bounded_prefix_entry + S (fp_value_bounded_prefix) = S ((S (fp_i_bounded_prefix)) * c)) /\ exists ff_q_bounded_prefix_entry. b = ff_q_bounded_prefix_entry * S ((S (fp_i_bounded_prefix)) * c) + (fp_value_bounded_prefix))) /\ (exists fp_gap_bounded_prefix_value. fp_gap_bounded_prefix_value + S fp_value_bounded_prefix = n))
specialize finite_bounded_prefix_without_top b
specialize finite_bounded_prefix_without_top c
specialize finite_bounded_prefix_without_top n
specialize finite_bounded_prefix_without_top sn
apply finite_bounded_prefix_without_top
exact hsn
exact hbounded
exact hnotop
have hprefix_injective : forall fp_i_inj_prefix fp_j_inj_prefix fp_value_inj_prefix. (exists fp_gap_inj_prefix_i. fp_gap_inj_prefix_i + S fp_i_inj_prefix = n) -&gt; (exists fp_gap_inj_prefix_j. fp_gap_inj_prefix_j + S fp_j_inj_prefix = n) -&gt; (((exists ff_h_inj_prefix_left. ff_h_inj_prefix_left + S (fp_value_inj_prefix) = S ((S (fp_i_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_left. b = ff_q_inj_prefix_left * S ((S (fp_i_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; (((exists ff_h_inj_prefix_right. ff_h_inj_prefix_right + S (fp_value_inj_prefix) = S ((S (fp_j_inj_prefix)) * c)) /\ exists ff_q_inj_prefix_right. b = ff_q_inj_prefix_right * S ((S (fp_j_inj_prefix)) * c) + (fp_value_inj_prefix))) -&gt; fp_i_inj_prefix = fp_j_inj_prefix
specialize finite_injective_prefix_succ b
specialize finite_injective_prefix_succ c
specialize finite_injective_prefix_succ n
specialize finite_injective_prefix_succ sn
apply finite_injective_prefix_succ
exact hsn
exact hinj
have hprefix_surjective : forall fp_value_surj_n. (exists fp_gap_surj_n_value. fp_gap_surj_n_value + S fp_value_surj_n = n) -&gt; exists fp_i_surj_n. ((exists fp_gap_surj_n_index. fp_gap_surj_n_index + S fp_i_surj_n = n) /\ (((exists ff_h_surj_n_entry. ff_h_surj_n_entry + S (fp_value_surj_n) = S ((S (fp_i_surj_n)) * c)) /\ exists ff_q_surj_n_entry. b = ff_q_surj_n_entry * S ((S (fp_i_surj_n)) * c) + (fp_value_surj_n))))
apply hinduction
exact hprefix_bounded
exact hprefix_injective
specialize finite_surjective_succ_from_prefix b
specialize finite_surjective_succ_from_prefix c
specialize finite_surjective_succ_from_prefix n
specialize finite_surjective_succ_from_prefix sn
apply finite_surjective_succ_from_prefix
exact hsn
exact hbounded
exact hinj
exact hprefix_surjective
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,054</dd></div>
        <div><dt>Distinct objects</dt><dd>553</dd></div>
        <div><dt>Reused references</dt><dd>14</dd></div>
        <div><dt>Depth</dt><dd>36</dd></div>
        <div><dt>Cuts</dt><dd>41</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2d6d4891922b432f50793a01195ecdab4a2ec330b30f127d903564556d2430a6">2d6d4891922b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_no_top_successor_gate">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_no_top_successor_gate</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1712">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_no_top_successor_gate.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_bounded_injective_surjective"
  data-name="finite_bounded_injective_surjective" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="finite_surjective_zero,finite_contains_decidable,finite_bounded_last_succ,beta_prefix_swap_last_from_entries,finite_swap_last_bounded,finite_swap_last_injective,finite_bounded_prefix_without_top,finite_injective_prefix_succ,finite_surjective_succ_from_prefix,finite_swap_last_surjective_back,finite_no_top_successor_gate,beta_at_unique,le_succ,le_refl,lt_irrefl_expanded"
  data-search="finite_bounded_injective_surjective finite bounded injective surjective every bounded injective beta-coded prefix is surjective onto its finite interval. forall n b c. (forall fp_i_pigeon_bounded. (exists fp_gap_pigeon_bounded_index. fp_gap_pigeon_bounded_index + s fp_i_pigeon_bounded = n) -&gt; exists fp_value_pigeon_bounded. ((((exists ff_h_pigeon_bounded_entry. ff_h_pigeon_bounded_entry + s (fp_value_pigeon_bounded) = s ((s (fp_i_pigeon_bounded)) * c)) /\ exists ff_q_pigeon_bounded_entry. b = ff_q_pigeon_bounded_entry * s ((s (fp_i_pigeon_bounded)) * c) + (fp_value_pigeon_bounded))) /\ (exists fp_gap_pigeon_bounded_value. fp_gap_pigeon_bounded_value + s fp_value_pigeon_bounded = n))) -&gt; (forall fp_i_pigeon_injective fp_j_pigeon_injective fp_value_pigeon_injective. (exists fp_gap_pigeon_injective_i. fp_gap_pigeon_injective_i + s fp_i_pigeon_injective = n) -&gt; (exists fp_gap_pigeon_injective_j. fp_gap_pigeon_injective_j + s fp_j_pigeon_injective = n) -&gt; (((exists ff_h_pigeon_injective_left. ff_h_pigeon_injective_left + s (fp_value_pigeon_injective) = s ((s (fp_i_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_left. b = ff_q_pigeon_injective_left * s ((s (fp_i_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -&gt; (((exists ff_h_pigeon_injective_right. ff_h_pigeon_injective_right + s (fp_value_pigeon_injective) = s ((s (fp_j_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_right. b = ff_q_pigeon_injective_right * s ((s (fp_j_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -&gt; fp_i_pigeon_injective = fp_j_pigeon_injective) -&gt; (forall fp_value_pigeon_surjective. (exists fp_gap_pigeon_surjective_value. fp_gap_pigeon_surjective_value + s fp_value_pigeon_surjective = n) -&gt; exists fp_i_pigeon_surjective. ((exists fp_gap_pigeon_surjective_index. fp_gap_pigeon_surjective_index + s fp_i_pigeon_surjective = n) /\ (((exists ff_h_pigeon_surjective_entry. ff_h_pigeon_surjective_entry + s (fp_value_pigeon_surjective) = s ((s (fp_i_pigeon_surjective)) * c)) /\ exists ff_q_pigeon_surjective_entry. b = ff_q_pigeon_surjective_entry * s ((s (fp_i_pigeon_surjective)) * c) + (fp_value_pigeon_surjective))))) quadratic_residues finite_surjective_zero finite_contains_decidable finite_bounded_last_succ beta_prefix_swap_last_from_entries finite_swap_last_bounded finite_swap_last_injective finite_bounded_prefix_without_top finite_injective_prefix_succ finite_surjective_succ_from_prefix finite_swap_last_surjective_back finite_no_top_successor_gate beta_at_unique le_succ le_refl lt_irrefl_expanded">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_bounded_injective_surjective</code><span>Finite bounded injective surjective</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every bounded injective beta-coded prefix is surjective onto its finite interval.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_surjective_zero" href="#theorem-finite_surjective_zero"><code>finite_surjective_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_contains_decidable" href="#theorem-finite_contains_decidable"><code>finite_contains_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_last_succ" href="#theorem-finite_bounded_last_succ"><code>finite_bounded_last_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_from_entries" href="#theorem-beta_prefix_swap_last_from_entries"><code>beta_prefix_swap_last_from_entries</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_bounded" href="#theorem-finite_swap_last_bounded"><code>finite_swap_last_bounded</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_injective" href="#theorem-finite_swap_last_injective"><code>finite_swap_last_injective</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_bounded_prefix_without_top" href="#theorem-finite_bounded_prefix_without_top"><code>finite_bounded_prefix_without_top</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_injective_prefix_succ" href="#theorem-finite_injective_prefix_succ"><code>finite_injective_prefix_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_surjective_succ_from_prefix" href="#theorem-finite_surjective_succ_from_prefix"><code>finite_surjective_succ_from_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_swap_last_surjective_back" href="#theorem-finite_swap_last_surjective_back"><code>finite_swap_last_surjective_back</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_no_top_successor_gate" href="#theorem-finite_no_top_successor_gate"><code>finite_no_top_successor_gate</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_bounded_injective_surjective">Copy statement</button>
        <pre id="statement-finite_bounded_injective_surjective"><code>forall n b c. (forall fp_i_pigeon_bounded. (exists fp_gap_pigeon_bounded_index. fp_gap_pigeon_bounded_index + S fp_i_pigeon_bounded = n) -&gt; exists fp_value_pigeon_bounded. ((((exists ff_h_pigeon_bounded_entry. ff_h_pigeon_bounded_entry + S (fp_value_pigeon_bounded) = S ((S (fp_i_pigeon_bounded)) * c)) /\ exists ff_q_pigeon_bounded_entry. b = ff_q_pigeon_bounded_entry * S ((S (fp_i_pigeon_bounded)) * c) + (fp_value_pigeon_bounded))) /\ (exists fp_gap_pigeon_bounded_value. fp_gap_pigeon_bounded_value + S fp_value_pigeon_bounded = n))) -&gt; (forall fp_i_pigeon_injective fp_j_pigeon_injective fp_value_pigeon_injective. (exists fp_gap_pigeon_injective_i. fp_gap_pigeon_injective_i + S fp_i_pigeon_injective = n) -&gt; (exists fp_gap_pigeon_injective_j. fp_gap_pigeon_injective_j + S fp_j_pigeon_injective = n) -&gt; (((exists ff_h_pigeon_injective_left. ff_h_pigeon_injective_left + S (fp_value_pigeon_injective) = S ((S (fp_i_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_left. b = ff_q_pigeon_injective_left * S ((S (fp_i_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -&gt; (((exists ff_h_pigeon_injective_right. ff_h_pigeon_injective_right + S (fp_value_pigeon_injective) = S ((S (fp_j_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_right. b = ff_q_pigeon_injective_right * S ((S (fp_j_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -&gt; fp_i_pigeon_injective = fp_j_pigeon_injective) -&gt; (forall fp_value_pigeon_surjective. (exists fp_gap_pigeon_surjective_value. fp_gap_pigeon_surjective_value + S fp_value_pigeon_surjective = n) -&gt; exists fp_i_pigeon_surjective. ((exists fp_gap_pigeon_surjective_index. fp_gap_pigeon_surjective_index + S fp_i_pigeon_surjective = n) /\ (((exists ff_h_pigeon_surjective_entry. ff_h_pigeon_surjective_entry + S (fp_value_pigeon_surjective) = S ((S (fp_i_pigeon_surjective)) * c)) /\ exists ff_q_pigeon_surjective_entry. b = ff_q_pigeon_surjective_entry * S ((S (fp_i_pigeon_surjective)) * c) + (fp_value_pigeon_surjective)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_bounded_injective_surjective">Copy proof</button>
        <pre id="proof-finite_bounded_injective_surjective"><code>pa prove forall n b c. (forall fp_i_pigeon_bounded. (exists fp_gap_pigeon_bounded_index. fp_gap_pigeon_bounded_index + S fp_i_pigeon_bounded = n) -&gt; exists fp_value_pigeon_bounded. ((((exists ff_h_pigeon_bounded_entry. ff_h_pigeon_bounded_entry + S (fp_value_pigeon_bounded) = S ((S (fp_i_pigeon_bounded)) * c)) /\ exists ff_q_pigeon_bounded_entry. b = ff_q_pigeon_bounded_entry * S ((S (fp_i_pigeon_bounded)) * c) + (fp_value_pigeon_bounded))) /\ (exists fp_gap_pigeon_bounded_value. fp_gap_pigeon_bounded_value + S fp_value_pigeon_bounded = n))) -&gt; (forall fp_i_pigeon_injective fp_j_pigeon_injective fp_value_pigeon_injective. (exists fp_gap_pigeon_injective_i. fp_gap_pigeon_injective_i + S fp_i_pigeon_injective = n) -&gt; (exists fp_gap_pigeon_injective_j. fp_gap_pigeon_injective_j + S fp_j_pigeon_injective = n) -&gt; (((exists ff_h_pigeon_injective_left. ff_h_pigeon_injective_left + S (fp_value_pigeon_injective) = S ((S (fp_i_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_left. b = ff_q_pigeon_injective_left * S ((S (fp_i_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -&gt; (((exists ff_h_pigeon_injective_right. ff_h_pigeon_injective_right + S (fp_value_pigeon_injective) = S ((S (fp_j_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_right. b = ff_q_pigeon_injective_right * S ((S (fp_j_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -&gt; fp_i_pigeon_injective = fp_j_pigeon_injective) -&gt; (forall fp_value_pigeon_surjective. (exists fp_gap_pigeon_surjective_value. fp_gap_pigeon_surjective_value + S fp_value_pigeon_surjective = n) -&gt; exists fp_i_pigeon_surjective. ((exists fp_gap_pigeon_surjective_index. fp_gap_pigeon_surjective_index + S fp_i_pigeon_surjective = n) /\ (((exists ff_h_pigeon_surjective_entry. ff_h_pigeon_surjective_entry + S (fp_value_pigeon_surjective) = S ((S (fp_i_pigeon_surjective)) * c)) /\ exists ff_q_pigeon_surjective_entry. b = ff_q_pigeon_surjective_entry * S ((S (fp_i_pigeon_surjective)) * c) + (fp_value_pigeon_surjective)))))
use finite_surjective_zero
use finite_contains_decidable
use finite_bounded_last_succ
use beta_prefix_swap_last_from_entries
use finite_swap_last_bounded
use finite_swap_last_injective
use finite_bounded_prefix_without_top
use finite_injective_prefix_succ
use finite_surjective_succ_from_prefix
use finite_swap_last_surjective_back
use finite_no_top_successor_gate
use beta_at_unique
use le_succ
use le_refl
use lt_irrefl_expanded
induction n
intro b
intro c
intro hbounded
intro hinjective
specialize finite_surjective_zero b
specialize finite_surjective_zero c
specialize finite_surjective_zero 0
apply finite_surjective_zero
refl
intro b
intro c
intro hbounded
intro hinjective
have hcontains : (exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n))))) \/ ~(exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n)))))
specialize finite_contains_decidable b
specialize finite_contains_decidable c
specialize finite_contains_decidable n
specialize finite_contains_decidable n
exact finite_contains_decidable
cases hcontains
cases hcontains_left
cases hcontains_left_witness
have hlast : exists y. (((exists h. h + S y = S ((S n) * c)) /\ exists q. b = q * S ((S n) * c) + y) /\ exists h. h + S y = S n)
specialize finite_bounded_last_succ b
specialize finite_bounded_last_succ c
specialize finite_bounded_last_succ n
specialize finite_bounded_last_succ (S n)
apply finite_bounded_last_succ
refl
exact hbounded
cases hlast
cases hlast_witness
have hswap : exists z d. ((((exists ff_h_pigeon_swap_new_i. ff_h_pigeon_swap_new_i + S (x1) = S ((S (x)) * d)) /\ exists ff_q_pigeon_swap_new_i. z = ff_q_pigeon_swap_new_i * S ((S (x)) * d) + (x1))) /\ ((((exists ff_h_pigeon_swap_new_n. ff_h_pigeon_swap_new_n + S (n) = S ((S (n)) * d)) /\ exists ff_q_pigeon_swap_new_n. z = ff_q_pigeon_swap_new_n * S ((S (n)) * d) + (n))) /\ forall j a. (exists h. h + S j = S n) -&gt; ~(j = x) -&gt; ~(j = n) -&gt; (((exists ff_h_pigeon_swap_old_other. ff_h_pigeon_swap_old_other + S (a) = S ((S (j)) * c)) /\ exists ff_q_pigeon_swap_old_other. b = ff_q_pigeon_swap_old_other * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_pigeon_swap_new_other. ff_h_pigeon_swap_new_other + S (a) = S ((S (j)) * d)) /\ exists ff_q_pigeon_swap_new_other. z = ff_q_pigeon_swap_new_other * S ((S (j)) * d) + (a)))))
specialize beta_prefix_swap_last_from_entries b
specialize beta_prefix_swap_last_from_entries c
specialize beta_prefix_swap_last_from_entries n
specialize beta_prefix_swap_last_from_entries x
specialize beta_prefix_swap_last_from_entries n
specialize beta_prefix_swap_last_from_entries x1
apply beta_prefix_swap_last_from_entries
exact hcontains_left_witness_left
exact hcontains_left_witness_right
exact hlast_witness_left
cases hswap
cases hswap_witness
cases hswap_witness_witness
cases hswap_witness_witness_right
have hswap_bounded : forall fp_i_pigeon_swapped_bounded. (exists fp_gap_pigeon_swapped_bounded_index. fp_gap_pigeon_swapped_bounded_index + S fp_i_pigeon_swapped_bounded = S n) -&gt; exists fp_value_pigeon_swapped_bounded. ((((exists ff_h_pigeon_swapped_bounded_entry. ff_h_pigeon_swapped_bounded_entry + S (fp_value_pigeon_swapped_bounded) = S ((S (fp_i_pigeon_swapped_bounded)) * x3)) /\ exists ff_q_pigeon_swapped_bounded_entry. x2 = ff_q_pigeon_swapped_bounded_entry * S ((S (fp_i_pigeon_swapped_bounded)) * x3) + (fp_value_pigeon_swapped_bounded))) /\ (exists fp_gap_pigeon_swapped_bounded_value. fp_gap_pigeon_swapped_bounded_value + S fp_value_pigeon_swapped_bounded = S n))
specialize finite_swap_last_bounded b
specialize finite_swap_last_bounded c
specialize finite_swap_last_bounded x2
specialize finite_swap_last_bounded x3
specialize finite_swap_last_bounded n
specialize finite_swap_last_bounded (S n)
specialize finite_swap_last_bounded x
specialize finite_swap_last_bounded n
specialize finite_swap_last_bounded x1
apply finite_swap_last_bounded
refl
exact hcontains_left_witness_left
exact hbounded
exact hcontains_left_witness_right
exact hlast_witness_left
exact hswap_witness_witness_left
exact hswap_witness_witness_right_left
exact hswap_witness_witness_right_right
have hswap_injective : forall fp_i_pigeon_swapped_injective fp_j_pigeon_swapped_injective fp_value_pigeon_swapped_injective. (exists fp_gap_pigeon_swapped_injective_i. fp_gap_pigeon_swapped_injective_i + S fp_i_pigeon_swapped_injective = S n) -&gt; (exists fp_gap_pigeon_swapped_injective_j. fp_gap_pigeon_swapped_injective_j + S fp_j_pigeon_swapped_injective = S n) -&gt; (((exists ff_h_pigeon_swapped_injective_left. ff_h_pigeon_swapped_injective_left + S (fp_value_pigeon_swapped_injective) = S ((S (fp_i_pigeon_swapped_injective)) * x3)) /\ exists ff_q_pigeon_swapped_injective_left. x2 = ff_q_pigeon_swapped_injective_left * S ((S (fp_i_pigeon_swapped_injective)) * x3) + (fp_value_pigeon_swapped_injective))) -&gt; (((exists ff_h_pigeon_swapped_injective_right. ff_h_pigeon_swapped_injective_right + S (fp_value_pigeon_swapped_injective) = S ((S (fp_j_pigeon_swapped_injective)) * x3)) /\ exists ff_q_pigeon_swapped_injective_right. x2 = ff_q_pigeon_swapped_injective_right * S ((S (fp_j_pigeon_swapped_injective)) * x3) + (fp_value_pigeon_swapped_injective))) -&gt; fp_i_pigeon_swapped_injective = fp_j_pigeon_swapped_injective
specialize finite_swap_last_injective b
specialize finite_swap_last_injective c
specialize finite_swap_last_injective x2
specialize finite_swap_last_injective x3
specialize finite_swap_last_injective n
specialize finite_swap_last_injective (S n)
specialize finite_swap_last_injective x
specialize finite_swap_last_injective n
specialize finite_swap_last_injective x1
apply finite_swap_last_injective
refl
exact hcontains_left_witness_left
exact hinjective
exact hcontains_left_witness_right
exact hlast_witness_left
exact hswap_witness_witness_left
exact hswap_witness_witness_right_left
exact hswap_witness_witness_right_right
have hnotop : forall j. (exists h. h + S j = n) -&gt; ~(((exists ff_h_pigeon_top_j. ff_h_pigeon_top_j + S (n) = S ((S (j)) * x3)) /\ exists ff_q_pigeon_top_j. x2 = ff_q_pigeon_top_j * S ((S (j)) * x3) + (n)))
intro j
intro hj
intro htop
have hjsn : exists h. h + S j = S n
specialize le_succ (S j)
specialize le_succ n
apply le_succ
exact hj
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hjneq : j = n
specialize hswap_injective j
specialize hswap_injective n
specialize hswap_injective n
apply hswap_injective
exact hjsn
exact hnsn
exact htop
exact hswap_witness_witness_right_left
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hjneq at hj
exact hj
have hprefix_bounded : forall fp_i_pigeon_swapped_prefix_bounded. (exists fp_gap_pigeon_swapped_prefix_bounded_index. fp_gap_pigeon_swapped_prefix_bounded_index + S fp_i_pigeon_swapped_prefix_bounded = n) -&gt; exists fp_value_pigeon_swapped_prefix_bounded. ((((exists ff_h_pigeon_swapped_prefix_bounded_entry. ff_h_pigeon_swapped_prefix_bounded_entry + S (fp_value_pigeon_swapped_prefix_bounded) = S ((S (fp_i_pigeon_swapped_prefix_bounded)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_bounded_entry. x2 = ff_q_pigeon_swapped_prefix_bounded_entry * S ((S (fp_i_pigeon_swapped_prefix_bounded)) * x3) + (fp_value_pigeon_swapped_prefix_bounded))) /\ (exists fp_gap_pigeon_swapped_prefix_bounded_value. fp_gap_pigeon_swapped_prefix_bounded_value + S fp_value_pigeon_swapped_prefix_bounded = n))
specialize finite_bounded_prefix_without_top x2
specialize finite_bounded_prefix_without_top x3
specialize finite_bounded_prefix_without_top n
specialize finite_bounded_prefix_without_top (S n)
apply finite_bounded_prefix_without_top
refl
exact hswap_bounded
exact hnotop
have hprefix_injective : forall fp_i_pigeon_swapped_prefix_injective fp_j_pigeon_swapped_prefix_injective fp_value_pigeon_swapped_prefix_injective. (exists fp_gap_pigeon_swapped_prefix_injective_i. fp_gap_pigeon_swapped_prefix_injective_i + S fp_i_pigeon_swapped_prefix_injective = n) -&gt; (exists fp_gap_pigeon_swapped_prefix_injective_j. fp_gap_pigeon_swapped_prefix_injective_j + S fp_j_pigeon_swapped_prefix_injective = n) -&gt; (((exists ff_h_pigeon_swapped_prefix_injective_left. ff_h_pigeon_swapped_prefix_injective_left + S (fp_value_pigeon_swapped_prefix_injective) = S ((S (fp_i_pigeon_swapped_prefix_injective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_injective_left. x2 = ff_q_pigeon_swapped_prefix_injective_left * S ((S (fp_i_pigeon_swapped_prefix_injective)) * x3) + (fp_value_pigeon_swapped_prefix_injective))) -&gt; (((exists ff_h_pigeon_swapped_prefix_injective_right. ff_h_pigeon_swapped_prefix_injective_right + S (fp_value_pigeon_swapped_prefix_injective) = S ((S (fp_j_pigeon_swapped_prefix_injective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_injective_right. x2 = ff_q_pigeon_swapped_prefix_injective_right * S ((S (fp_j_pigeon_swapped_prefix_injective)) * x3) + (fp_value_pigeon_swapped_prefix_injective))) -&gt; fp_i_pigeon_swapped_prefix_injective = fp_j_pigeon_swapped_prefix_injective
specialize finite_injective_prefix_succ x2
specialize finite_injective_prefix_succ x3
specialize finite_injective_prefix_succ n
specialize finite_injective_prefix_succ (S n)
apply finite_injective_prefix_succ
refl
exact hswap_injective
have hprefix_surjective : forall fp_value_pigeon_swapped_prefix_surjective. (exists fp_gap_pigeon_swapped_prefix_surjective_value. fp_gap_pigeon_swapped_prefix_surjective_value + S fp_value_pigeon_swapped_prefix_surjective = n) -&gt; exists fp_i_pigeon_swapped_prefix_surjective. ((exists fp_gap_pigeon_swapped_prefix_surjective_index. fp_gap_pigeon_swapped_prefix_surjective_index + S fp_i_pigeon_swapped_prefix_surjective = n) /\ (((exists ff_h_pigeon_swapped_prefix_surjective_entry. ff_h_pigeon_swapped_prefix_surjective_entry + S (fp_value_pigeon_swapped_prefix_surjective) = S ((S (fp_i_pigeon_swapped_prefix_surjective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_surjective_entry. x2 = ff_q_pigeon_swapped_prefix_surjective_entry * S ((S (fp_i_pigeon_swapped_prefix_surjective)) * x3) + (fp_value_pigeon_swapped_prefix_surjective))))
specialize IH x2
specialize IH x3
apply IH
exact hprefix_bounded
exact hprefix_injective
have hswap_surjective : forall fp_value_pigeon_swapped_surjective. (exists fp_gap_pigeon_swapped_surjective_value. fp_gap_pigeon_swapped_surjective_value + S fp_value_pigeon_swapped_surjective = S n) -&gt; exists fp_i_pigeon_swapped_surjective. ((exists fp_gap_pigeon_swapped_surjective_index. fp_gap_pigeon_swapped_surjective_index + S fp_i_pigeon_swapped_surjective = S n) /\ (((exists ff_h_pigeon_swapped_surjective_entry. ff_h_pigeon_swapped_surjective_entry + S (fp_value_pigeon_swapped_surjective) = S ((S (fp_i_pigeon_swapped_surjective)) * x3)) /\ exists ff_q_pigeon_swapped_surjective_entry. x2 = ff_q_pigeon_swapped_surjective_entry * S ((S (fp_i_pigeon_swapped_surjective)) * x3) + (fp_value_pigeon_swapped_surjective))))
specialize finite_surjective_succ_from_prefix x2
specialize finite_surjective_succ_from_prefix x3
specialize finite_surjective_succ_from_prefix n
specialize finite_surjective_succ_from_prefix (S n)
apply finite_surjective_succ_from_prefix
refl
exact hswap_bounded
exact hswap_injective
exact hprefix_surjective
specialize finite_swap_last_surjective_back b
specialize finite_swap_last_surjective_back c
specialize finite_swap_last_surjective_back x2
specialize finite_swap_last_surjective_back x3
specialize finite_swap_last_surjective_back n
specialize finite_swap_last_surjective_back (S n)
specialize finite_swap_last_surjective_back x
specialize finite_swap_last_surjective_back n
specialize finite_swap_last_surjective_back x1
apply finite_swap_last_surjective_back
refl
exact hcontains_left_witness_left
exact hcontains_left_witness_right
exact hlast_witness_left
exact hswap_witness_witness_left
exact hswap_witness_witness_right_left
exact hswap_witness_witness_right_right
exact hswap_surjective
specialize finite_no_top_successor_gate b
specialize finite_no_top_successor_gate c
specialize finite_no_top_successor_gate n
specialize finite_no_top_successor_gate (S n)
apply finite_no_top_successor_gate
refl
exact hbounded
exact hinjective
exact hcontains_right
intro hprefix_bounded
intro hprefix_injective
specialize IH b
specialize IH c
apply IH
exact hprefix_bounded
exact hprefix_injective
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>42,463</dd></div>
        <div><dt>Distinct objects</dt><dd>6,399</dd></div>
        <div><dt>Reused references</dt><dd>274</dd></div>
        <div><dt>Depth</dt><dd>89</dd></div>
        <div><dt>Cuts</dt><dd>1,266</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3e4a5f2303e7f14927ccd4b171ff6915960e99e27b1a4c1d5a08c25f5ee5d067">3e4a5f2303e7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_bounded_injective_surjective">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_bounded_injective_surjective</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_permutation_theorems.py#L1777">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_bounded_injective_surjective.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_prefix_replace_reflect"
  data-name="beta_prefix_replace_reflect" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="eq_decidable,beta_at_exists,beta_at_unique"
  data-search="beta_prefix_replace_reflect beta prefix replace reflect a decoded entry of a one-position replacement is either the replacement or the original entry. forall b c z d k i y. (exists h. h + s i = k) -&gt; (((exists ff_h_replace_reflect_new_i. ff_h_replace_reflect_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_replace_reflect_new_i. z = ff_q_replace_reflect_new_i * s ((s (i)) * d) + (y))) -&gt; (forall j a. (exists h. h + s j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * s ((s (j)) * d) + (a)))) -&gt; forall j a. (exists h. h + s j = k) -&gt; (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * s ((s (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ (~(j = i) /\ (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * s ((s (j)) * c) + (a))))) quadratic_residues eq_decidable beta_at_exists beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_prefix_replace_reflect</code><span>Beta prefix replace reflect</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A decoded entry of a one-position replacement is either the replacement or the original entry.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_exists" href="#theorem-beta_at_exists"><code>beta_at_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_prefix_replace_reflect">Copy statement</button>
        <pre id="statement-beta_prefix_replace_reflect"><code>forall b c z d k i y. (exists h. h + S i = k) -&gt; (((exists ff_h_replace_reflect_new_i. ff_h_replace_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_replace_reflect_new_i. z = ff_q_replace_reflect_new_i * S ((S (i)) * d) + (y))) -&gt; (forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a)))) -&gt; forall j a. (exists h. h + S j = k) -&gt; (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ (~(j = i) /\ (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_prefix_replace_reflect">Copy proof</button>
        <pre id="proof-beta_prefix_replace_reflect"><code>pa prove forall b c z d k i y. (exists h. h + S i = k) -&gt; (((exists ff_h_replace_reflect_new_i. ff_h_replace_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_replace_reflect_new_i. z = ff_q_replace_reflect_new_i * S ((S (i)) * d) + (y))) -&gt; (forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a)))) -&gt; forall j a. (exists h. h + S j = k) -&gt; (((exists ff_h_replace_reflect_new_j. ff_h_replace_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_replace_reflect_new_j. z = ff_q_replace_reflect_new_j * S ((S (j)) * d) + (a))) -&gt; ((j = i /\ a = y) \/ (~(j = i) /\ (((exists ff_h_replace_reflect_old_j. ff_h_replace_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_replace_reflect_old_j. b = ff_q_replace_reflect_old_j * S ((S (j)) * c) + (a)))))
use eq_decidable
use beta_at_exists
use beta_at_unique
intro b
intro c
intro z
intro d
intro k
intro i
intro y
intro hi
intro hnew_i
intro hpreserve
intro j
intro a
intro hj
intro hnew
specialize eq_decidable j
specialize eq_decidable i
cases eq_decidable
left
split
exact eq_decidable_left
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique i
specialize beta_at_unique a
specialize beta_at_unique y
apply beta_at_unique
rewrite eq_decidable_left at hnew
rewrite eq_decidable_left at hnew
exact hnew
exact hnew_i
specialize beta_at_exists b
specialize beta_at_exists c
specialize beta_at_exists j
cases beta_at_exists
have htransport : ((exists h. h + S x = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + x)
specialize hpreserve j
specialize hpreserve x
apply hpreserve
exact hj
exact eq_decidable_right
exact beta_at_exists_witness
have hax : a = x
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique j
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
exact hnew
exact htransport
right
split
exact eq_decidable_right
rewrite hax
rewrite hax
exact beta_at_exists_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,735</dd></div>
        <div><dt>Distinct objects</dt><dd>1,011</dd></div>
        <div><dt>Reused references</dt><dd>55</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>48</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3e50d9582fa73c3588059ff78ecb8f09542bca789384c5be84f11e09badc538d">3e50d9582fa7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_prefix_replace_reflect">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_prefix_replace_reflect</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_product_permutation_theorems.py#L80">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_prefix_replace_reflect.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_replace_balance"
  data-name="beta_product_replace_balance" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="add_eq_zero_right,succ_ne_zero,finite_lt_succ_eq_or_lt,beta_product_succ_decompose,beta_product_transport_prefix,beta_product_functional,beta_at_unique,mul_assoc,mul_comm,le_succ,le_refl,lt_irrefl_expanded"
  data-search="beta_product_replace_balance beta product replace balance replacing one factor balances the old and new finite products by the exchanged values. forall k b c z d i x y p q. (exists h. h + s i = k) -&gt; (((exists ff_h_balance_old_i. ff_h_balance_old_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_balance_old_i. b = ff_q_balance_old_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_balance_new_i. ff_h_balance_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_balance_new_i. z = ff_q_balance_new_i * s ((s (i)) * d) + (y))) -&gt; (forall j a. (exists h. h + s j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_balance_old_j. ff_h_balance_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_balance_old_j. b = ff_q_balance_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_balance_new_j. ff_h_balance_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_balance_new_j. z = ff_q_balance_new_j * s ((s (j)) * d) + (a)))) -&gt; (exists ff_u_balance_old ff_v_balance_old. ((((exists ff_h_balance_old_start. ff_h_balance_old_start + s (1) = s ((s (0)) * ff_v_balance_old)) /\ exists ff_q_balance_old_start. ff_u_balance_old = ff_q_balance_old_start * s ((s (0)) * ff_v_balance_old) + (1))) /\ ((((exists ff_h_balance_old_terminal. ff_h_balance_old_terminal + s (p) = s ((s (k)) * ff_v_balance_old)) /\ exists ff_q_balance_old_terminal. ff_u_balance_old = ff_q_balance_old_terminal * s ((s (k)) * ff_v_balance_old) + (p))) /\ forall ff_i_balance_old. (exists ff_lt_balance_old_bound. ff_lt_balance_old_bound + s ff_i_balance_old = k) -&gt; exists ff_p_balance_old ff_r_balance_old ff_s_balance_old. ((((exists ff_h_balance_old_factor. ff_h_balance_old_factor + s (ff_p_balance_old) = s ((s (ff_i_balance_old)) * c)) /\ exists ff_q_balance_old_factor. b = ff_q_balance_old_factor * s ((s (ff_i_balance_old)) * c) + (ff_p_balance_old))) /\ ((((exists ff_h_balance_old_partial. ff_h_balance_old_partial + s (ff_r_balance_old) = s ((s (ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_partial. ff_u_balance_old = ff_q_balance_old_partial * s ((s (ff_i_balance_old)) * ff_v_balance_old) + (ff_r_balance_old))) /\ ((((exists ff_h_balance_old_successor. ff_h_balance_old_successor + s (ff_s_balance_old) = s ((s (s ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_successor. ff_u_balance_old = ff_q_balance_old_successor * s ((s (s ff_i_balance_old)) * ff_v_balance_old) + (ff_s_balance_old))) /\ ff_s_balance_old = ff_r_balance_old * ff_p_balance_old)))))) -&gt; (exists ff_u_balance_new ff_v_balance_new. ((((exists ff_h_balance_new_start. ff_h_balance_new_start + s (1) = s ((s (0)) * ff_v_balance_new)) /\ exists ff_q_balance_new_start. ff_u_balance_new = ff_q_balance_new_start * s ((s (0)) * ff_v_balance_new) + (1))) /\ ((((exists ff_h_balance_new_terminal. ff_h_balance_new_terminal + s (q) = s ((s (k)) * ff_v_balance_new)) /\ exists ff_q_balance_new_terminal. ff_u_balance_new = ff_q_balance_new_terminal * s ((s (k)) * ff_v_balance_new) + (q))) /\ forall ff_i_balance_new. (exists ff_lt_balance_new_bound. ff_lt_balance_new_bound + s ff_i_balance_new = k) -&gt; exists ff_p_balance_new ff_r_balance_new ff_s_balance_new. ((((exists ff_h_balance_new_factor. ff_h_balance_new_factor + s (ff_p_balance_new) = s ((s (ff_i_balance_new)) * d)) /\ exists ff_q_balance_new_factor. z = ff_q_balance_new_factor * s ((s (ff_i_balance_new)) * d) + (ff_p_balance_new))) /\ ((((exists ff_h_balance_new_partial. ff_h_balance_new_partial + s (ff_r_balance_new) = s ((s (ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_partial. ff_u_balance_new = ff_q_balance_new_partial * s ((s (ff_i_balance_new)) * ff_v_balance_new) + (ff_r_balance_new))) /\ ((((exists ff_h_balance_new_successor. ff_h_balance_new_successor + s (ff_s_balance_new) = s ((s (s ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_successor. ff_u_balance_new = ff_q_balance_new_successor * s ((s (s ff_i_balance_new)) * ff_v_balance_new) + (ff_s_balance_new))) /\ ff_s_balance_new = ff_r_balance_new * ff_p_balance_new)))))) -&gt; q * x = p * y quadratic_residues add_eq_zero_right succ_ne_zero finite_lt_succ_eq_or_lt beta_product_succ_decompose beta_product_transport_prefix beta_product_functional beta_at_unique mul_assoc mul_comm le_succ le_refl lt_irrefl_expanded">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_replace_balance</code><span>Beta product replace balance</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Replacing one factor balances the old and new finite products by the exchanged values.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_eq_zero_right" href="#theorem-add_eq_zero_right"><code>add_eq_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="finite_lt_succ_eq_or_lt" href="#theorem-finite_lt_succ_eq_or_lt"><code>finite_lt_succ_eq_or_lt</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_transport_prefix" href="#theorem-beta_product_transport_prefix"><code>beta_product_transport_prefix</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_functional" href="#theorem-beta_product_functional"><code>beta_product_functional</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_swap_last_invariant" href="#theorem-beta_product_swap_last_invariant"><code>beta_product_swap_last_invariant</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_replace_balance">Copy statement</button>
        <pre id="statement-beta_product_replace_balance"><code>forall k b c z d i x y p q. (exists h. h + S i = k) -&gt; (((exists ff_h_balance_old_i. ff_h_balance_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_balance_old_i. b = ff_q_balance_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_balance_new_i. ff_h_balance_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_balance_new_i. z = ff_q_balance_new_i * S ((S (i)) * d) + (y))) -&gt; (forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_balance_old_j. ff_h_balance_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_balance_old_j. b = ff_q_balance_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_balance_new_j. ff_h_balance_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_balance_new_j. z = ff_q_balance_new_j * S ((S (j)) * d) + (a)))) -&gt; (exists ff_u_balance_old ff_v_balance_old. ((((exists ff_h_balance_old_start. ff_h_balance_old_start + S (1) = S ((S (0)) * ff_v_balance_old)) /\ exists ff_q_balance_old_start. ff_u_balance_old = ff_q_balance_old_start * S ((S (0)) * ff_v_balance_old) + (1))) /\ ((((exists ff_h_balance_old_terminal. ff_h_balance_old_terminal + S (p) = S ((S (k)) * ff_v_balance_old)) /\ exists ff_q_balance_old_terminal. ff_u_balance_old = ff_q_balance_old_terminal * S ((S (k)) * ff_v_balance_old) + (p))) /\ forall ff_i_balance_old. (exists ff_lt_balance_old_bound. ff_lt_balance_old_bound + S ff_i_balance_old = k) -&gt; exists ff_p_balance_old ff_r_balance_old ff_s_balance_old. ((((exists ff_h_balance_old_factor. ff_h_balance_old_factor + S (ff_p_balance_old) = S ((S (ff_i_balance_old)) * c)) /\ exists ff_q_balance_old_factor. b = ff_q_balance_old_factor * S ((S (ff_i_balance_old)) * c) + (ff_p_balance_old))) /\ ((((exists ff_h_balance_old_partial. ff_h_balance_old_partial + S (ff_r_balance_old) = S ((S (ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_partial. ff_u_balance_old = ff_q_balance_old_partial * S ((S (ff_i_balance_old)) * ff_v_balance_old) + (ff_r_balance_old))) /\ ((((exists ff_h_balance_old_successor. ff_h_balance_old_successor + S (ff_s_balance_old) = S ((S (S ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_successor. ff_u_balance_old = ff_q_balance_old_successor * S ((S (S ff_i_balance_old)) * ff_v_balance_old) + (ff_s_balance_old))) /\ ff_s_balance_old = ff_r_balance_old * ff_p_balance_old)))))) -&gt; (exists ff_u_balance_new ff_v_balance_new. ((((exists ff_h_balance_new_start. ff_h_balance_new_start + S (1) = S ((S (0)) * ff_v_balance_new)) /\ exists ff_q_balance_new_start. ff_u_balance_new = ff_q_balance_new_start * S ((S (0)) * ff_v_balance_new) + (1))) /\ ((((exists ff_h_balance_new_terminal. ff_h_balance_new_terminal + S (q) = S ((S (k)) * ff_v_balance_new)) /\ exists ff_q_balance_new_terminal. ff_u_balance_new = ff_q_balance_new_terminal * S ((S (k)) * ff_v_balance_new) + (q))) /\ forall ff_i_balance_new. (exists ff_lt_balance_new_bound. ff_lt_balance_new_bound + S ff_i_balance_new = k) -&gt; exists ff_p_balance_new ff_r_balance_new ff_s_balance_new. ((((exists ff_h_balance_new_factor. ff_h_balance_new_factor + S (ff_p_balance_new) = S ((S (ff_i_balance_new)) * d)) /\ exists ff_q_balance_new_factor. z = ff_q_balance_new_factor * S ((S (ff_i_balance_new)) * d) + (ff_p_balance_new))) /\ ((((exists ff_h_balance_new_partial. ff_h_balance_new_partial + S (ff_r_balance_new) = S ((S (ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_partial. ff_u_balance_new = ff_q_balance_new_partial * S ((S (ff_i_balance_new)) * ff_v_balance_new) + (ff_r_balance_new))) /\ ((((exists ff_h_balance_new_successor. ff_h_balance_new_successor + S (ff_s_balance_new) = S ((S (S ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_successor. ff_u_balance_new = ff_q_balance_new_successor * S ((S (S ff_i_balance_new)) * ff_v_balance_new) + (ff_s_balance_new))) /\ ff_s_balance_new = ff_r_balance_new * ff_p_balance_new)))))) -&gt; q * x = p * y</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_replace_balance">Copy proof</button>
        <pre id="proof-beta_product_replace_balance"><code>pa prove forall k b c z d i x y p q. (exists h. h + S i = k) -&gt; (((exists ff_h_balance_old_i. ff_h_balance_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_balance_old_i. b = ff_q_balance_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_balance_new_i. ff_h_balance_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_balance_new_i. z = ff_q_balance_new_i * S ((S (i)) * d) + (y))) -&gt; (forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; (((exists ff_h_balance_old_j. ff_h_balance_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_balance_old_j. b = ff_q_balance_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_balance_new_j. ff_h_balance_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_balance_new_j. z = ff_q_balance_new_j * S ((S (j)) * d) + (a)))) -&gt; (exists ff_u_balance_old ff_v_balance_old. ((((exists ff_h_balance_old_start. ff_h_balance_old_start + S (1) = S ((S (0)) * ff_v_balance_old)) /\ exists ff_q_balance_old_start. ff_u_balance_old = ff_q_balance_old_start * S ((S (0)) * ff_v_balance_old) + (1))) /\ ((((exists ff_h_balance_old_terminal. ff_h_balance_old_terminal + S (p) = S ((S (k)) * ff_v_balance_old)) /\ exists ff_q_balance_old_terminal. ff_u_balance_old = ff_q_balance_old_terminal * S ((S (k)) * ff_v_balance_old) + (p))) /\ forall ff_i_balance_old. (exists ff_lt_balance_old_bound. ff_lt_balance_old_bound + S ff_i_balance_old = k) -&gt; exists ff_p_balance_old ff_r_balance_old ff_s_balance_old. ((((exists ff_h_balance_old_factor. ff_h_balance_old_factor + S (ff_p_balance_old) = S ((S (ff_i_balance_old)) * c)) /\ exists ff_q_balance_old_factor. b = ff_q_balance_old_factor * S ((S (ff_i_balance_old)) * c) + (ff_p_balance_old))) /\ ((((exists ff_h_balance_old_partial. ff_h_balance_old_partial + S (ff_r_balance_old) = S ((S (ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_partial. ff_u_balance_old = ff_q_balance_old_partial * S ((S (ff_i_balance_old)) * ff_v_balance_old) + (ff_r_balance_old))) /\ ((((exists ff_h_balance_old_successor. ff_h_balance_old_successor + S (ff_s_balance_old) = S ((S (S ff_i_balance_old)) * ff_v_balance_old)) /\ exists ff_q_balance_old_successor. ff_u_balance_old = ff_q_balance_old_successor * S ((S (S ff_i_balance_old)) * ff_v_balance_old) + (ff_s_balance_old))) /\ ff_s_balance_old = ff_r_balance_old * ff_p_balance_old)))))) -&gt; (exists ff_u_balance_new ff_v_balance_new. ((((exists ff_h_balance_new_start. ff_h_balance_new_start + S (1) = S ((S (0)) * ff_v_balance_new)) /\ exists ff_q_balance_new_start. ff_u_balance_new = ff_q_balance_new_start * S ((S (0)) * ff_v_balance_new) + (1))) /\ ((((exists ff_h_balance_new_terminal. ff_h_balance_new_terminal + S (q) = S ((S (k)) * ff_v_balance_new)) /\ exists ff_q_balance_new_terminal. ff_u_balance_new = ff_q_balance_new_terminal * S ((S (k)) * ff_v_balance_new) + (q))) /\ forall ff_i_balance_new. (exists ff_lt_balance_new_bound. ff_lt_balance_new_bound + S ff_i_balance_new = k) -&gt; exists ff_p_balance_new ff_r_balance_new ff_s_balance_new. ((((exists ff_h_balance_new_factor. ff_h_balance_new_factor + S (ff_p_balance_new) = S ((S (ff_i_balance_new)) * d)) /\ exists ff_q_balance_new_factor. z = ff_q_balance_new_factor * S ((S (ff_i_balance_new)) * d) + (ff_p_balance_new))) /\ ((((exists ff_h_balance_new_partial. ff_h_balance_new_partial + S (ff_r_balance_new) = S ((S (ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_partial. ff_u_balance_new = ff_q_balance_new_partial * S ((S (ff_i_balance_new)) * ff_v_balance_new) + (ff_r_balance_new))) /\ ((((exists ff_h_balance_new_successor. ff_h_balance_new_successor + S (ff_s_balance_new) = S ((S (S ff_i_balance_new)) * ff_v_balance_new)) /\ exists ff_q_balance_new_successor. ff_u_balance_new = ff_q_balance_new_successor * S ((S (S ff_i_balance_new)) * ff_v_balance_new) + (ff_s_balance_new))) /\ ff_s_balance_new = ff_r_balance_new * ff_p_balance_new)))))) -&gt; q * x = p * y
use add_eq_zero_right
use succ_ne_zero
use finite_lt_succ_eq_or_lt
use beta_product_succ_decompose
use beta_product_transport_prefix
use beta_product_functional
use beta_at_unique
use mul_assoc
use mul_comm
use le_succ
use le_refl
use lt_irrefl_expanded
induction k
intro b
intro c
intro z
intro d
intro i
intro x
intro y
intro p
intro q
intro hi
exfalso
cases hi
have hsi : S i = 0
specialize add_eq_zero_right x1
specialize add_eq_zero_right (S i)
apply add_eq_zero_right
exact hi_witness
specialize succ_ne_zero i
apply succ_ne_zero
exact hsi
intro b
intro c
intro z
intro d
intro i
intro x
intro y
intro p
intro q
intro hi
intro hold_i
intro hnew_i
intro hpreserve
intro hproduct_old
intro hproduct_new
have hisplit : i = k \/ exists h. h + S i = k
specialize finite_lt_succ_eq_or_lt k
specialize finite_lt_succ_eq_or_lt i
apply finite_lt_succ_eq_or_lt
exact hi
have hold_decomp : exists a r. (((exists ff_h_balance_old_last. ff_h_balance_old_last + S (a) = S ((S (k)) * c)) /\ exists ff_q_balance_old_last. b = ff_q_balance_old_last * S ((S (k)) * c) + (a))) /\ ((exists ff_u_balance_old_prefix ff_v_balance_old_prefix. ((((exists ff_h_balance_old_prefix_start. ff_h_balance_old_prefix_start + S (1) = S ((S (0)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_start. ff_u_balance_old_prefix = ff_q_balance_old_prefix_start * S ((S (0)) * ff_v_balance_old_prefix) + (1))) /\ ((((exists ff_h_balance_old_prefix_terminal. ff_h_balance_old_prefix_terminal + S (r) = S ((S (k)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_terminal. ff_u_balance_old_prefix = ff_q_balance_old_prefix_terminal * S ((S (k)) * ff_v_balance_old_prefix) + (r))) /\ forall ff_i_balance_old_prefix. (exists ff_lt_balance_old_prefix_bound. ff_lt_balance_old_prefix_bound + S ff_i_balance_old_prefix = k) -&gt; exists ff_p_balance_old_prefix ff_r_balance_old_prefix ff_s_balance_old_prefix. ((((exists ff_h_balance_old_prefix_factor. ff_h_balance_old_prefix_factor + S (ff_p_balance_old_prefix) = S ((S (ff_i_balance_old_prefix)) * c)) /\ exists ff_q_balance_old_prefix_factor. b = ff_q_balance_old_prefix_factor * S ((S (ff_i_balance_old_prefix)) * c) + (ff_p_balance_old_prefix))) /\ ((((exists ff_h_balance_old_prefix_partial. ff_h_balance_old_prefix_partial + S (ff_r_balance_old_prefix) = S ((S (ff_i_balance_old_prefix)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_partial. ff_u_balance_old_prefix = ff_q_balance_old_prefix_partial * S ((S (ff_i_balance_old_prefix)) * ff_v_balance_old_prefix) + (ff_r_balance_old_prefix))) /\ ((((exists ff_h_balance_old_prefix_successor. ff_h_balance_old_prefix_successor + S (ff_s_balance_old_prefix) = S ((S (S ff_i_balance_old_prefix)) * ff_v_balance_old_prefix)) /\ exists ff_q_balance_old_prefix_successor. ff_u_balance_old_prefix = ff_q_balance_old_prefix_successor * S ((S (S ff_i_balance_old_prefix)) * ff_v_balance_old_prefix) + (ff_s_balance_old_prefix))) /\ ff_s_balance_old_prefix = ff_r_balance_old_prefix * ff_p_balance_old_prefix)))))) /\ p = r * a)
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose k
specialize beta_product_succ_decompose p
apply beta_product_succ_decompose
exact hproduct_old
have hnew_decomp : exists a r. (((exists ff_h_balance_new_last. ff_h_balance_new_last + S (a) = S ((S (k)) * d)) /\ exists ff_q_balance_new_last. z = ff_q_balance_new_last * S ((S (k)) * d) + (a))) /\ ((exists ff_u_balance_new_prefix ff_v_balance_new_prefix. ((((exists ff_h_balance_new_prefix_start. ff_h_balance_new_prefix_start + S (1) = S ((S (0)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_start. ff_u_balance_new_prefix = ff_q_balance_new_prefix_start * S ((S (0)) * ff_v_balance_new_prefix) + (1))) /\ ((((exists ff_h_balance_new_prefix_terminal. ff_h_balance_new_prefix_terminal + S (r) = S ((S (k)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_terminal. ff_u_balance_new_prefix = ff_q_balance_new_prefix_terminal * S ((S (k)) * ff_v_balance_new_prefix) + (r))) /\ forall ff_i_balance_new_prefix. (exists ff_lt_balance_new_prefix_bound. ff_lt_balance_new_prefix_bound + S ff_i_balance_new_prefix = k) -&gt; exists ff_p_balance_new_prefix ff_r_balance_new_prefix ff_s_balance_new_prefix. ((((exists ff_h_balance_new_prefix_factor. ff_h_balance_new_prefix_factor + S (ff_p_balance_new_prefix) = S ((S (ff_i_balance_new_prefix)) * d)) /\ exists ff_q_balance_new_prefix_factor. z = ff_q_balance_new_prefix_factor * S ((S (ff_i_balance_new_prefix)) * d) + (ff_p_balance_new_prefix))) /\ ((((exists ff_h_balance_new_prefix_partial. ff_h_balance_new_prefix_partial + S (ff_r_balance_new_prefix) = S ((S (ff_i_balance_new_prefix)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_partial. ff_u_balance_new_prefix = ff_q_balance_new_prefix_partial * S ((S (ff_i_balance_new_prefix)) * ff_v_balance_new_prefix) + (ff_r_balance_new_prefix))) /\ ((((exists ff_h_balance_new_prefix_successor. ff_h_balance_new_prefix_successor + S (ff_s_balance_new_prefix) = S ((S (S ff_i_balance_new_prefix)) * ff_v_balance_new_prefix)) /\ exists ff_q_balance_new_prefix_successor. ff_u_balance_new_prefix = ff_q_balance_new_prefix_successor * S ((S (S ff_i_balance_new_prefix)) * ff_v_balance_new_prefix) + (ff_s_balance_new_prefix))) /\ ff_s_balance_new_prefix = ff_r_balance_new_prefix * ff_p_balance_new_prefix)))))) /\ q = r * a)
specialize beta_product_succ_decompose z
specialize beta_product_succ_decompose d
specialize beta_product_succ_decompose k
specialize beta_product_succ_decompose q
apply beta_product_succ_decompose
exact hproduct_new
cases hold_decomp
cases hold_decomp_witness
cases hold_decomp_witness_witness
cases hold_decomp_witness_witness_right
cases hnew_decomp
cases hnew_decomp_witness
cases hnew_decomp_witness_witness
cases hnew_decomp_witness_witness_right
cases hisplit
have hax : x1 = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique k
specialize beta_at_unique x1
specialize beta_at_unique x
apply beta_at_unique
exact hold_decomp_witness_witness_left
rewrite hisplit_left at hold_i
rewrite hisplit_left at hold_i
exact hold_i
have hby : x3 = y
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique k
specialize beta_at_unique x3
specialize beta_at_unique y
apply beta_at_unique
exact hnew_decomp_witness_witness_left
rewrite hisplit_left at hnew_i
rewrite hisplit_left at hnew_i
exact hnew_i
have hprefix_transport : exists ff_u_balance_transported_prefix ff_v_balance_transported_prefix. ((((exists ff_h_balance_transported_prefix_start. ff_h_balance_transported_prefix_start + S (1) = S ((S (0)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_start. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_start * S ((S (0)) * ff_v_balance_transported_prefix) + (1))) /\ ((((exists ff_h_balance_transported_prefix_terminal. ff_h_balance_transported_prefix_terminal + S (x2) = S ((S (k)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_terminal. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_terminal * S ((S (k)) * ff_v_balance_transported_prefix) + (x2))) /\ forall ff_i_balance_transported_prefix. (exists ff_lt_balance_transported_prefix_bound. ff_lt_balance_transported_prefix_bound + S ff_i_balance_transported_prefix = k) -&gt; exists ff_p_balance_transported_prefix ff_r_balance_transported_prefix ff_s_balance_transported_prefix. ((((exists ff_h_balance_transported_prefix_factor. ff_h_balance_transported_prefix_factor + S (ff_p_balance_transported_prefix) = S ((S (ff_i_balance_transported_prefix)) * d)) /\ exists ff_q_balance_transported_prefix_factor. z = ff_q_balance_transported_prefix_factor * S ((S (ff_i_balance_transported_prefix)) * d) + (ff_p_balance_transported_prefix))) /\ ((((exists ff_h_balance_transported_prefix_partial. ff_h_balance_transported_prefix_partial + S (ff_r_balance_transported_prefix) = S ((S (ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_partial. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_partial * S ((S (ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix) + (ff_r_balance_transported_prefix))) /\ ((((exists ff_h_balance_transported_prefix_successor. ff_h_balance_transported_prefix_successor + S (ff_s_balance_transported_prefix) = S ((S (S ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix)) /\ exists ff_q_balance_transported_prefix_successor. ff_u_balance_transported_prefix = ff_q_balance_transported_prefix_successor * S ((S (S ff_i_balance_transported_prefix)) * ff_v_balance_transported_prefix) + (ff_s_balance_transported_prefix))) /\ ff_s_balance_transported_prefix = ff_r_balance_transported_prefix * ff_p_balance_transported_prefix)))))
specialize beta_product_transport_prefix b
specialize beta_product_transport_prefix c
specialize beta_product_transport_prefix z
specialize beta_product_transport_prefix d
specialize beta_product_transport_prefix k
specialize beta_product_transport_prefix x2
apply beta_product_transport_prefix
exact hold_decomp_witness_witness_right_left
intro j
intro a
intro hj
intro hold
specialize hpreserve j
specialize hpreserve a
apply hpreserve
specialize le_succ (S j)
specialize le_succ k
apply le_succ
exact hj
intro hjk
specialize lt_irrefl_expanded k
apply lt_irrefl_expanded
rewrite hjk at hj
rewrite hisplit_left at hj
exact hj
exact hold
cases hprefix_transport
cases hprefix_transport_witness
cases hnew_decomp_witness_witness_right_left
cases hnew_decomp_witness_witness_right_left_witness
rewrite hold_decomp_witness_witness_right_right
rewrite hnew_decomp_witness_witness_right_right
rewrite hax
rewrite hby
trans (x4 * x) * y
simp [mul_assoc, mul_comm]
congr
congr
symm
specialize beta_product_functional z
specialize beta_product_functional d
specialize beta_product_functional k
specialize beta_product_functional x2
specialize beta_product_functional x5
specialize beta_product_functional x6
specialize beta_product_functional x4
specialize beta_product_functional x7
specialize beta_product_functional x8
apply beta_product_functional
exact hprefix_transport_witness_witness
exact hnew_decomp_witness_witness_right_left_witness_witness
refl
refl
have hki : ~(k = i)
intro hki_eq
specialize lt_irrefl_expanded k
apply lt_irrefl_expanded
rewrite &lt;- hki_eq at hisplit_right
exact hisplit_right
have hlast_new : ((exists h. h + S x1 = S ((S k) * d)) /\ exists w. z = w * S ((S k) * d) + x1)
specialize hpreserve k
specialize hpreserve x1
apply hpreserve
specialize le_refl (S k)
exact le_refl
exact hki
exact hold_decomp_witness_witness_left
have hlast_eq : x3 = x1
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique k
specialize beta_at_unique x3
specialize beta_at_unique x1
apply beta_at_unique
exact hnew_decomp_witness_witness_left
exact hlast_new
have hprefix_preserve : forall j a. (exists h. h + S j = k) -&gt; ~(j = i) -&gt; ((exists h. h + S a = S ((S j) * c)) /\ exists w. b = w * S ((S j) * c) + a) -&gt; ((exists h. h + S a = S ((S j) * d)) /\ exists w. z = w * S ((S j) * d) + a)
intro j
intro a
intro hj
intro hji
intro hold
specialize hpreserve j
specialize hpreserve a
apply hpreserve
specialize le_succ (S j)
specialize le_succ k
apply le_succ
exact hj
exact hji
exact hold
have hbalance : x4 * x = x2 * y
specialize IH b
specialize IH c
specialize IH z
specialize IH d
specialize IH i
specialize IH x
specialize IH y
specialize IH x2
specialize IH x4
apply IH
exact hisplit_right
exact hold_i
exact hnew_i
exact hprefix_preserve
exact hold_decomp_witness_witness_right_left
exact hnew_decomp_witness_witness_right_left
rewrite hold_decomp_witness_witness_right_right
rewrite hnew_decomp_witness_witness_right_right
rewrite hlast_eq
trans (x4 * x) * x1
simp [mul_assoc, mul_comm]
rewrite hbalance
simp [mul_assoc, mul_comm]
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,780</dd></div>
        <div><dt>Distinct objects</dt><dd>1,552</dd></div>
        <div><dt>Reused references</dt><dd>56</dd></div>
        <div><dt>Depth</dt><dd>66</dd></div>
        <div><dt>Cuts</dt><dd>130</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e4f1bc0e72bf6eadefa702d282c800636a87065c2d6fb637bf4d0f59adda9658">e4f1bc0e72bf…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_replace_balance">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_replace_balance</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_product_permutation_theorems.py#L152">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_replace_balance.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_product_swap_last_invariant"
  data-name="beta_product_swap_last_invariant" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_product_replace_balance,beta_product_succ_decompose,beta_at_unique,le_succ,le_refl,lt_irrefl_expanded"
  data-search="beta_product_swap_last_invariant beta product swap last invariant swapping an interior beta-coded factor with the last factor preserves the exact finite product. forall b c z d n i x y p q. (exists h. h + s i = n) -&gt; (((exists ff_h_product_swap_old_i. ff_h_product_swap_old_i + s (x) = s ((s (i)) * c)) /\ exists ff_q_product_swap_old_i. b = ff_q_product_swap_old_i * s ((s (i)) * c) + (x))) -&gt; (((exists ff_h_product_swap_old_n. ff_h_product_swap_old_n + s (y) = s ((s (n)) * c)) /\ exists ff_q_product_swap_old_n. b = ff_q_product_swap_old_n * s ((s (n)) * c) + (y))) -&gt; (((exists ff_h_product_swap_new_i. ff_h_product_swap_new_i + s (y) = s ((s (i)) * d)) /\ exists ff_q_product_swap_new_i. z = ff_q_product_swap_new_i * s ((s (i)) * d) + (y))) -&gt; (((exists ff_h_product_swap_new_n. ff_h_product_swap_new_n + s (x) = s ((s (n)) * d)) /\ exists ff_q_product_swap_new_n. z = ff_q_product_swap_new_n * s ((s (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + s j = s n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_product_swap_old_j. ff_h_product_swap_old_j + s (a) = s ((s (j)) * c)) /\ exists ff_q_product_swap_old_j. b = ff_q_product_swap_old_j * s ((s (j)) * c) + (a))) -&gt; (((exists ff_h_product_swap_new_j. ff_h_product_swap_new_j + s (a) = s ((s (j)) * d)) /\ exists ff_q_product_swap_new_j. z = ff_q_product_swap_new_j * s ((s (j)) * d) + (a)))) -&gt; (exists ff_u_product_swap_old ff_v_product_swap_old. ((((exists ff_h_product_swap_old_start. ff_h_product_swap_old_start + s (1) = s ((s (0)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_start. ff_u_product_swap_old = ff_q_product_swap_old_start * s ((s (0)) * ff_v_product_swap_old) + (1))) /\ ((((exists ff_h_product_swap_old_terminal. ff_h_product_swap_old_terminal + s (p) = s ((s (s n)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_terminal. ff_u_product_swap_old = ff_q_product_swap_old_terminal * s ((s (s n)) * ff_v_product_swap_old) + (p))) /\ forall ff_i_product_swap_old. (exists ff_lt_product_swap_old_bound. ff_lt_product_swap_old_bound + s ff_i_product_swap_old = s n) -&gt; exists ff_p_product_swap_old ff_r_product_swap_old ff_s_product_swap_old. ((((exists ff_h_product_swap_old_factor. ff_h_product_swap_old_factor + s (ff_p_product_swap_old) = s ((s (ff_i_product_swap_old)) * c)) /\ exists ff_q_product_swap_old_factor. b = ff_q_product_swap_old_factor * s ((s (ff_i_product_swap_old)) * c) + (ff_p_product_swap_old))) /\ ((((exists ff_h_product_swap_old_partial. ff_h_product_swap_old_partial + s (ff_r_product_swap_old) = s ((s (ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_partial. ff_u_product_swap_old = ff_q_product_swap_old_partial * s ((s (ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_r_product_swap_old))) /\ ((((exists ff_h_product_swap_old_successor. ff_h_product_swap_old_successor + s (ff_s_product_swap_old) = s ((s (s ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_successor. ff_u_product_swap_old = ff_q_product_swap_old_successor * s ((s (s ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_s_product_swap_old))) /\ ff_s_product_swap_old = ff_r_product_swap_old * ff_p_product_swap_old)))))) -&gt; (exists ff_u_product_swap_new ff_v_product_swap_new. ((((exists ff_h_product_swap_new_start. ff_h_product_swap_new_start + s (1) = s ((s (0)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_start. ff_u_product_swap_new = ff_q_product_swap_new_start * s ((s (0)) * ff_v_product_swap_new) + (1))) /\ ((((exists ff_h_product_swap_new_terminal. ff_h_product_swap_new_terminal + s (q) = s ((s (s n)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_terminal. ff_u_product_swap_new = ff_q_product_swap_new_terminal * s ((s (s n)) * ff_v_product_swap_new) + (q))) /\ forall ff_i_product_swap_new. (exists ff_lt_product_swap_new_bound. ff_lt_product_swap_new_bound + s ff_i_product_swap_new = s n) -&gt; exists ff_p_product_swap_new ff_r_product_swap_new ff_s_product_swap_new. ((((exists ff_h_product_swap_new_factor. ff_h_product_swap_new_factor + s (ff_p_product_swap_new) = s ((s (ff_i_product_swap_new)) * d)) /\ exists ff_q_product_swap_new_factor. z = ff_q_product_swap_new_factor * s ((s (ff_i_product_swap_new)) * d) + (ff_p_product_swap_new))) /\ ((((exists ff_h_product_swap_new_partial. ff_h_product_swap_new_partial + s (ff_r_product_swap_new) = s ((s (ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_partial. ff_u_product_swap_new = ff_q_product_swap_new_partial * s ((s (ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_r_product_swap_new))) /\ ((((exists ff_h_product_swap_new_successor. ff_h_product_swap_new_successor + s (ff_s_product_swap_new) = s ((s (s ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_successor. ff_u_product_swap_new = ff_q_product_swap_new_successor * s ((s (s ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_s_product_swap_new))) /\ ff_s_product_swap_new = ff_r_product_swap_new * ff_p_product_swap_new)))))) -&gt; p = q quadratic_residues beta_product_replace_balance beta_product_succ_decompose beta_at_unique le_succ le_refl lt_irrefl_expanded">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_product_swap_last_invariant</code><span>Beta product swap last invariant</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Swapping an interior beta-coded factor with the last factor preserves the exact finite product.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_product_replace_balance" href="#theorem-beta_product_replace_balance"><code>beta_product_replace_balance</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_product_succ_decompose" href="#theorem-beta_product_succ_decompose"><code>beta_product_succ_decompose</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_product_swap_last_invariant">Copy statement</button>
        <pre id="statement-beta_product_swap_last_invariant"><code>forall b c z d n i x y p q. (exists h. h + S i = n) -&gt; (((exists ff_h_product_swap_old_i. ff_h_product_swap_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_product_swap_old_i. b = ff_q_product_swap_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_product_swap_old_n. ff_h_product_swap_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_product_swap_old_n. b = ff_q_product_swap_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_product_swap_new_i. ff_h_product_swap_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_product_swap_new_i. z = ff_q_product_swap_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_product_swap_new_n. ff_h_product_swap_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_product_swap_new_n. z = ff_q_product_swap_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_product_swap_old_j. ff_h_product_swap_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_product_swap_old_j. b = ff_q_product_swap_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_product_swap_new_j. ff_h_product_swap_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_product_swap_new_j. z = ff_q_product_swap_new_j * S ((S (j)) * d) + (a)))) -&gt; (exists ff_u_product_swap_old ff_v_product_swap_old. ((((exists ff_h_product_swap_old_start. ff_h_product_swap_old_start + S (1) = S ((S (0)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_start. ff_u_product_swap_old = ff_q_product_swap_old_start * S ((S (0)) * ff_v_product_swap_old) + (1))) /\ ((((exists ff_h_product_swap_old_terminal. ff_h_product_swap_old_terminal + S (p) = S ((S (S n)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_terminal. ff_u_product_swap_old = ff_q_product_swap_old_terminal * S ((S (S n)) * ff_v_product_swap_old) + (p))) /\ forall ff_i_product_swap_old. (exists ff_lt_product_swap_old_bound. ff_lt_product_swap_old_bound + S ff_i_product_swap_old = S n) -&gt; exists ff_p_product_swap_old ff_r_product_swap_old ff_s_product_swap_old. ((((exists ff_h_product_swap_old_factor. ff_h_product_swap_old_factor + S (ff_p_product_swap_old) = S ((S (ff_i_product_swap_old)) * c)) /\ exists ff_q_product_swap_old_factor. b = ff_q_product_swap_old_factor * S ((S (ff_i_product_swap_old)) * c) + (ff_p_product_swap_old))) /\ ((((exists ff_h_product_swap_old_partial. ff_h_product_swap_old_partial + S (ff_r_product_swap_old) = S ((S (ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_partial. ff_u_product_swap_old = ff_q_product_swap_old_partial * S ((S (ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_r_product_swap_old))) /\ ((((exists ff_h_product_swap_old_successor. ff_h_product_swap_old_successor + S (ff_s_product_swap_old) = S ((S (S ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_successor. ff_u_product_swap_old = ff_q_product_swap_old_successor * S ((S (S ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_s_product_swap_old))) /\ ff_s_product_swap_old = ff_r_product_swap_old * ff_p_product_swap_old)))))) -&gt; (exists ff_u_product_swap_new ff_v_product_swap_new. ((((exists ff_h_product_swap_new_start. ff_h_product_swap_new_start + S (1) = S ((S (0)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_start. ff_u_product_swap_new = ff_q_product_swap_new_start * S ((S (0)) * ff_v_product_swap_new) + (1))) /\ ((((exists ff_h_product_swap_new_terminal. ff_h_product_swap_new_terminal + S (q) = S ((S (S n)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_terminal. ff_u_product_swap_new = ff_q_product_swap_new_terminal * S ((S (S n)) * ff_v_product_swap_new) + (q))) /\ forall ff_i_product_swap_new. (exists ff_lt_product_swap_new_bound. ff_lt_product_swap_new_bound + S ff_i_product_swap_new = S n) -&gt; exists ff_p_product_swap_new ff_r_product_swap_new ff_s_product_swap_new. ((((exists ff_h_product_swap_new_factor. ff_h_product_swap_new_factor + S (ff_p_product_swap_new) = S ((S (ff_i_product_swap_new)) * d)) /\ exists ff_q_product_swap_new_factor. z = ff_q_product_swap_new_factor * S ((S (ff_i_product_swap_new)) * d) + (ff_p_product_swap_new))) /\ ((((exists ff_h_product_swap_new_partial. ff_h_product_swap_new_partial + S (ff_r_product_swap_new) = S ((S (ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_partial. ff_u_product_swap_new = ff_q_product_swap_new_partial * S ((S (ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_r_product_swap_new))) /\ ((((exists ff_h_product_swap_new_successor. ff_h_product_swap_new_successor + S (ff_s_product_swap_new) = S ((S (S ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_successor. ff_u_product_swap_new = ff_q_product_swap_new_successor * S ((S (S ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_s_product_swap_new))) /\ ff_s_product_swap_new = ff_r_product_swap_new * ff_p_product_swap_new)))))) -&gt; p = q</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_product_swap_last_invariant">Copy proof</button>
        <pre id="proof-beta_product_swap_last_invariant"><code>pa prove forall b c z d n i x y p q. (exists h. h + S i = n) -&gt; (((exists ff_h_product_swap_old_i. ff_h_product_swap_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_product_swap_old_i. b = ff_q_product_swap_old_i * S ((S (i)) * c) + (x))) -&gt; (((exists ff_h_product_swap_old_n. ff_h_product_swap_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_product_swap_old_n. b = ff_q_product_swap_old_n * S ((S (n)) * c) + (y))) -&gt; (((exists ff_h_product_swap_new_i. ff_h_product_swap_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_product_swap_new_i. z = ff_q_product_swap_new_i * S ((S (i)) * d) + (y))) -&gt; (((exists ff_h_product_swap_new_n. ff_h_product_swap_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_product_swap_new_n. z = ff_q_product_swap_new_n * S ((S (n)) * d) + (x))) -&gt; (forall j a. (exists h. h + S j = S n) -&gt; ~(j = i) -&gt; ~(j = n) -&gt; (((exists ff_h_product_swap_old_j. ff_h_product_swap_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_product_swap_old_j. b = ff_q_product_swap_old_j * S ((S (j)) * c) + (a))) -&gt; (((exists ff_h_product_swap_new_j. ff_h_product_swap_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_product_swap_new_j. z = ff_q_product_swap_new_j * S ((S (j)) * d) + (a)))) -&gt; (exists ff_u_product_swap_old ff_v_product_swap_old. ((((exists ff_h_product_swap_old_start. ff_h_product_swap_old_start + S (1) = S ((S (0)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_start. ff_u_product_swap_old = ff_q_product_swap_old_start * S ((S (0)) * ff_v_product_swap_old) + (1))) /\ ((((exists ff_h_product_swap_old_terminal. ff_h_product_swap_old_terminal + S (p) = S ((S (S n)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_terminal. ff_u_product_swap_old = ff_q_product_swap_old_terminal * S ((S (S n)) * ff_v_product_swap_old) + (p))) /\ forall ff_i_product_swap_old. (exists ff_lt_product_swap_old_bound. ff_lt_product_swap_old_bound + S ff_i_product_swap_old = S n) -&gt; exists ff_p_product_swap_old ff_r_product_swap_old ff_s_product_swap_old. ((((exists ff_h_product_swap_old_factor. ff_h_product_swap_old_factor + S (ff_p_product_swap_old) = S ((S (ff_i_product_swap_old)) * c)) /\ exists ff_q_product_swap_old_factor. b = ff_q_product_swap_old_factor * S ((S (ff_i_product_swap_old)) * c) + (ff_p_product_swap_old))) /\ ((((exists ff_h_product_swap_old_partial. ff_h_product_swap_old_partial + S (ff_r_product_swap_old) = S ((S (ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_partial. ff_u_product_swap_old = ff_q_product_swap_old_partial * S ((S (ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_r_product_swap_old))) /\ ((((exists ff_h_product_swap_old_successor. ff_h_product_swap_old_successor + S (ff_s_product_swap_old) = S ((S (S ff_i_product_swap_old)) * ff_v_product_swap_old)) /\ exists ff_q_product_swap_old_successor. ff_u_product_swap_old = ff_q_product_swap_old_successor * S ((S (S ff_i_product_swap_old)) * ff_v_product_swap_old) + (ff_s_product_swap_old))) /\ ff_s_product_swap_old = ff_r_product_swap_old * ff_p_product_swap_old)))))) -&gt; (exists ff_u_product_swap_new ff_v_product_swap_new. ((((exists ff_h_product_swap_new_start. ff_h_product_swap_new_start + S (1) = S ((S (0)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_start. ff_u_product_swap_new = ff_q_product_swap_new_start * S ((S (0)) * ff_v_product_swap_new) + (1))) /\ ((((exists ff_h_product_swap_new_terminal. ff_h_product_swap_new_terminal + S (q) = S ((S (S n)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_terminal. ff_u_product_swap_new = ff_q_product_swap_new_terminal * S ((S (S n)) * ff_v_product_swap_new) + (q))) /\ forall ff_i_product_swap_new. (exists ff_lt_product_swap_new_bound. ff_lt_product_swap_new_bound + S ff_i_product_swap_new = S n) -&gt; exists ff_p_product_swap_new ff_r_product_swap_new ff_s_product_swap_new. ((((exists ff_h_product_swap_new_factor. ff_h_product_swap_new_factor + S (ff_p_product_swap_new) = S ((S (ff_i_product_swap_new)) * d)) /\ exists ff_q_product_swap_new_factor. z = ff_q_product_swap_new_factor * S ((S (ff_i_product_swap_new)) * d) + (ff_p_product_swap_new))) /\ ((((exists ff_h_product_swap_new_partial. ff_h_product_swap_new_partial + S (ff_r_product_swap_new) = S ((S (ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_partial. ff_u_product_swap_new = ff_q_product_swap_new_partial * S ((S (ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_r_product_swap_new))) /\ ((((exists ff_h_product_swap_new_successor. ff_h_product_swap_new_successor + S (ff_s_product_swap_new) = S ((S (S ff_i_product_swap_new)) * ff_v_product_swap_new)) /\ exists ff_q_product_swap_new_successor. ff_u_product_swap_new = ff_q_product_swap_new_successor * S ((S (S ff_i_product_swap_new)) * ff_v_product_swap_new) + (ff_s_product_swap_new))) /\ ff_s_product_swap_new = ff_r_product_swap_new * ff_p_product_swap_new)))))) -&gt; p = q
use beta_product_replace_balance
use beta_product_succ_decompose
use beta_at_unique
use le_succ
use le_refl
use lt_irrefl_expanded
intro b
intro c
intro z
intro d
intro n
intro i
intro x
intro y
intro p
intro q
intro hi
intro hold_i
intro hold_n
intro hnew_i
intro hnew_n
intro hpreserve
intro hproduct_old
intro hproduct_new
have hold_decomp : exists a r. (((exists ff_h_swap_old_last. ff_h_swap_old_last + S (a) = S ((S (n)) * c)) /\ exists ff_q_swap_old_last. b = ff_q_swap_old_last * S ((S (n)) * c) + (a))) /\ ((exists ff_u_swap_old_prefix ff_v_swap_old_prefix. ((((exists ff_h_swap_old_prefix_start. ff_h_swap_old_prefix_start + S (1) = S ((S (0)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_start. ff_u_swap_old_prefix = ff_q_swap_old_prefix_start * S ((S (0)) * ff_v_swap_old_prefix) + (1))) /\ ((((exists ff_h_swap_old_prefix_terminal. ff_h_swap_old_prefix_terminal + S (r) = S ((S (n)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_terminal. ff_u_swap_old_prefix = ff_q_swap_old_prefix_terminal * S ((S (n)) * ff_v_swap_old_prefix) + (r))) /\ forall ff_i_swap_old_prefix. (exists ff_lt_swap_old_prefix_bound. ff_lt_swap_old_prefix_bound + S ff_i_swap_old_prefix = n) -&gt; exists ff_p_swap_old_prefix ff_r_swap_old_prefix ff_s_swap_old_prefix. ((((exists ff_h_swap_old_prefix_factor. ff_h_swap_old_prefix_factor + S (ff_p_swap_old_prefix) = S ((S (ff_i_swap_old_prefix)) * c)) /\ exists ff_q_swap_old_prefix_factor. b = ff_q_swap_old_prefix_factor * S ((S (ff_i_swap_old_prefix)) * c) + (ff_p_swap_old_prefix))) /\ ((((exists ff_h_swap_old_prefix_partial. ff_h_swap_old_prefix_partial + S (ff_r_swap_old_prefix) = S ((S (ff_i_swap_old_prefix)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_partial. ff_u_swap_old_prefix = ff_q_swap_old_prefix_partial * S ((S (ff_i_swap_old_prefix)) * ff_v_swap_old_prefix) + (ff_r_swap_old_prefix))) /\ ((((exists ff_h_swap_old_prefix_successor. ff_h_swap_old_prefix_successor + S (ff_s_swap_old_prefix) = S ((S (S ff_i_swap_old_prefix)) * ff_v_swap_old_prefix)) /\ exists ff_q_swap_old_prefix_successor. ff_u_swap_old_prefix = ff_q_swap_old_prefix_successor * S ((S (S ff_i_swap_old_prefix)) * ff_v_swap_old_prefix) + (ff_s_swap_old_prefix))) /\ ff_s_swap_old_prefix = ff_r_swap_old_prefix * ff_p_swap_old_prefix)))))) /\ p = r * a)
specialize beta_product_succ_decompose b
specialize beta_product_succ_decompose c
specialize beta_product_succ_decompose n
specialize beta_product_succ_decompose p
apply beta_product_succ_decompose
exact hproduct_old
have hnew_decomp : exists a r. (((exists ff_h_swap_new_last. ff_h_swap_new_last + S (a) = S ((S (n)) * d)) /\ exists ff_q_swap_new_last. z = ff_q_swap_new_last * S ((S (n)) * d) + (a))) /\ ((exists ff_u_swap_new_prefix ff_v_swap_new_prefix. ((((exists ff_h_swap_new_prefix_start. ff_h_swap_new_prefix_start + S (1) = S ((S (0)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_start. ff_u_swap_new_prefix = ff_q_swap_new_prefix_start * S ((S (0)) * ff_v_swap_new_prefix) + (1))) /\ ((((exists ff_h_swap_new_prefix_terminal. ff_h_swap_new_prefix_terminal + S (r) = S ((S (n)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_terminal. ff_u_swap_new_prefix = ff_q_swap_new_prefix_terminal * S ((S (n)) * ff_v_swap_new_prefix) + (r))) /\ forall ff_i_swap_new_prefix. (exists ff_lt_swap_new_prefix_bound. ff_lt_swap_new_prefix_bound + S ff_i_swap_new_prefix = n) -&gt; exists ff_p_swap_new_prefix ff_r_swap_new_prefix ff_s_swap_new_prefix. ((((exists ff_h_swap_new_prefix_factor. ff_h_swap_new_prefix_factor + S (ff_p_swap_new_prefix) = S ((S (ff_i_swap_new_prefix)) * d)) /\ exists ff_q_swap_new_prefix_factor. z = ff_q_swap_new_prefix_factor * S ((S (ff_i_swap_new_prefix)) * d) + (ff_p_swap_new_prefix))) /\ ((((exists ff_h_swap_new_prefix_partial. ff_h_swap_new_prefix_partial + S (ff_r_swap_new_prefix) = S ((S (ff_i_swap_new_prefix)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_partial. ff_u_swap_new_prefix = ff_q_swap_new_prefix_partial * S ((S (ff_i_swap_new_prefix)) * ff_v_swap_new_prefix) + (ff_r_swap_new_prefix))) /\ ((((exists ff_h_swap_new_prefix_successor. ff_h_swap_new_prefix_successor + S (ff_s_swap_new_prefix) = S ((S (S ff_i_swap_new_prefix)) * ff_v_swap_new_prefix)) /\ exists ff_q_swap_new_prefix_successor. ff_u_swap_new_prefix = ff_q_swap_new_prefix_successor * S ((S (S ff_i_swap_new_prefix)) * ff_v_swap_new_prefix) + (ff_s_swap_new_prefix))) /\ ff_s_swap_new_prefix = ff_r_swap_new_prefix * ff_p_swap_new_prefix)))))) /\ q = r * a)
specialize beta_product_succ_decompose z
specialize beta_product_succ_decompose d
specialize beta_product_succ_decompose n
specialize beta_product_succ_decompose q
apply beta_product_succ_decompose
exact hproduct_new
cases hold_decomp
cases hold_decomp_witness
cases hold_decomp_witness_witness
cases hold_decomp_witness_witness_right
cases hnew_decomp
cases hnew_decomp_witness
cases hnew_decomp_witness_witness
cases hnew_decomp_witness_witness_right
have hold_last : x1 = y
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique n
specialize beta_at_unique x1
specialize beta_at_unique y
apply beta_at_unique
exact hold_decomp_witness_witness_left
exact hold_n
have hnew_last : x3 = x
specialize beta_at_unique z
specialize beta_at_unique d
specialize beta_at_unique n
specialize beta_at_unique x3
specialize beta_at_unique x
apply beta_at_unique
exact hnew_decomp_witness_witness_left
exact hnew_n
have hprefix_preserve : forall j a. (exists h. h + S j = n) -&gt; ~(j = i) -&gt; ((exists h. h + S a = S ((S j) * c)) /\ exists w. b = w * S ((S j) * c) + a) -&gt; ((exists h. h + S a = S ((S j) * d)) /\ exists w. z = w * S ((S j) * d) + a)
intro j
intro a
intro hj
intro hji
intro hold
specialize hpreserve j
specialize hpreserve a
apply hpreserve
specialize le_succ (S j)
specialize le_succ n
apply le_succ
exact hj
exact hji
intro hjn
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hjn at hj
exact hj
exact hold
have hbalance : x4 * x = x2 * y
specialize beta_product_replace_balance n
specialize beta_product_replace_balance b
specialize beta_product_replace_balance c
specialize beta_product_replace_balance z
specialize beta_product_replace_balance d
specialize beta_product_replace_balance i
specialize beta_product_replace_balance x
specialize beta_product_replace_balance y
specialize beta_product_replace_balance x2
specialize beta_product_replace_balance x4
apply beta_product_replace_balance
exact hi
exact hold_i
exact hnew_i
exact hprefix_preserve
exact hold_decomp_witness_witness_right_left
exact hnew_decomp_witness_witness_right_left
rewrite hold_decomp_witness_witness_right_right
rewrite hnew_decomp_witness_witness_right_right
rewrite hold_last
rewrite hnew_last
symm
exact hbalance
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>7,439</dd></div>
        <div><dt>Distinct objects</dt><dd>1,685</dd></div>
        <div><dt>Reused references</dt><dd>61</dd></div>
        <div><dt>Depth</dt><dd>67</dd></div>
        <div><dt>Cuts</dt><dd>205</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ee7ff4aa1c4567b1f46752db3bc1e29748d506653669c090ac6d76bc77ff59dd">ee7ff4aa1c45…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_product_swap_last_invariant">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_product_swap_last_invariant</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_product_permutation_theorems.py#L388">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_product_swap_last_invariant.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-finite_fixed_last_prefix_bounded"
  data-name="finite_fixed_last_prefix_bounded" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="finite_bounded_prefix_without_top,le_succ,le_refl,lt_irrefl_expanded"
  data-search="finite_fixed_last_prefix_bounded finite fixed last prefix bounded a bounded injective successor reindexing fixed at its last position is bounded on the old prefix. forall r s n. (forall fp_i_fixed_last_bounded_succ. (exists fp_gap_fixed_last_bounded_succ_index. fp_gap_fixed_last_bounded_succ_index + s fp_i_fixed_last_bounded_succ = s n) -&gt; exists fp_value_fixed_last_bounded_succ. ((((exists ff_h_fixed_last_bounded_succ_entry. ff_h_fixed_last_bounded_succ_entry + s (fp_value_fixed_last_bounded_succ) = s ((s (fp_i_fixed_last_bounded_succ)) * s)) /\ exists ff_q_fixed_last_bounded_succ_entry. r = ff_q_fixed_last_bounded_succ_entry * s ((s (fp_i_fixed_last_bounded_succ)) * s) + (fp_value_fixed_last_bounded_succ))) /\ (exists fp_gap_fixed_last_bounded_succ_value. fp_gap_fixed_last_bounded_succ_value + s fp_value_fixed_last_bounded_succ = s n))) -&gt; (forall fp_i_fixed_last_injective_succ fp_j_fixed_last_injective_succ fp_value_fixed_last_injective_succ. (exists fp_gap_fixed_last_injective_succ_i. fp_gap_fixed_last_injective_succ_i + s fp_i_fixed_last_injective_succ = s n) -&gt; (exists fp_gap_fixed_last_injective_succ_j. fp_gap_fixed_last_injective_succ_j + s fp_j_fixed_last_injective_succ = s n) -&gt; (((exists ff_h_fixed_last_injective_succ_left. ff_h_fixed_last_injective_succ_left + s (fp_value_fixed_last_injective_succ) = s ((s (fp_i_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_left. r = ff_q_fixed_last_injective_succ_left * s ((s (fp_i_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -&gt; (((exists ff_h_fixed_last_injective_succ_right. ff_h_fixed_last_injective_succ_right + s (fp_value_fixed_last_injective_succ) = s ((s (fp_j_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_right. r = ff_q_fixed_last_injective_succ_right * s ((s (fp_j_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -&gt; fp_i_fixed_last_injective_succ = fp_j_fixed_last_injective_succ) -&gt; (((exists ff_h_fixed_last_entry. ff_h_fixed_last_entry + s (n) = s ((s (n)) * s)) /\ exists ff_q_fixed_last_entry. r = ff_q_fixed_last_entry * s ((s (n)) * s) + (n))) -&gt; (forall fp_i_fixed_last_bounded_prefix. (exists fp_gap_fixed_last_bounded_prefix_index. fp_gap_fixed_last_bounded_prefix_index + s fp_i_fixed_last_bounded_prefix = n) -&gt; exists fp_value_fixed_last_bounded_prefix. ((((exists ff_h_fixed_last_bounded_prefix_entry. ff_h_fixed_last_bounded_prefix_entry + s (fp_value_fixed_last_bounded_prefix) = s ((s (fp_i_fixed_last_bounded_prefix)) * s)) /\ exists ff_q_fixed_last_bounded_prefix_entry. r = ff_q_fixed_last_bounded_prefix_entry * s ((s (fp_i_fixed_last_bounded_prefix)) * s) + (fp_value_fixed_last_bounded_prefix))) /\ (exists fp_gap_fixed_last_bounded_prefix_value. fp_gap_fixed_last_bounded_prefix_value + s fp_value_fixed_last_bounded_prefix = n))) quadratic_residues finite_bounded_prefix_without_top le_succ le_refl lt_irrefl_expanded">
  <details>
    <summary>
      <span class="pa-card-title"><code>finite_fixed_last_prefix_bounded</code><span>Finite fixed last prefix bounded</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A bounded injective successor reindexing fixed at its last position is bounded on the old prefix.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="finite_bounded_prefix_without_top" href="#theorem-finite_bounded_prefix_without_top"><code>finite_bounded_prefix_without_top</code></a> <a class="pa-theorem-chip" data-theorem-link="le_succ" href="#theorem-le_succ"><code>le_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="le_refl" href="#theorem-le_refl"><code>le_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_irrefl_expanded" href="#theorem-lt_irrefl_expanded"><code>lt_irrefl_expanded</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-finite_fixed_last_prefix_bounded">Copy statement</button>
        <pre id="statement-finite_fixed_last_prefix_bounded"><code>forall r s n. (forall fp_i_fixed_last_bounded_succ. (exists fp_gap_fixed_last_bounded_succ_index. fp_gap_fixed_last_bounded_succ_index + S fp_i_fixed_last_bounded_succ = S n) -&gt; exists fp_value_fixed_last_bounded_succ. ((((exists ff_h_fixed_last_bounded_succ_entry. ff_h_fixed_last_bounded_succ_entry + S (fp_value_fixed_last_bounded_succ) = S ((S (fp_i_fixed_last_bounded_succ)) * s)) /\ exists ff_q_fixed_last_bounded_succ_entry. r = ff_q_fixed_last_bounded_succ_entry * S ((S (fp_i_fixed_last_bounded_succ)) * s) + (fp_value_fixed_last_bounded_succ))) /\ (exists fp_gap_fixed_last_bounded_succ_value. fp_gap_fixed_last_bounded_succ_value + S fp_value_fixed_last_bounded_succ = S n))) -&gt; (forall fp_i_fixed_last_injective_succ fp_j_fixed_last_injective_succ fp_value_fixed_last_injective_succ. (exists fp_gap_fixed_last_injective_succ_i. fp_gap_fixed_last_injective_succ_i + S fp_i_fixed_last_injective_succ = S n) -&gt; (exists fp_gap_fixed_last_injective_succ_j. fp_gap_fixed_last_injective_succ_j + S fp_j_fixed_last_injective_succ = S n) -&gt; (((exists ff_h_fixed_last_injective_succ_left. ff_h_fixed_last_injective_succ_left + S (fp_value_fixed_last_injective_succ) = S ((S (fp_i_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_left. r = ff_q_fixed_last_injective_succ_left * S ((S (fp_i_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -&gt; (((exists ff_h_fixed_last_injective_succ_right. ff_h_fixed_last_injective_succ_right + S (fp_value_fixed_last_injective_succ) = S ((S (fp_j_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_right. r = ff_q_fixed_last_injective_succ_right * S ((S (fp_j_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -&gt; fp_i_fixed_last_injective_succ = fp_j_fixed_last_injective_succ) -&gt; (((exists ff_h_fixed_last_entry. ff_h_fixed_last_entry + S (n) = S ((S (n)) * s)) /\ exists ff_q_fixed_last_entry. r = ff_q_fixed_last_entry * S ((S (n)) * s) + (n))) -&gt; (forall fp_i_fixed_last_bounded_prefix. (exists fp_gap_fixed_last_bounded_prefix_index. fp_gap_fixed_last_bounded_prefix_index + S fp_i_fixed_last_bounded_prefix = n) -&gt; exists fp_value_fixed_last_bounded_prefix. ((((exists ff_h_fixed_last_bounded_prefix_entry. ff_h_fixed_last_bounded_prefix_entry + S (fp_value_fixed_last_bounded_prefix) = S ((S (fp_i_fixed_last_bounded_prefix)) * s)) /\ exists ff_q_fixed_last_bounded_prefix_entry. r = ff_q_fixed_last_bounded_prefix_entry * S ((S (fp_i_fixed_last_bounded_prefix)) * s) + (fp_value_fixed_last_bounded_prefix))) /\ (exists fp_gap_fixed_last_bounded_prefix_value. fp_gap_fixed_last_bounded_prefix_value + S fp_value_fixed_last_bounded_prefix = n)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-finite_fixed_last_prefix_bounded">Copy proof</button>
        <pre id="proof-finite_fixed_last_prefix_bounded"><code>pa prove forall r s n. (forall fp_i_fixed_last_bounded_succ. (exists fp_gap_fixed_last_bounded_succ_index. fp_gap_fixed_last_bounded_succ_index + S fp_i_fixed_last_bounded_succ = S n) -&gt; exists fp_value_fixed_last_bounded_succ. ((((exists ff_h_fixed_last_bounded_succ_entry. ff_h_fixed_last_bounded_succ_entry + S (fp_value_fixed_last_bounded_succ) = S ((S (fp_i_fixed_last_bounded_succ)) * s)) /\ exists ff_q_fixed_last_bounded_succ_entry. r = ff_q_fixed_last_bounded_succ_entry * S ((S (fp_i_fixed_last_bounded_succ)) * s) + (fp_value_fixed_last_bounded_succ))) /\ (exists fp_gap_fixed_last_bounded_succ_value. fp_gap_fixed_last_bounded_succ_value + S fp_value_fixed_last_bounded_succ = S n))) -&gt; (forall fp_i_fixed_last_injective_succ fp_j_fixed_last_injective_succ fp_value_fixed_last_injective_succ. (exists fp_gap_fixed_last_injective_succ_i. fp_gap_fixed_last_injective_succ_i + S fp_i_fixed_last_injective_succ = S n) -&gt; (exists fp_gap_fixed_last_injective_succ_j. fp_gap_fixed_last_injective_succ_j + S fp_j_fixed_last_injective_succ = S n) -&gt; (((exists ff_h_fixed_last_injective_succ_left. ff_h_fixed_last_injective_succ_left + S (fp_value_fixed_last_injective_succ) = S ((S (fp_i_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_left. r = ff_q_fixed_last_injective_succ_left * S ((S (fp_i_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -&gt; (((exists ff_h_fixed_last_injective_succ_right. ff_h_fixed_last_injective_succ_right + S (fp_value_fixed_last_injective_succ) = S ((S (fp_j_fixed_last_injective_succ)) * s)) /\ exists ff_q_fixed_last_injective_succ_right. r = ff_q_fixed_last_injective_succ_right * S ((S (fp_j_fixed_last_injective_succ)) * s) + (fp_value_fixed_last_injective_succ))) -&gt; fp_i_fixed_last_injective_succ = fp_j_fixed_last_injective_succ) -&gt; (((exists ff_h_fixed_last_entry. ff_h_fixed_last_entry + S (n) = S ((S (n)) * s)) /\ exists ff_q_fixed_last_entry. r = ff_q_fixed_last_entry * S ((S (n)) * s) + (n))) -&gt; (forall fp_i_fixed_last_bounded_prefix. (exists fp_gap_fixed_last_bounded_prefix_index. fp_gap_fixed_last_bounded_prefix_index + S fp_i_fixed_last_bounded_prefix = n) -&gt; exists fp_value_fixed_last_bounded_prefix. ((((exists ff_h_fixed_last_bounded_prefix_entry. ff_h_fixed_last_bounded_prefix_entry + S (fp_value_fixed_last_bounded_prefix) = S ((S (fp_i_fixed_last_bounded_prefix)) * s)) /\ exists ff_q_fixed_last_bounded_prefix_entry. r = ff_q_fixed_last_bounded_prefix_entry * S ((S (fp_i_fixed_last_bounded_prefix)) * s) + (fp_value_fixed_last_bounded_prefix))) /\ (exists fp_gap_fixed_last_bounded_prefix_value. fp_gap_fixed_last_bounded_prefix_value + S fp_value_fixed_last_bounded_prefix = n)))
use finite_bounded_prefix_without_top
use le_succ
use le_refl
use lt_irrefl_expanded
intro r
intro s
intro n
intro hbounded
intro hinjective
intro hlast
have hnotop : forall i. (exists h. h + S i = n) -&gt; ~((exists h. h + S n = S ((S i) * s)) /\ exists q. r = q * S ((S i) * s) + n)
intro i
intro hi
intro htop
have hisn : exists h. h + S i = S n
specialize le_succ (S i)
specialize le_succ n
apply le_succ
exact hi
have hnsn : exists h. h + S n = S n
specialize le_refl (S n)
exact le_refl
have hin : i = n
specialize hinjective i
specialize hinjective n
specialize hinjective n
apply hinjective
exact hisn
exact hnsn
exact htop
exact hlast
specialize lt_irrefl_expanded n
apply lt_irrefl_expanded
rewrite hin at hi
exact hi
specialize finite_bounded_prefix_without_top r
specialize finite_bounded_prefix_without_top s
specialize finite_bounded_prefix_without_top n
specialize finite_bounded_prefix_without_top (S n)
apply finite_bounded_prefix_without_top
refl
exact hbounded
exact hnotop
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>409</dd></div>
        <div><dt>Distinct objects</dt><dd>294</dd></div>
        <div><dt>Reused references</dt><dd>8</dd></div>
        <div><dt>Depth</dt><dd>24</dd></div>
        <div><dt>Cuts</dt><dd>16</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f17e5ed17a10a10f1055332c4fb79f0869609e7b56949fbc99fc0524704f038e">f17e5ed17a10…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for finite_fixed_last_prefix_bounded">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib finite_fixed_last_prefix_bounded</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_product_reindex_support.py#L194">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/finite_fixed_last_prefix_bounded.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-beta_reindex_alignment_swap_last"
  data-name="beta_reindex_alignment_swap_last" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="beta_prefix_swap_last_reflect,beta_at_unique"
  data-search="beta_reindex_alignment_swap_last beta reindex alignment swap last simultaneous interior/final swaps of an index code and target factors preserve alignment. forall r s u v b c z d w e n i m x y. (((exists ff_h_align_swap_map_i. ff_h_align_swap_map_i + s (m) = s ((s (i)) * v)) /\ exists ff_q_align_swap_map_i. u = ff_q_align_swap_map_i * s ((s (i)) * v) + (m))) -&gt; (((exists ff_h_align_swap_map_n. ff_h_align_swap_map_n + s (n) = s ((s (n)) * v)) /\ exists ff_q_align_swap_map_n. u = ff_q_align_swap_map_n * s ((s (n)) * v) + (n))) -&gt; (forall k j. (exists h. h + s k = s n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_align_swap_map_old. ff_h_align_swap_map_old + s (j) = s ((s (k)) * s)) /\ exists ff_q_align_swap_map_old. r = ff_q_align_swap_map_old * s ((s (k)) * s) + (j))) -&gt; (((exists ff_h_align_swap_map_new. ff_h_align_swap_map_new + s (j) = s ((s (k)) * v)) /\ exists ff_q_align_swap_map_new. u = ff_q_align_swap_map_new * s ((s (k)) * v) + (j)))) -&gt; (((exists ff_h_align_swap_source_m. ff_h_align_swap_source_m + s (y) = s ((s (m)) * c)) /\ exists ff_q_align_swap_source_m. b = ff_q_align_swap_source_m * s ((s (m)) * c) + (y))) -&gt; (((exists ff_h_align_swap_source_n. ff_h_align_swap_source_n + s (x) = s ((s (n)) * c)) /\ exists ff_q_align_swap_source_n. b = ff_q_align_swap_source_n * s ((s (n)) * c) + (x))) -&gt; (((exists ff_h_align_swap_target_i. ff_h_align_swap_target_i + s (y) = s ((s (i)) * e)) /\ exists ff_q_align_swap_target_i. w = ff_q_align_swap_target_i * s ((s (i)) * e) + (y))) -&gt; (((exists ff_h_align_swap_target_n. ff_h_align_swap_target_n + s (x) = s ((s (n)) * e)) /\ exists ff_q_align_swap_target_n. w = ff_q_align_swap_target_n * s ((s (n)) * e) + (x))) -&gt; (forall k a. (exists h. h + s k = s n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_align_swap_target_old. ff_h_align_swap_target_old + s (a) = s ((s (k)) * d)) /\ exists ff_q_align_swap_target_old. z = ff_q_align_swap_target_old * s ((s (k)) * d) + (a))) -&gt; (((exists ff_h_align_swap_target_new. ff_h_align_swap_target_new + s (a) = s ((s (k)) * e)) /\ exists ff_q_align_swap_target_new. w = ff_q_align_swap_target_new * s ((s (k)) * e) + (a)))) -&gt; (forall fpr_i_align_swap_old fpr_j_align_swap_old fpr_x_align_swap_old. (exists fpr_h_align_swap_old. fpr_h_align_swap_old + s fpr_i_align_swap_old = s n) -&gt; (((exists ff_h_align_swap_old_map. ff_h_align_swap_old_map + s (fpr_j_align_swap_old) = s ((s (fpr_i_align_swap_old)) * s)) /\ exists ff_q_align_swap_old_map. r = ff_q_align_swap_old_map * s ((s (fpr_i_align_swap_old)) * s) + (fpr_j_align_swap_old))) -&gt; (((exists ff_h_align_swap_old_source. ff_h_align_swap_old_source + s (fpr_x_align_swap_old) = s ((s (fpr_j_align_swap_old)) * c)) /\ exists ff_q_align_swap_old_source. b = ff_q_align_swap_old_source * s ((s (fpr_j_align_swap_old)) * c) + (fpr_x_align_swap_old))) -&gt; (((exists ff_h_align_swap_old_target. ff_h_align_swap_old_target + s (fpr_x_align_swap_old) = s ((s (fpr_i_align_swap_old)) * d)) /\ exists ff_q_align_swap_old_target. z = ff_q_align_swap_old_target * s ((s (fpr_i_align_swap_old)) * d) + (fpr_x_align_swap_old)))) -&gt; (forall fpr_i_align_swap_new fpr_j_align_swap_new fpr_x_align_swap_new. (exists fpr_h_align_swap_new. fpr_h_align_swap_new + s fpr_i_align_swap_new = s n) -&gt; (((exists ff_h_align_swap_new_map. ff_h_align_swap_new_map + s (fpr_j_align_swap_new) = s ((s (fpr_i_align_swap_new)) * v)) /\ exists ff_q_align_swap_new_map. u = ff_q_align_swap_new_map * s ((s (fpr_i_align_swap_new)) * v) + (fpr_j_align_swap_new))) -&gt; (((exists ff_h_align_swap_new_source. ff_h_align_swap_new_source + s (fpr_x_align_swap_new) = s ((s (fpr_j_align_swap_new)) * c)) /\ exists ff_q_align_swap_new_source. b = ff_q_align_swap_new_source * s ((s (fpr_j_align_swap_new)) * c) + (fpr_x_align_swap_new))) -&gt; (((exists ff_h_align_swap_new_target. ff_h_align_swap_new_target + s (fpr_x_align_swap_new) = s ((s (fpr_i_align_swap_new)) * e)) /\ exists ff_q_align_swap_new_target. w = ff_q_align_swap_new_target * s ((s (fpr_i_align_swap_new)) * e) + (fpr_x_align_swap_new)))) quadratic_residues beta_prefix_swap_last_reflect beta_at_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>beta_reindex_alignment_swap_last</code><span>Beta reindex alignment swap last</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Simultaneous interior/final swaps of an index code and target factors preserve alignment.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="beta_prefix_swap_last_reflect" href="#theorem-beta_prefix_swap_last_reflect"><code>beta_prefix_swap_last_reflect</code></a> <a class="pa-theorem-chip" data-theorem-link="beta_at_unique" href="#theorem-beta_at_unique"><code>beta_at_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-beta_reindex_alignment_swap_last">Copy statement</button>
        <pre id="statement-beta_reindex_alignment_swap_last"><code>forall r s u v b c z d w e n i m x y. (((exists ff_h_align_swap_map_i. ff_h_align_swap_map_i + S (m) = S ((S (i)) * v)) /\ exists ff_q_align_swap_map_i. u = ff_q_align_swap_map_i * S ((S (i)) * v) + (m))) -&gt; (((exists ff_h_align_swap_map_n. ff_h_align_swap_map_n + S (n) = S ((S (n)) * v)) /\ exists ff_q_align_swap_map_n. u = ff_q_align_swap_map_n * S ((S (n)) * v) + (n))) -&gt; (forall k j. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_align_swap_map_old. ff_h_align_swap_map_old + S (j) = S ((S (k)) * s)) /\ exists ff_q_align_swap_map_old. r = ff_q_align_swap_map_old * S ((S (k)) * s) + (j))) -&gt; (((exists ff_h_align_swap_map_new. ff_h_align_swap_map_new + S (j) = S ((S (k)) * v)) /\ exists ff_q_align_swap_map_new. u = ff_q_align_swap_map_new * S ((S (k)) * v) + (j)))) -&gt; (((exists ff_h_align_swap_source_m. ff_h_align_swap_source_m + S (y) = S ((S (m)) * c)) /\ exists ff_q_align_swap_source_m. b = ff_q_align_swap_source_m * S ((S (m)) * c) + (y))) -&gt; (((exists ff_h_align_swap_source_n. ff_h_align_swap_source_n + S (x) = S ((S (n)) * c)) /\ exists ff_q_align_swap_source_n. b = ff_q_align_swap_source_n * S ((S (n)) * c) + (x))) -&gt; (((exists ff_h_align_swap_target_i. ff_h_align_swap_target_i + S (y) = S ((S (i)) * e)) /\ exists ff_q_align_swap_target_i. w = ff_q_align_swap_target_i * S ((S (i)) * e) + (y))) -&gt; (((exists ff_h_align_swap_target_n. ff_h_align_swap_target_n + S (x) = S ((S (n)) * e)) /\ exists ff_q_align_swap_target_n. w = ff_q_align_swap_target_n * S ((S (n)) * e) + (x))) -&gt; (forall k a. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_align_swap_target_old. ff_h_align_swap_target_old + S (a) = S ((S (k)) * d)) /\ exists ff_q_align_swap_target_old. z = ff_q_align_swap_target_old * S ((S (k)) * d) + (a))) -&gt; (((exists ff_h_align_swap_target_new. ff_h_align_swap_target_new + S (a) = S ((S (k)) * e)) /\ exists ff_q_align_swap_target_new. w = ff_q_align_swap_target_new * S ((S (k)) * e) + (a)))) -&gt; (forall fpr_i_align_swap_old fpr_j_align_swap_old fpr_x_align_swap_old. (exists fpr_h_align_swap_old. fpr_h_align_swap_old + S fpr_i_align_swap_old = S n) -&gt; (((exists ff_h_align_swap_old_map. ff_h_align_swap_old_map + S (fpr_j_align_swap_old) = S ((S (fpr_i_align_swap_old)) * s)) /\ exists ff_q_align_swap_old_map. r = ff_q_align_swap_old_map * S ((S (fpr_i_align_swap_old)) * s) + (fpr_j_align_swap_old))) -&gt; (((exists ff_h_align_swap_old_source. ff_h_align_swap_old_source + S (fpr_x_align_swap_old) = S ((S (fpr_j_align_swap_old)) * c)) /\ exists ff_q_align_swap_old_source. b = ff_q_align_swap_old_source * S ((S (fpr_j_align_swap_old)) * c) + (fpr_x_align_swap_old))) -&gt; (((exists ff_h_align_swap_old_target. ff_h_align_swap_old_target + S (fpr_x_align_swap_old) = S ((S (fpr_i_align_swap_old)) * d)) /\ exists ff_q_align_swap_old_target. z = ff_q_align_swap_old_target * S ((S (fpr_i_align_swap_old)) * d) + (fpr_x_align_swap_old)))) -&gt; (forall fpr_i_align_swap_new fpr_j_align_swap_new fpr_x_align_swap_new. (exists fpr_h_align_swap_new. fpr_h_align_swap_new + S fpr_i_align_swap_new = S n) -&gt; (((exists ff_h_align_swap_new_map. ff_h_align_swap_new_map + S (fpr_j_align_swap_new) = S ((S (fpr_i_align_swap_new)) * v)) /\ exists ff_q_align_swap_new_map. u = ff_q_align_swap_new_map * S ((S (fpr_i_align_swap_new)) * v) + (fpr_j_align_swap_new))) -&gt; (((exists ff_h_align_swap_new_source. ff_h_align_swap_new_source + S (fpr_x_align_swap_new) = S ((S (fpr_j_align_swap_new)) * c)) /\ exists ff_q_align_swap_new_source. b = ff_q_align_swap_new_source * S ((S (fpr_j_align_swap_new)) * c) + (fpr_x_align_swap_new))) -&gt; (((exists ff_h_align_swap_new_target. ff_h_align_swap_new_target + S (fpr_x_align_swap_new) = S ((S (fpr_i_align_swap_new)) * e)) /\ exists ff_q_align_swap_new_target. w = ff_q_align_swap_new_target * S ((S (fpr_i_align_swap_new)) * e) + (fpr_x_align_swap_new))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-beta_reindex_alignment_swap_last">Copy proof</button>
        <pre id="proof-beta_reindex_alignment_swap_last"><code>pa prove forall r s u v b c z d w e n i m x y. (((exists ff_h_align_swap_map_i. ff_h_align_swap_map_i + S (m) = S ((S (i)) * v)) /\ exists ff_q_align_swap_map_i. u = ff_q_align_swap_map_i * S ((S (i)) * v) + (m))) -&gt; (((exists ff_h_align_swap_map_n. ff_h_align_swap_map_n + S (n) = S ((S (n)) * v)) /\ exists ff_q_align_swap_map_n. u = ff_q_align_swap_map_n * S ((S (n)) * v) + (n))) -&gt; (forall k j. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_align_swap_map_old. ff_h_align_swap_map_old + S (j) = S ((S (k)) * s)) /\ exists ff_q_align_swap_map_old. r = ff_q_align_swap_map_old * S ((S (k)) * s) + (j))) -&gt; (((exists ff_h_align_swap_map_new. ff_h_align_swap_map_new + S (j) = S ((S (k)) * v)) /\ exists ff_q_align_swap_map_new. u = ff_q_align_swap_map_new * S ((S (k)) * v) + (j)))) -&gt; (((exists ff_h_align_swap_source_m. ff_h_align_swap_source_m + S (y) = S ((S (m)) * c)) /\ exists ff_q_align_swap_source_m. b = ff_q_align_swap_source_m * S ((S (m)) * c) + (y))) -&gt; (((exists ff_h_align_swap_source_n. ff_h_align_swap_source_n + S (x) = S ((S (n)) * c)) /\ exists ff_q_align_swap_source_n. b = ff_q_align_swap_source_n * S ((S (n)) * c) + (x))) -&gt; (((exists ff_h_align_swap_target_i. ff_h_align_swap_target_i + S (y) = S ((S (i)) * e)) /\ exists ff_q_align_swap_target_i. w = ff_q_align_swap_target_i * S ((S (i)) * e) + (y))) -&gt; (((exists ff_h_align_swap_target_n. ff_h_align_swap_target_n + S (x) = S ((S (n)) * e)) /\ exists ff_q_align_swap_target_n. w = ff_q_align_swap_target_n * S ((S (n)) * e) + (x))) -&gt; (forall k a. (exists h. h + S k = S n) -&gt; ~(k = i) -&gt; ~(k = n) -&gt; (((exists ff_h_align_swap_target_old. ff_h_align_swap_target_old + S (a) = S ((S (k)) * d)) /\ exists ff_q_align_swap_target_old. z = ff_q_align_swap_target_old * S ((S (k)) * d) + (a))) -&gt; (((exists ff_h_align_swap_target_new. ff_h_align_swap_target_new + S (a) = S ((S (k)) * e)) /\ exists ff_q_align_swap_target_new. w = ff_q_align_swap_target_new * S ((S (k)) * e) + (a)))) -&gt; (forall fpr_i_align_swap_old fpr_j_align_swap_old fpr_x_align_swap_old. (exists fpr_h_align_swap_old. fpr_h_align_swap_old + S fpr_i_align_swap_old = S n) -&gt; (((exists ff_h_align_swap_old_map. ff_h_align_swap_old_map + S (fpr_j_align_swap_old) = S ((S (fpr_i_align_swap_old)) * s)) /\ exists ff_q_align_swap_old_map. r = ff_q_align_swap_old_map * S ((S (fpr_i_align_swap_old)) * s) + (fpr_j_align_swap_old))) -&gt; (((exists ff_h_align_swap_old_source. ff_h_align_swap_old_source + S (fpr_x_align_swap_old) = S ((S (fpr_j_align_swap_old)) * c)) /\ exists ff_q_align_swap_old_source. b = ff_q_align_swap_old_source * S ((S (fpr_j_align_swap_old)) * c) + (fpr_x_align_swap_old))) -&gt; (((exists ff_h_align_swap_old_target. ff_h_align_swap_old_target + S (fpr_x_align_swap_old) = S ((S (fpr_i_align_swap_old)) * d)) /\ exists ff_q_align_swap_old_target. z = ff_q_align_swap_old_target * S ((S (fpr_i_align_swap_old)) * d) + (fpr_x_align_swap_old)))) -&gt; (forall fpr_i_align_swap_new fpr_j_align_swap_new fpr_x_align_swap_new. (exists fpr_h_align_swap_new. fpr_h_align_swap_new + S fpr_i_align_swap_new = S n) -&gt; (((exists ff_h_align_swap_new_map. ff_h_align_swap_new_map + S (fpr_j_align_swap_new) = S ((S (fpr_i_align_swap_new)) * v)) /\ exists ff_q_align_swap_new_map. u = ff_q_align_swap_new_map * S ((S (fpr_i_align_swap_new)) * v) + (fpr_j_align_swap_new))) -&gt; (((exists ff_h_align_swap_new_source. ff_h_align_swap_new_source + S (fpr_x_align_swap_new) = S ((S (fpr_j_align_swap_new)) * c)) /\ exists ff_q_align_swap_new_source. b = ff_q_align_swap_new_source * S ((S (fpr_j_align_swap_new)) * c) + (fpr_x_align_swap_new))) -&gt; (((exists ff_h_align_swap_new_target. ff_h_align_swap_new_target + S (fpr_x_align_swap_new) = S ((S (fpr_i_align_swap_new)) * e)) /\ exists ff_q_align_swap_new_target. w = ff_q_align_swap_new_target * S ((S (fpr_i_align_swap_new)) * e) + (fpr_x_align_swap_new))))
use beta_prefix_swap_last_reflect
use beta_at_unique
intro r
intro s
intro u
intro v
intro b
intro c
intro z
intro d
intro w
intro e
intro n
intro i
intro m
intro x
intro y
intro hmap_i
intro hmap_n
intro hmap_preserve
intro hsource_m
intro hsource_n
intro htarget_i
intro htarget_n
intro htarget_preserve
intro haligned
have hreflect : forall k j. (exists h. h + S k = S n) -&gt; ((exists h. h + S j = S ((S k) * v)) /\ exists q. u = q * S ((S k) * v) + j) -&gt; (k = i /\ j = m) \/ ((k = n /\ j = n) \/ (~(k = i) /\ (~(k = n) /\ ((exists h. h + S j = S ((S k) * s)) /\ exists q. r = q * S ((S k) * s) + j))))
specialize beta_prefix_swap_last_reflect r
specialize beta_prefix_swap_last_reflect s
specialize beta_prefix_swap_last_reflect u
specialize beta_prefix_swap_last_reflect v
specialize beta_prefix_swap_last_reflect n
specialize beta_prefix_swap_last_reflect i
specialize beta_prefix_swap_last_reflect n
specialize beta_prefix_swap_last_reflect m
apply beta_prefix_swap_last_reflect
exact hmap_i
exact hmap_n
exact hmap_preserve
intro k
intro j
intro a
intro hk
intro hmap
intro hsource
specialize hreflect k
specialize hreflect j
have hcases : (k = i /\ j = m) \/ ((k = n /\ j = n) \/ (~(k = i) /\ (~(k = n) /\ ((exists h. h + S j = S ((S k) * s)) /\ exists q. r = q * S ((S k) * s) + j))))
apply hreflect
exact hk
exact hmap
cases hcases
cases hcases_left
have hay : a = y
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique m
specialize beta_at_unique a
specialize beta_at_unique y
apply beta_at_unique
rewrite hcases_left_right at hsource
rewrite hcases_left_right at hsource
exact hsource
exact hsource_m
rewrite hcases_left_left
rewrite hcases_left_left
rewrite hay
rewrite hay
exact htarget_i
cases hcases_right
cases hcases_right_left
have hax : a = x
specialize beta_at_unique b
specialize beta_at_unique c
specialize beta_at_unique n
specialize beta_at_unique a
specialize beta_at_unique x
apply beta_at_unique
rewrite hcases_right_left_right at hsource
rewrite hcases_right_left_right at hsource
exact hsource
exact hsource_n
rewrite hcases_right_left_left
rewrite hcases_right_left_left
rewrite hax
rewrite hax
exact htarget_n
cases hcases_right_right
cases hcases_right_right_right
have hold_target : ((exists h. h + S a = S ((S k) * d)) /\ exists q. z = q * S ((S k) * d) + a)
specialize haligned k
specialize haligned j
specialize haligned a
apply haligned
exact hk
exact hcases_right_right_right_right
exact hsource
specialize htarget_preserve k
specialize htarget_preserve a
apply htarget_preserve
exact hk
exact hcases_right_right_left
exact hcases_right_right_right_left
exact hold_target
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>3,057</dd></div>
        <div><dt>Distinct objects</dt><dd>1,212</dd></div>
        <div><dt>Reused references</dt><dd>56</dd></div>
        <div><dt>Depth</dt><dd>63</dd></div>
        <div><dt>Cuts</dt><dd>80</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="04543723c864641ef9cbb9899ec884ce196c128fbae31042969b67922c76a299">04543723c864…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for beta_reindex_alignment_swap_last">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib beta_reindex_alignment_swap_last</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/finite_product_reindex_support.py#L250">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/beta_reindex_alignment_swap_last.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_is_succ_succ"
  data-name="prime_is_succ_succ" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="prime_nonzero,nonzero_is_succ"
  data-search="prime_is_succ_succ prime is succ succ every prime natural is the second successor of a natural. forall p. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -&gt; qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -&gt; exists k. p = s (s k) quadratic_residues prime_nonzero nonzero_is_succ">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_is_succ_succ</code><span>Prime is succ succ</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every prime natural is the second successor of a natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="nonzero_is_succ" href="#theorem-nonzero_is_succ"><code>nonzero_is_succ</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_bounded_nonzero_mod_inverse" href="#theorem-prime_bounded_nonzero_mod_inverse"><code>prime_bounded_nonzero_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_is_succ_succ">Copy statement</button>
        <pre id="statement-prime_is_succ_succ"><code>forall p. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -&gt; qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -&gt; exists k. p = S (S k)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_is_succ_succ">Copy proof</button>
        <pre id="proof-prime_is_succ_succ"><code>pa prove forall p. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -&gt; qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -&gt; exists k. p = S (S k)
use prime_nonzero
use nonzero_is_succ
intro p
intro hp
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hps : exists k. p = S k
specialize nonzero_is_succ p
apply nonzero_is_succ
exact hp0
cases hps
have hx0 : ~(x = 0)
intro hx0
cases hp
apply hp_left
rewrite hps_witness
rewrite hx0
refl
have hxs : exists k. x = S k
specialize nonzero_is_succ x
apply nonzero_is_succ
exact hx0
cases hxs
exists x1
rewrite hps_witness
rewrite hxs_witness
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>98</dd></div>
        <div><dt>Distinct objects</dt><dd>98</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>4</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e0cd8df0205c0dd8f4773a78736736929ee489871c6dc53769d1313ecb1ea1c3">e0cd8df0205c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_is_succ_succ">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_is_succ_succ</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_bounded_units.py#L116">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_is_succ_succ.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-prime_bounded_nonzero_mod_inverse"
  data-name="prime_bounded_nonzero_mod_inverse" data-domain="quadratic_residues"
  data-status="checked_m20"
  data-dependencies="prime_is_succ_succ,prime_nonzero,divisor_le_nonzero,lt_not_le,prime_mod_inverse,division_remainder_exists,mul_comm,remainder_decomposition_to_mod_eq,mod_eq_mul_left,mod_eq_symm,mod_eq_trans,mod_eq_bounded_unique,succ_ne_zero"
  data-search="prime_bounded_nonzero_mod_inverse prime bounded nonzero mod inverse a nonzero residue below a prime has a nonzero bounded inverse. forall p a. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -&gt; qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -&gt; ~(a = 0) -&gt; (exists qrbu_gap_a_lt_p. qrbu_gap_a_lt_p + s a = p) -&gt; (exists qrbu_inverse_bounded_inverse. (~(qrbu_inverse_bounded_inverse = 0) /\ ((exists qrbu_gap_bounded_inverse_bound. qrbu_gap_bounded_inverse_bound + s qrbu_inverse_bounded_inverse = p) /\ (exists qrbu_mod_left_bounded_inverse_mod qrbu_mod_right_bounded_inverse_mod. a * qrbu_inverse_bounded_inverse + p * qrbu_mod_left_bounded_inverse_mod = 1 + p * qrbu_mod_right_bounded_inverse_mod)))) quadratic_residues prime_is_succ_succ prime_nonzero divisor_le_nonzero lt_not_le prime_mod_inverse division_remainder_exists mul_comm remainder_decomposition_to_mod_eq mod_eq_mul_left mod_eq_symm mod_eq_trans mod_eq_bounded_unique succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>prime_bounded_nonzero_mod_inverse</code><span>Prime bounded nonzero mod inverse</span></span>
      <span class="pa-badge pa-domain-quadratic_residues">Quadratic reciprocity campaign</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero residue below a prime has a nonzero bounded inverse.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="prime_is_succ_succ" href="#theorem-prime_is_succ_succ"><code>prime_is_succ_succ</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_nonzero" href="#theorem-prime_nonzero"><code>prime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_le_nonzero" href="#theorem-divisor_le_nonzero"><code>divisor_le_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="lt_not_le" href="#theorem-lt_not_le"><code>lt_not_le</code></a> <a class="pa-theorem-chip" data-theorem-link="prime_mod_inverse" href="#theorem-prime_mod_inverse"><code>prime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-prime_bounded_nonzero_mod_inverse">Copy statement</button>
        <pre id="statement-prime_bounded_nonzero_mod_inverse"><code>forall p a. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -&gt; qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -&gt; ~(a = 0) -&gt; (exists qrbu_gap_a_lt_p. qrbu_gap_a_lt_p + S a = p) -&gt; (exists qrbu_inverse_bounded_inverse. (~(qrbu_inverse_bounded_inverse = 0) /\ ((exists qrbu_gap_bounded_inverse_bound. qrbu_gap_bounded_inverse_bound + S qrbu_inverse_bounded_inverse = p) /\ (exists qrbu_mod_left_bounded_inverse_mod qrbu_mod_right_bounded_inverse_mod. a * qrbu_inverse_bounded_inverse + p * qrbu_mod_left_bounded_inverse_mod = 1 + p * qrbu_mod_right_bounded_inverse_mod))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-prime_bounded_nonzero_mod_inverse">Copy proof</button>
        <pre id="proof-prime_bounded_nonzero_mod_inverse"><code>pa prove forall p a. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -&gt; qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -&gt; ~(a = 0) -&gt; (exists qrbu_gap_a_lt_p. qrbu_gap_a_lt_p + S a = p) -&gt; (exists qrbu_inverse_bounded_inverse. (~(qrbu_inverse_bounded_inverse = 0) /\ ((exists qrbu_gap_bounded_inverse_bound. qrbu_gap_bounded_inverse_bound + S qrbu_inverse_bounded_inverse = p) /\ (exists qrbu_mod_left_bounded_inverse_mod qrbu_mod_right_bounded_inverse_mod. a * qrbu_inverse_bounded_inverse + p * qrbu_mod_left_bounded_inverse_mod = 1 + p * qrbu_mod_right_bounded_inverse_mod))))
use prime_is_succ_succ
use prime_nonzero
use divisor_le_nonzero
use lt_not_le
use prime_mod_inverse
use division_remainder_exists
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_mul_left
use mod_eq_symm
use mod_eq_trans
use mod_eq_bounded_unique
use succ_ne_zero
intro p
intro a
intro hp
intro ha0
intro hap
have hp0 : ~(p = 0)
intro hpzero
specialize prime_nonzero p
apply prime_nonzero
exact hp
exact hpzero
have hnotdiv : ~(exists k. a = p * k)
intro hdiv
have hpa : exists t. t + p = a
specialize divisor_le_nonzero p
specialize divisor_le_nonzero a
apply divisor_le_nonzero
exact ha0
exact hdiv
specialize lt_not_le a
specialize lt_not_le p
apply lt_not_le
exact hap
exact hpa
have hinv : exists z u v. a * z + p * u = 1 + p * v
specialize prime_mod_inverse p
specialize prime_mod_inverse a
apply prime_mod_inverse
exact hp
exact hnotdiv
cases hinv
cases hinv_witness
cases hinv_witness_witness
have hdivz : exists q r. x = p * q + r /\ exists h. h + S r = p
specialize division_remainder_exists p
specialize division_remainder_exists x
apply division_remainder_exists
exact hp0
cases hdivz
cases hdivz_witness
cases hdivz_witness_witness
have hzdecomp : x = x3 * p + x4
trans p * x3 + x4
exact hdivz_witness_witness_left
congr
apply mul_comm
refl
have hzr : exists u v. x + p * u = x4 + p * v
specialize remainder_decomposition_to_mod_eq p
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x3
specialize remainder_decomposition_to_mod_eq x4
apply remainder_decomposition_to_mod_eq
exact hzdecomp
have hscaled : exists u v. (a * x) + p * u = (a * x4) + p * v
specialize mod_eq_mul_left p
specialize mod_eq_mul_left x
specialize mod_eq_mul_left x4
specialize mod_eq_mul_left a
apply mod_eq_mul_left
exact hzr
have hrz : exists u v. (a * x4) + p * u = (a * x) + p * v
specialize mod_eq_symm p
specialize mod_eq_symm (a * x)
specialize mod_eq_symm (a * x4)
apply mod_eq_symm
exact hscaled
have hfinal : exists u v. (a * x4) + p * u = 1 + p * v
specialize mod_eq_trans p
specialize mod_eq_trans (a * x4)
specialize mod_eq_trans (a * x)
specialize mod_eq_trans 1
apply mod_eq_trans
exact hrz
exists x1
exists x2
exact hinv_witness_witness_witness
have hp2 : exists k. p = S (S k)
specialize prime_is_succ_succ p
apply prime_is_succ_succ
exact hp
cases hp2
have h0bound : exists h. h + S 0 = p
exists S x5
rewrite hp2_witness
simp
have h1bound : exists h. h + S 1 = p
exists x5
rewrite hp2_witness
simp
have hr0 : ~(x4 = 0)
intro hrzero
have hzeroone : exists u v. 0 + p * u = 1 + p * v
cases hfinal
cases hfinal_witness
exists x6
exists x7
trans (a * x4) + p * x6
congr
symm
trans a * 0
congr
refl
exact hrzero
apply PA5
refl
exact hfinal_witness_witness
have hzeroeqone : 0 = 1
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique 0
specialize mod_eq_bounded_unique 1
apply mod_eq_bounded_unique
exact h0bound
exact h1bound
exact hzeroone
specialize succ_ne_zero 0
apply succ_ne_zero
symm
exact hzeroeqone
exists x4
split
exact hr0
split
exact hdivz_witness_witness_right
exact hfinal
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>8,684</dd></div>
        <div><dt>Distinct objects</dt><dd>2,801</dd></div>
        <div><dt>Reused references</dt><dd>151</dd></div>
        <div><dt>Depth</dt><dd>71</dd></div>
        <div><dt>Cuts</dt><dd>260</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a954ec4e9c7009129ba7f91651afa9451cf1731a64c58936e589e04e04c14af6">a954ec4e9c70…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for prime_bounded_nonzero_mod_inverse">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib prime_bounded_nonzero_mod_inverse</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/qr_bounded_units.py#L153">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/prime_bounded_nonzero_mod_inverse.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="quadratic-reciprocity.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-canonical_remainder_exists"
  data-name="canonical_remainder_exists" data-domain="division"
  data-status="checked_m20"
  data-dependencies="division_remainder_exists"
  data-search="canonical_remainder_exists canonical remainder existence every dividend has a canonical remainder for each nonzero modulus. forall m n. ~(m = 0) -&gt; exists r. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + s r = m)) division division_remainder_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>canonical_remainder_exists</code><span>Canonical remainder existence</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every dividend has a canonical remainder for each nonzero modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="canonical_remainder_exists_unique" href="#theorem-canonical_remainder_exists_unique"><code>canonical_remainder_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-canonical_remainder_exists">Copy statement</button>
        <pre id="statement-canonical_remainder_exists"><code>forall m n. ~(m = 0) -&gt; exists r. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-canonical_remainder_exists">Copy proof</button>
        <pre id="proof-canonical_remainder_exists"><code>pa prove forall m n. ~(m = 0) -&gt; exists r. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m))
use division_remainder_exists
intro m
intro n
intro hm
have hdivision : exists q r. n = m * q + r /\ exists gap. gap + S r = m
specialize division_remainder_exists m
specialize division_remainder_exists n
apply division_remainder_exists
exact hm
cases hdivision
cases hdivision_witness
cases hdivision_witness_witness
exists x1
split
exists x
exact hdivision_witness_witness_left
exact hdivision_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>238</dd></div>
        <div><dt>Distinct objects</dt><dd>215</dd></div>
        <div><dt>Reused references</dt><dd>16</dd></div>
        <div><dt>Depth</dt><dd>29</dd></div>
        <div><dt>Cuts</dt><dd>6</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="02da660e4be1b9f70bc15b94c028113aa8e59e4a6d2e46e63689453099591d0c">02da660e4be1…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for canonical_remainder_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib canonical_remainder_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_canonical_remainder_candidate.py#L80">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/canonical_remainder_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-canonical_remainder_functional"
  data-name="canonical_remainder_functional" data-domain="division"
  data-status="checked_m20"
  data-dependencies="division_remainder_unique"
  data-search="canonical_remainder_functional canonical remainder functionality canonical remainders for a fixed modulus are functional whenever they exist. forall m n r s. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + s r = m)) -&gt; (((exists hcr_quotient_comparison. n = m * hcr_quotient_comparison + s) /\ exists hcr_gap_comparison. hcr_gap_comparison + s s = m)) -&gt; r = s division division_remainder_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>canonical_remainder_functional</code><span>Canonical remainder functionality</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Canonical remainders for a fixed modulus are functional whenever they exist.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_unique" href="#theorem-division_remainder_unique"><code>division_remainder_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="canonical_remainder_exists_unique" href="#theorem-canonical_remainder_exists_unique"><code>canonical_remainder_exists_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-canonical_remainder_functional">Copy statement</button>
        <pre id="statement-canonical_remainder_functional"><code>forall m n r s. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m)) -&gt; (((exists hcr_quotient_comparison. n = m * hcr_quotient_comparison + s) /\ exists hcr_gap_comparison. hcr_gap_comparison + S s = m)) -&gt; r = s</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-canonical_remainder_functional">Copy proof</button>
        <pre id="proof-canonical_remainder_functional"><code>pa prove forall m n r s. (((exists hcr_quotient_result. n = m * hcr_quotient_result + r) /\ exists hcr_gap_result. hcr_gap_result + S r = m)) -&gt; (((exists hcr_quotient_comparison. n = m * hcr_quotient_comparison + s) /\ exists hcr_gap_comparison. hcr_gap_comparison + S s = m)) -&gt; r = s
use division_remainder_unique
intro m
intro n
intro r
intro s
intro hr
intro hs
cases hr
cases hs
cases hr_left
cases hs_left
have hunique : x = x1 /\ r = s
specialize division_remainder_unique m
specialize division_remainder_unique n
specialize division_remainder_unique x
specialize division_remainder_unique r
specialize division_remainder_unique x1
specialize division_remainder_unique s
apply division_remainder_unique
exact hr_left_witness
exact hr_right
exact hs_left_witness
exact hs_right
cases hunique
exact hunique_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>885</dd></div>
        <div><dt>Distinct objects</dt><dd>575</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>58</dd></div>
        <div><dt>Cuts</dt><dd>23</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="075a5bc6bceb4604fba4d7ed7a07cc5260e3eea08f49c78c693a599f8fc99f3b">075a5bc6bceb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for canonical_remainder_functional">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib canonical_remainder_functional</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_canonical_remainder_candidate.py#L105">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/canonical_remainder_functional.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-canonical_remainder_zero_impossible"
  data-name="canonical_remainder_zero_impossible" data-domain="division"
  data-status="checked_m20"
  data-dependencies="succ_ne_zero"
  data-search="canonical_remainder_zero_impossible canonical remainder excludes modulus zero the canonical-remainder relation has no inhabitant at modulus zero. forall m n r. m = 0 -&gt; ~(((exists hcr_quotient_zero_impossible. n = m * hcr_quotient_zero_impossible + r) /\ exists hcr_gap_zero_impossible. hcr_gap_zero_impossible + s r = m)) division succ_ne_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>canonical_remainder_zero_impossible</code><span>Canonical remainder excludes modulus zero</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The canonical-remainder relation has no inhabitant at modulus zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="succ_ne_zero" href="#theorem-succ_ne_zero"><code>succ_ne_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-canonical_remainder_zero_impossible">Copy statement</button>
        <pre id="statement-canonical_remainder_zero_impossible"><code>forall m n r. m = 0 -&gt; ~(((exists hcr_quotient_zero_impossible. n = m * hcr_quotient_zero_impossible + r) /\ exists hcr_gap_zero_impossible. hcr_gap_zero_impossible + S r = m))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-canonical_remainder_zero_impossible">Copy proof</button>
        <pre id="proof-canonical_remainder_zero_impossible"><code>pa prove forall m n r. m = 0 -&gt; ~(((exists hcr_quotient_zero_impossible. n = m * hcr_quotient_zero_impossible + r) /\ exists hcr_gap_zero_impossible. hcr_gap_zero_impossible + S r = m))
use succ_ne_zero
intro m
intro n
intro r
intro hm
intro hrem
cases hrem
rewrite hm at hrem_right
cases hrem_right
have hsucc : S (x + r) = 0
trans x + S r
symm
apply PA4
exact hrem_right_witness
specialize succ_ne_zero (x + r)
apply succ_ne_zero
exact hsucc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>21</dd></div>
        <div><dt>Distinct objects</dt><dd>21</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="ba801ceeb2236327fd3d117c740fc338309e1620d32d84a01b9d8452cca96c4e">ba801ceeb223…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for canonical_remainder_zero_impossible">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib canonical_remainder_zero_impossible</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_canonical_remainder_candidate.py#L137">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/canonical_remainder_zero_impossible.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-canonical_remainder_exists_unique"
  data-name="canonical_remainder_exists_unique" data-domain="division"
  data-status="checked_m20"
  data-dependencies="canonical_remainder_exists,canonical_remainder_functional"
  data-search="canonical_remainder_exists_unique unique canonical remainder for every nonzero modulus, the canonical remainder exists uniquely; the comparison remainder is proved equal to the chosen remainder. forall m n. ~(m = 0) -&gt; exists r. ((((exists hcr_quotient_unique_result. n = m * hcr_quotient_unique_result + r) /\ exists hcr_gap_unique_result. hcr_gap_unique_result + s r = m)) /\ forall s. (((exists hcr_quotient_unique_comparison. n = m * hcr_quotient_unique_comparison + s) /\ exists hcr_gap_unique_comparison. hcr_gap_unique_comparison + s s = m)) -&gt; s = r) division canonical_remainder_exists canonical_remainder_functional">
  <details>
    <summary>
      <span class="pa-card-title"><code>canonical_remainder_exists_unique</code><span>Unique canonical remainder</span></span>
      <span class="pa-badge pa-domain-division">Division</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">For every nonzero modulus, the canonical remainder exists uniquely; the comparison remainder is proved equal to the chosen remainder.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="canonical_remainder_exists" href="#theorem-canonical_remainder_exists"><code>canonical_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="canonical_remainder_functional" href="#theorem-canonical_remainder_functional"><code>canonical_remainder_functional</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-canonical_remainder_exists_unique">Copy statement</button>
        <pre id="statement-canonical_remainder_exists_unique"><code>forall m n. ~(m = 0) -&gt; exists r. ((((exists hcr_quotient_unique_result. n = m * hcr_quotient_unique_result + r) /\ exists hcr_gap_unique_result. hcr_gap_unique_result + S r = m)) /\ forall s. (((exists hcr_quotient_unique_comparison. n = m * hcr_quotient_unique_comparison + s) /\ exists hcr_gap_unique_comparison. hcr_gap_unique_comparison + S s = m)) -&gt; s = r)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-canonical_remainder_exists_unique">Copy proof</button>
        <pre id="proof-canonical_remainder_exists_unique"><code>pa prove forall m n. ~(m = 0) -&gt; exists r. ((((exists hcr_quotient_unique_result. n = m * hcr_quotient_unique_result + r) /\ exists hcr_gap_unique_result. hcr_gap_unique_result + S r = m)) /\ forall s. (((exists hcr_quotient_unique_comparison. n = m * hcr_quotient_unique_comparison + s) /\ exists hcr_gap_unique_comparison. hcr_gap_unique_comparison + S s = m)) -&gt; s = r)
use canonical_remainder_exists
use canonical_remainder_functional
intro m
intro n
intro hm
have hexists : exists r. (((exists hcr_quotient_unique_result. n = m * hcr_quotient_unique_result + r) /\ exists hcr_gap_unique_result. hcr_gap_unique_result + S r = m))
specialize canonical_remainder_exists m
specialize canonical_remainder_exists n
apply canonical_remainder_exists
exact hm
cases hexists
exists x
split
exact hexists_witness
intro s
intro hs
specialize canonical_remainder_functional m
specialize canonical_remainder_functional n
specialize canonical_remainder_functional s
specialize canonical_remainder_functional x
apply canonical_remainder_functional
exact hs
exact hexists_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,148</dd></div>
        <div><dt>Distinct objects</dt><dd>765</dd></div>
        <div><dt>Reused references</dt><dd>39</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>31</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="40bd3cda0f0b76737bc8c588ba0cc15a58870a0d7bdd1a1541c5f1f657ab4f41">40bd3cda0f0b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for canonical_remainder_exists_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib canonical_remainder_exists_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_canonical_remainder_candidate.py#L161">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/canonical_remainder_exists_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-division">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-canonical_remainders_characterize_mod_eq"
  data-name="canonical_remainders_characterize_mod_eq" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mul_comm,remainder_decomposition_to_mod_eq,mod_eq_symm,mod_eq_trans,mod_eq_bounded_unique"
  data-search="canonical_remainders_characterize_mod_eq canonical remainders characterize congruence two canonical remainders are equal exactly when their dividends are congruent modulo the shared modulus. forall m a b r s. (((exists hcr_quotient_left. a = m * hcr_quotient_left + r) /\ exists hcr_gap_left. hcr_gap_left + s r = m)) -&gt; (((exists hcr_quotient_right. b = m * hcr_quotient_right + s) /\ exists hcr_gap_right. hcr_gap_right + s s = m)) -&gt; (((exists hcc_mod_left_source hcc_mod_right_source. a + m * hcc_mod_left_source = b + m * hcc_mod_right_source) -&gt; r = s) /\ (r = s -&gt; (exists hcc_mod_left_result hcc_mod_right_result. a + m * hcc_mod_left_result = b + m * hcc_mod_right_result))) congruence mul_comm remainder_decomposition_to_mod_eq mod_eq_symm mod_eq_trans mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>canonical_remainders_characterize_mod_eq</code><span>Canonical remainders characterize congruence</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two canonical remainders are equal exactly when their dividends are congruent modulo the shared modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-canonical_remainders_characterize_mod_eq">Copy statement</button>
        <pre id="statement-canonical_remainders_characterize_mod_eq"><code>forall m a b r s. (((exists hcr_quotient_left. a = m * hcr_quotient_left + r) /\ exists hcr_gap_left. hcr_gap_left + S r = m)) -&gt; (((exists hcr_quotient_right. b = m * hcr_quotient_right + s) /\ exists hcr_gap_right. hcr_gap_right + S s = m)) -&gt; (((exists hcc_mod_left_source hcc_mod_right_source. a + m * hcc_mod_left_source = b + m * hcc_mod_right_source) -&gt; r = s) /\ (r = s -&gt; (exists hcc_mod_left_result hcc_mod_right_result. a + m * hcc_mod_left_result = b + m * hcc_mod_right_result)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-canonical_remainders_characterize_mod_eq">Copy proof</button>
        <pre id="proof-canonical_remainders_characterize_mod_eq"><code>pa prove forall m a b r s. (((exists hcr_quotient_left. a = m * hcr_quotient_left + r) /\ exists hcr_gap_left. hcr_gap_left + S r = m)) -&gt; (((exists hcr_quotient_right. b = m * hcr_quotient_right + s) /\ exists hcr_gap_right. hcr_gap_right + S s = m)) -&gt; (((exists hcc_mod_left_source hcc_mod_right_source. a + m * hcc_mod_left_source = b + m * hcc_mod_right_source) -&gt; r = s) /\ (r = s -&gt; (exists hcc_mod_left_result hcc_mod_right_result. a + m * hcc_mod_left_result = b + m * hcc_mod_right_result)))
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mod_eq_bounded_unique
intro m
intro a
intro b
intro r
intro s
intro hr
intro hs
cases hr
cases hs
cases hr_left
cases hs_left
have hadecomp : a = x * m + r
trans m * x + r
exact hr_left_witness
congr
apply mul_comm
refl
have hbdecomp : b = x1 * m + s
trans m * x1 + s
exact hs_left_witness
congr
apply mul_comm
refl
have har : exists hcc_mod_left_a_r hcc_mod_right_a_r. a + m * hcc_mod_left_a_r = r + m * hcc_mod_right_a_r
specialize remainder_decomposition_to_mod_eq m
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq r
apply remainder_decomposition_to_mod_eq
exact hadecomp
have hbs : exists hcc_mod_left_b_s hcc_mod_right_b_s. b + m * hcc_mod_left_b_s = s + m * hcc_mod_right_b_s
specialize remainder_decomposition_to_mod_eq m
specialize remainder_decomposition_to_mod_eq b
specialize remainder_decomposition_to_mod_eq x1
specialize remainder_decomposition_to_mod_eq s
apply remainder_decomposition_to_mod_eq
exact hbdecomp
split
intro hab
have hra : exists hcc_mod_left_r_a hcc_mod_right_r_a. r + m * hcc_mod_left_r_a = a + m * hcc_mod_right_r_a
specialize mod_eq_symm m
specialize mod_eq_symm a
specialize mod_eq_symm r
apply mod_eq_symm
exact har
have hrb : exists hcc_mod_left_r_b hcc_mod_right_r_b. r + m * hcc_mod_left_r_b = b + m * hcc_mod_right_r_b
specialize mod_eq_trans m
specialize mod_eq_trans r
specialize mod_eq_trans a
specialize mod_eq_trans b
apply mod_eq_trans
exact hra
exact hab
have hrs : exists hcc_mod_left_r_s hcc_mod_right_r_s. r + m * hcc_mod_left_r_s = s + m * hcc_mod_right_r_s
specialize mod_eq_trans m
specialize mod_eq_trans r
specialize mod_eq_trans b
specialize mod_eq_trans s
apply mod_eq_trans
exact hrb
exact hbs
specialize mod_eq_bounded_unique m
specialize mod_eq_bounded_unique r
specialize mod_eq_bounded_unique s
apply mod_eq_bounded_unique
exact hr_right
exact hs_right
exact hrs
intro hrs_equal
rewrite hrs_equal at har
have hsb : exists hcc_mod_left_s_b hcc_mod_right_s_b. s + m * hcc_mod_left_s_b = b + m * hcc_mod_right_s_b
specialize mod_eq_symm m
specialize mod_eq_symm b
specialize mod_eq_symm s
apply mod_eq_symm
exact hbs
specialize mod_eq_trans m
specialize mod_eq_trans a
specialize mod_eq_trans s
specialize mod_eq_trans b
apply mod_eq_trans
exact har
exact hsb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,888</dd></div>
        <div><dt>Distinct objects</dt><dd>908</dd></div>
        <div><dt>Reused references</dt><dd>43</dd></div>
        <div><dt>Depth</dt><dd>64</dd></div>
        <div><dt>Cuts</dt><dd>53</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f15b6a2109e7dca86fe5d98339b9cf9710e3a9a0cbe1ac3ff840c003e4e802c1">f15b6a2109e7…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for canonical_remainders_characterize_mod_eq">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib canonical_remainders_characterize_mod_eq</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_canonical_congruence_candidate.py#L88">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/canonical_remainders_characterize_mod_eq.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-bounded_mod_inverse_unique"
  data-name="bounded_mod_inverse_unique" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="mod_eq_symm,mod_eq_mul_left,mod_eq_mul_right,mul_assoc,mul_comm,mul_one,one_mul,mod_eq_trans,mod_eq_bounded_unique"
  data-search="bounded_mod_inverse_unique uniqueness of bounded modular inverses two bounded inverses of the same residue are equal. forall p x y z. (exists wip_strict_gap_unique_y_bound. wip_strict_gap_unique_y_bound + s y = p) -&gt; (exists wip_strict_gap_unique_z_bound. wip_strict_gap_unique_z_bound + s z = p) -&gt; (exists wip_mod_left_unique_xy wip_mod_right_unique_xy. x * y + p * wip_mod_left_unique_xy = 1 + p * wip_mod_right_unique_xy) -&gt; (exists wip_mod_left_unique_xz wip_mod_right_unique_xz. x * z + p * wip_mod_left_unique_xz = 1 + p * wip_mod_right_unique_xz) -&gt; y = z gcd_coprime mod_eq_symm mod_eq_mul_left mod_eq_mul_right mul_assoc mul_comm mul_one one_mul mod_eq_trans mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>bounded_mod_inverse_unique</code><span>Uniqueness of bounded modular inverses</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Two bounded inverses of the same residue are equal.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_right" href="#theorem-mod_eq_mul_right"><code>mod_eq_mul_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="one_mul" href="#theorem-one_mul"><code>one_mul</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_iff_unique_bounded_mod_inverse" href="#theorem-coprime_iff_unique_bounded_mod_inverse"><code>coprime_iff_unique_bounded_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-bounded_mod_inverse_unique">Copy statement</button>
        <pre id="statement-bounded_mod_inverse_unique"><code>forall p x y z. (exists wip_strict_gap_unique_y_bound. wip_strict_gap_unique_y_bound + S y = p) -&gt; (exists wip_strict_gap_unique_z_bound. wip_strict_gap_unique_z_bound + S z = p) -&gt; (exists wip_mod_left_unique_xy wip_mod_right_unique_xy. x * y + p * wip_mod_left_unique_xy = 1 + p * wip_mod_right_unique_xy) -&gt; (exists wip_mod_left_unique_xz wip_mod_right_unique_xz. x * z + p * wip_mod_left_unique_xz = 1 + p * wip_mod_right_unique_xz) -&gt; y = z</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-bounded_mod_inverse_unique">Copy proof</button>
        <pre id="proof-bounded_mod_inverse_unique"><code>pa prove forall p x y z. (exists wip_strict_gap_unique_y_bound. wip_strict_gap_unique_y_bound + S y = p) -&gt; (exists wip_strict_gap_unique_z_bound. wip_strict_gap_unique_z_bound + S z = p) -&gt; (exists wip_mod_left_unique_xy wip_mod_right_unique_xy. x * y + p * wip_mod_left_unique_xy = 1 + p * wip_mod_right_unique_xy) -&gt; (exists wip_mod_left_unique_xz wip_mod_right_unique_xz. x * z + p * wip_mod_left_unique_xz = 1 + p * wip_mod_right_unique_xz) -&gt; y = z
use mod_eq_symm
use mod_eq_mul_left
use mod_eq_mul_right
use mul_assoc
use mul_comm
use mul_one
use one_mul
use mod_eq_trans
use mod_eq_bounded_unique
intro p
intro x
intro y
intro z
intro hy
intro hz
intro hxy
intro hxz
have hreverse : exists wip_mod_left_unique_reverse_xz wip_mod_right_unique_reverse_xz. 1 + p * wip_mod_left_unique_reverse_xz = x * z + p * wip_mod_right_unique_reverse_xz
specialize mod_eq_symm p
specialize mod_eq_symm (x * z)
specialize mod_eq_symm 1
apply mod_eq_symm
exact hxz
have hleftscaled : exists wip_mod_left_unique_left_scaled wip_mod_right_unique_left_scaled. y * 1 + p * wip_mod_left_unique_left_scaled = y * (x * z) + p * wip_mod_right_unique_left_scaled
specialize mod_eq_mul_left p
specialize mod_eq_mul_left 1
specialize mod_eq_mul_left (x * z)
specialize mod_eq_mul_left y
apply mod_eq_mul_left
exact hreverse
have hrightscaled : exists wip_mod_left_unique_right_scaled wip_mod_right_unique_right_scaled. (x * y) * z + p * wip_mod_left_unique_right_scaled = 1 * z + p * wip_mod_right_unique_right_scaled
specialize mod_eq_mul_right p
specialize mod_eq_mul_right (x * y)
specialize mod_eq_mul_right 1
specialize mod_eq_mul_right z
apply mod_eq_mul_right
exact hxy
have hleft : y * 1 = y
specialize mul_one y
exact mul_one
have hmiddle : y * (x * z) = (x * y) * z
trans (y * x) * z
symm
specialize mul_assoc y
specialize mul_assoc x
specialize mul_assoc z
apply mul_assoc
congr
apply mul_comm
refl
have hright : 1 * z = z
specialize one_mul z
exact one_mul
rewrite hleft at hleftscaled
rewrite hmiddle at hleftscaled
rewrite hright at hrightscaled
have hyz : exists wip_mod_left_unique_result wip_mod_right_unique_result. y + p * wip_mod_left_unique_result = z + p * wip_mod_right_unique_result
specialize mod_eq_trans p
specialize mod_eq_trans y
specialize mod_eq_trans ((x * y) * z)
specialize mod_eq_trans z
apply mod_eq_trans
exact hleftscaled
exact hrightscaled
specialize mod_eq_bounded_unique p
specialize mod_eq_bounded_unique y
specialize mod_eq_bounded_unique z
apply mod_eq_bounded_unique
exact hy
exact hz
exact hyz
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,914</dd></div>
        <div><dt>Distinct objects</dt><dd>1,001</dd></div>
        <div><dt>Reused references</dt><dd>61</dd></div>
        <div><dt>Depth</dt><dd>68</dd></div>
        <div><dt>Cuts</dt><dd>84</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fd4a80c79f23a1071b9b51fd2a2057cbb605cb9b3a0c2deec0b67303f1893b23">fd4a80c79f23…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for bounded_mod_inverse_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib bounded_mod_inverse_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/wilson_inverse_point_candidate.py#L325">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/bounded_mod_inverse_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_bounded_mod_inverse"
  data-name="coprime_bounded_mod_inverse" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="canonical_remainder_exists,coprime_mod_inverse,mul_comm,remainder_decomposition_to_mod_eq,mod_eq_mul_left,mod_eq_symm,mod_eq_trans"
  data-search="coprime_bounded_mod_inverse coprime residues have bounded modular inverses every coprime residue has an inverse in the canonical interval below a nonzero modulus. forall a m. ~(m = 0) -&gt; (forall hmi_divisor_assumption. (exists hmi_left_factor_assumption. a = hmi_divisor_assumption * hmi_left_factor_assumption) -&gt; (exists hmi_right_factor_assumption. m = hmi_divisor_assumption * hmi_right_factor_assumption) -&gt; hmi_divisor_assumption = 1) -&gt; exists r. (exists hmi_gap_result_bound. hmi_gap_result_bound + s r = m) /\ (exists hmi_left_offset_result_inverse hmi_right_offset_result_inverse. a * r + m * hmi_left_offset_result_inverse = 1 + m * hmi_right_offset_result_inverse) gcd_coprime canonical_remainder_exists coprime_mod_inverse mul_comm remainder_decomposition_to_mod_eq mod_eq_mul_left mod_eq_symm mod_eq_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_bounded_mod_inverse</code><span>Coprime residues have bounded modular inverses</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every coprime residue has an inverse in the canonical interval below a nonzero modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="canonical_remainder_exists" href="#theorem-canonical_remainder_exists"><code>canonical_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_mod_inverse" href="#theorem-coprime_mod_inverse"><code>coprime_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_mul_left" href="#theorem-mod_eq_mul_left"><code>mod_eq_mul_left</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_iff_unique_bounded_mod_inverse" href="#theorem-coprime_iff_unique_bounded_mod_inverse"><code>coprime_iff_unique_bounded_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_bounded_mod_inverse">Copy statement</button>
        <pre id="statement-coprime_bounded_mod_inverse"><code>forall a m. ~(m = 0) -&gt; (forall hmi_divisor_assumption. (exists hmi_left_factor_assumption. a = hmi_divisor_assumption * hmi_left_factor_assumption) -&gt; (exists hmi_right_factor_assumption. m = hmi_divisor_assumption * hmi_right_factor_assumption) -&gt; hmi_divisor_assumption = 1) -&gt; exists r. (exists hmi_gap_result_bound. hmi_gap_result_bound + S r = m) /\ (exists hmi_left_offset_result_inverse hmi_right_offset_result_inverse. a * r + m * hmi_left_offset_result_inverse = 1 + m * hmi_right_offset_result_inverse)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_bounded_mod_inverse">Copy proof</button>
        <pre id="proof-coprime_bounded_mod_inverse"><code>pa prove forall a m. ~(m = 0) -&gt; (forall hmi_divisor_assumption. (exists hmi_left_factor_assumption. a = hmi_divisor_assumption * hmi_left_factor_assumption) -&gt; (exists hmi_right_factor_assumption. m = hmi_divisor_assumption * hmi_right_factor_assumption) -&gt; hmi_divisor_assumption = 1) -&gt; exists r. (exists hmi_gap_result_bound. hmi_gap_result_bound + S r = m) /\ (exists hmi_left_offset_result_inverse hmi_right_offset_result_inverse. a * r + m * hmi_left_offset_result_inverse = 1 + m * hmi_right_offset_result_inverse)
use canonical_remainder_exists
use coprime_mod_inverse
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_mul_left
use mod_eq_symm
use mod_eq_trans
intro a
intro m
intro hm
intro hcop
have hinv : exists z u v. a * z + m * u = 1 + m * v
specialize coprime_mod_inverse a
specialize coprime_mod_inverse m
apply coprime_mod_inverse
exact hm
exact hcop
cases hinv
cases hinv_witness
cases hinv_witness_witness
have hrem : exists r. (((exists hcr_quotient_inverse_witness. x = m * hcr_quotient_inverse_witness + r) /\ exists hcr_gap_inverse_witness. hcr_gap_inverse_witness + S r = m))
specialize canonical_remainder_exists m
specialize canonical_remainder_exists x
apply canonical_remainder_exists
exact hm
cases hrem
cases hrem_witness
cases hrem_witness_left
have hzdecomp : x = x4 * m + x3
trans m * x4 + x3
exact hrem_witness_left_witness
congr
apply mul_comm
refl
have hzr : exists u v. x + m * u = x3 + m * v
specialize remainder_decomposition_to_mod_eq m
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x4
specialize remainder_decomposition_to_mod_eq x3
apply remainder_decomposition_to_mod_eq
exact hzdecomp
have hscaled : exists u v. (a * x) + m * u = (a * x3) + m * v
specialize mod_eq_mul_left m
specialize mod_eq_mul_left x
specialize mod_eq_mul_left x3
specialize mod_eq_mul_left a
apply mod_eq_mul_left
exact hzr
have hreverse : exists u v. (a * x3) + m * u = (a * x) + m * v
specialize mod_eq_symm m
specialize mod_eq_symm (a * x)
specialize mod_eq_symm (a * x3)
apply mod_eq_symm
exact hscaled
have hfinal : exists u v. (a * x3) + m * u = 1 + m * v
specialize mod_eq_trans m
specialize mod_eq_trans (a * x3)
specialize mod_eq_trans (a * x)
specialize mod_eq_trans 1
apply mod_eq_trans
exact hreverse
exists x1
exists x2
exact hinv_witness_witness_witness
exists x3
split
exact hrem_witness_right
exact hfinal
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,675</dd></div>
        <div><dt>Distinct objects</dt><dd>1,752</dd></div>
        <div><dt>Reused references</dt><dd>102</dd></div>
        <div><dt>Depth</dt><dd>53</dd></div>
        <div><dt>Cuts</dt><dd>168</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="00e30d9df307bf74515b36c81ffe6665eceeb99e460f8dc54ae390ab593e54d4">00e30d9df307…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_bounded_mod_inverse">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_bounded_mod_inverse</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_modular_inverse_candidate.py#L204">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_bounded_mod_inverse.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_inverse_implies_coprime"
  data-name="mod_inverse_implies_coprime" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="common_divisor_divides_balanced_result,zero_add,divisor_one"
  data-search="mod_inverse_implies_coprime a modular inverse implies coprimality any natural modular inverse forces coprimality, without a nonzero-modulus side condition. forall a m z. (exists hmi_left_offset_converse_assumption hmi_right_offset_converse_assumption. a * z + m * hmi_left_offset_converse_assumption = 1 + m * hmi_right_offset_converse_assumption) -&gt; (forall hmi_divisor_converse_result. (exists hmi_left_factor_converse_result. a = hmi_divisor_converse_result * hmi_left_factor_converse_result) -&gt; (exists hmi_right_factor_converse_result. m = hmi_divisor_converse_result * hmi_right_factor_converse_result) -&gt; hmi_divisor_converse_result = 1) gcd_coprime common_divisor_divides_balanced_result zero_add divisor_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_inverse_implies_coprime</code><span>A modular inverse implies coprimality</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Any natural modular inverse forces coprimality, without a nonzero-modulus side condition.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="common_divisor_divides_balanced_result" href="#theorem-common_divisor_divides_balanced_result"><code>common_divisor_divides_balanced_result</code></a> <a class="pa-theorem-chip" data-theorem-link="zero_add" href="#theorem-zero_add"><code>zero_add</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_iff_unique_bounded_mod_inverse" href="#theorem-coprime_iff_unique_bounded_mod_inverse"><code>coprime_iff_unique_bounded_mod_inverse</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_inverse_implies_coprime">Copy statement</button>
        <pre id="statement-mod_inverse_implies_coprime"><code>forall a m z. (exists hmi_left_offset_converse_assumption hmi_right_offset_converse_assumption. a * z + m * hmi_left_offset_converse_assumption = 1 + m * hmi_right_offset_converse_assumption) -&gt; (forall hmi_divisor_converse_result. (exists hmi_left_factor_converse_result. a = hmi_divisor_converse_result * hmi_left_factor_converse_result) -&gt; (exists hmi_right_factor_converse_result. m = hmi_divisor_converse_result * hmi_right_factor_converse_result) -&gt; hmi_divisor_converse_result = 1)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_inverse_implies_coprime">Copy proof</button>
        <pre id="proof-mod_inverse_implies_coprime"><code>pa prove forall a m z. (exists hmi_left_offset_converse_assumption hmi_right_offset_converse_assumption. a * z + m * hmi_left_offset_converse_assumption = 1 + m * hmi_right_offset_converse_assumption) -&gt; (forall hmi_divisor_converse_result. (exists hmi_left_factor_converse_result. a = hmi_divisor_converse_result * hmi_left_factor_converse_result) -&gt; (exists hmi_right_factor_converse_result. m = hmi_divisor_converse_result * hmi_right_factor_converse_result) -&gt; hmi_divisor_converse_result = 1)
use common_divisor_divides_balanced_result
use zero_add
use divisor_one
intro a
intro m
intro z
intro hinv
intro d
intro hda
intro hdm
cases hinv
cases hinv_witness
have hbez : a * z + m * x = 1 + (a * 0 + m * x1)
trans 1 + m * x1
exact hinv_witness_witness
congr
refl
symm
trans 0 + m * x1
congr
apply PA5
refl
apply zero_add
have hdivone : exists w. 1 = d * w
specialize common_divisor_divides_balanced_result d
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result m
specialize common_divisor_divides_balanced_result 1
specialize common_divisor_divides_balanced_result z
specialize common_divisor_divides_balanced_result x
specialize common_divisor_divides_balanced_result 0
specialize common_divisor_divides_balanced_result x1
apply common_divisor_divides_balanced_result
exact hda
exact hdm
exact hbez
specialize divisor_one d
apply divisor_one
exact hdivone
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>874</dd></div>
        <div><dt>Distinct objects</dt><dd>602</dd></div>
        <div><dt>Reused references</dt><dd>42</dd></div>
        <div><dt>Depth</dt><dd>40</dd></div>
        <div><dt>Cuts</dt><dd>23</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="64b57d743e8945355369932efe2153bb039182cb242a896d6d7bfefb91eb11af">64b57d743e89…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_inverse_implies_coprime">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_inverse_implies_coprime</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_modular_inverse_candidate.py#L283">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_inverse_implies_coprime.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_iff_unique_bounded_mod_inverse"
  data-name="coprime_iff_unique_bounded_mod_inverse" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="coprime_bounded_mod_inverse,bounded_mod_inverse_unique,mod_inverse_implies_coprime"
  data-search="coprime_iff_unique_bounded_mod_inverse coprimality iff unique bounded modular inverse for a nonzero modulus, coprimality is equivalent to unique existence of a modular inverse in the canonical interval. forall a m. ~(m = 0) -&gt; ((forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -&gt; (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -&gt; hmi_divisor_package_coprime = 1) -&gt; (exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + s hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + s hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -&gt; hmi_comparison_package_result = hmi_solution_package_result))) /\ ((exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + s hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + s hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -&gt; hmi_comparison_package_result = hmi_solution_package_result)) -&gt; (forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -&gt; (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -&gt; hmi_divisor_package_coprime = 1)) gcd_coprime coprime_bounded_mod_inverse bounded_mod_inverse_unique mod_inverse_implies_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_iff_unique_bounded_mod_inverse</code><span>Coprimality iff unique bounded modular inverse</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">For a nonzero modulus, coprimality is equivalent to unique existence of a modular inverse in the canonical interval.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="coprime_bounded_mod_inverse" href="#theorem-coprime_bounded_mod_inverse"><code>coprime_bounded_mod_inverse</code></a> <a class="pa-theorem-chip" data-theorem-link="bounded_mod_inverse_unique" href="#theorem-bounded_mod_inverse_unique"><code>bounded_mod_inverse_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_inverse_implies_coprime" href="#theorem-mod_inverse_implies_coprime"><code>mod_inverse_implies_coprime</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_iff_unique_bounded_mod_inverse">Copy statement</button>
        <pre id="statement-coprime_iff_unique_bounded_mod_inverse"><code>forall a m. ~(m = 0) -&gt; ((forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -&gt; (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -&gt; hmi_divisor_package_coprime = 1) -&gt; (exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -&gt; hmi_comparison_package_result = hmi_solution_package_result))) /\ ((exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -&gt; hmi_comparison_package_result = hmi_solution_package_result)) -&gt; (forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -&gt; (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -&gt; hmi_divisor_package_coprime = 1))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_iff_unique_bounded_mod_inverse">Copy proof</button>
        <pre id="proof-coprime_iff_unique_bounded_mod_inverse"><code>pa prove forall a m. ~(m = 0) -&gt; ((forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -&gt; (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -&gt; hmi_divisor_package_coprime = 1) -&gt; (exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -&gt; hmi_comparison_package_result = hmi_solution_package_result))) /\ ((exists hmi_solution_package_result. ((((exists hmi_gap_package_result_chosen_bound. hmi_gap_package_result_chosen_bound + S hmi_solution_package_result = m) /\ (exists hmi_left_offset_package_result_chosen_inverse hmi_right_offset_package_result_chosen_inverse. a * hmi_solution_package_result + m * hmi_left_offset_package_result_chosen_inverse = 1 + m * hmi_right_offset_package_result_chosen_inverse))) /\ forall hmi_comparison_package_result. (((exists hmi_gap_package_result_compared_bound. hmi_gap_package_result_compared_bound + S hmi_comparison_package_result = m) /\ (exists hmi_left_offset_package_result_compared_inverse hmi_right_offset_package_result_compared_inverse. a * hmi_comparison_package_result + m * hmi_left_offset_package_result_compared_inverse = 1 + m * hmi_right_offset_package_result_compared_inverse))) -&gt; hmi_comparison_package_result = hmi_solution_package_result)) -&gt; (forall hmi_divisor_package_coprime. (exists hmi_left_factor_package_coprime. a = hmi_divisor_package_coprime * hmi_left_factor_package_coprime) -&gt; (exists hmi_right_factor_package_coprime. m = hmi_divisor_package_coprime * hmi_right_factor_package_coprime) -&gt; hmi_divisor_package_coprime = 1))
use coprime_bounded_mod_inverse
use bounded_mod_inverse_unique
use mod_inverse_implies_coprime
intro a
intro m
intro hm
split
intro hcop
have hexists : exists u. (((exists hmi_gap_package_exists_bound. hmi_gap_package_exists_bound + S u = m) /\ (exists hmi_left_offset_package_exists_inverse hmi_right_offset_package_exists_inverse. a * u + m * hmi_left_offset_package_exists_inverse = 1 + m * hmi_right_offset_package_exists_inverse)))
specialize coprime_bounded_mod_inverse a
specialize coprime_bounded_mod_inverse m
apply coprime_bounded_mod_inverse
exact hm
exact hcop
cases hexists
exists x
split
exact hexists_witness
intro v
intro hv
cases hv
cases hexists_witness
specialize bounded_mod_inverse_unique m
specialize bounded_mod_inverse_unique a
specialize bounded_mod_inverse_unique v
specialize bounded_mod_inverse_unique x
apply bounded_mod_inverse_unique
exact hv_left
exact hexists_witness_left
exact hv_right
exact hexists_witness_right
intro hunique
cases hunique
cases hunique_witness
cases hunique_witness_left
specialize mod_inverse_implies_coprime a
specialize mod_inverse_implies_coprime m
specialize mod_inverse_implies_coprime x
apply mod_inverse_implies_coprime
exact hunique_witness_left_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9,512</dd></div>
        <div><dt>Distinct objects</dt><dd>2,538</dd></div>
        <div><dt>Reused references</dt><dd>142</dd></div>
        <div><dt>Depth</dt><dd>70</dd></div>
        <div><dt>Cuts</dt><dd>278</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="4cce94405a1394a9824f464047fb4b13d8934852063430fc87e396d6021596d5">4cce94405a13…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_iff_unique_bounded_mod_inverse">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_iff_unique_bounded_mod_inverse</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_modular_inverse_candidate.py#L332">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_iff_unique_bounded_mod_inverse.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_multiple_left"
  data-name="is_lcm_multiple_left" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_lcm_multiple_left a relational lcm is a multiple of its left input a relational lcm is a multiple of its left input. forall l a b. ((((exists hlcm_left_factor_projection_left. l = a * hlcm_left_factor_projection_left) /\ (exists hlcm_right_factor_projection_left. l = b * hlcm_right_factor_projection_left)) /\ forall hlcm_common_projection_left. (exists hlcm_left_common_projection_left. hlcm_common_projection_left = a * hlcm_left_common_projection_left) -&gt; (exists hlcm_right_common_projection_left. hlcm_common_projection_left = b * hlcm_right_common_projection_left) -&gt; exists hlcm_least_factor_projection_left. hlcm_common_projection_left = l * hlcm_least_factor_projection_left)) -&gt; exists x. l = a * x gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_multiple_left</code><span>A relational LCM is a multiple of its left input</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational lcm is a multiple of its left input.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_iff_pair" href="#theorem-mod_eq_lcm_iff_pair"><code>mod_eq_lcm_iff_pair</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_multiple_left">Copy statement</button>
        <pre id="statement-is_lcm_multiple_left"><code>forall l a b. ((((exists hlcm_left_factor_projection_left. l = a * hlcm_left_factor_projection_left) /\ (exists hlcm_right_factor_projection_left. l = b * hlcm_right_factor_projection_left)) /\ forall hlcm_common_projection_left. (exists hlcm_left_common_projection_left. hlcm_common_projection_left = a * hlcm_left_common_projection_left) -&gt; (exists hlcm_right_common_projection_left. hlcm_common_projection_left = b * hlcm_right_common_projection_left) -&gt; exists hlcm_least_factor_projection_left. hlcm_common_projection_left = l * hlcm_least_factor_projection_left)) -&gt; exists x. l = a * x</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_multiple_left">Copy proof</button>
        <pre id="proof-is_lcm_multiple_left"><code>pa prove forall l a b. ((((exists hlcm_left_factor_projection_left. l = a * hlcm_left_factor_projection_left) /\ (exists hlcm_right_factor_projection_left. l = b * hlcm_right_factor_projection_left)) /\ forall hlcm_common_projection_left. (exists hlcm_left_common_projection_left. hlcm_common_projection_left = a * hlcm_left_common_projection_left) -&gt; (exists hlcm_right_common_projection_left. hlcm_common_projection_left = b * hlcm_right_common_projection_left) -&gt; exists hlcm_least_factor_projection_left. hlcm_common_projection_left = l * hlcm_least_factor_projection_left)) -&gt; exists x. l = a * x
intro l
intro a
intro b
intro h
cases h
cases h_left
exact h_left_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>21</dd></div>
        <div><dt>Distinct objects</dt><dd>21</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="848a8df1aab96094ed63ce2bf3d09d59aa98ec7a7c50caa079f4bdd99f9e23bf">848a8df1aab9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_multiple_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_multiple_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_relational_lcm_candidate.py#L164">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_multiple_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_multiple_right"
  data-name="is_lcm_multiple_right" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_lcm_multiple_right a relational lcm is a multiple of its right input a relational lcm is a multiple of its right input. forall l a b. ((((exists hlcm_left_factor_projection_right. l = a * hlcm_left_factor_projection_right) /\ (exists hlcm_right_factor_projection_right. l = b * hlcm_right_factor_projection_right)) /\ forall hlcm_common_projection_right. (exists hlcm_left_common_projection_right. hlcm_common_projection_right = a * hlcm_left_common_projection_right) -&gt; (exists hlcm_right_common_projection_right. hlcm_common_projection_right = b * hlcm_right_common_projection_right) -&gt; exists hlcm_least_factor_projection_right. hlcm_common_projection_right = l * hlcm_least_factor_projection_right)) -&gt; exists x. l = b * x gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_multiple_right</code><span>A relational LCM is a multiple of its right input</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational lcm is a multiple of its right input.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_iff_pair" href="#theorem-mod_eq_lcm_iff_pair"><code>mod_eq_lcm_iff_pair</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_multiple_right">Copy statement</button>
        <pre id="statement-is_lcm_multiple_right"><code>forall l a b. ((((exists hlcm_left_factor_projection_right. l = a * hlcm_left_factor_projection_right) /\ (exists hlcm_right_factor_projection_right. l = b * hlcm_right_factor_projection_right)) /\ forall hlcm_common_projection_right. (exists hlcm_left_common_projection_right. hlcm_common_projection_right = a * hlcm_left_common_projection_right) -&gt; (exists hlcm_right_common_projection_right. hlcm_common_projection_right = b * hlcm_right_common_projection_right) -&gt; exists hlcm_least_factor_projection_right. hlcm_common_projection_right = l * hlcm_least_factor_projection_right)) -&gt; exists x. l = b * x</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_multiple_right">Copy proof</button>
        <pre id="proof-is_lcm_multiple_right"><code>pa prove forall l a b. ((((exists hlcm_left_factor_projection_right. l = a * hlcm_left_factor_projection_right) /\ (exists hlcm_right_factor_projection_right. l = b * hlcm_right_factor_projection_right)) /\ forall hlcm_common_projection_right. (exists hlcm_left_common_projection_right. hlcm_common_projection_right = a * hlcm_left_common_projection_right) -&gt; (exists hlcm_right_common_projection_right. hlcm_common_projection_right = b * hlcm_right_common_projection_right) -&gt; exists hlcm_least_factor_projection_right. hlcm_common_projection_right = l * hlcm_least_factor_projection_right)) -&gt; exists x. l = b * x
intro l
intro a
intro b
intro h
cases h
cases h_left
exact h_left_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>21</dd></div>
        <div><dt>Distinct objects</dt><dd>21</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="bdbcd5dadc7777321fbf770aa7ac10f523c08bd412d6c6f9c2b8e76da0edfd67">bdbcd5dadc77…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_multiple_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_multiple_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_relational_lcm_candidate.py#L179">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_multiple_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_least"
  data-name="is_lcm_least" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_lcm_least a relational lcm divides every common multiple a relational lcm divides every common multiple. forall l a b c. ((((exists hlcm_left_factor_least. l = a * hlcm_left_factor_least) /\ (exists hlcm_right_factor_least. l = b * hlcm_right_factor_least)) /\ forall hlcm_common_least. (exists hlcm_left_common_least. hlcm_common_least = a * hlcm_left_common_least) -&gt; (exists hlcm_right_common_least. hlcm_common_least = b * hlcm_right_common_least) -&gt; exists hlcm_least_factor_least. hlcm_common_least = l * hlcm_least_factor_least)) -&gt; (exists x. c = a * x) -&gt; (exists y. c = b * y) -&gt; exists z. c = l * z gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_least</code><span>A relational LCM divides every common multiple</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A relational lcm divides every common multiple.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_merge" href="#theorem-mod_eq_lcm_merge"><code>mod_eq_lcm_merge</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_least">Copy statement</button>
        <pre id="statement-is_lcm_least"><code>forall l a b c. ((((exists hlcm_left_factor_least. l = a * hlcm_left_factor_least) /\ (exists hlcm_right_factor_least. l = b * hlcm_right_factor_least)) /\ forall hlcm_common_least. (exists hlcm_left_common_least. hlcm_common_least = a * hlcm_left_common_least) -&gt; (exists hlcm_right_common_least. hlcm_common_least = b * hlcm_right_common_least) -&gt; exists hlcm_least_factor_least. hlcm_common_least = l * hlcm_least_factor_least)) -&gt; (exists x. c = a * x) -&gt; (exists y. c = b * y) -&gt; exists z. c = l * z</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_least">Copy proof</button>
        <pre id="proof-is_lcm_least"><code>pa prove forall l a b c. ((((exists hlcm_left_factor_least. l = a * hlcm_left_factor_least) /\ (exists hlcm_right_factor_least. l = b * hlcm_right_factor_least)) /\ forall hlcm_common_least. (exists hlcm_left_common_least. hlcm_common_least = a * hlcm_left_common_least) -&gt; (exists hlcm_right_common_least. hlcm_common_least = b * hlcm_right_common_least) -&gt; exists hlcm_least_factor_least. hlcm_common_least = l * hlcm_least_factor_least)) -&gt; (exists x. c = a * x) -&gt; (exists y. c = b * y) -&gt; exists z. c = l * z
intro l
intro a
intro b
intro c
intro h
intro ha
intro hb
cases h
specialize h_right c
apply h_right
exact ha
exact hb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>24</dd></div>
        <div><dt>Distinct objects</dt><dd>24</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>16</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="90f411bbe2541f1cc127b54b3175b911800c9a3132efb726fa20987751761b83">90f411bbe254…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_least">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_least</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_relational_lcm_candidate.py#L194">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_least.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_symm"
  data-name="is_lcm_symm" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies=""
  data-search="is_lcm_symm symmetry of relational lcm the expanded relational lcm specification is symmetric. forall l a b. ((((exists hlcm_left_factor_symmetry_source. l = a * hlcm_left_factor_symmetry_source) /\ (exists hlcm_right_factor_symmetry_source. l = b * hlcm_right_factor_symmetry_source)) /\ forall hlcm_common_symmetry_source. (exists hlcm_left_common_symmetry_source. hlcm_common_symmetry_source = a * hlcm_left_common_symmetry_source) -&gt; (exists hlcm_right_common_symmetry_source. hlcm_common_symmetry_source = b * hlcm_right_common_symmetry_source) -&gt; exists hlcm_least_factor_symmetry_source. hlcm_common_symmetry_source = l * hlcm_least_factor_symmetry_source)) -&gt; ((((exists hlcm_left_factor_symmetry_target. l = b * hlcm_left_factor_symmetry_target) /\ (exists hlcm_right_factor_symmetry_target. l = a * hlcm_right_factor_symmetry_target)) /\ forall hlcm_common_symmetry_target. (exists hlcm_left_common_symmetry_target. hlcm_common_symmetry_target = b * hlcm_left_common_symmetry_target) -&gt; (exists hlcm_right_common_symmetry_target. hlcm_common_symmetry_target = a * hlcm_right_common_symmetry_target) -&gt; exists hlcm_least_factor_symmetry_target. hlcm_common_symmetry_target = l * hlcm_least_factor_symmetry_target)) gcd_coprime">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_symm</code><span>Symmetry of relational LCM</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The expanded relational lcm specification is symmetric.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><span class="pa-empty-relation">none — a root theorem</span></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_lcm_zero_left" href="#theorem-is_lcm_zero_left"><code>is_lcm_zero_left</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_symm">Copy statement</button>
        <pre id="statement-is_lcm_symm"><code>forall l a b. ((((exists hlcm_left_factor_symmetry_source. l = a * hlcm_left_factor_symmetry_source) /\ (exists hlcm_right_factor_symmetry_source. l = b * hlcm_right_factor_symmetry_source)) /\ forall hlcm_common_symmetry_source. (exists hlcm_left_common_symmetry_source. hlcm_common_symmetry_source = a * hlcm_left_common_symmetry_source) -&gt; (exists hlcm_right_common_symmetry_source. hlcm_common_symmetry_source = b * hlcm_right_common_symmetry_source) -&gt; exists hlcm_least_factor_symmetry_source. hlcm_common_symmetry_source = l * hlcm_least_factor_symmetry_source)) -&gt; ((((exists hlcm_left_factor_symmetry_target. l = b * hlcm_left_factor_symmetry_target) /\ (exists hlcm_right_factor_symmetry_target. l = a * hlcm_right_factor_symmetry_target)) /\ forall hlcm_common_symmetry_target. (exists hlcm_left_common_symmetry_target. hlcm_common_symmetry_target = b * hlcm_left_common_symmetry_target) -&gt; (exists hlcm_right_common_symmetry_target. hlcm_common_symmetry_target = a * hlcm_right_common_symmetry_target) -&gt; exists hlcm_least_factor_symmetry_target. hlcm_common_symmetry_target = l * hlcm_least_factor_symmetry_target))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_symm">Copy proof</button>
        <pre id="proof-is_lcm_symm"><code>pa prove forall l a b. ((((exists hlcm_left_factor_symmetry_source. l = a * hlcm_left_factor_symmetry_source) /\ (exists hlcm_right_factor_symmetry_source. l = b * hlcm_right_factor_symmetry_source)) /\ forall hlcm_common_symmetry_source. (exists hlcm_left_common_symmetry_source. hlcm_common_symmetry_source = a * hlcm_left_common_symmetry_source) -&gt; (exists hlcm_right_common_symmetry_source. hlcm_common_symmetry_source = b * hlcm_right_common_symmetry_source) -&gt; exists hlcm_least_factor_symmetry_source. hlcm_common_symmetry_source = l * hlcm_least_factor_symmetry_source)) -&gt; ((((exists hlcm_left_factor_symmetry_target. l = b * hlcm_left_factor_symmetry_target) /\ (exists hlcm_right_factor_symmetry_target. l = a * hlcm_right_factor_symmetry_target)) /\ forall hlcm_common_symmetry_target. (exists hlcm_left_common_symmetry_target. hlcm_common_symmetry_target = b * hlcm_left_common_symmetry_target) -&gt; (exists hlcm_right_common_symmetry_target. hlcm_common_symmetry_target = a * hlcm_right_common_symmetry_target) -&gt; exists hlcm_least_factor_symmetry_target. hlcm_common_symmetry_target = l * hlcm_least_factor_symmetry_target))
intro l
intro a
intro b
intro h
cases h
cases h_left
split
split
exact h_left_right
exact h_left_left
intro c
intro hbc
intro hac
specialize h_right c
apply h_right
exact hac
exact hbc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>36</dd></div>
        <div><dt>Distinct objects</dt><dd>36</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>0</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="bf63a0e526c3fbbbc313b6d105f5b98edbefe5b09ad48257637397db93425af0">bf63a0e526c3…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_symm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_symm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_relational_lcm_candidate.py#L139">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_symm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_unique"
  data-name="is_lcm_unique" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_antisymm"
  data-search="is_lcm_unique uniqueness of relational lcm the expanded relational lcm specification is single-valued. forall l m a b. ((((exists hlcm_left_factor_unique_left. l = a * hlcm_left_factor_unique_left) /\ (exists hlcm_right_factor_unique_left. l = b * hlcm_right_factor_unique_left)) /\ forall hlcm_common_unique_left. (exists hlcm_left_common_unique_left. hlcm_common_unique_left = a * hlcm_left_common_unique_left) -&gt; (exists hlcm_right_common_unique_left. hlcm_common_unique_left = b * hlcm_right_common_unique_left) -&gt; exists hlcm_least_factor_unique_left. hlcm_common_unique_left = l * hlcm_least_factor_unique_left)) -&gt; ((((exists hlcm_left_factor_unique_right. m = a * hlcm_left_factor_unique_right) /\ (exists hlcm_right_factor_unique_right. m = b * hlcm_right_factor_unique_right)) /\ forall hlcm_common_unique_right. (exists hlcm_left_common_unique_right. hlcm_common_unique_right = a * hlcm_left_common_unique_right) -&gt; (exists hlcm_right_common_unique_right. hlcm_common_unique_right = b * hlcm_right_common_unique_right) -&gt; exists hlcm_least_factor_unique_right. hlcm_common_unique_right = m * hlcm_least_factor_unique_right)) -&gt; l = m gcd_coprime multiple_antisymm">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_unique</code><span>Uniqueness of relational LCM</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The expanded relational lcm specification is single-valued.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_antisymm" href="#theorem-multiple_antisymm"><code>multiple_antisymm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="canonical_lcm_exists_unique" href="#theorem-canonical_lcm_exists_unique"><code>canonical_lcm_exists_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_lcm_product" href="#theorem-gcd_lcm_product"><code>gcd_lcm_product</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_unique">Copy statement</button>
        <pre id="statement-is_lcm_unique"><code>forall l m a b. ((((exists hlcm_left_factor_unique_left. l = a * hlcm_left_factor_unique_left) /\ (exists hlcm_right_factor_unique_left. l = b * hlcm_right_factor_unique_left)) /\ forall hlcm_common_unique_left. (exists hlcm_left_common_unique_left. hlcm_common_unique_left = a * hlcm_left_common_unique_left) -&gt; (exists hlcm_right_common_unique_left. hlcm_common_unique_left = b * hlcm_right_common_unique_left) -&gt; exists hlcm_least_factor_unique_left. hlcm_common_unique_left = l * hlcm_least_factor_unique_left)) -&gt; ((((exists hlcm_left_factor_unique_right. m = a * hlcm_left_factor_unique_right) /\ (exists hlcm_right_factor_unique_right. m = b * hlcm_right_factor_unique_right)) /\ forall hlcm_common_unique_right. (exists hlcm_left_common_unique_right. hlcm_common_unique_right = a * hlcm_left_common_unique_right) -&gt; (exists hlcm_right_common_unique_right. hlcm_common_unique_right = b * hlcm_right_common_unique_right) -&gt; exists hlcm_least_factor_unique_right. hlcm_common_unique_right = m * hlcm_least_factor_unique_right)) -&gt; l = m</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_unique">Copy proof</button>
        <pre id="proof-is_lcm_unique"><code>pa prove forall l m a b. ((((exists hlcm_left_factor_unique_left. l = a * hlcm_left_factor_unique_left) /\ (exists hlcm_right_factor_unique_left. l = b * hlcm_right_factor_unique_left)) /\ forall hlcm_common_unique_left. (exists hlcm_left_common_unique_left. hlcm_common_unique_left = a * hlcm_left_common_unique_left) -&gt; (exists hlcm_right_common_unique_left. hlcm_common_unique_left = b * hlcm_right_common_unique_left) -&gt; exists hlcm_least_factor_unique_left. hlcm_common_unique_left = l * hlcm_least_factor_unique_left)) -&gt; ((((exists hlcm_left_factor_unique_right. m = a * hlcm_left_factor_unique_right) /\ (exists hlcm_right_factor_unique_right. m = b * hlcm_right_factor_unique_right)) /\ forall hlcm_common_unique_right. (exists hlcm_left_common_unique_right. hlcm_common_unique_right = a * hlcm_left_common_unique_right) -&gt; (exists hlcm_right_common_unique_right. hlcm_common_unique_right = b * hlcm_right_common_unique_right) -&gt; exists hlcm_least_factor_unique_right. hlcm_common_unique_right = m * hlcm_least_factor_unique_right)) -&gt; l = m
use multiple_antisymm
intro l
intro m
intro a
intro b
intro hl
intro hm
cases hl
cases hl_left
cases hm
cases hm_left
have hlm : exists q. m = l * q
specialize hl_right m
apply hl_right
exact hm_left_left
exact hm_left_right
have hml : exists q. l = m * q
specialize hm_right l
apply hm_right
exact hl_left_left
exact hl_left_right
specialize multiple_antisymm l
specialize multiple_antisymm m
apply multiple_antisymm
exact hlm
exact hml
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>680</dd></div>
        <div><dt>Distinct objects</dt><dd>561</dd></div>
        <div><dt>Reused references</dt><dd>35</dd></div>
        <div><dt>Depth</dt><dd>34</dd></div>
        <div><dt>Cuts</dt><dd>20</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d39024dce99881ba11b32b3e2babece49f9c955ba9be3ec68f0f1061fca0d3f6">d39024dce998…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_relational_lcm_candidate.py#L274">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_zero_right"
  data-name="is_lcm_zero_right" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="multiple_zero"
  data-search="is_lcm_zero_right lcm with zero on the right zero is an lcm of every natural and zero. forall a. ((((exists hlcm_left_factor_zero_right. 0 = a * hlcm_left_factor_zero_right) /\ (exists hlcm_right_factor_zero_right. 0 = 0 * hlcm_right_factor_zero_right)) /\ forall hlcm_common_zero_right. (exists hlcm_left_common_zero_right. hlcm_common_zero_right = a * hlcm_left_common_zero_right) -&gt; (exists hlcm_right_common_zero_right. hlcm_common_zero_right = 0 * hlcm_right_common_zero_right) -&gt; exists hlcm_least_factor_zero_right. hlcm_common_zero_right = 0 * hlcm_least_factor_zero_right)) gcd_coprime multiple_zero">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_zero_right</code><span>LCM with zero on the right</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Zero is an lcm of every natural and zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="multiple_zero" href="#theorem-multiple_zero"><code>multiple_zero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_lcm_zero_left" href="#theorem-is_lcm_zero_left"><code>is_lcm_zero_left</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_zero_right">Copy statement</button>
        <pre id="statement-is_lcm_zero_right"><code>forall a. ((((exists hlcm_left_factor_zero_right. 0 = a * hlcm_left_factor_zero_right) /\ (exists hlcm_right_factor_zero_right. 0 = 0 * hlcm_right_factor_zero_right)) /\ forall hlcm_common_zero_right. (exists hlcm_left_common_zero_right. hlcm_common_zero_right = a * hlcm_left_common_zero_right) -&gt; (exists hlcm_right_common_zero_right. hlcm_common_zero_right = 0 * hlcm_right_common_zero_right) -&gt; exists hlcm_least_factor_zero_right. hlcm_common_zero_right = 0 * hlcm_least_factor_zero_right))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_zero_right">Copy proof</button>
        <pre id="proof-is_lcm_zero_right"><code>pa prove forall a. ((((exists hlcm_left_factor_zero_right. 0 = a * hlcm_left_factor_zero_right) /\ (exists hlcm_right_factor_zero_right. 0 = 0 * hlcm_right_factor_zero_right)) /\ forall hlcm_common_zero_right. (exists hlcm_left_common_zero_right. hlcm_common_zero_right = a * hlcm_left_common_zero_right) -&gt; (exists hlcm_right_common_zero_right. hlcm_common_zero_right = 0 * hlcm_right_common_zero_right) -&gt; exists hlcm_least_factor_zero_right. hlcm_common_zero_right = 0 * hlcm_least_factor_zero_right))
use multiple_zero
intro a
split
split
specialize multiple_zero a
exact multiple_zero
specialize multiple_zero 0
exact multiple_zero
intro c
intro hca
intro hc0
exact hc0
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>25</dd></div>
        <div><dt>Distinct objects</dt><dd>25</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>7</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="166243d22548d11534203ec1cae8c7c0eca104bf7d43d12826bf75f8c725f17b">166243d22548…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_zero_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_zero_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_relational_lcm_candidate.py#L324">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_zero_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_zero_left"
  data-name="is_lcm_zero_left" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="is_lcm_zero_right,is_lcm_symm"
  data-search="is_lcm_zero_left lcm with zero on the left zero is an lcm of zero and every natural. forall b. ((((exists hlcm_left_factor_zero_left. 0 = 0 * hlcm_left_factor_zero_left) /\ (exists hlcm_right_factor_zero_left. 0 = b * hlcm_right_factor_zero_left)) /\ forall hlcm_common_zero_left. (exists hlcm_left_common_zero_left. hlcm_common_zero_left = 0 * hlcm_left_common_zero_left) -&gt; (exists hlcm_right_common_zero_left. hlcm_common_zero_left = b * hlcm_right_common_zero_left) -&gt; exists hlcm_least_factor_zero_left. hlcm_common_zero_left = 0 * hlcm_least_factor_zero_left)) gcd_coprime is_lcm_zero_right is_lcm_symm">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_zero_left</code><span>LCM with zero on the left</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Zero is an lcm of zero and every natural.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_lcm_zero_right" href="#theorem-is_lcm_zero_right"><code>is_lcm_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_symm" href="#theorem-is_lcm_symm"><code>is_lcm_symm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_zero_left">Copy statement</button>
        <pre id="statement-is_lcm_zero_left"><code>forall b. ((((exists hlcm_left_factor_zero_left. 0 = 0 * hlcm_left_factor_zero_left) /\ (exists hlcm_right_factor_zero_left. 0 = b * hlcm_right_factor_zero_left)) /\ forall hlcm_common_zero_left. (exists hlcm_left_common_zero_left. hlcm_common_zero_left = 0 * hlcm_left_common_zero_left) -&gt; (exists hlcm_right_common_zero_left. hlcm_common_zero_left = b * hlcm_right_common_zero_left) -&gt; exists hlcm_least_factor_zero_left. hlcm_common_zero_left = 0 * hlcm_least_factor_zero_left))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_zero_left">Copy proof</button>
        <pre id="proof-is_lcm_zero_left"><code>pa prove forall b. ((((exists hlcm_left_factor_zero_left. 0 = 0 * hlcm_left_factor_zero_left) /\ (exists hlcm_right_factor_zero_left. 0 = b * hlcm_right_factor_zero_left)) /\ forall hlcm_common_zero_left. (exists hlcm_left_common_zero_left. hlcm_common_zero_left = 0 * hlcm_left_common_zero_left) -&gt; (exists hlcm_right_common_zero_left. hlcm_common_zero_left = b * hlcm_right_common_zero_left) -&gt; exists hlcm_least_factor_zero_left. hlcm_common_zero_left = 0 * hlcm_least_factor_zero_left))
use is_lcm_zero_right
use is_lcm_symm
intro b
have h : ((((exists hlcm_left_factor_zero_left_middle. 0 = b * hlcm_left_factor_zero_left_middle) /\ (exists hlcm_right_factor_zero_left_middle. 0 = 0 * hlcm_right_factor_zero_left_middle)) /\ forall hlcm_common_zero_left_middle. (exists hlcm_left_common_zero_left_middle. hlcm_common_zero_left_middle = b * hlcm_left_common_zero_left_middle) -&gt; (exists hlcm_right_common_zero_left_middle. hlcm_common_zero_left_middle = 0 * hlcm_right_common_zero_left_middle) -&gt; exists hlcm_least_factor_zero_left_middle. hlcm_common_zero_left_middle = 0 * hlcm_least_factor_zero_left_middle))
specialize is_lcm_zero_right b
exact is_lcm_zero_right
specialize is_lcm_symm 0
specialize is_lcm_symm b
specialize is_lcm_symm 0
apply is_lcm_symm
exact h
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>71</dd></div>
        <div><dt>Distinct objects</dt><dd>71</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>23</dd></div>
        <div><dt>Cuts</dt><dd>3</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a4202018cabb2699dd4290c87cd503b3ae51297beda7ddb1cbfc21658f0208d9">a4202018cabb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_zero_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_zero_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_relational_lcm_candidate.py#L307">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_zero_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-balanced_bezout_one_implies_coprime"
  data-name="balanced_bezout_one_implies_coprime" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="common_divisor_divides_balanced_result,divisor_one"
  data-search="balanced_bezout_one_implies_coprime balanced bezout result one implies coprimality a balanced natural bezout equation with result one forces the two inputs to be coprime. forall a b xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn) -&gt; forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; d = 1 gcd_coprime common_divisor_divides_balanced_result divisor_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>balanced_bezout_one_implies_coprime</code><span>Balanced Bezout result one implies coprimality</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A balanced natural Bezout equation with result one forces the two inputs to be coprime.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="common_divisor_divides_balanced_result" href="#theorem-common_divisor_divides_balanced_result"><code>common_divisor_divides_balanced_result</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-balanced_bezout_one_implies_coprime">Copy statement</button>
        <pre id="statement-balanced_bezout_one_implies_coprime"><code>forall a b xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn) -&gt; forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; d = 1</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-balanced_bezout_one_implies_coprime">Copy proof</button>
        <pre id="proof-balanced_bezout_one_implies_coprime"><code>pa prove forall a b xp yp xn yn. a * xp + b * yp = 1 + (a * xn + b * yn) -&gt; forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; d = 1
use common_divisor_divides_balanced_result
use divisor_one
intro a
intro b
intro xp
intro yp
intro xn
intro yn
intro hbez
intro d
intro ha
intro hb
specialize divisor_one d
apply divisor_one
specialize common_divisor_divides_balanced_result d
specialize common_divisor_divides_balanced_result a
specialize common_divisor_divides_balanced_result b
specialize common_divisor_divides_balanced_result 1
specialize common_divisor_divides_balanced_result xp
specialize common_divisor_divides_balanced_result yp
specialize common_divisor_divides_balanced_result xn
specialize common_divisor_divides_balanced_result yn
apply common_divisor_divides_balanced_result
exact ha
exact hb
exact hbez
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>871</dd></div>
        <div><dt>Distinct objects</dt><dd>616</dd></div>
        <div><dt>Reused references</dt><dd>41</dd></div>
        <div><dt>Depth</dt><dd>40</dd></div>
        <div><dt>Cuts</dt><dd>22</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="50e944a45f51f848b46a341a68b84d51d0ceb35513b65fd86dab86e8376f88b9">50e944a45f51…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for balanced_bezout_one_implies_coprime">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib balanced_bezout_one_implies_coprime</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L189">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/balanced_bezout_one_implies_coprime.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-coprime_product_is_lcm"
  data-name="coprime_product_is_lcm" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="mul_comm,gauss_coprime_cancel,mul_assoc"
  data-search="coprime_product_is_lcm the product of coprime naturals is an lcm the product of coprime naturals satisfies the universal relational lcm specification. forall a b. (forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; d = 1) -&gt; ((((exists hlcm_left_factor_coprime_product. a * b = a * hlcm_left_factor_coprime_product) /\ (exists hlcm_right_factor_coprime_product. a * b = b * hlcm_right_factor_coprime_product)) /\ forall hlcm_common_coprime_product. (exists hlcm_left_common_coprime_product. hlcm_common_coprime_product = a * hlcm_left_common_coprime_product) -&gt; (exists hlcm_right_common_coprime_product. hlcm_common_coprime_product = b * hlcm_right_common_coprime_product) -&gt; exists hlcm_least_factor_coprime_product. hlcm_common_coprime_product = a * b * hlcm_least_factor_coprime_product)) gcd_coprime mul_comm gauss_coprime_cancel mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>coprime_product_is_lcm</code><span>The product of coprime naturals is an LCM</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The product of coprime naturals satisfies the universal relational LCM specification.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="gauss_coprime_cancel" href="#theorem-gauss_coprime_cancel"><code>gauss_coprime_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-coprime_product_is_lcm">Copy statement</button>
        <pre id="statement-coprime_product_is_lcm"><code>forall a b. (forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; d = 1) -&gt; ((((exists hlcm_left_factor_coprime_product. a * b = a * hlcm_left_factor_coprime_product) /\ (exists hlcm_right_factor_coprime_product. a * b = b * hlcm_right_factor_coprime_product)) /\ forall hlcm_common_coprime_product. (exists hlcm_left_common_coprime_product. hlcm_common_coprime_product = a * hlcm_left_common_coprime_product) -&gt; (exists hlcm_right_common_coprime_product. hlcm_common_coprime_product = b * hlcm_right_common_coprime_product) -&gt; exists hlcm_least_factor_coprime_product. hlcm_common_coprime_product = a * b * hlcm_least_factor_coprime_product))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-coprime_product_is_lcm">Copy proof</button>
        <pre id="proof-coprime_product_is_lcm"><code>pa prove forall a b. (forall d. (exists u. a = d * u) -&gt; (exists v. b = d * v) -&gt; d = 1) -&gt; ((((exists hlcm_left_factor_coprime_product. a * b = a * hlcm_left_factor_coprime_product) /\ (exists hlcm_right_factor_coprime_product. a * b = b * hlcm_right_factor_coprime_product)) /\ forall hlcm_common_coprime_product. (exists hlcm_left_common_coprime_product. hlcm_common_coprime_product = a * hlcm_left_common_coprime_product) -&gt; (exists hlcm_right_common_coprime_product. hlcm_common_coprime_product = b * hlcm_right_common_coprime_product) -&gt; exists hlcm_least_factor_coprime_product. hlcm_common_coprime_product = a * b * hlcm_least_factor_coprime_product))
use mul_comm
use gauss_coprime_cancel
use mul_assoc
intro a
intro b
intro hcop
split
split
exists b
refl
exists a
apply mul_comm
intro c
intro ha
intro hb
cases ha
cases hb
have hdiv : exists q. b * x1 = a * q
exists x
trans c
symm
exact hb_witness
exact ha_witness
have hfactor : exists w. x1 = a * w
specialize gauss_coprime_cancel a
specialize gauss_coprime_cancel b
specialize gauss_coprime_cancel x1
apply gauss_coprime_cancel
exact hcop
exact hdiv
cases hfactor
exists x2
trans b * x1
exact hb_witness
trans b * (a * x2)
rewrite hfactor_witness
refl
trans (b * a) * x2
symm
apply mul_assoc
congr
apply mul_comm
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,191</dd></div>
        <div><dt>Distinct objects</dt><dd>1,552</dd></div>
        <div><dt>Reused references</dt><dd>95</dd></div>
        <div><dt>Depth</dt><dd>53</dd></div>
        <div><dt>Cuts</dt><dd>121</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="1bb51a1a4ac2c4be25d9a7c86174efdeccc4b5517de1bc5b11ee4cda71da839b">1bb51a1a4ac2…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for coprime_product_is_lcm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib coprime_product_is_lcm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L228">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/coprime_product_is_lcm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_lcm_scale_nonzero"
  data-name="is_lcm_scale_nonzero" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="mul_assoc,mul_left_cancel_nonzero"
  data-search="is_lcm_scale_nonzero nonzero scaling preserves relational lcm a nonzero common left scale preserves the universal relational lcm specification. forall k l a b. ~(k = 0) -&gt; ((((exists hscale_left_factor_source. l = a * hscale_left_factor_source) /\ (exists hscale_right_factor_source. l = b * hscale_right_factor_source)) /\ forall hscale_common_source. (exists hscale_left_common_source. hscale_common_source = a * hscale_left_common_source) -&gt; (exists hscale_right_common_source. hscale_common_source = b * hscale_right_common_source) -&gt; exists hscale_least_factor_source. hscale_common_source = l * hscale_least_factor_source)) -&gt; ((((exists hscale_left_factor_target. (k * l) = (k * a) * hscale_left_factor_target) /\ (exists hscale_right_factor_target. (k * l) = (k * b) * hscale_right_factor_target)) /\ forall hscale_common_target. (exists hscale_left_common_target. hscale_common_target = (k * a) * hscale_left_common_target) -&gt; (exists hscale_right_common_target. hscale_common_target = (k * b) * hscale_right_common_target) -&gt; exists hscale_least_factor_target. hscale_common_target = (k * l) * hscale_least_factor_target)) gcd_coprime mul_assoc mul_left_cancel_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_lcm_scale_nonzero</code><span>Nonzero scaling preserves relational LCM</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A nonzero common left scale preserves the universal relational LCM specification.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_lcm_scale_nonzero">Copy statement</button>
        <pre id="statement-is_lcm_scale_nonzero"><code>forall k l a b. ~(k = 0) -&gt; ((((exists hscale_left_factor_source. l = a * hscale_left_factor_source) /\ (exists hscale_right_factor_source. l = b * hscale_right_factor_source)) /\ forall hscale_common_source. (exists hscale_left_common_source. hscale_common_source = a * hscale_left_common_source) -&gt; (exists hscale_right_common_source. hscale_common_source = b * hscale_right_common_source) -&gt; exists hscale_least_factor_source. hscale_common_source = l * hscale_least_factor_source)) -&gt; ((((exists hscale_left_factor_target. (k * l) = (k * a) * hscale_left_factor_target) /\ (exists hscale_right_factor_target. (k * l) = (k * b) * hscale_right_factor_target)) /\ forall hscale_common_target. (exists hscale_left_common_target. hscale_common_target = (k * a) * hscale_left_common_target) -&gt; (exists hscale_right_common_target. hscale_common_target = (k * b) * hscale_right_common_target) -&gt; exists hscale_least_factor_target. hscale_common_target = (k * l) * hscale_least_factor_target))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_lcm_scale_nonzero">Copy proof</button>
        <pre id="proof-is_lcm_scale_nonzero"><code>pa prove forall k l a b. ~(k = 0) -&gt; ((((exists hscale_left_factor_source. l = a * hscale_left_factor_source) /\ (exists hscale_right_factor_source. l = b * hscale_right_factor_source)) /\ forall hscale_common_source. (exists hscale_left_common_source. hscale_common_source = a * hscale_left_common_source) -&gt; (exists hscale_right_common_source. hscale_common_source = b * hscale_right_common_source) -&gt; exists hscale_least_factor_source. hscale_common_source = l * hscale_least_factor_source)) -&gt; ((((exists hscale_left_factor_target. (k * l) = (k * a) * hscale_left_factor_target) /\ (exists hscale_right_factor_target. (k * l) = (k * b) * hscale_right_factor_target)) /\ forall hscale_common_target. (exists hscale_left_common_target. hscale_common_target = (k * a) * hscale_left_common_target) -&gt; (exists hscale_right_common_target. hscale_common_target = (k * b) * hscale_right_common_target) -&gt; exists hscale_least_factor_target. hscale_common_target = (k * l) * hscale_least_factor_target))
use mul_assoc
use mul_left_cancel_nonzero
intro k
intro l
intro a
intro b
intro hk
intro h
cases h
cases h_left
cases h_left_left
cases h_left_right
split
split
exists x
rewrite h_left_left_witness
symm
apply mul_assoc
exists x1
rewrite h_left_right_witness
symm
apply mul_assoc
intro c
intro hca
intro hcb
cases hca
cases hcb
have hca_norm : c = k * (a * x2)
trans (k * a) * x2
exact hca_witness
apply mul_assoc
have hcb_norm : c = k * (b * x3)
trans (k * b) * x3
exact hcb_witness
apply mul_assoc
have hab : a * x2 = b * x3
specialize mul_left_cancel_nonzero k
specialize mul_left_cancel_nonzero (a * x2)
specialize mul_left_cancel_nonzero (b * x3)
apply mul_left_cancel_nonzero
exact hk
trans c
symm
exact hca_norm
exact hcb_norm
have hleast : exists w. a * x2 = l * w
specialize h_right (a * x2)
apply h_right
exists x2
refl
exists x3
exact hab
cases hleast
exists x4
trans k * (a * x2)
exact hca_norm
trans k * (l * x4)
congr
refl
exact hleast_witness
symm
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>430</dd></div>
        <div><dt>Distinct objects</dt><dd>371</dd></div>
        <div><dt>Reused references</dt><dd>13</dd></div>
        <div><dt>Depth</dt><dd>27</dd></div>
        <div><dt>Cuts</dt><dd>11</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e53557b877b429b561fc6984e5aed5b8687642df27c041d0cb464086f2eb71ec">e53557b877b4…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_lcm_scale_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_lcm_scale_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L283">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_lcm_scale_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-balanced_bezout_cancel_gcd"
  data-name="balanced_bezout_cancel_gcd" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="mul_left_cancel_nonzero,mul_add,mul_assoc,mul_one"
  data-search="balanced_bezout_cancel_gcd cancel a nonzero gcd from balanced bezout cancel a nonzero common gcd factor from a balanced bezout equation. forall g a b a b xp yp xn yn. ~(g = 0) -&gt; a = g * a -&gt; b = g * b -&gt; a * xp + b * yp = g + (a * xn + b * yn) -&gt; a * xp + b * yp = 1 + (a * xn + b * yn) gcd_coprime mul_left_cancel_nonzero mul_add mul_assoc mul_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>balanced_bezout_cancel_gcd</code><span>Cancel a nonzero gcd from balanced Bezout</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Cancel a nonzero common gcd factor from a balanced Bezout equation.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-balanced_bezout_cancel_gcd">Copy statement</button>
        <pre id="statement-balanced_bezout_cancel_gcd"><code>forall g a b A B xp yp xn yn. ~(g = 0) -&gt; a = g * A -&gt; b = g * B -&gt; a * xp + b * yp = g + (a * xn + b * yn) -&gt; A * xp + B * yp = 1 + (A * xn + B * yn)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-balanced_bezout_cancel_gcd">Copy proof</button>
        <pre id="proof-balanced_bezout_cancel_gcd"><code>pa prove forall g a b A B xp yp xn yn. ~(g = 0) -&gt; a = g * A -&gt; b = g * B -&gt; a * xp + b * yp = g + (a * xn + b * yn) -&gt; A * xp + B * yp = 1 + (A * xn + B * yn)
use mul_left_cancel_nonzero
use mul_add
use mul_assoc
use mul_one
intro g
intro a
intro b
intro A
intro B
intro xp
intro yp
intro xn
intro yn
intro hg
intro ha
intro hb
intro hbez
specialize mul_left_cancel_nonzero g
specialize mul_left_cancel_nonzero (A * xp + B * yp)
specialize mul_left_cancel_nonzero (1 + (A * xn + B * yn))
apply mul_left_cancel_nonzero
exact hg
trans g * (A * xp) + g * (B * yp)
apply mul_add
trans (g * A) * xp + (g * B) * yp
congr
symm
apply mul_assoc
symm
apply mul_assoc
trans a * xp + b * yp
rewrite ha
rewrite hb
refl
trans g + (a * xn + b * yn)
exact hbez
trans g + ((g * A) * xn + (g * B) * yn)
rewrite ha
rewrite hb
refl
trans g * 1 + ((g * A) * xn + (g * B) * yn)
congr
symm
apply mul_one
refl
trans g * 1 + (g * (A * xn) + g * (B * yn))
congr
refl
congr
apply mul_assoc
apply mul_assoc
trans g * 1 + g * (A * xn + B * yn)
congr
refl
symm
apply mul_add
symm
apply mul_add
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>549</dd></div>
        <div><dt>Distinct objects</dt><dd>409</dd></div>
        <div><dt>Reused references</dt><dd>18</dd></div>
        <div><dt>Depth</dt><dd>38</dd></div>
        <div><dt>Cuts</dt><dd>15</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="2f0613e9f78c31eae2a0bbbae62ceca50d3af9549f0658b78659311c6e215e9a">2f0613e9f78c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for balanced_bezout_cancel_gcd">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib balanced_bezout_cancel_gcd</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L356">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/balanced_bezout_cancel_gcd.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gcd_zero_inputs"
  data-name="gcd_zero_inputs" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="mul_zero_left"
  data-search="gcd_zero_inputs a zero gcd forces zero inputs a zero relational gcd can divide only the zero input pair. forall g a b. g = 0 -&gt; ((((exists hag_left_factor_zero_inputs. a = g * hag_left_factor_zero_inputs) /\ (exists hag_right_factor_zero_inputs. b = g * hag_right_factor_zero_inputs)) /\ forall hag_divisor_zero_inputs. (exists hag_common_left_zero_inputs. a = hag_divisor_zero_inputs * hag_common_left_zero_inputs) -&gt; (exists hag_common_right_zero_inputs. b = hag_divisor_zero_inputs * hag_common_right_zero_inputs) -&gt; exists hag_greatest_factor_zero_inputs. g = hag_divisor_zero_inputs * hag_greatest_factor_zero_inputs)) -&gt; (a = 0 /\ b = 0) gcd_coprime mul_zero_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>gcd_zero_inputs</code><span>A zero gcd forces zero inputs</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A zero relational gcd can divide only the zero input pair.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gcd_zero_inputs">Copy statement</button>
        <pre id="statement-gcd_zero_inputs"><code>forall g a b. g = 0 -&gt; ((((exists hag_left_factor_zero_inputs. a = g * hag_left_factor_zero_inputs) /\ (exists hag_right_factor_zero_inputs. b = g * hag_right_factor_zero_inputs)) /\ forall hag_divisor_zero_inputs. (exists hag_common_left_zero_inputs. a = hag_divisor_zero_inputs * hag_common_left_zero_inputs) -&gt; (exists hag_common_right_zero_inputs. b = hag_divisor_zero_inputs * hag_common_right_zero_inputs) -&gt; exists hag_greatest_factor_zero_inputs. g = hag_divisor_zero_inputs * hag_greatest_factor_zero_inputs)) -&gt; (a = 0 /\ b = 0)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gcd_zero_inputs">Copy proof</button>
        <pre id="proof-gcd_zero_inputs"><code>pa prove forall g a b. g = 0 -&gt; ((((exists hag_left_factor_zero_inputs. a = g * hag_left_factor_zero_inputs) /\ (exists hag_right_factor_zero_inputs. b = g * hag_right_factor_zero_inputs)) /\ forall hag_divisor_zero_inputs. (exists hag_common_left_zero_inputs. a = hag_divisor_zero_inputs * hag_common_left_zero_inputs) -&gt; (exists hag_common_right_zero_inputs. b = hag_divisor_zero_inputs * hag_common_right_zero_inputs) -&gt; exists hag_greatest_factor_zero_inputs. g = hag_divisor_zero_inputs * hag_greatest_factor_zero_inputs)) -&gt; (a = 0 /\ b = 0)
use mul_zero_left
intro g
intro a
intro b
intro hg
intro h
cases h
cases h_left
cases h_left_left
cases h_left_right
split
trans g * x
exact h_left_left_witness
rewrite hg
apply mul_zero_left
trans g * x1
exact h_left_right_witness
rewrite hg
apply mul_zero_left
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>62</dd></div>
        <div><dt>Distinct objects</dt><dd>62</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="0cfd18ba4f88a13630a5f6e5544262028c0ce8e9032f564ec8771def70009252">0cfd18ba4f88…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gcd_zero_inputs">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gcd_zero_inputs</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L428">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gcd_zero_inputs.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gcd_lcm_compatible_exists"
  data-name="gcd_lcm_compatible_exists" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="gcd_balanced_bezout_exists,eq_decidable,gcd_zero_inputs,is_lcm_zero_left,balanced_bezout_cancel_gcd,balanced_bezout_one_implies_coprime,coprime_product_is_lcm,is_lcm_scale_nonzero,mul_assoc,mul_comm"
  data-search="gcd_lcm_compatible_exists compatible gcd and lcm witnesses exist every pair has compatible relational gcd and lcm witnesses whose product is the product of the inputs, including zero inputs. forall a b. exists g l. ((((((exists hag_left_factor_compatible. a = g * hag_left_factor_compatible) /\ (exists hag_right_factor_compatible. b = g * hag_right_factor_compatible)) /\ forall hag_divisor_compatible. (exists hag_common_left_compatible. a = hag_divisor_compatible * hag_common_left_compatible) -&gt; (exists hag_common_right_compatible. b = hag_divisor_compatible * hag_common_right_compatible) -&gt; exists hag_greatest_factor_compatible. g = hag_divisor_compatible * hag_greatest_factor_compatible)) /\ ((((exists hlcm_left_factor_compatible. l = a * hlcm_left_factor_compatible) /\ (exists hlcm_right_factor_compatible. l = b * hlcm_right_factor_compatible)) /\ forall hlcm_common_compatible. (exists hlcm_left_common_compatible. hlcm_common_compatible = a * hlcm_left_common_compatible) -&gt; (exists hlcm_right_common_compatible. hlcm_common_compatible = b * hlcm_right_common_compatible) -&gt; exists hlcm_least_factor_compatible. hlcm_common_compatible = l * hlcm_least_factor_compatible))) /\ g * l = a * b) gcd_coprime gcd_balanced_bezout_exists eq_decidable gcd_zero_inputs is_lcm_zero_left balanced_bezout_cancel_gcd balanced_bezout_one_implies_coprime coprime_product_is_lcm is_lcm_scale_nonzero mul_assoc mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>gcd_lcm_compatible_exists</code><span>Compatible gcd and LCM witnesses exist</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every pair has compatible relational gcd and lcm witnesses whose product is the product of the inputs, including zero inputs.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_balanced_bezout_exists" href="#theorem-gcd_balanced_bezout_exists"><code>gcd_balanced_bezout_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_zero_inputs" href="#theorem-gcd_zero_inputs"><code>gcd_zero_inputs</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_zero_left" href="#theorem-is_lcm_zero_left"><code>is_lcm_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_cancel_gcd" href="#theorem-balanced_bezout_cancel_gcd"><code>balanced_bezout_cancel_gcd</code></a> <a class="pa-theorem-chip" data-theorem-link="balanced_bezout_one_implies_coprime" href="#theorem-balanced_bezout_one_implies_coprime"><code>balanced_bezout_one_implies_coprime</code></a> <a class="pa-theorem-chip" data-theorem-link="coprime_product_is_lcm" href="#theorem-coprime_product_is_lcm"><code>coprime_product_is_lcm</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_scale_nonzero" href="#theorem-is_lcm_scale_nonzero"><code>is_lcm_scale_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lcm_exists_relational" href="#theorem-lcm_exists_relational"><code>lcm_exists_relational</code></a> <a class="pa-theorem-chip" data-theorem-link="gcd_lcm_product" href="#theorem-gcd_lcm_product"><code>gcd_lcm_product</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gcd_lcm_compatible_exists">Copy statement</button>
        <pre id="statement-gcd_lcm_compatible_exists"><code>forall a b. exists g l. ((((((exists hag_left_factor_compatible. a = g * hag_left_factor_compatible) /\ (exists hag_right_factor_compatible. b = g * hag_right_factor_compatible)) /\ forall hag_divisor_compatible. (exists hag_common_left_compatible. a = hag_divisor_compatible * hag_common_left_compatible) -&gt; (exists hag_common_right_compatible. b = hag_divisor_compatible * hag_common_right_compatible) -&gt; exists hag_greatest_factor_compatible. g = hag_divisor_compatible * hag_greatest_factor_compatible)) /\ ((((exists hlcm_left_factor_compatible. l = a * hlcm_left_factor_compatible) /\ (exists hlcm_right_factor_compatible. l = b * hlcm_right_factor_compatible)) /\ forall hlcm_common_compatible. (exists hlcm_left_common_compatible. hlcm_common_compatible = a * hlcm_left_common_compatible) -&gt; (exists hlcm_right_common_compatible. hlcm_common_compatible = b * hlcm_right_common_compatible) -&gt; exists hlcm_least_factor_compatible. hlcm_common_compatible = l * hlcm_least_factor_compatible))) /\ g * l = a * b)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gcd_lcm_compatible_exists">Copy proof</button>
        <pre id="proof-gcd_lcm_compatible_exists"><code>pa prove forall a b. exists g l. ((((((exists hag_left_factor_compatible. a = g * hag_left_factor_compatible) /\ (exists hag_right_factor_compatible. b = g * hag_right_factor_compatible)) /\ forall hag_divisor_compatible. (exists hag_common_left_compatible. a = hag_divisor_compatible * hag_common_left_compatible) -&gt; (exists hag_common_right_compatible. b = hag_divisor_compatible * hag_common_right_compatible) -&gt; exists hag_greatest_factor_compatible. g = hag_divisor_compatible * hag_greatest_factor_compatible)) /\ ((((exists hlcm_left_factor_compatible. l = a * hlcm_left_factor_compatible) /\ (exists hlcm_right_factor_compatible. l = b * hlcm_right_factor_compatible)) /\ forall hlcm_common_compatible. (exists hlcm_left_common_compatible. hlcm_common_compatible = a * hlcm_left_common_compatible) -&gt; (exists hlcm_right_common_compatible. hlcm_common_compatible = b * hlcm_right_common_compatible) -&gt; exists hlcm_least_factor_compatible. hlcm_common_compatible = l * hlcm_least_factor_compatible))) /\ g * l = a * b)
use gcd_balanced_bezout_exists
use eq_decidable
use gcd_zero_inputs
use is_lcm_zero_left
use balanced_bezout_cancel_gcd
use balanced_bezout_one_implies_coprime
use coprime_product_is_lcm
use is_lcm_scale_nonzero
use mul_assoc
use mul_comm
intro a
intro b
have hgb : exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -&gt; (exists v. b = c * v) -&gt; exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))
specialize gcd_balanced_bezout_exists a
specialize gcd_balanced_bezout_exists b
apply gcd_balanced_bezout_exists
cases hgb
cases hgb_witness
have hzero : x = 0 \/ ~(x = 0)
specialize eq_decidable x
specialize eq_decidable 0
exact eq_decidable
cases hzero
have habzero : a = 0 /\ b = 0
specialize gcd_zero_inputs x
specialize gcd_zero_inputs a
specialize gcd_zero_inputs b
apply gcd_zero_inputs
exact hzero_left
exact hgb_witness_left
cases habzero
have hlcmzero : ((((exists hlcm_left_factor_compatible_zero. 0 = 0 * hlcm_left_factor_compatible_zero) /\ (exists hlcm_right_factor_compatible_zero. 0 = 0 * hlcm_right_factor_compatible_zero)) /\ forall hlcm_common_compatible_zero. (exists hlcm_left_common_compatible_zero. hlcm_common_compatible_zero = 0 * hlcm_left_common_compatible_zero) -&gt; (exists hlcm_right_common_compatible_zero. hlcm_common_compatible_zero = 0 * hlcm_right_common_compatible_zero) -&gt; exists hlcm_least_factor_compatible_zero. hlcm_common_compatible_zero = 0 * hlcm_least_factor_compatible_zero))
specialize is_lcm_zero_left 0
exact is_lcm_zero_left
exists x
exists 0
split
split
exact hgb_witness_left
rewrite habzero_left
rewrite habzero_left
rewrite habzero_right
rewrite habzero_right
exact hlcmzero
rewrite hzero_left
rewrite habzero_left
rewrite habzero_right
refl
cases hgb_witness_left
cases hgb_witness_left_left
cases hgb_witness_left_left_left
cases hgb_witness_left_left_right
cases hgb_witness_right
cases hgb_witness_right_witness
cases hgb_witness_right_witness_witness
cases hgb_witness_right_witness_witness_witness
have hquotbez : x1 * x3 + x2 * x4 = 1 + (x1 * x5 + x2 * x6)
specialize balanced_bezout_cancel_gcd x
specialize balanced_bezout_cancel_gcd a
specialize balanced_bezout_cancel_gcd b
specialize balanced_bezout_cancel_gcd x1
specialize balanced_bezout_cancel_gcd x2
specialize balanced_bezout_cancel_gcd x3
specialize balanced_bezout_cancel_gcd x4
specialize balanced_bezout_cancel_gcd x5
specialize balanced_bezout_cancel_gcd x6
apply balanced_bezout_cancel_gcd
exact hzero_right
exact hgb_witness_left_left_left_witness
exact hgb_witness_left_left_right_witness
exact hgb_witness_right_witness_witness_witness_witness
have hcop : forall d. (exists u. x1 = d * u) -&gt; (exists v. x2 = d * v) -&gt; d = 1
specialize balanced_bezout_one_implies_coprime x1
specialize balanced_bezout_one_implies_coprime x2
specialize balanced_bezout_one_implies_coprime x3
specialize balanced_bezout_one_implies_coprime x4
specialize balanced_bezout_one_implies_coprime x5
specialize balanced_bezout_one_implies_coprime x6
apply balanced_bezout_one_implies_coprime
exact hquotbez
have hbase : ((((exists hlcm_left_factor_compatible_base. x1 * x2 = x1 * hlcm_left_factor_compatible_base) /\ (exists hlcm_right_factor_compatible_base. x1 * x2 = x2 * hlcm_right_factor_compatible_base)) /\ forall hlcm_common_compatible_base. (exists hlcm_left_common_compatible_base. hlcm_common_compatible_base = x1 * hlcm_left_common_compatible_base) -&gt; (exists hlcm_right_common_compatible_base. hlcm_common_compatible_base = x2 * hlcm_right_common_compatible_base) -&gt; exists hlcm_least_factor_compatible_base. hlcm_common_compatible_base = x1 * x2 * hlcm_least_factor_compatible_base))
specialize coprime_product_is_lcm x1
specialize coprime_product_is_lcm x2
apply coprime_product_is_lcm
exact hcop
have hscaled : ((((exists hscale_left_factor_compatible_scaled. (x * (x1 * x2)) = (x * x1) * hscale_left_factor_compatible_scaled) /\ (exists hscale_right_factor_compatible_scaled. (x * (x1 * x2)) = (x * x2) * hscale_right_factor_compatible_scaled)) /\ forall hscale_common_compatible_scaled. (exists hscale_left_common_compatible_scaled. hscale_common_compatible_scaled = (x * x1) * hscale_left_common_compatible_scaled) -&gt; (exists hscale_right_common_compatible_scaled. hscale_common_compatible_scaled = (x * x2) * hscale_right_common_compatible_scaled) -&gt; exists hscale_least_factor_compatible_scaled. hscale_common_compatible_scaled = (x * (x1 * x2)) * hscale_least_factor_compatible_scaled))
specialize is_lcm_scale_nonzero x
specialize is_lcm_scale_nonzero (x1 * x2)
specialize is_lcm_scale_nonzero x1
specialize is_lcm_scale_nonzero x2
apply is_lcm_scale_nonzero
exact hzero_right
exact hbase
exists x
exists x * (x1 * x2)
split
split
exact hgb_witness_left
rewrite hgb_witness_left_left_left_witness
rewrite hgb_witness_left_left_left_witness
rewrite hgb_witness_left_left_right_witness
rewrite hgb_witness_left_left_right_witness
exact hscaled
rewrite hgb_witness_left_left_left_witness
rewrite hgb_witness_left_left_right_witness
trans x * (x1 * (x * x2))
congr
refl
trans (x * x1) * x2
symm
apply mul_assoc
trans (x1 * x) * x2
congr
apply mul_comm
refl
apply mul_assoc
symm
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9,038</dd></div>
        <div><dt>Distinct objects</dt><dd>2,390</dd></div>
        <div><dt>Reused references</dt><dd>121</dd></div>
        <div><dt>Depth</dt><dd>60</dd></div>
        <div><dt>Cuts</dt><dd>257</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7f93d3556a9fc53ab3eff6ee33cc167657efcbf4031367526fc15d17b5ec9a20">7f93d3556a9f…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gcd_lcm_compatible_exists">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gcd_lcm_compatible_exists</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L455">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gcd_lcm_compatible_exists.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-lcm_exists_relational"
  data-name="lcm_exists_relational" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="gcd_lcm_compatible_exists"
  data-search="lcm_exists_relational relational lcm exists every pair of naturals has a relational lcm; this is the direct lcm projection of the compatible pair theorem. forall a b. exists l. ((((exists hlcm_left_factor_existence. l = a * hlcm_left_factor_existence) /\ (exists hlcm_right_factor_existence. l = b * hlcm_right_factor_existence)) /\ forall hlcm_common_existence. (exists hlcm_left_common_existence. hlcm_common_existence = a * hlcm_left_common_existence) -&gt; (exists hlcm_right_common_existence. hlcm_common_existence = b * hlcm_right_common_existence) -&gt; exists hlcm_least_factor_existence. hlcm_common_existence = l * hlcm_least_factor_existence)) gcd_coprime gcd_lcm_compatible_exists">
  <details>
    <summary>
      <span class="pa-card-title"><code>lcm_exists_relational</code><span>Relational LCM exists</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every pair of naturals has a relational LCM; this is the direct LCM projection of the compatible pair theorem.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="canonical_lcm_exists_unique" href="#theorem-canonical_lcm_exists_unique"><code>canonical_lcm_exists_unique</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-lcm_exists_relational">Copy statement</button>
        <pre id="statement-lcm_exists_relational"><code>forall a b. exists l. ((((exists hlcm_left_factor_existence. l = a * hlcm_left_factor_existence) /\ (exists hlcm_right_factor_existence. l = b * hlcm_right_factor_existence)) /\ forall hlcm_common_existence. (exists hlcm_left_common_existence. hlcm_common_existence = a * hlcm_left_common_existence) -&gt; (exists hlcm_right_common_existence. hlcm_common_existence = b * hlcm_right_common_existence) -&gt; exists hlcm_least_factor_existence. hlcm_common_existence = l * hlcm_least_factor_existence))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-lcm_exists_relational">Copy proof</button>
        <pre id="proof-lcm_exists_relational"><code>pa prove forall a b. exists l. ((((exists hlcm_left_factor_existence. l = a * hlcm_left_factor_existence) /\ (exists hlcm_right_factor_existence. l = b * hlcm_right_factor_existence)) /\ forall hlcm_common_existence. (exists hlcm_left_common_existence. hlcm_common_existence = a * hlcm_left_common_existence) -&gt; (exists hlcm_right_common_existence. hlcm_common_existence = b * hlcm_right_common_existence) -&gt; exists hlcm_least_factor_existence. hlcm_common_existence = l * hlcm_least_factor_existence))
use gcd_lcm_compatible_exists
intro a
intro b
specialize gcd_lcm_compatible_exists a
specialize gcd_lcm_compatible_exists b
cases gcd_lcm_compatible_exists
cases gcd_lcm_compatible_exists_witness
cases gcd_lcm_compatible_exists_witness_witness
cases gcd_lcm_compatible_exists_witness_witness_left
exists x1
exact gcd_lcm_compatible_exists_witness_witness_left_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9,071</dd></div>
        <div><dt>Distinct objects</dt><dd>2,423</dd></div>
        <div><dt>Reused references</dt><dd>121</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>258</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="804dd563fab902d2e402ac6c20fcfec60e0f5306f5291e55943bcd8630352b47">804dd563fab9…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for lcm_exists_relational">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib lcm_exists_relational</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L587">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/lcm_exists_relational.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-canonical_lcm_exists_unique"
  data-name="canonical_lcm_exists_unique" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="lcm_exists_relational,is_lcm_unique"
  data-search="canonical_lcm_exists_unique canonical lcm exists uniquely the relational lcm value exists uniquely; divisibility witnesses themselves are not claimed to be unique. forall a b. exists l. (((((exists hlcm_left_factor_unique_chosen. l = a * hlcm_left_factor_unique_chosen) /\ (exists hlcm_right_factor_unique_chosen. l = b * hlcm_right_factor_unique_chosen)) /\ forall hlcm_common_unique_chosen. (exists hlcm_left_common_unique_chosen. hlcm_common_unique_chosen = a * hlcm_left_common_unique_chosen) -&gt; (exists hlcm_right_common_unique_chosen. hlcm_common_unique_chosen = b * hlcm_right_common_unique_chosen) -&gt; exists hlcm_least_factor_unique_chosen. hlcm_common_unique_chosen = l * hlcm_least_factor_unique_chosen)) /\ forall m. ((((exists hlcm_left_factor_unique_compared. m = a * hlcm_left_factor_unique_compared) /\ (exists hlcm_right_factor_unique_compared. m = b * hlcm_right_factor_unique_compared)) /\ forall hlcm_common_unique_compared. (exists hlcm_left_common_unique_compared. hlcm_common_unique_compared = a * hlcm_left_common_unique_compared) -&gt; (exists hlcm_right_common_unique_compared. hlcm_common_unique_compared = b * hlcm_right_common_unique_compared) -&gt; exists hlcm_least_factor_unique_compared. hlcm_common_unique_compared = m * hlcm_least_factor_unique_compared)) -&gt; m = l) gcd_coprime lcm_exists_relational is_lcm_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>canonical_lcm_exists_unique</code><span>Canonical LCM exists uniquely</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The relational LCM value exists uniquely; divisibility witnesses themselves are not claimed to be unique.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="lcm_exists_relational" href="#theorem-lcm_exists_relational"><code>lcm_exists_relational</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_unique" href="#theorem-is_lcm_unique"><code>is_lcm_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-canonical_lcm_exists_unique">Copy statement</button>
        <pre id="statement-canonical_lcm_exists_unique"><code>forall a b. exists l. (((((exists hlcm_left_factor_unique_chosen. l = a * hlcm_left_factor_unique_chosen) /\ (exists hlcm_right_factor_unique_chosen. l = b * hlcm_right_factor_unique_chosen)) /\ forall hlcm_common_unique_chosen. (exists hlcm_left_common_unique_chosen. hlcm_common_unique_chosen = a * hlcm_left_common_unique_chosen) -&gt; (exists hlcm_right_common_unique_chosen. hlcm_common_unique_chosen = b * hlcm_right_common_unique_chosen) -&gt; exists hlcm_least_factor_unique_chosen. hlcm_common_unique_chosen = l * hlcm_least_factor_unique_chosen)) /\ forall m. ((((exists hlcm_left_factor_unique_compared. m = a * hlcm_left_factor_unique_compared) /\ (exists hlcm_right_factor_unique_compared. m = b * hlcm_right_factor_unique_compared)) /\ forall hlcm_common_unique_compared. (exists hlcm_left_common_unique_compared. hlcm_common_unique_compared = a * hlcm_left_common_unique_compared) -&gt; (exists hlcm_right_common_unique_compared. hlcm_common_unique_compared = b * hlcm_right_common_unique_compared) -&gt; exists hlcm_least_factor_unique_compared. hlcm_common_unique_compared = m * hlcm_least_factor_unique_compared)) -&gt; m = l)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-canonical_lcm_exists_unique">Copy proof</button>
        <pre id="proof-canonical_lcm_exists_unique"><code>pa prove forall a b. exists l. (((((exists hlcm_left_factor_unique_chosen. l = a * hlcm_left_factor_unique_chosen) /\ (exists hlcm_right_factor_unique_chosen. l = b * hlcm_right_factor_unique_chosen)) /\ forall hlcm_common_unique_chosen. (exists hlcm_left_common_unique_chosen. hlcm_common_unique_chosen = a * hlcm_left_common_unique_chosen) -&gt; (exists hlcm_right_common_unique_chosen. hlcm_common_unique_chosen = b * hlcm_right_common_unique_chosen) -&gt; exists hlcm_least_factor_unique_chosen. hlcm_common_unique_chosen = l * hlcm_least_factor_unique_chosen)) /\ forall m. ((((exists hlcm_left_factor_unique_compared. m = a * hlcm_left_factor_unique_compared) /\ (exists hlcm_right_factor_unique_compared. m = b * hlcm_right_factor_unique_compared)) /\ forall hlcm_common_unique_compared. (exists hlcm_left_common_unique_compared. hlcm_common_unique_compared = a * hlcm_left_common_unique_compared) -&gt; (exists hlcm_right_common_unique_compared. hlcm_common_unique_compared = b * hlcm_right_common_unique_compared) -&gt; exists hlcm_least_factor_unique_compared. hlcm_common_unique_compared = m * hlcm_least_factor_unique_compared)) -&gt; m = l)
use lcm_exists_relational
use is_lcm_unique
intro a
intro b
specialize lcm_exists_relational a
specialize lcm_exists_relational b
cases lcm_exists_relational
exists x
split
exact lcm_exists_relational_witness
intro m
intro hm
specialize is_lcm_unique m
specialize is_lcm_unique x
specialize is_lcm_unique a
specialize is_lcm_unique b
apply is_lcm_unique
exact hm
exact lcm_exists_relational_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9,791</dd></div>
        <div><dt>Distinct objects</dt><dd>2,565</dd></div>
        <div><dt>Reused references</dt><dd>127</dd></div>
        <div><dt>Depth</dt><dd>62</dd></div>
        <div><dt>Cuts</dt><dd>280</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="e40bc57282961975fec8888fdbab7561fb10978a320aabdbb151d9cb0e7fe287">e40bc5728296…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for canonical_lcm_exists_unique">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib canonical_lcm_exists_unique</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L606">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/canonical_lcm_exists_unique.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-gcd_lcm_product"
  data-name="gcd_lcm_product" data-domain="gcd_coprime"
  data-status="checked_m20"
  data-dependencies="gcd_lcm_compatible_exists,is_gcd_unique,is_lcm_unique"
  data-search="gcd_lcm_product the gcd-lcm product identity any relational gcd and lcm pair satisfies the gcd--lcm product identity, by uniqueness from a compatible pair. forall g l a b. ((((exists hag_left_factor_product_gcd_assumption. a = g * hag_left_factor_product_gcd_assumption) /\ (exists hag_right_factor_product_gcd_assumption. b = g * hag_right_factor_product_gcd_assumption)) /\ forall hag_divisor_product_gcd_assumption. (exists hag_common_left_product_gcd_assumption. a = hag_divisor_product_gcd_assumption * hag_common_left_product_gcd_assumption) -&gt; (exists hag_common_right_product_gcd_assumption. b = hag_divisor_product_gcd_assumption * hag_common_right_product_gcd_assumption) -&gt; exists hag_greatest_factor_product_gcd_assumption. g = hag_divisor_product_gcd_assumption * hag_greatest_factor_product_gcd_assumption)) -&gt; ((((exists hlcm_left_factor_product_lcm_assumption. l = a * hlcm_left_factor_product_lcm_assumption) /\ (exists hlcm_right_factor_product_lcm_assumption. l = b * hlcm_right_factor_product_lcm_assumption)) /\ forall hlcm_common_product_lcm_assumption. (exists hlcm_left_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = a * hlcm_left_common_product_lcm_assumption) -&gt; (exists hlcm_right_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = b * hlcm_right_common_product_lcm_assumption) -&gt; exists hlcm_least_factor_product_lcm_assumption. hlcm_common_product_lcm_assumption = l * hlcm_least_factor_product_lcm_assumption)) -&gt; g * l = a * b gcd_coprime gcd_lcm_compatible_exists is_gcd_unique is_lcm_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>gcd_lcm_product</code><span>The gcd-LCM product identity</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Any relational gcd and LCM pair satisfies the gcd--LCM product identity, by uniqueness from a compatible pair.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_lcm_compatible_exists" href="#theorem-gcd_lcm_compatible_exists"><code>gcd_lcm_compatible_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_unique" href="#theorem-is_gcd_unique"><code>is_gcd_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_unique" href="#theorem-is_lcm_unique"><code>is_lcm_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-gcd_lcm_product">Copy statement</button>
        <pre id="statement-gcd_lcm_product"><code>forall g l a b. ((((exists hag_left_factor_product_gcd_assumption. a = g * hag_left_factor_product_gcd_assumption) /\ (exists hag_right_factor_product_gcd_assumption. b = g * hag_right_factor_product_gcd_assumption)) /\ forall hag_divisor_product_gcd_assumption. (exists hag_common_left_product_gcd_assumption. a = hag_divisor_product_gcd_assumption * hag_common_left_product_gcd_assumption) -&gt; (exists hag_common_right_product_gcd_assumption. b = hag_divisor_product_gcd_assumption * hag_common_right_product_gcd_assumption) -&gt; exists hag_greatest_factor_product_gcd_assumption. g = hag_divisor_product_gcd_assumption * hag_greatest_factor_product_gcd_assumption)) -&gt; ((((exists hlcm_left_factor_product_lcm_assumption. l = a * hlcm_left_factor_product_lcm_assumption) /\ (exists hlcm_right_factor_product_lcm_assumption. l = b * hlcm_right_factor_product_lcm_assumption)) /\ forall hlcm_common_product_lcm_assumption. (exists hlcm_left_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = a * hlcm_left_common_product_lcm_assumption) -&gt; (exists hlcm_right_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = b * hlcm_right_common_product_lcm_assumption) -&gt; exists hlcm_least_factor_product_lcm_assumption. hlcm_common_product_lcm_assumption = l * hlcm_least_factor_product_lcm_assumption)) -&gt; g * l = a * b</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-gcd_lcm_product">Copy proof</button>
        <pre id="proof-gcd_lcm_product"><code>pa prove forall g l a b. ((((exists hag_left_factor_product_gcd_assumption. a = g * hag_left_factor_product_gcd_assumption) /\ (exists hag_right_factor_product_gcd_assumption. b = g * hag_right_factor_product_gcd_assumption)) /\ forall hag_divisor_product_gcd_assumption. (exists hag_common_left_product_gcd_assumption. a = hag_divisor_product_gcd_assumption * hag_common_left_product_gcd_assumption) -&gt; (exists hag_common_right_product_gcd_assumption. b = hag_divisor_product_gcd_assumption * hag_common_right_product_gcd_assumption) -&gt; exists hag_greatest_factor_product_gcd_assumption. g = hag_divisor_product_gcd_assumption * hag_greatest_factor_product_gcd_assumption)) -&gt; ((((exists hlcm_left_factor_product_lcm_assumption. l = a * hlcm_left_factor_product_lcm_assumption) /\ (exists hlcm_right_factor_product_lcm_assumption. l = b * hlcm_right_factor_product_lcm_assumption)) /\ forall hlcm_common_product_lcm_assumption. (exists hlcm_left_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = a * hlcm_left_common_product_lcm_assumption) -&gt; (exists hlcm_right_common_product_lcm_assumption. hlcm_common_product_lcm_assumption = b * hlcm_right_common_product_lcm_assumption) -&gt; exists hlcm_least_factor_product_lcm_assumption. hlcm_common_product_lcm_assumption = l * hlcm_least_factor_product_lcm_assumption)) -&gt; g * l = a * b
use gcd_lcm_compatible_exists
use is_gcd_unique
use is_lcm_unique
intro g
intro l
intro a
intro b
intro hg
intro hl
specialize gcd_lcm_compatible_exists a
specialize gcd_lcm_compatible_exists b
cases gcd_lcm_compatible_exists
cases gcd_lcm_compatible_exists_witness
cases gcd_lcm_compatible_exists_witness_witness
cases gcd_lcm_compatible_exists_witness_witness_left
have hgeq : g = x
specialize is_gcd_unique g
specialize is_gcd_unique x
specialize is_gcd_unique a
specialize is_gcd_unique b
apply is_gcd_unique
exact hg
exact gcd_lcm_compatible_exists_witness_witness_left_left
have hleq : l = x1
specialize is_lcm_unique l
specialize is_lcm_unique x1
specialize is_lcm_unique a
specialize is_lcm_unique b
apply is_lcm_unique
exact hl
exact gcd_lcm_compatible_exists_witness_witness_left_right
rewrite hgeq
rewrite hleq
exact gcd_lcm_compatible_exists_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>10,441</dd></div>
        <div><dt>Distinct objects</dt><dd>2,569</dd></div>
        <div><dt>Reused references</dt><dd>128</dd></div>
        <div><dt>Depth</dt><dd>61</dd></div>
        <div><dt>Cuts</dt><dd>300</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8f7608a596be2a1fc71e12ed011f14306173030d48d0867546ccfd812dee2471">8f7608a596be…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for gcd_lcm_product">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib gcd_lcm_product</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_lcm_totality_bridge_candidate.py#L636">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/gcd_lcm_product.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="guided-tour.html#stage-bezout">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_zero_iff_eq"
  data-name="mod_eq_zero_iff_eq" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mul_zero_left"
  data-search="mod_eq_zero_iff_eq mod eq zero iff eq balanced congruence modulo zero is exactly equality. forall a b. (((exists hgcrt_mod_left_zero_source hgcrt_mod_right_zero_source. a + 0 * hgcrt_mod_left_zero_source = b + 0 * hgcrt_mod_right_zero_source) -&gt; a = b) /\ (a = b -&gt; (exists hgcrt_mod_left_zero_result hgcrt_mod_right_zero_result. a + 0 * hgcrt_mod_left_zero_result = b + 0 * hgcrt_mod_right_zero_result))) congruence mul_zero_left">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_zero_iff_eq</code><span>Mod eq zero iff eq</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced congruence modulo zero is exactly equality.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_solution_unique_lcm_zero" href="#theorem-crt_solution_unique_lcm_zero"><code>crt_solution_unique_lcm_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable" href="#theorem-mod_eq_decidable"><code>mod_eq_decidable</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_zero_iff_eq">Copy statement</button>
        <pre id="statement-mod_eq_zero_iff_eq"><code>forall a b. (((exists hgcrt_mod_left_zero_source hgcrt_mod_right_zero_source. a + 0 * hgcrt_mod_left_zero_source = b + 0 * hgcrt_mod_right_zero_source) -&gt; a = b) /\ (a = b -&gt; (exists hgcrt_mod_left_zero_result hgcrt_mod_right_zero_result. a + 0 * hgcrt_mod_left_zero_result = b + 0 * hgcrt_mod_right_zero_result)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_zero_iff_eq">Copy proof</button>
        <pre id="proof-mod_eq_zero_iff_eq"><code>pa prove forall a b. (((exists hgcrt_mod_left_zero_source hgcrt_mod_right_zero_source. a + 0 * hgcrt_mod_left_zero_source = b + 0 * hgcrt_mod_right_zero_source) -&gt; a = b) /\ (a = b -&gt; (exists hgcrt_mod_left_zero_result hgcrt_mod_right_zero_result. a + 0 * hgcrt_mod_left_zero_result = b + 0 * hgcrt_mod_right_zero_result)))
use mul_zero_left
intro a
intro b
split
intro h
cases h
cases h_witness
trans a + 0 * x
symm
trans a + 0
congr
refl
apply mul_zero_left
apply PA3
trans b + 0 * x1
exact h_witness_witness
trans b + 0
congr
refl
apply mul_zero_left
apply PA3
intro h
exists 0
exists 0
rewrite h
refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>55</dd></div>
        <div><dt>Distinct objects</dt><dd>55</dd></div>
        <div><dt>Reused references</dt><dd>0</dd></div>
        <div><dt>Depth</dt><dd>13</dd></div>
        <div><dt>Cuts</dt><dd>1</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="af253fd988c16693a85586ea505dffe67e0a653ced19782dc3fc6a48b292c97c">af253fd988c1…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_zero_iff_eq">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_zero_iff_eq</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_congruence_candidate.py#L233">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_zero_iff_eq.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_scale"
  data-name="mod_eq_scale" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mul_add,mul_assoc"
  data-search="mod_eq_scale mod eq scale scaling values and their modulus preserves balanced congruence. forall k m a b. (exists hgcrt_mod_left_scale_source hgcrt_mod_right_scale_source. a + m * hgcrt_mod_left_scale_source = b + m * hgcrt_mod_right_scale_source) -&gt; (exists hgcrt_mod_left_scale_result hgcrt_mod_right_scale_result. (k * a) + (k * m) * hgcrt_mod_left_scale_result = (k * b) + (k * m) * hgcrt_mod_right_scale_result) congruence mul_add mul_assoc">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_scale</code><span>Mod eq scale</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Scaling values and their modulus preserves balanced congruence.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mul_add" href="#theorem-mul_add"><code>mul_add</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_scaled_common_remainder_lift" href="#theorem-crt_scaled_common_remainder_lift"><code>crt_scaled_common_remainder_lift</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_scale">Copy statement</button>
        <pre id="statement-mod_eq_scale"><code>forall k m a b. (exists hgcrt_mod_left_scale_source hgcrt_mod_right_scale_source. a + m * hgcrt_mod_left_scale_source = b + m * hgcrt_mod_right_scale_source) -&gt; (exists hgcrt_mod_left_scale_result hgcrt_mod_right_scale_result. (k * a) + (k * m) * hgcrt_mod_left_scale_result = (k * b) + (k * m) * hgcrt_mod_right_scale_result)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_scale">Copy proof</button>
        <pre id="proof-mod_eq_scale"><code>pa prove forall k m a b. (exists hgcrt_mod_left_scale_source hgcrt_mod_right_scale_source. a + m * hgcrt_mod_left_scale_source = b + m * hgcrt_mod_right_scale_source) -&gt; (exists hgcrt_mod_left_scale_result hgcrt_mod_right_scale_result. (k * a) + (k * m) * hgcrt_mod_left_scale_result = (k * b) + (k * m) * hgcrt_mod_right_scale_result)
use mul_add
use mul_assoc
intro k
intro m
intro a
intro b
intro h
cases h
cases h_witness
exists x
exists x1
trans k * a + k * (m * x)
congr
refl
apply mul_assoc
trans k * (a + m * x)
symm
apply mul_add
trans k * (b + m * x1)
congr
refl
exact h_witness_witness
trans k * b + k * (m * x1)
apply mul_add
congr
refl
symm
apply mul_assoc
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>235</dd></div>
        <div><dt>Distinct objects</dt><dd>146</dd></div>
        <div><dt>Reused references</dt><dd>13</dd></div>
        <div><dt>Depth</dt><dd>21</dd></div>
        <div><dt>Cuts</dt><dd>5</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="d9c5bcb8145dfa9ab0153c1f4817db759728036d000238f151c3afc23597d9a9">d9c5bcb8145d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_scale">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_scale</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_congruence_candidate.py#L293">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_scale.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-crt_solution_pair_congruent"
  data-name="crt_solution_pair_congruent" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod_eq_symm,mod_eq_trans"
  data-search="crt_solution_pair_congruent crt solution pair congruent any two solutions of one binary crt problem agree modulo each modulus. forall m n a b x y. (((exists hgcrt_mod_left_pair_x_left hgcrt_mod_right_pair_x_left. x + m * hgcrt_mod_left_pair_x_left = a + m * hgcrt_mod_right_pair_x_left) /\ (exists hgcrt_mod_left_pair_x_right hgcrt_mod_right_pair_x_right. x + n * hgcrt_mod_left_pair_x_right = b + n * hgcrt_mod_right_pair_x_right))) -&gt; (((exists hgcrt_mod_left_pair_y_left hgcrt_mod_right_pair_y_left. y + m * hgcrt_mod_left_pair_y_left = a + m * hgcrt_mod_right_pair_y_left) /\ (exists hgcrt_mod_left_pair_y_right hgcrt_mod_right_pair_y_right. y + n * hgcrt_mod_left_pair_y_right = b + n * hgcrt_mod_right_pair_y_right))) -&gt; ((exists hgcrt_mod_left_pair_mod_m hgcrt_mod_right_pair_mod_m. x + m * hgcrt_mod_left_pair_mod_m = y + m * hgcrt_mod_right_pair_mod_m) /\ (exists hgcrt_mod_left_pair_mod_n hgcrt_mod_right_pair_mod_n. x + n * hgcrt_mod_left_pair_mod_n = y + n * hgcrt_mod_right_pair_mod_n)) congruence mod_eq_symm mod_eq_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>crt_solution_pair_congruent</code><span>Crt solution pair congruent</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Any two solutions of one binary CRT problem agree modulo each modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_solution_class_iff_lcm" href="#theorem-crt_solution_class_iff_lcm"><code>crt_solution_class_iff_lcm</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-crt_solution_pair_congruent">Copy statement</button>
        <pre id="statement-crt_solution_pair_congruent"><code>forall m n a b x y. (((exists hgcrt_mod_left_pair_x_left hgcrt_mod_right_pair_x_left. x + m * hgcrt_mod_left_pair_x_left = a + m * hgcrt_mod_right_pair_x_left) /\ (exists hgcrt_mod_left_pair_x_right hgcrt_mod_right_pair_x_right. x + n * hgcrt_mod_left_pair_x_right = b + n * hgcrt_mod_right_pair_x_right))) -&gt; (((exists hgcrt_mod_left_pair_y_left hgcrt_mod_right_pair_y_left. y + m * hgcrt_mod_left_pair_y_left = a + m * hgcrt_mod_right_pair_y_left) /\ (exists hgcrt_mod_left_pair_y_right hgcrt_mod_right_pair_y_right. y + n * hgcrt_mod_left_pair_y_right = b + n * hgcrt_mod_right_pair_y_right))) -&gt; ((exists hgcrt_mod_left_pair_mod_m hgcrt_mod_right_pair_mod_m. x + m * hgcrt_mod_left_pair_mod_m = y + m * hgcrt_mod_right_pair_mod_m) /\ (exists hgcrt_mod_left_pair_mod_n hgcrt_mod_right_pair_mod_n. x + n * hgcrt_mod_left_pair_mod_n = y + n * hgcrt_mod_right_pair_mod_n))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-crt_solution_pair_congruent">Copy proof</button>
        <pre id="proof-crt_solution_pair_congruent"><code>pa prove forall m n a b x y. (((exists hgcrt_mod_left_pair_x_left hgcrt_mod_right_pair_x_left. x + m * hgcrt_mod_left_pair_x_left = a + m * hgcrt_mod_right_pair_x_left) /\ (exists hgcrt_mod_left_pair_x_right hgcrt_mod_right_pair_x_right. x + n * hgcrt_mod_left_pair_x_right = b + n * hgcrt_mod_right_pair_x_right))) -&gt; (((exists hgcrt_mod_left_pair_y_left hgcrt_mod_right_pair_y_left. y + m * hgcrt_mod_left_pair_y_left = a + m * hgcrt_mod_right_pair_y_left) /\ (exists hgcrt_mod_left_pair_y_right hgcrt_mod_right_pair_y_right. y + n * hgcrt_mod_left_pair_y_right = b + n * hgcrt_mod_right_pair_y_right))) -&gt; ((exists hgcrt_mod_left_pair_mod_m hgcrt_mod_right_pair_mod_m. x + m * hgcrt_mod_left_pair_mod_m = y + m * hgcrt_mod_right_pair_mod_m) /\ (exists hgcrt_mod_left_pair_mod_n hgcrt_mod_right_pair_mod_n. x + n * hgcrt_mod_left_pair_mod_n = y + n * hgcrt_mod_right_pair_mod_n))
use mod_eq_symm
use mod_eq_trans
intro m
intro n
intro a
intro b
intro x
intro y
intro hx
intro hy
cases hx
cases hy
split
have hay : exists hgcrt_mod_left_pair_a_y hgcrt_mod_right_pair_a_y. a + m * hgcrt_mod_left_pair_a_y = y + m * hgcrt_mod_right_pair_a_y
specialize mod_eq_symm m
specialize mod_eq_symm y
specialize mod_eq_symm a
apply mod_eq_symm
exact hy_left
specialize mod_eq_trans m
specialize mod_eq_trans x
specialize mod_eq_trans a
specialize mod_eq_trans y
apply mod_eq_trans
exact hx_left
exact hay
have hby : exists hgcrt_mod_left_pair_b_y hgcrt_mod_right_pair_b_y. b + n * hgcrt_mod_left_pair_b_y = y + n * hgcrt_mod_right_pair_b_y
specialize mod_eq_symm n
specialize mod_eq_symm y
specialize mod_eq_symm b
apply mod_eq_symm
exact hy_right
specialize mod_eq_trans n
specialize mod_eq_trans x
specialize mod_eq_trans b
specialize mod_eq_trans y
apply mod_eq_trans
exact hx_right
exact hby
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>307</dd></div>
        <div><dt>Distinct objects</dt><dd>259</dd></div>
        <div><dt>Reused references</dt><dd>16</dd></div>
        <div><dt>Depth</dt><dd>31</dd></div>
        <div><dt>Cuts</dt><dd>8</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a3425a60d00eb7849d73cf634ba165e4d3af88e1a05b8170ebe694eeeb9b352e">a3425a60d00e…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for crt_solution_pair_congruent">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib crt_solution_pair_congruent</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_congruence_candidate.py#L370">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/crt_solution_pair_congruent.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-crt_common_solution_implies_gcd_compatible"
  data-name="crt_common_solution_implies_gcd_compatible" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="is_gcd_dvd_left,is_gcd_dvd_right,mod_eq_of_mod_eq_multiple,mod_eq_symm,mod_eq_trans"
  data-search="crt_common_solution_implies_gcd_compatible crt common solution implies gcd compatible a common crt solution forces the residues to be congruent modulo every relational gcd. forall g m n a b x. ((((exists hag_left_factor_crt_necessity. m = g * hag_left_factor_crt_necessity) /\ (exists hag_right_factor_crt_necessity. n = g * hag_right_factor_crt_necessity)) /\ forall hag_divisor_crt_necessity. (exists hag_common_left_crt_necessity. m = hag_divisor_crt_necessity * hag_common_left_crt_necessity) -&gt; (exists hag_common_right_crt_necessity. n = hag_divisor_crt_necessity * hag_common_right_crt_necessity) -&gt; exists hag_greatest_factor_crt_necessity. g = hag_divisor_crt_necessity * hag_greatest_factor_crt_necessity)) -&gt; (((exists hgcrt_mod_left_necessity_solution_left hgcrt_mod_right_necessity_solution_left. x + m * hgcrt_mod_left_necessity_solution_left = a + m * hgcrt_mod_right_necessity_solution_left) /\ (exists hgcrt_mod_left_necessity_solution_right hgcrt_mod_right_necessity_solution_right. x + n * hgcrt_mod_left_necessity_solution_right = b + n * hgcrt_mod_right_necessity_solution_right))) -&gt; (exists hgcrt_mod_left_necessity_compatibility hgcrt_mod_right_necessity_compatibility. a + g * hgcrt_mod_left_necessity_compatibility = b + g * hgcrt_mod_right_necessity_compatibility) congruence is_gcd_dvd_left is_gcd_dvd_right mod_eq_of_mod_eq_multiple mod_eq_symm mod_eq_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>crt_common_solution_implies_gcd_compatible</code><span>Crt common solution implies gcd compatible</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A common CRT solution forces the residues to be congruent modulo every relational gcd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_dvd_left" href="#theorem-is_gcd_dvd_left"><code>is_gcd_dvd_left</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_dvd_right" href="#theorem-is_gcd_dvd_right"><code>is_gcd_dvd_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_of_mod_eq_multiple" href="#theorem-mod_eq_of_mod_eq_multiple"><code>mod_eq_of_mod_eq_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_incompatibility_obstructs_solution" href="#theorem-crt_incompatibility_obstructs_solution"><code>crt_incompatibility_obstructs_solution</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_solvable_iff" href="#theorem-generalized_binary_crt_solvable_iff"><code>generalized_binary_crt_solvable_iff</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-crt_common_solution_implies_gcd_compatible">Copy statement</button>
        <pre id="statement-crt_common_solution_implies_gcd_compatible"><code>forall g m n a b x. ((((exists hag_left_factor_crt_necessity. m = g * hag_left_factor_crt_necessity) /\ (exists hag_right_factor_crt_necessity. n = g * hag_right_factor_crt_necessity)) /\ forall hag_divisor_crt_necessity. (exists hag_common_left_crt_necessity. m = hag_divisor_crt_necessity * hag_common_left_crt_necessity) -&gt; (exists hag_common_right_crt_necessity. n = hag_divisor_crt_necessity * hag_common_right_crt_necessity) -&gt; exists hag_greatest_factor_crt_necessity. g = hag_divisor_crt_necessity * hag_greatest_factor_crt_necessity)) -&gt; (((exists hgcrt_mod_left_necessity_solution_left hgcrt_mod_right_necessity_solution_left. x + m * hgcrt_mod_left_necessity_solution_left = a + m * hgcrt_mod_right_necessity_solution_left) /\ (exists hgcrt_mod_left_necessity_solution_right hgcrt_mod_right_necessity_solution_right. x + n * hgcrt_mod_left_necessity_solution_right = b + n * hgcrt_mod_right_necessity_solution_right))) -&gt; (exists hgcrt_mod_left_necessity_compatibility hgcrt_mod_right_necessity_compatibility. a + g * hgcrt_mod_left_necessity_compatibility = b + g * hgcrt_mod_right_necessity_compatibility)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-crt_common_solution_implies_gcd_compatible">Copy proof</button>
        <pre id="proof-crt_common_solution_implies_gcd_compatible"><code>pa prove forall g m n a b x. ((((exists hag_left_factor_crt_necessity. m = g * hag_left_factor_crt_necessity) /\ (exists hag_right_factor_crt_necessity. n = g * hag_right_factor_crt_necessity)) /\ forall hag_divisor_crt_necessity. (exists hag_common_left_crt_necessity. m = hag_divisor_crt_necessity * hag_common_left_crt_necessity) -&gt; (exists hag_common_right_crt_necessity. n = hag_divisor_crt_necessity * hag_common_right_crt_necessity) -&gt; exists hag_greatest_factor_crt_necessity. g = hag_divisor_crt_necessity * hag_greatest_factor_crt_necessity)) -&gt; (((exists hgcrt_mod_left_necessity_solution_left hgcrt_mod_right_necessity_solution_left. x + m * hgcrt_mod_left_necessity_solution_left = a + m * hgcrt_mod_right_necessity_solution_left) /\ (exists hgcrt_mod_left_necessity_solution_right hgcrt_mod_right_necessity_solution_right. x + n * hgcrt_mod_left_necessity_solution_right = b + n * hgcrt_mod_right_necessity_solution_right))) -&gt; (exists hgcrt_mod_left_necessity_compatibility hgcrt_mod_right_necessity_compatibility. a + g * hgcrt_mod_left_necessity_compatibility = b + g * hgcrt_mod_right_necessity_compatibility)
use is_gcd_dvd_left
use is_gcd_dvd_right
use mod_eq_of_mod_eq_multiple
use mod_eq_symm
use mod_eq_trans
intro g
intro m
intro n
intro a
intro b
intro x
intro hg
intro hx
cases hx
have hgm : exists q. m = g * q
specialize is_gcd_dvd_left g
specialize is_gcd_dvd_left m
specialize is_gcd_dvd_left n
apply is_gcd_dvd_left
exact hg
have hgn : exists q. n = g * q
specialize is_gcd_dvd_right g
specialize is_gcd_dvd_right m
specialize is_gcd_dvd_right n
apply is_gcd_dvd_right
exact hg
have hxa : exists hgcrt_mod_left_necessity_x_a hgcrt_mod_right_necessity_x_a. x + g * hgcrt_mod_left_necessity_x_a = a + g * hgcrt_mod_right_necessity_x_a
specialize mod_eq_of_mod_eq_multiple g
specialize mod_eq_of_mod_eq_multiple m
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple a
apply mod_eq_of_mod_eq_multiple
exact hgm
exact hx_left
have hxb : exists hgcrt_mod_left_necessity_x_b hgcrt_mod_right_necessity_x_b. x + g * hgcrt_mod_left_necessity_x_b = b + g * hgcrt_mod_right_necessity_x_b
specialize mod_eq_of_mod_eq_multiple g
specialize mod_eq_of_mod_eq_multiple n
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple b
apply mod_eq_of_mod_eq_multiple
exact hgn
exact hx_right
have hax : exists hgcrt_mod_left_necessity_a_x hgcrt_mod_right_necessity_a_x. a + g * hgcrt_mod_left_necessity_a_x = x + g * hgcrt_mod_right_necessity_a_x
specialize mod_eq_symm g
specialize mod_eq_symm x
specialize mod_eq_symm a
apply mod_eq_symm
exact hxa
specialize mod_eq_trans g
specialize mod_eq_trans a
specialize mod_eq_trans x
specialize mod_eq_trans b
apply mod_eq_trans
exact hax
exact hxb
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>518</dd></div>
        <div><dt>Distinct objects</dt><dd>388</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>34</dd></div>
        <div><dt>Cuts</dt><dd>14</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="aa5633a5e76733c821102c41ac1c683f367432e3b5c6f28da01dc0e302b56f41">aa5633a5e767…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for crt_common_solution_implies_gcd_compatible">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib crt_common_solution_implies_gcd_compatible</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_congruence_candidate.py#L416">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/crt_common_solution_implies_gcd_compatible.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-crt_incompatibility_obstructs_solution"
  data-name="crt_incompatibility_obstructs_solution" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="crt_common_solution_implies_gcd_compatible"
  data-search="crt_incompatibility_obstructs_solution crt incompatibility obstructs solution failure of gcd compatibility constructively refutes every common crt solution. forall g m n a b. ((((exists hag_left_factor_crt_obstruction. m = g * hag_left_factor_crt_obstruction) /\ (exists hag_right_factor_crt_obstruction. n = g * hag_right_factor_crt_obstruction)) /\ forall hag_divisor_crt_obstruction. (exists hag_common_left_crt_obstruction. m = hag_divisor_crt_obstruction * hag_common_left_crt_obstruction) -&gt; (exists hag_common_right_crt_obstruction. n = hag_divisor_crt_obstruction * hag_common_right_crt_obstruction) -&gt; exists hag_greatest_factor_crt_obstruction. g = hag_divisor_crt_obstruction * hag_greatest_factor_crt_obstruction)) -&gt; ~(exists hgcrt_mod_left_obstruction_compatibility hgcrt_mod_right_obstruction_compatibility. a + g * hgcrt_mod_left_obstruction_compatibility = b + g * hgcrt_mod_right_obstruction_compatibility) -&gt; ~(exists x. (((exists hgcrt_mod_left_obstruction_solution_left hgcrt_mod_right_obstruction_solution_left. x + m * hgcrt_mod_left_obstruction_solution_left = a + m * hgcrt_mod_right_obstruction_solution_left) /\ (exists hgcrt_mod_left_obstruction_solution_right hgcrt_mod_right_obstruction_solution_right. x + n * hgcrt_mod_left_obstruction_solution_right = b + n * hgcrt_mod_right_obstruction_solution_right)))) congruence crt_common_solution_implies_gcd_compatible">
  <details>
    <summary>
      <span class="pa-card-title"><code>crt_incompatibility_obstructs_solution</code><span>Crt incompatibility obstructs solution</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Failure of gcd compatibility constructively refutes every common CRT solution.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_common_solution_implies_gcd_compatible" href="#theorem-crt_common_solution_implies_gcd_compatible"><code>crt_common_solution_implies_gcd_compatible</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_solution_or_obstruction" href="#theorem-generalized_binary_crt_solution_or_obstruction"><code>generalized_binary_crt_solution_or_obstruction</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-crt_incompatibility_obstructs_solution">Copy statement</button>
        <pre id="statement-crt_incompatibility_obstructs_solution"><code>forall g m n a b. ((((exists hag_left_factor_crt_obstruction. m = g * hag_left_factor_crt_obstruction) /\ (exists hag_right_factor_crt_obstruction. n = g * hag_right_factor_crt_obstruction)) /\ forall hag_divisor_crt_obstruction. (exists hag_common_left_crt_obstruction. m = hag_divisor_crt_obstruction * hag_common_left_crt_obstruction) -&gt; (exists hag_common_right_crt_obstruction. n = hag_divisor_crt_obstruction * hag_common_right_crt_obstruction) -&gt; exists hag_greatest_factor_crt_obstruction. g = hag_divisor_crt_obstruction * hag_greatest_factor_crt_obstruction)) -&gt; ~(exists hgcrt_mod_left_obstruction_compatibility hgcrt_mod_right_obstruction_compatibility. a + g * hgcrt_mod_left_obstruction_compatibility = b + g * hgcrt_mod_right_obstruction_compatibility) -&gt; ~(exists x. (((exists hgcrt_mod_left_obstruction_solution_left hgcrt_mod_right_obstruction_solution_left. x + m * hgcrt_mod_left_obstruction_solution_left = a + m * hgcrt_mod_right_obstruction_solution_left) /\ (exists hgcrt_mod_left_obstruction_solution_right hgcrt_mod_right_obstruction_solution_right. x + n * hgcrt_mod_left_obstruction_solution_right = b + n * hgcrt_mod_right_obstruction_solution_right))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-crt_incompatibility_obstructs_solution">Copy proof</button>
        <pre id="proof-crt_incompatibility_obstructs_solution"><code>pa prove forall g m n a b. ((((exists hag_left_factor_crt_obstruction. m = g * hag_left_factor_crt_obstruction) /\ (exists hag_right_factor_crt_obstruction. n = g * hag_right_factor_crt_obstruction)) /\ forall hag_divisor_crt_obstruction. (exists hag_common_left_crt_obstruction. m = hag_divisor_crt_obstruction * hag_common_left_crt_obstruction) -&gt; (exists hag_common_right_crt_obstruction. n = hag_divisor_crt_obstruction * hag_common_right_crt_obstruction) -&gt; exists hag_greatest_factor_crt_obstruction. g = hag_divisor_crt_obstruction * hag_greatest_factor_crt_obstruction)) -&gt; ~(exists hgcrt_mod_left_obstruction_compatibility hgcrt_mod_right_obstruction_compatibility. a + g * hgcrt_mod_left_obstruction_compatibility = b + g * hgcrt_mod_right_obstruction_compatibility) -&gt; ~(exists x. (((exists hgcrt_mod_left_obstruction_solution_left hgcrt_mod_right_obstruction_solution_left. x + m * hgcrt_mod_left_obstruction_solution_left = a + m * hgcrt_mod_right_obstruction_solution_left) /\ (exists hgcrt_mod_left_obstruction_solution_right hgcrt_mod_right_obstruction_solution_right. x + n * hgcrt_mod_left_obstruction_solution_right = b + n * hgcrt_mod_right_obstruction_solution_right))))
use crt_common_solution_implies_gcd_compatible
intro g
intro m
intro n
intro a
intro b
intro hg
intro hnot
intro hsolution
cases hsolution
apply hnot
specialize crt_common_solution_implies_gcd_compatible g
specialize crt_common_solution_implies_gcd_compatible m
specialize crt_common_solution_implies_gcd_compatible n
specialize crt_common_solution_implies_gcd_compatible a
specialize crt_common_solution_implies_gcd_compatible b
specialize crt_common_solution_implies_gcd_compatible x
apply crt_common_solution_implies_gcd_compatible
exact hg
exact hsolution_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>560</dd></div>
        <div><dt>Distinct objects</dt><dd>430</dd></div>
        <div><dt>Reused references</dt><dd>22</dd></div>
        <div><dt>Depth</dt><dd>35</dd></div>
        <div><dt>Cuts</dt><dd>15</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3e304725fcdf8d45ab5309add0c8013a3e8f276f7ceef0da13d60d1e78d0eca4">3e304725fcdf…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for crt_incompatibility_obstructs_solution">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib crt_incompatibility_obstructs_solution</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_congruence_candidate.py#L481">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/crt_incompatibility_obstructs_solution.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-is_gcd_quotients_coprime_nonzero"
  data-name="is_gcd_quotients_coprime_nonzero" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="is_gcd_greatest,mul_assoc,mul_one,mul_left_cancel_nonzero,divisor_one"
  data-search="is_gcd_quotients_coprime_nonzero is gcd quotients coprime nonzero nonzero gcd cofactors are coprime by the greatest-divisor property. forall g m n m n. ((((exists hag_left_factor_quotient_assumption. m = g * hag_left_factor_quotient_assumption) /\ (exists hag_right_factor_quotient_assumption. n = g * hag_right_factor_quotient_assumption)) /\ forall hag_divisor_quotient_assumption. (exists hag_common_left_quotient_assumption. m = hag_divisor_quotient_assumption * hag_common_left_quotient_assumption) -&gt; (exists hag_common_right_quotient_assumption. n = hag_divisor_quotient_assumption * hag_common_right_quotient_assumption) -&gt; exists hag_greatest_factor_quotient_assumption. g = hag_divisor_quotient_assumption * hag_greatest_factor_quotient_assumption)) -&gt; ~(g = 0) -&gt; m = g * m -&gt; n = g * n -&gt; (forall hmi_divisor_quotient_result. (exists hmi_left_factor_quotient_result. m = hmi_divisor_quotient_result * hmi_left_factor_quotient_result) -&gt; (exists hmi_right_factor_quotient_result. n = hmi_divisor_quotient_result * hmi_right_factor_quotient_result) -&gt; hmi_divisor_quotient_result = 1) congruence is_gcd_greatest mul_assoc mul_one mul_left_cancel_nonzero divisor_one">
  <details>
    <summary>
      <span class="pa-card-title"><code>is_gcd_quotients_coprime_nonzero</code><span>Is gcd quotients coprime nonzero</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Nonzero gcd cofactors are coprime by the greatest-divisor property.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_greatest" href="#theorem-is_gcd_greatest"><code>is_gcd_greatest</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_assoc" href="#theorem-mul_assoc"><code>mul_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_one" href="#theorem-mul_one"><code>mul_one</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_left_cancel_nonzero" href="#theorem-mul_left_cancel_nonzero"><code>mul_left_cancel_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="divisor_one" href="#theorem-divisor_one"><code>divisor_one</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_nonzero" href="#theorem-generalized_binary_crt_sufficient_nonzero"><code>generalized_binary_crt_sufficient_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-is_gcd_quotients_coprime_nonzero">Copy statement</button>
        <pre id="statement-is_gcd_quotients_coprime_nonzero"><code>forall g m n M N. ((((exists hag_left_factor_quotient_assumption. m = g * hag_left_factor_quotient_assumption) /\ (exists hag_right_factor_quotient_assumption. n = g * hag_right_factor_quotient_assumption)) /\ forall hag_divisor_quotient_assumption. (exists hag_common_left_quotient_assumption. m = hag_divisor_quotient_assumption * hag_common_left_quotient_assumption) -&gt; (exists hag_common_right_quotient_assumption. n = hag_divisor_quotient_assumption * hag_common_right_quotient_assumption) -&gt; exists hag_greatest_factor_quotient_assumption. g = hag_divisor_quotient_assumption * hag_greatest_factor_quotient_assumption)) -&gt; ~(g = 0) -&gt; m = g * M -&gt; n = g * N -&gt; (forall hmi_divisor_quotient_result. (exists hmi_left_factor_quotient_result. M = hmi_divisor_quotient_result * hmi_left_factor_quotient_result) -&gt; (exists hmi_right_factor_quotient_result. N = hmi_divisor_quotient_result * hmi_right_factor_quotient_result) -&gt; hmi_divisor_quotient_result = 1)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-is_gcd_quotients_coprime_nonzero">Copy proof</button>
        <pre id="proof-is_gcd_quotients_coprime_nonzero"><code>pa prove forall g m n M N. ((((exists hag_left_factor_quotient_assumption. m = g * hag_left_factor_quotient_assumption) /\ (exists hag_right_factor_quotient_assumption. n = g * hag_right_factor_quotient_assumption)) /\ forall hag_divisor_quotient_assumption. (exists hag_common_left_quotient_assumption. m = hag_divisor_quotient_assumption * hag_common_left_quotient_assumption) -&gt; (exists hag_common_right_quotient_assumption. n = hag_divisor_quotient_assumption * hag_common_right_quotient_assumption) -&gt; exists hag_greatest_factor_quotient_assumption. g = hag_divisor_quotient_assumption * hag_greatest_factor_quotient_assumption)) -&gt; ~(g = 0) -&gt; m = g * M -&gt; n = g * N -&gt; (forall hmi_divisor_quotient_result. (exists hmi_left_factor_quotient_result. M = hmi_divisor_quotient_result * hmi_left_factor_quotient_result) -&gt; (exists hmi_right_factor_quotient_result. N = hmi_divisor_quotient_result * hmi_right_factor_quotient_result) -&gt; hmi_divisor_quotient_result = 1)
use is_gcd_greatest
use mul_assoc
use mul_one
use mul_left_cancel_nonzero
use divisor_one
intro g
intro m
intro n
intro M
intro N
intro hg
intro hg0
intro hm
intro hn
intro d
intro hdM
intro hdN
cases hdM
cases hdN
have hdm : exists u. m = (g * d) * u
exists x
trans g * M
exact hm
trans g * (d * x)
congr
refl
exact hdM_witness
symm
apply mul_assoc
have hdn : exists v. n = (g * d) * v
exists x1
trans g * N
exact hn
trans g * (d * x1)
congr
refl
exact hdN_witness
symm
apply mul_assoc
have hdg : exists w. g = (g * d) * w
specialize is_gcd_greatest g
specialize is_gcd_greatest m
specialize is_gcd_greatest n
specialize is_gcd_greatest (g * d)
apply is_gcd_greatest
exact hg
exact hdm
exact hdn
cases hdg
have hnorm : g = g * (d * x2)
trans (g * d) * x2
exact hdg_witness
apply mul_assoc
have hone : 1 = d * x2
specialize mul_left_cancel_nonzero g
specialize mul_left_cancel_nonzero 1
specialize mul_left_cancel_nonzero (d * x2)
apply mul_left_cancel_nonzero
exact hg0
trans g
apply mul_one
exact hnorm
specialize divisor_one d
apply divisor_one
exists x2
exact hone
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>660</dd></div>
        <div><dt>Distinct objects</dt><dd>562</dd></div>
        <div><dt>Reused references</dt><dd>34</dd></div>
        <div><dt>Depth</dt><dd>33</dd></div>
        <div><dt>Cuts</dt><dd>19</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7c391465091030ffca049b466792726c945bee8e23e5352abca90377e28ac0f1">7c3914650910…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for is_gcd_quotients_coprime_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib is_gcd_quotients_coprime_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_sufficiency_candidate.py#L186">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/is_gcd_quotients_coprime_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_common_remainder_decomposition"
  data-name="mod_eq_common_remainder_decomposition" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="division_remainder_exists,remainder_decomposition_to_mod_eq,mod_eq_symm,mod_eq_trans,mod_eq_to_remainder_decomposition,mul_comm"
  data-search="mod_eq_common_remainder_decomposition mod eq common remainder decomposition compatible residues share one bounded remainder modulo their gcd. forall g a b. ~(g = 0) -&gt; (exists hgcrt_mod_left_common_remainder_assumption hgcrt_mod_right_common_remainder_assumption. a + g * hgcrt_mod_left_common_remainder_assumption = b + g * hgcrt_mod_right_common_remainder_assumption) -&gt; exists a b r. ((a = g * a + r /\ b = g * b + r) /\ (exists hmi_gap_common_remainder_bound. hmi_gap_common_remainder_bound + s r = g)) congruence division_remainder_exists remainder_decomposition_to_mod_eq mod_eq_symm mod_eq_trans mod_eq_to_remainder_decomposition mul_comm">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_common_remainder_decomposition</code><span>Mod eq common remainder decomposition</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Compatible residues share one bounded remainder modulo their gcd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_to_remainder_decomposition" href="#theorem-mod_eq_to_remainder_decomposition"><code>mod_eq_to_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_nonzero" href="#theorem-generalized_binary_crt_sufficient_nonzero"><code>generalized_binary_crt_sufficient_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_common_remainder_decomposition">Copy statement</button>
        <pre id="statement-mod_eq_common_remainder_decomposition"><code>forall g a b. ~(g = 0) -&gt; (exists hgcrt_mod_left_common_remainder_assumption hgcrt_mod_right_common_remainder_assumption. a + g * hgcrt_mod_left_common_remainder_assumption = b + g * hgcrt_mod_right_common_remainder_assumption) -&gt; exists A B r. ((a = g * A + r /\ b = g * B + r) /\ (exists hmi_gap_common_remainder_bound. hmi_gap_common_remainder_bound + S r = g))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_common_remainder_decomposition">Copy proof</button>
        <pre id="proof-mod_eq_common_remainder_decomposition"><code>pa prove forall g a b. ~(g = 0) -&gt; (exists hgcrt_mod_left_common_remainder_assumption hgcrt_mod_right_common_remainder_assumption. a + g * hgcrt_mod_left_common_remainder_assumption = b + g * hgcrt_mod_right_common_remainder_assumption) -&gt; exists A B r. ((a = g * A + r /\ b = g * B + r) /\ (exists hmi_gap_common_remainder_bound. hmi_gap_common_remainder_bound + S r = g))
use division_remainder_exists
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use mod_eq_trans
use mod_eq_to_remainder_decomposition
use mul_comm
intro g
intro a
intro b
intro hg0
intro hab
have hdiva : exists q r. a = g * q + r /\ exists h. h + S r = g
specialize division_remainder_exists g
specialize division_remainder_exists a
apply division_remainder_exists
exact hg0
cases hdiva
cases hdiva_witness
cases hdiva_witness_witness
have haqr : a = x * g + x1
trans g * x + x1
exact hdiva_witness_witness_left
congr
apply mul_comm
refl
have har : exists hgcrt_mod_left_common_remainder_a_r hgcrt_mod_right_common_remainder_a_r. a + g * hgcrt_mod_left_common_remainder_a_r = x1 + g * hgcrt_mod_right_common_remainder_a_r
specialize remainder_decomposition_to_mod_eq g
specialize remainder_decomposition_to_mod_eq a
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x1
apply remainder_decomposition_to_mod_eq
exact haqr
have hba : exists hgcrt_mod_left_common_remainder_b_a hgcrt_mod_right_common_remainder_b_a. b + g * hgcrt_mod_left_common_remainder_b_a = a + g * hgcrt_mod_right_common_remainder_b_a
specialize mod_eq_symm g
specialize mod_eq_symm a
specialize mod_eq_symm b
apply mod_eq_symm
exact hab
have hbr : exists hgcrt_mod_left_common_remainder_b_r hgcrt_mod_right_common_remainder_b_r. b + g * hgcrt_mod_left_common_remainder_b_r = x1 + g * hgcrt_mod_right_common_remainder_b_r
specialize mod_eq_trans g
specialize mod_eq_trans b
specialize mod_eq_trans a
specialize mod_eq_trans x1
apply mod_eq_trans
exact hba
exact har
have hqb : exists q. b = q * g + x1
specialize mod_eq_to_remainder_decomposition g
specialize mod_eq_to_remainder_decomposition b
specialize mod_eq_to_remainder_decomposition x1
apply mod_eq_to_remainder_decomposition
exact hg0
exact hdiva_witness_witness_right
exact hbr
cases hqb
exists x
exists x2
exists x1
split
split
exact hdiva_witness_witness_left
trans x2 * g + x1
exact hqb_witness
congr
apply mul_comm
refl
exact hdiva_witness_witness_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,894</dd></div>
        <div><dt>Distinct objects</dt><dd>1,075</dd></div>
        <div><dt>Reused references</dt><dd>64</dd></div>
        <div><dt>Depth</dt><dd>69</dd></div>
        <div><dt>Cuts</dt><dd>83</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="fadb875632514a5173cef91575ddc21acf797b80c30c6c892d98e3197efd4971">fadb87563251…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_common_remainder_decomposition">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_common_remainder_decomposition</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_sufficiency_candidate.py#L349">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_common_remainder_decomposition.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-crt_scaled_common_remainder_lift"
  data-name="crt_scaled_common_remainder_lift" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="binary_crt,mod_eq_scale,mod_eq_refl,mod_eq_add"
  data-search="crt_scaled_common_remainder_lift crt scaled common remainder lift a coprime cofactor crt solution scales and lifts through a common remainder. forall g m n a b m n a b r. m = g * m -&gt; n = g * n -&gt; a = g * a + r -&gt; b = g * b + r -&gt; ~(m = 0) -&gt; ~(n = 0) -&gt; (forall hmi_divisor_lift_assumption. (exists hmi_left_factor_lift_assumption. m = hmi_divisor_lift_assumption * hmi_left_factor_lift_assumption) -&gt; (exists hmi_right_factor_lift_assumption. n = hmi_divisor_lift_assumption * hmi_right_factor_lift_assumption) -&gt; hmi_divisor_lift_assumption = 1) -&gt; exists x. (((exists hgcrt_mod_left_lift_result_left hgcrt_mod_right_lift_result_left. x + m * hgcrt_mod_left_lift_result_left = a + m * hgcrt_mod_right_lift_result_left) /\ (exists hgcrt_mod_left_lift_result_right hgcrt_mod_right_lift_result_right. x + n * hgcrt_mod_left_lift_result_right = b + n * hgcrt_mod_right_lift_result_right))) congruence binary_crt mod_eq_scale mod_eq_refl mod_eq_add">
  <details>
    <summary>
      <span class="pa-card-title"><code>crt_scaled_common_remainder_lift</code><span>Crt scaled common remainder lift</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">A coprime cofactor CRT solution scales and lifts through a common remainder.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="binary_crt" href="#theorem-binary_crt"><code>binary_crt</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_scale" href="#theorem-mod_eq_scale"><code>mod_eq_scale</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_add" href="#theorem-mod_eq_add"><code>mod_eq_add</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_nonzero" href="#theorem-generalized_binary_crt_sufficient_nonzero"><code>generalized_binary_crt_sufficient_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-crt_scaled_common_remainder_lift">Copy statement</button>
        <pre id="statement-crt_scaled_common_remainder_lift"><code>forall g m n a b M N A B r. m = g * M -&gt; n = g * N -&gt; a = g * A + r -&gt; b = g * B + r -&gt; ~(M = 0) -&gt; ~(N = 0) -&gt; (forall hmi_divisor_lift_assumption. (exists hmi_left_factor_lift_assumption. M = hmi_divisor_lift_assumption * hmi_left_factor_lift_assumption) -&gt; (exists hmi_right_factor_lift_assumption. N = hmi_divisor_lift_assumption * hmi_right_factor_lift_assumption) -&gt; hmi_divisor_lift_assumption = 1) -&gt; exists x. (((exists hgcrt_mod_left_lift_result_left hgcrt_mod_right_lift_result_left. x + m * hgcrt_mod_left_lift_result_left = a + m * hgcrt_mod_right_lift_result_left) /\ (exists hgcrt_mod_left_lift_result_right hgcrt_mod_right_lift_result_right. x + n * hgcrt_mod_left_lift_result_right = b + n * hgcrt_mod_right_lift_result_right)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-crt_scaled_common_remainder_lift">Copy proof</button>
        <pre id="proof-crt_scaled_common_remainder_lift"><code>pa prove forall g m n a b M N A B r. m = g * M -&gt; n = g * N -&gt; a = g * A + r -&gt; b = g * B + r -&gt; ~(M = 0) -&gt; ~(N = 0) -&gt; (forall hmi_divisor_lift_assumption. (exists hmi_left_factor_lift_assumption. M = hmi_divisor_lift_assumption * hmi_left_factor_lift_assumption) -&gt; (exists hmi_right_factor_lift_assumption. N = hmi_divisor_lift_assumption * hmi_right_factor_lift_assumption) -&gt; hmi_divisor_lift_assumption = 1) -&gt; exists x. (((exists hgcrt_mod_left_lift_result_left hgcrt_mod_right_lift_result_left. x + m * hgcrt_mod_left_lift_result_left = a + m * hgcrt_mod_right_lift_result_left) /\ (exists hgcrt_mod_left_lift_result_right hgcrt_mod_right_lift_result_right. x + n * hgcrt_mod_left_lift_result_right = b + n * hgcrt_mod_right_lift_result_right)))
use binary_crt
use mod_eq_scale
use mod_eq_refl
use mod_eq_add
intro g
intro m
intro n
intro a
intro b
intro M
intro N
intro A
intro B
intro r
intro hm
intro hn
intro ha
intro hb
intro hM
intro hN
intro hcop
have hcrt : exists x. (((exists hgcrt_mod_left_lift_reduced_left hgcrt_mod_right_lift_reduced_left. x + M * hgcrt_mod_left_lift_reduced_left = A + M * hgcrt_mod_right_lift_reduced_left) /\ (exists hgcrt_mod_left_lift_reduced_right hgcrt_mod_right_lift_reduced_right. x + N * hgcrt_mod_left_lift_reduced_right = B + N * hgcrt_mod_right_lift_reduced_right)))
specialize binary_crt M
specialize binary_crt N
specialize binary_crt A
specialize binary_crt B
apply binary_crt
exact hM
exact hN
exact hcop
cases hcrt
cases hcrt_witness
have hls : exists hgcrt_mod_left_lift_ls hgcrt_mod_right_lift_ls. (g * x) + (g * M) * hgcrt_mod_left_lift_ls = (g * A) + (g * M) * hgcrt_mod_right_lift_ls
specialize mod_eq_scale g
specialize mod_eq_scale M
specialize mod_eq_scale x
specialize mod_eq_scale A
apply mod_eq_scale
exact hcrt_witness_left
have hrs : exists hgcrt_mod_left_lift_rs hgcrt_mod_right_lift_rs. (g * x) + (g * N) * hgcrt_mod_left_lift_rs = (g * B) + (g * N) * hgcrt_mod_right_lift_rs
specialize mod_eq_scale g
specialize mod_eq_scale N
specialize mod_eq_scale x
specialize mod_eq_scale B
apply mod_eq_scale
exact hcrt_witness_right
have hlr : exists hgcrt_mod_left_lift_lr hgcrt_mod_right_lift_lr. r + (g * M) * hgcrt_mod_left_lift_lr = r + (g * M) * hgcrt_mod_right_lift_lr
specialize mod_eq_refl (g * M)
specialize mod_eq_refl r
apply mod_eq_refl
have hrr : exists hgcrt_mod_left_lift_rr hgcrt_mod_right_lift_rr. r + (g * N) * hgcrt_mod_left_lift_rr = r + (g * N) * hgcrt_mod_right_lift_rr
specialize mod_eq_refl (g * N)
specialize mod_eq_refl r
apply mod_eq_refl
have hll : exists hgcrt_mod_left_lift_ll hgcrt_mod_right_lift_ll. (g * x + r) + (g * M) * hgcrt_mod_left_lift_ll = (g * A + r) + (g * M) * hgcrt_mod_right_lift_ll
specialize mod_eq_add (g * M)
specialize mod_eq_add (g * x)
specialize mod_eq_add (g * A)
specialize mod_eq_add r
specialize mod_eq_add r
apply mod_eq_add
exact hls
exact hlr
have hrl : exists hgcrt_mod_left_lift_rl hgcrt_mod_right_lift_rl. (g * x + r) + (g * N) * hgcrt_mod_left_lift_rl = (g * B + r) + (g * N) * hgcrt_mod_right_lift_rl
specialize mod_eq_add (g * N)
specialize mod_eq_add (g * x)
specialize mod_eq_add (g * B)
specialize mod_eq_add r
specialize mod_eq_add r
apply mod_eq_add
exact hrs
exact hrr
exists g * x + r
split
rewrite &lt;- hm at hll
rewrite &lt;- hm at hll
rewrite &lt;- ha at hll
exact hll
rewrite &lt;- hn at hrl
rewrite &lt;- hn at hrl
rewrite &lt;- hb at hrl
exact hrl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>5,745</dd></div>
        <div><dt>Distinct objects</dt><dd>2,062</dd></div>
        <div><dt>Reused references</dt><dd>113</dd></div>
        <div><dt>Depth</dt><dd>52</dd></div>
        <div><dt>Cuts</dt><dd>163</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="983f84cbd94af0f30539be1e6fce1fec7e9b125479cc63395a8ea10d4cc45892">983f84cbd94a…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for crt_scaled_common_remainder_lift">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib crt_scaled_common_remainder_lift</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_sufficiency_candidate.py#L428">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/crt_scaled_common_remainder_lift.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_sufficient_nonzero"
  data-name="generalized_binary_crt_sufficient_nonzero" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="is_gcd_dvd_left,is_gcd_dvd_right,mul_zero_left,is_gcd_quotients_coprime_nonzero,mod_eq_common_remainder_decomposition,crt_scaled_common_remainder_lift"
  data-search="generalized_binary_crt_sufficient_nonzero generalized binary crt sufficient nonzero gcd compatibility is sufficient for a common solution when both moduli are nonzero. forall g m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; ((((exists hag_left_factor_sufficient_assumption. m = g * hag_left_factor_sufficient_assumption) /\ (exists hag_right_factor_sufficient_assumption. n = g * hag_right_factor_sufficient_assumption)) /\ forall hag_divisor_sufficient_assumption. (exists hag_common_left_sufficient_assumption. m = hag_divisor_sufficient_assumption * hag_common_left_sufficient_assumption) -&gt; (exists hag_common_right_sufficient_assumption. n = hag_divisor_sufficient_assumption * hag_common_right_sufficient_assumption) -&gt; exists hag_greatest_factor_sufficient_assumption. g = hag_divisor_sufficient_assumption * hag_greatest_factor_sufficient_assumption)) -&gt; (exists hgcrt_mod_left_sufficient_compatibility hgcrt_mod_right_sufficient_compatibility. a + g * hgcrt_mod_left_sufficient_compatibility = b + g * hgcrt_mod_right_sufficient_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_sufficient_result_left hgcrt_mod_right_sufficient_result_left. x + m * hgcrt_mod_left_sufficient_result_left = a + m * hgcrt_mod_right_sufficient_result_left) /\ (exists hgcrt_mod_left_sufficient_result_right hgcrt_mod_right_sufficient_result_right. x + n * hgcrt_mod_left_sufficient_result_right = b + n * hgcrt_mod_right_sufficient_result_right))) congruence is_gcd_dvd_left is_gcd_dvd_right mul_zero_left is_gcd_quotients_coprime_nonzero mod_eq_common_remainder_decomposition crt_scaled_common_remainder_lift">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_sufficient_nonzero</code><span>Generalized binary crt sufficient nonzero</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Gcd compatibility is sufficient for a common solution when both moduli are nonzero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_dvd_left" href="#theorem-is_gcd_dvd_left"><code>is_gcd_dvd_left</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_dvd_right" href="#theorem-is_gcd_dvd_right"><code>is_gcd_dvd_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_zero_left" href="#theorem-mul_zero_left"><code>mul_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_quotients_coprime_nonzero" href="#theorem-is_gcd_quotients_coprime_nonzero"><code>is_gcd_quotients_coprime_nonzero</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_common_remainder_decomposition" href="#theorem-mod_eq_common_remainder_decomposition"><code>mod_eq_common_remainder_decomposition</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_scaled_common_remainder_lift" href="#theorem-crt_scaled_common_remainder_lift"><code>crt_scaled_common_remainder_lift</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient" href="#theorem-generalized_binary_crt_sufficient"><code>generalized_binary_crt_sufficient</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_sufficient_nonzero">Copy statement</button>
        <pre id="statement-generalized_binary_crt_sufficient_nonzero"><code>forall g m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; ((((exists hag_left_factor_sufficient_assumption. m = g * hag_left_factor_sufficient_assumption) /\ (exists hag_right_factor_sufficient_assumption. n = g * hag_right_factor_sufficient_assumption)) /\ forall hag_divisor_sufficient_assumption. (exists hag_common_left_sufficient_assumption. m = hag_divisor_sufficient_assumption * hag_common_left_sufficient_assumption) -&gt; (exists hag_common_right_sufficient_assumption. n = hag_divisor_sufficient_assumption * hag_common_right_sufficient_assumption) -&gt; exists hag_greatest_factor_sufficient_assumption. g = hag_divisor_sufficient_assumption * hag_greatest_factor_sufficient_assumption)) -&gt; (exists hgcrt_mod_left_sufficient_compatibility hgcrt_mod_right_sufficient_compatibility. a + g * hgcrt_mod_left_sufficient_compatibility = b + g * hgcrt_mod_right_sufficient_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_sufficient_result_left hgcrt_mod_right_sufficient_result_left. x + m * hgcrt_mod_left_sufficient_result_left = a + m * hgcrt_mod_right_sufficient_result_left) /\ (exists hgcrt_mod_left_sufficient_result_right hgcrt_mod_right_sufficient_result_right. x + n * hgcrt_mod_left_sufficient_result_right = b + n * hgcrt_mod_right_sufficient_result_right)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_sufficient_nonzero">Copy proof</button>
        <pre id="proof-generalized_binary_crt_sufficient_nonzero"><code>pa prove forall g m n a b. ~(m = 0) -&gt; ~(n = 0) -&gt; ((((exists hag_left_factor_sufficient_assumption. m = g * hag_left_factor_sufficient_assumption) /\ (exists hag_right_factor_sufficient_assumption. n = g * hag_right_factor_sufficient_assumption)) /\ forall hag_divisor_sufficient_assumption. (exists hag_common_left_sufficient_assumption. m = hag_divisor_sufficient_assumption * hag_common_left_sufficient_assumption) -&gt; (exists hag_common_right_sufficient_assumption. n = hag_divisor_sufficient_assumption * hag_common_right_sufficient_assumption) -&gt; exists hag_greatest_factor_sufficient_assumption. g = hag_divisor_sufficient_assumption * hag_greatest_factor_sufficient_assumption)) -&gt; (exists hgcrt_mod_left_sufficient_compatibility hgcrt_mod_right_sufficient_compatibility. a + g * hgcrt_mod_left_sufficient_compatibility = b + g * hgcrt_mod_right_sufficient_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_sufficient_result_left hgcrt_mod_right_sufficient_result_left. x + m * hgcrt_mod_left_sufficient_result_left = a + m * hgcrt_mod_right_sufficient_result_left) /\ (exists hgcrt_mod_left_sufficient_result_right hgcrt_mod_right_sufficient_result_right. x + n * hgcrt_mod_left_sufficient_result_right = b + n * hgcrt_mod_right_sufficient_result_right)))
use is_gcd_dvd_left
use is_gcd_dvd_right
use mul_zero_left
use is_gcd_quotients_coprime_nonzero
use mod_eq_common_remainder_decomposition
use crt_scaled_common_remainder_lift
intro g
intro m
intro n
intro a
intro b
intro hm0
intro hn0
intro hgcd
intro hcompat
have hmfactor : exists M. m = g * M
specialize is_gcd_dvd_left g
specialize is_gcd_dvd_left m
specialize is_gcd_dvd_left n
apply is_gcd_dvd_left
exact hgcd
have hnfactor : exists N. n = g * N
specialize is_gcd_dvd_right g
specialize is_gcd_dvd_right m
specialize is_gcd_dvd_right n
apply is_gcd_dvd_right
exact hgcd
cases hmfactor
cases hnfactor
have hg0 : ~(g = 0)
intro hgz
apply hm0
trans g * x
exact hmfactor_witness
rewrite hgz
apply mul_zero_left
have hM0 : ~(x = 0)
intro hx0
apply hm0
trans g * x
exact hmfactor_witness
rewrite hx0
apply PA5
have hN0 : ~(x1 = 0)
intro hx10
apply hn0
trans g * x1
exact hnfactor_witness
rewrite hx10
apply PA5
have hcop : forall hmi_divisor_main_cofactors. (exists hmi_left_factor_main_cofactors. x = hmi_divisor_main_cofactors * hmi_left_factor_main_cofactors) -&gt; (exists hmi_right_factor_main_cofactors. x1 = hmi_divisor_main_cofactors * hmi_right_factor_main_cofactors) -&gt; hmi_divisor_main_cofactors = 1
specialize is_gcd_quotients_coprime_nonzero g
specialize is_gcd_quotients_coprime_nonzero m
specialize is_gcd_quotients_coprime_nonzero n
specialize is_gcd_quotients_coprime_nonzero x
specialize is_gcd_quotients_coprime_nonzero x1
apply is_gcd_quotients_coprime_nonzero
exact hgcd
exact hg0
exact hmfactor_witness
exact hnfactor_witness
have hrem : exists A B r. ((a = g * A + r /\ b = g * B + r) /\ exists h. h + S r = g)
specialize mod_eq_common_remainder_decomposition g
specialize mod_eq_common_remainder_decomposition a
specialize mod_eq_common_remainder_decomposition b
apply mod_eq_common_remainder_decomposition
exact hg0
exact hcompat
cases hrem
cases hrem_witness
cases hrem_witness_witness
cases hrem_witness_witness_witness
cases hrem_witness_witness_witness_left
specialize crt_scaled_common_remainder_lift g
specialize crt_scaled_common_remainder_lift m
specialize crt_scaled_common_remainder_lift n
specialize crt_scaled_common_remainder_lift a
specialize crt_scaled_common_remainder_lift b
specialize crt_scaled_common_remainder_lift x
specialize crt_scaled_common_remainder_lift x1
specialize crt_scaled_common_remainder_lift x2
specialize crt_scaled_common_remainder_lift x3
specialize crt_scaled_common_remainder_lift x4
apply crt_scaled_common_remainder_lift
exact hmfactor_witness
exact hnfactor_witness
exact hrem_witness_witness_witness_left_left
exact hrem_witness_witness_witness_left_right
exact hM0
exact hN0
exact hcop
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>9,482</dd></div>
        <div><dt>Distinct objects</dt><dd>3,147</dd></div>
        <div><dt>Reused references</dt><dd>156</dd></div>
        <div><dt>Depth</dt><dd>74</dd></div>
        <div><dt>Cuts</dt><dd>271</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="632ca3c589541e739146c89dd36db1a6a8ec4bd19463c8afb7fe01405f342ebf">632ca3c58954…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_sufficient_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_sufficient_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_sufficiency_candidate.py#L516">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_sufficient_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_sufficient_zero_left"
  data-name="generalized_binary_crt_sufficient_zero_left" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="is_gcd_symm,is_gcd_zero_right,is_gcd_unique,mod_eq_refl"
  data-search="generalized_binary_crt_sufficient_zero_left generalized binary crt sufficient zero left if the left modulus is zero, gcd compatibility constructs a solution by choosing the left residue. forall g n a b. ((((exists hage_left_factor_zero_left_gcd. 0 = g * hage_left_factor_zero_left_gcd) /\ (exists hage_right_factor_zero_left_gcd. n = g * hage_right_factor_zero_left_gcd)) /\ forall hage_divisor_zero_left_gcd. (exists hage_common_left_zero_left_gcd. 0 = hage_divisor_zero_left_gcd * hage_common_left_zero_left_gcd) -&gt; (exists hage_common_right_zero_left_gcd. n = hage_divisor_zero_left_gcd * hage_common_right_zero_left_gcd) -&gt; exists hage_greatest_factor_zero_left_gcd. g = hage_divisor_zero_left_gcd * hage_greatest_factor_zero_left_gcd)) -&gt; (exists hgcrt_mod_left_zero_left_compatibility hgcrt_mod_right_zero_left_compatibility. a + g * hgcrt_mod_left_zero_left_compatibility = b + g * hgcrt_mod_right_zero_left_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_zero_left_solution_left hgcrt_mod_right_zero_left_solution_left. x + 0 * hgcrt_mod_left_zero_left_solution_left = a + 0 * hgcrt_mod_right_zero_left_solution_left) /\ (exists hgcrt_mod_left_zero_left_solution_right hgcrt_mod_right_zero_left_solution_right. x + n * hgcrt_mod_left_zero_left_solution_right = b + n * hgcrt_mod_right_zero_left_solution_right))) congruence is_gcd_symm is_gcd_zero_right is_gcd_unique mod_eq_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_sufficient_zero_left</code><span>Generalized binary crt sufficient zero left</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">If the left modulus is zero, gcd compatibility constructs a solution by choosing the left residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_symm" href="#theorem-is_gcd_symm"><code>is_gcd_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_zero_right" href="#theorem-is_gcd_zero_right"><code>is_gcd_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_unique" href="#theorem-is_gcd_unique"><code>is_gcd_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient" href="#theorem-generalized_binary_crt_sufficient"><code>generalized_binary_crt_sufficient</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_sufficient_zero_left">Copy statement</button>
        <pre id="statement-generalized_binary_crt_sufficient_zero_left"><code>forall g n a b. ((((exists hage_left_factor_zero_left_gcd. 0 = g * hage_left_factor_zero_left_gcd) /\ (exists hage_right_factor_zero_left_gcd. n = g * hage_right_factor_zero_left_gcd)) /\ forall hage_divisor_zero_left_gcd. (exists hage_common_left_zero_left_gcd. 0 = hage_divisor_zero_left_gcd * hage_common_left_zero_left_gcd) -&gt; (exists hage_common_right_zero_left_gcd. n = hage_divisor_zero_left_gcd * hage_common_right_zero_left_gcd) -&gt; exists hage_greatest_factor_zero_left_gcd. g = hage_divisor_zero_left_gcd * hage_greatest_factor_zero_left_gcd)) -&gt; (exists hgcrt_mod_left_zero_left_compatibility hgcrt_mod_right_zero_left_compatibility. a + g * hgcrt_mod_left_zero_left_compatibility = b + g * hgcrt_mod_right_zero_left_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_zero_left_solution_left hgcrt_mod_right_zero_left_solution_left. x + 0 * hgcrt_mod_left_zero_left_solution_left = a + 0 * hgcrt_mod_right_zero_left_solution_left) /\ (exists hgcrt_mod_left_zero_left_solution_right hgcrt_mod_right_zero_left_solution_right. x + n * hgcrt_mod_left_zero_left_solution_right = b + n * hgcrt_mod_right_zero_left_solution_right)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_sufficient_zero_left">Copy proof</button>
        <pre id="proof-generalized_binary_crt_sufficient_zero_left"><code>pa prove forall g n a b. ((((exists hage_left_factor_zero_left_gcd. 0 = g * hage_left_factor_zero_left_gcd) /\ (exists hage_right_factor_zero_left_gcd. n = g * hage_right_factor_zero_left_gcd)) /\ forall hage_divisor_zero_left_gcd. (exists hage_common_left_zero_left_gcd. 0 = hage_divisor_zero_left_gcd * hage_common_left_zero_left_gcd) -&gt; (exists hage_common_right_zero_left_gcd. n = hage_divisor_zero_left_gcd * hage_common_right_zero_left_gcd) -&gt; exists hage_greatest_factor_zero_left_gcd. g = hage_divisor_zero_left_gcd * hage_greatest_factor_zero_left_gcd)) -&gt; (exists hgcrt_mod_left_zero_left_compatibility hgcrt_mod_right_zero_left_compatibility. a + g * hgcrt_mod_left_zero_left_compatibility = b + g * hgcrt_mod_right_zero_left_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_zero_left_solution_left hgcrt_mod_right_zero_left_solution_left. x + 0 * hgcrt_mod_left_zero_left_solution_left = a + 0 * hgcrt_mod_right_zero_left_solution_left) /\ (exists hgcrt_mod_left_zero_left_solution_right hgcrt_mod_right_zero_left_solution_right. x + n * hgcrt_mod_left_zero_left_solution_right = b + n * hgcrt_mod_right_zero_left_solution_right)))
use is_gcd_symm
use is_gcd_zero_right
use is_gcd_unique
use mod_eq_refl
intro g
intro n
intro a
intro b
intro hg
intro hab
have hsym : (((exists hage_left_factor_zero_left_gcd_swapped. n = g * hage_left_factor_zero_left_gcd_swapped) /\ (exists hage_right_factor_zero_left_gcd_swapped. 0 = g * hage_right_factor_zero_left_gcd_swapped)) /\ forall hage_divisor_zero_left_gcd_swapped. (exists hage_common_left_zero_left_gcd_swapped. n = hage_divisor_zero_left_gcd_swapped * hage_common_left_zero_left_gcd_swapped) -&gt; (exists hage_common_right_zero_left_gcd_swapped. 0 = hage_divisor_zero_left_gcd_swapped * hage_common_right_zero_left_gcd_swapped) -&gt; exists hage_greatest_factor_zero_left_gcd_swapped. g = hage_divisor_zero_left_gcd_swapped * hage_greatest_factor_zero_left_gcd_swapped)
specialize is_gcd_symm g
specialize is_gcd_symm 0
specialize is_gcd_symm n
apply is_gcd_symm
exact hg
have hn : (((exists hage_left_factor_zero_left_gcd_base. n = n * hage_left_factor_zero_left_gcd_base) /\ (exists hage_right_factor_zero_left_gcd_base. 0 = n * hage_right_factor_zero_left_gcd_base)) /\ forall hage_divisor_zero_left_gcd_base. (exists hage_common_left_zero_left_gcd_base. n = hage_divisor_zero_left_gcd_base * hage_common_left_zero_left_gcd_base) -&gt; (exists hage_common_right_zero_left_gcd_base. 0 = hage_divisor_zero_left_gcd_base * hage_common_right_zero_left_gcd_base) -&gt; exists hage_greatest_factor_zero_left_gcd_base. n = hage_divisor_zero_left_gcd_base * hage_greatest_factor_zero_left_gcd_base)
specialize is_gcd_zero_right n
exact is_gcd_zero_right
have hgn : g = n
specialize is_gcd_unique g
specialize is_gcd_unique n
specialize is_gcd_unique n
specialize is_gcd_unique 0
apply is_gcd_unique
exact hsym
exact hn
rewrite hgn at hab
rewrite hgn at hab
exists a
split
specialize mod_eq_refl 0
specialize mod_eq_refl a
exact mod_eq_refl
exact hab
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>834</dd></div>
        <div><dt>Distinct objects</dt><dd>682</dd></div>
        <div><dt>Reused references</dt><dd>36</dd></div>
        <div><dt>Depth</dt><dd>37</dd></div>
        <div><dt>Cuts</dt><dd>28</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="a45dc68d23812e579027385bfb0221594cc803fca07599352ee801d644f9f170">a45dc68d2381…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_sufficient_zero_left">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_sufficient_zero_left</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_zero_boundary_candidate.py#L124">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_sufficient_zero_left.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_sufficient_zero_right"
  data-name="generalized_binary_crt_sufficient_zero_right" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="is_gcd_zero_right,is_gcd_unique,mod_eq_symm,mod_eq_refl"
  data-search="generalized_binary_crt_sufficient_zero_right generalized binary crt sufficient zero right if the right modulus is zero, gcd compatibility constructs a solution by choosing the right residue. forall g m a b. ((((exists hage_left_factor_zero_right_gcd. m = g * hage_left_factor_zero_right_gcd) /\ (exists hage_right_factor_zero_right_gcd. 0 = g * hage_right_factor_zero_right_gcd)) /\ forall hage_divisor_zero_right_gcd. (exists hage_common_left_zero_right_gcd. m = hage_divisor_zero_right_gcd * hage_common_left_zero_right_gcd) -&gt; (exists hage_common_right_zero_right_gcd. 0 = hage_divisor_zero_right_gcd * hage_common_right_zero_right_gcd) -&gt; exists hage_greatest_factor_zero_right_gcd. g = hage_divisor_zero_right_gcd * hage_greatest_factor_zero_right_gcd)) -&gt; (exists hgcrt_mod_left_zero_right_compatibility hgcrt_mod_right_zero_right_compatibility. a + g * hgcrt_mod_left_zero_right_compatibility = b + g * hgcrt_mod_right_zero_right_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_zero_right_solution_left hgcrt_mod_right_zero_right_solution_left. x + m * hgcrt_mod_left_zero_right_solution_left = a + m * hgcrt_mod_right_zero_right_solution_left) /\ (exists hgcrt_mod_left_zero_right_solution_right hgcrt_mod_right_zero_right_solution_right. x + 0 * hgcrt_mod_left_zero_right_solution_right = b + 0 * hgcrt_mod_right_zero_right_solution_right))) congruence is_gcd_zero_right is_gcd_unique mod_eq_symm mod_eq_refl">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_sufficient_zero_right</code><span>Generalized binary crt sufficient zero right</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">If the right modulus is zero, gcd compatibility constructs a solution by choosing the right residue.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_gcd_zero_right" href="#theorem-is_gcd_zero_right"><code>is_gcd_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="is_gcd_unique" href="#theorem-is_gcd_unique"><code>is_gcd_unique</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_refl" href="#theorem-mod_eq_refl"><code>mod_eq_refl</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient" href="#theorem-generalized_binary_crt_sufficient"><code>generalized_binary_crt_sufficient</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_sufficient_zero_right">Copy statement</button>
        <pre id="statement-generalized_binary_crt_sufficient_zero_right"><code>forall g m a b. ((((exists hage_left_factor_zero_right_gcd. m = g * hage_left_factor_zero_right_gcd) /\ (exists hage_right_factor_zero_right_gcd. 0 = g * hage_right_factor_zero_right_gcd)) /\ forall hage_divisor_zero_right_gcd. (exists hage_common_left_zero_right_gcd. m = hage_divisor_zero_right_gcd * hage_common_left_zero_right_gcd) -&gt; (exists hage_common_right_zero_right_gcd. 0 = hage_divisor_zero_right_gcd * hage_common_right_zero_right_gcd) -&gt; exists hage_greatest_factor_zero_right_gcd. g = hage_divisor_zero_right_gcd * hage_greatest_factor_zero_right_gcd)) -&gt; (exists hgcrt_mod_left_zero_right_compatibility hgcrt_mod_right_zero_right_compatibility. a + g * hgcrt_mod_left_zero_right_compatibility = b + g * hgcrt_mod_right_zero_right_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_zero_right_solution_left hgcrt_mod_right_zero_right_solution_left. x + m * hgcrt_mod_left_zero_right_solution_left = a + m * hgcrt_mod_right_zero_right_solution_left) /\ (exists hgcrt_mod_left_zero_right_solution_right hgcrt_mod_right_zero_right_solution_right. x + 0 * hgcrt_mod_left_zero_right_solution_right = b + 0 * hgcrt_mod_right_zero_right_solution_right)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_sufficient_zero_right">Copy proof</button>
        <pre id="proof-generalized_binary_crt_sufficient_zero_right"><code>pa prove forall g m a b. ((((exists hage_left_factor_zero_right_gcd. m = g * hage_left_factor_zero_right_gcd) /\ (exists hage_right_factor_zero_right_gcd. 0 = g * hage_right_factor_zero_right_gcd)) /\ forall hage_divisor_zero_right_gcd. (exists hage_common_left_zero_right_gcd. m = hage_divisor_zero_right_gcd * hage_common_left_zero_right_gcd) -&gt; (exists hage_common_right_zero_right_gcd. 0 = hage_divisor_zero_right_gcd * hage_common_right_zero_right_gcd) -&gt; exists hage_greatest_factor_zero_right_gcd. g = hage_divisor_zero_right_gcd * hage_greatest_factor_zero_right_gcd)) -&gt; (exists hgcrt_mod_left_zero_right_compatibility hgcrt_mod_right_zero_right_compatibility. a + g * hgcrt_mod_left_zero_right_compatibility = b + g * hgcrt_mod_right_zero_right_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_zero_right_solution_left hgcrt_mod_right_zero_right_solution_left. x + m * hgcrt_mod_left_zero_right_solution_left = a + m * hgcrt_mod_right_zero_right_solution_left) /\ (exists hgcrt_mod_left_zero_right_solution_right hgcrt_mod_right_zero_right_solution_right. x + 0 * hgcrt_mod_left_zero_right_solution_right = b + 0 * hgcrt_mod_right_zero_right_solution_right)))
use is_gcd_zero_right
use is_gcd_unique
use mod_eq_symm
use mod_eq_refl
intro g
intro m
intro a
intro b
intro hg
intro hab
have hm : (((exists hage_left_factor_zero_right_gcd_base. m = m * hage_left_factor_zero_right_gcd_base) /\ (exists hage_right_factor_zero_right_gcd_base. 0 = m * hage_right_factor_zero_right_gcd_base)) /\ forall hage_divisor_zero_right_gcd_base. (exists hage_common_left_zero_right_gcd_base. m = hage_divisor_zero_right_gcd_base * hage_common_left_zero_right_gcd_base) -&gt; (exists hage_common_right_zero_right_gcd_base. 0 = hage_divisor_zero_right_gcd_base * hage_common_right_zero_right_gcd_base) -&gt; exists hage_greatest_factor_zero_right_gcd_base. m = hage_divisor_zero_right_gcd_base * hage_greatest_factor_zero_right_gcd_base)
specialize is_gcd_zero_right m
exact is_gcd_zero_right
have hgm : g = m
specialize is_gcd_unique g
specialize is_gcd_unique m
specialize is_gcd_unique m
specialize is_gcd_unique 0
apply is_gcd_unique
exact hg
exact hm
rewrite hgm at hab
rewrite hgm at hab
exists b
split
specialize mod_eq_symm m
specialize mod_eq_symm a
specialize mod_eq_symm b
apply mod_eq_symm
exact hab
specialize mod_eq_refl 0
specialize mod_eq_refl b
exact mod_eq_refl
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>805</dd></div>
        <div><dt>Distinct objects</dt><dd>653</dd></div>
        <div><dt>Reused references</dt><dd>36</dd></div>
        <div><dt>Depth</dt><dd>36</dd></div>
        <div><dt>Cuts</dt><dd>28</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="015740ead6873b98f1123b2c2013e943f15d3882775f6456b02ecb14955d324c">015740ead687…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_sufficient_zero_right">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_sufficient_zero_right</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_zero_boundary_candidate.py#L169">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_sufficient_zero_right.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_sufficient"
  data-name="generalized_binary_crt_sufficient" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="eq_decidable,generalized_binary_crt_sufficient_zero_left,generalized_binary_crt_sufficient_zero_right,generalized_binary_crt_sufficient_nonzero"
  data-search="generalized_binary_crt_sufficient generalized binary crt sufficient gcd compatibility constructs a common solution for arbitrary natural moduli, including zero. forall g m n a b. ((((exists hag_left_factor_total_sufficiency_gcd. m = g * hag_left_factor_total_sufficiency_gcd) /\ (exists hag_right_factor_total_sufficiency_gcd. n = g * hag_right_factor_total_sufficiency_gcd)) /\ forall hag_divisor_total_sufficiency_gcd. (exists hag_common_left_total_sufficiency_gcd. m = hag_divisor_total_sufficiency_gcd * hag_common_left_total_sufficiency_gcd) -&gt; (exists hag_common_right_total_sufficiency_gcd. n = hag_divisor_total_sufficiency_gcd * hag_common_right_total_sufficiency_gcd) -&gt; exists hag_greatest_factor_total_sufficiency_gcd. g = hag_divisor_total_sufficiency_gcd * hag_greatest_factor_total_sufficiency_gcd)) -&gt; (exists hgcrt_mod_left_total_sufficiency_compatibility hgcrt_mod_right_total_sufficiency_compatibility. a + g * hgcrt_mod_left_total_sufficiency_compatibility = b + g * hgcrt_mod_right_total_sufficiency_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_total_sufficiency_solution_left hgcrt_mod_right_total_sufficiency_solution_left. x + m * hgcrt_mod_left_total_sufficiency_solution_left = a + m * hgcrt_mod_right_total_sufficiency_solution_left) /\ (exists hgcrt_mod_left_total_sufficiency_solution_right hgcrt_mod_right_total_sufficiency_solution_right. x + n * hgcrt_mod_left_total_sufficiency_solution_right = b + n * hgcrt_mod_right_total_sufficiency_solution_right))) congruence eq_decidable generalized_binary_crt_sufficient_zero_left generalized_binary_crt_sufficient_zero_right generalized_binary_crt_sufficient_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_sufficient</code><span>Generalized binary crt sufficient</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Gcd compatibility constructs a common solution for arbitrary natural moduli, including zero.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_left" href="#theorem-generalized_binary_crt_sufficient_zero_left"><code>generalized_binary_crt_sufficient_zero_left</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_zero_right" href="#theorem-generalized_binary_crt_sufficient_zero_right"><code>generalized_binary_crt_sufficient_zero_right</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient_nonzero" href="#theorem-generalized_binary_crt_sufficient_nonzero"><code>generalized_binary_crt_sufficient_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_solvable_iff" href="#theorem-generalized_binary_crt_solvable_iff"><code>generalized_binary_crt_solvable_iff</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_canonical_boundary" href="#theorem-generalized_binary_crt_canonical_boundary"><code>generalized_binary_crt_canonical_boundary</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_solution_or_obstruction" href="#theorem-generalized_binary_crt_solution_or_obstruction"><code>generalized_binary_crt_solution_or_obstruction</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_sufficient">Copy statement</button>
        <pre id="statement-generalized_binary_crt_sufficient"><code>forall g m n a b. ((((exists hag_left_factor_total_sufficiency_gcd. m = g * hag_left_factor_total_sufficiency_gcd) /\ (exists hag_right_factor_total_sufficiency_gcd. n = g * hag_right_factor_total_sufficiency_gcd)) /\ forall hag_divisor_total_sufficiency_gcd. (exists hag_common_left_total_sufficiency_gcd. m = hag_divisor_total_sufficiency_gcd * hag_common_left_total_sufficiency_gcd) -&gt; (exists hag_common_right_total_sufficiency_gcd. n = hag_divisor_total_sufficiency_gcd * hag_common_right_total_sufficiency_gcd) -&gt; exists hag_greatest_factor_total_sufficiency_gcd. g = hag_divisor_total_sufficiency_gcd * hag_greatest_factor_total_sufficiency_gcd)) -&gt; (exists hgcrt_mod_left_total_sufficiency_compatibility hgcrt_mod_right_total_sufficiency_compatibility. a + g * hgcrt_mod_left_total_sufficiency_compatibility = b + g * hgcrt_mod_right_total_sufficiency_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_total_sufficiency_solution_left hgcrt_mod_right_total_sufficiency_solution_left. x + m * hgcrt_mod_left_total_sufficiency_solution_left = a + m * hgcrt_mod_right_total_sufficiency_solution_left) /\ (exists hgcrt_mod_left_total_sufficiency_solution_right hgcrt_mod_right_total_sufficiency_solution_right. x + n * hgcrt_mod_left_total_sufficiency_solution_right = b + n * hgcrt_mod_right_total_sufficiency_solution_right)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_sufficient">Copy proof</button>
        <pre id="proof-generalized_binary_crt_sufficient"><code>pa prove forall g m n a b. ((((exists hag_left_factor_total_sufficiency_gcd. m = g * hag_left_factor_total_sufficiency_gcd) /\ (exists hag_right_factor_total_sufficiency_gcd. n = g * hag_right_factor_total_sufficiency_gcd)) /\ forall hag_divisor_total_sufficiency_gcd. (exists hag_common_left_total_sufficiency_gcd. m = hag_divisor_total_sufficiency_gcd * hag_common_left_total_sufficiency_gcd) -&gt; (exists hag_common_right_total_sufficiency_gcd. n = hag_divisor_total_sufficiency_gcd * hag_common_right_total_sufficiency_gcd) -&gt; exists hag_greatest_factor_total_sufficiency_gcd. g = hag_divisor_total_sufficiency_gcd * hag_greatest_factor_total_sufficiency_gcd)) -&gt; (exists hgcrt_mod_left_total_sufficiency_compatibility hgcrt_mod_right_total_sufficiency_compatibility. a + g * hgcrt_mod_left_total_sufficiency_compatibility = b + g * hgcrt_mod_right_total_sufficiency_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_total_sufficiency_solution_left hgcrt_mod_right_total_sufficiency_solution_left. x + m * hgcrt_mod_left_total_sufficiency_solution_left = a + m * hgcrt_mod_right_total_sufficiency_solution_left) /\ (exists hgcrt_mod_left_total_sufficiency_solution_right hgcrt_mod_right_total_sufficiency_solution_right. x + n * hgcrt_mod_left_total_sufficiency_solution_right = b + n * hgcrt_mod_right_total_sufficiency_solution_right)))
use eq_decidable
use generalized_binary_crt_sufficient_zero_left
use generalized_binary_crt_sufficient_zero_right
use generalized_binary_crt_sufficient_nonzero
intro g
intro m
intro n
intro a
intro b
intro hg
intro hab
have hmzero : m = 0 \/ ~(m = 0)
specialize eq_decidable m
specialize eq_decidable 0
exact eq_decidable
cases hmzero
rewrite hmzero_left at hg
rewrite hmzero_left at hg
rewrite hmzero_left
rewrite hmzero_left
specialize generalized_binary_crt_sufficient_zero_left g
specialize generalized_binary_crt_sufficient_zero_left n
specialize generalized_binary_crt_sufficient_zero_left a
specialize generalized_binary_crt_sufficient_zero_left b
apply generalized_binary_crt_sufficient_zero_left
exact hg
exact hab
have hnzero : n = 0 \/ ~(n = 0)
specialize eq_decidable n
specialize eq_decidable 0
exact eq_decidable
cases hnzero
rewrite hnzero_left at hg
rewrite hnzero_left at hg
rewrite hnzero_left
rewrite hnzero_left
specialize generalized_binary_crt_sufficient_zero_right g
specialize generalized_binary_crt_sufficient_zero_right m
specialize generalized_binary_crt_sufficient_zero_right a
specialize generalized_binary_crt_sufficient_zero_right b
apply generalized_binary_crt_sufficient_zero_right
exact hg
exact hab
specialize generalized_binary_crt_sufficient_nonzero g
specialize generalized_binary_crt_sufficient_nonzero m
specialize generalized_binary_crt_sufficient_nonzero n
specialize generalized_binary_crt_sufficient_nonzero a
specialize generalized_binary_crt_sufficient_nonzero b
apply generalized_binary_crt_sufficient_nonzero
exact hmzero_right
exact hnzero_right
exact hg
exact hab
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>11,240</dd></div>
        <div><dt>Distinct objects</dt><dd>3,495</dd></div>
        <div><dt>Reused references</dt><dd>168</dd></div>
        <div><dt>Depth</dt><dd>78</dd></div>
        <div><dt>Cuts</dt><dd>331</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f22596043fc0e8e79efca06ff82808cd888da18a665078e6be1074b9b71c14a9">f22596043fc0…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_sufficient">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_sufficient</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_zero_boundary_candidate.py#L212">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_sufficient.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_solvable_iff"
  data-name="generalized_binary_crt_solvable_iff" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="crt_common_solution_implies_gcd_compatible,generalized_binary_crt_sufficient"
  data-search="generalized_binary_crt_solvable_iff generalized binary crt solvable iff for arbitrary natural moduli, a binary crt system is solvable exactly when its residues are congruent modulo a relational gcd. forall g m n a b. ((((exists hag_left_factor_total_iff_gcd. m = g * hag_left_factor_total_iff_gcd) /\ (exists hag_right_factor_total_iff_gcd. n = g * hag_right_factor_total_iff_gcd)) /\ forall hag_divisor_total_iff_gcd. (exists hag_common_left_total_iff_gcd. m = hag_divisor_total_iff_gcd * hag_common_left_total_iff_gcd) -&gt; (exists hag_common_right_total_iff_gcd. n = hag_divisor_total_iff_gcd * hag_common_right_total_iff_gcd) -&gt; exists hag_greatest_factor_total_iff_gcd. g = hag_divisor_total_iff_gcd * hag_greatest_factor_total_iff_gcd)) -&gt; (((exists x. (((exists hgcrt_mod_left_total_iff_forward_solution_left hgcrt_mod_right_total_iff_forward_solution_left. x + m * hgcrt_mod_left_total_iff_forward_solution_left = a + m * hgcrt_mod_right_total_iff_forward_solution_left) /\ (exists hgcrt_mod_left_total_iff_forward_solution_right hgcrt_mod_right_total_iff_forward_solution_right. x + n * hgcrt_mod_left_total_iff_forward_solution_right = b + n * hgcrt_mod_right_total_iff_forward_solution_right)))) -&gt; (exists hgcrt_mod_left_total_iff_forward_compatibility hgcrt_mod_right_total_iff_forward_compatibility. a + g * hgcrt_mod_left_total_iff_forward_compatibility = b + g * hgcrt_mod_right_total_iff_forward_compatibility)) /\ ((exists hgcrt_mod_left_total_iff_reverse_compatibility hgcrt_mod_right_total_iff_reverse_compatibility. a + g * hgcrt_mod_left_total_iff_reverse_compatibility = b + g * hgcrt_mod_right_total_iff_reverse_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_total_iff_reverse_solution_left hgcrt_mod_right_total_iff_reverse_solution_left. x + m * hgcrt_mod_left_total_iff_reverse_solution_left = a + m * hgcrt_mod_right_total_iff_reverse_solution_left) /\ (exists hgcrt_mod_left_total_iff_reverse_solution_right hgcrt_mod_right_total_iff_reverse_solution_right. x + n * hgcrt_mod_left_total_iff_reverse_solution_right = b + n * hgcrt_mod_right_total_iff_reverse_solution_right))))) congruence crt_common_solution_implies_gcd_compatible generalized_binary_crt_sufficient">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_solvable_iff</code><span>Generalized binary crt solvable iff</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">For arbitrary natural moduli, a binary CRT system is solvable exactly when its residues are congruent modulo a relational gcd.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_common_solution_implies_gcd_compatible" href="#theorem-crt_common_solution_implies_gcd_compatible"><code>crt_common_solution_implies_gcd_compatible</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient" href="#theorem-generalized_binary_crt_sufficient"><code>generalized_binary_crt_sufficient</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_solvable_iff">Copy statement</button>
        <pre id="statement-generalized_binary_crt_solvable_iff"><code>forall g m n a b. ((((exists hag_left_factor_total_iff_gcd. m = g * hag_left_factor_total_iff_gcd) /\ (exists hag_right_factor_total_iff_gcd. n = g * hag_right_factor_total_iff_gcd)) /\ forall hag_divisor_total_iff_gcd. (exists hag_common_left_total_iff_gcd. m = hag_divisor_total_iff_gcd * hag_common_left_total_iff_gcd) -&gt; (exists hag_common_right_total_iff_gcd. n = hag_divisor_total_iff_gcd * hag_common_right_total_iff_gcd) -&gt; exists hag_greatest_factor_total_iff_gcd. g = hag_divisor_total_iff_gcd * hag_greatest_factor_total_iff_gcd)) -&gt; (((exists x. (((exists hgcrt_mod_left_total_iff_forward_solution_left hgcrt_mod_right_total_iff_forward_solution_left. x + m * hgcrt_mod_left_total_iff_forward_solution_left = a + m * hgcrt_mod_right_total_iff_forward_solution_left) /\ (exists hgcrt_mod_left_total_iff_forward_solution_right hgcrt_mod_right_total_iff_forward_solution_right. x + n * hgcrt_mod_left_total_iff_forward_solution_right = b + n * hgcrt_mod_right_total_iff_forward_solution_right)))) -&gt; (exists hgcrt_mod_left_total_iff_forward_compatibility hgcrt_mod_right_total_iff_forward_compatibility. a + g * hgcrt_mod_left_total_iff_forward_compatibility = b + g * hgcrt_mod_right_total_iff_forward_compatibility)) /\ ((exists hgcrt_mod_left_total_iff_reverse_compatibility hgcrt_mod_right_total_iff_reverse_compatibility. a + g * hgcrt_mod_left_total_iff_reverse_compatibility = b + g * hgcrt_mod_right_total_iff_reverse_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_total_iff_reverse_solution_left hgcrt_mod_right_total_iff_reverse_solution_left. x + m * hgcrt_mod_left_total_iff_reverse_solution_left = a + m * hgcrt_mod_right_total_iff_reverse_solution_left) /\ (exists hgcrt_mod_left_total_iff_reverse_solution_right hgcrt_mod_right_total_iff_reverse_solution_right. x + n * hgcrt_mod_left_total_iff_reverse_solution_right = b + n * hgcrt_mod_right_total_iff_reverse_solution_right)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_solvable_iff">Copy proof</button>
        <pre id="proof-generalized_binary_crt_solvable_iff"><code>pa prove forall g m n a b. ((((exists hag_left_factor_total_iff_gcd. m = g * hag_left_factor_total_iff_gcd) /\ (exists hag_right_factor_total_iff_gcd. n = g * hag_right_factor_total_iff_gcd)) /\ forall hag_divisor_total_iff_gcd. (exists hag_common_left_total_iff_gcd. m = hag_divisor_total_iff_gcd * hag_common_left_total_iff_gcd) -&gt; (exists hag_common_right_total_iff_gcd. n = hag_divisor_total_iff_gcd * hag_common_right_total_iff_gcd) -&gt; exists hag_greatest_factor_total_iff_gcd. g = hag_divisor_total_iff_gcd * hag_greatest_factor_total_iff_gcd)) -&gt; (((exists x. (((exists hgcrt_mod_left_total_iff_forward_solution_left hgcrt_mod_right_total_iff_forward_solution_left. x + m * hgcrt_mod_left_total_iff_forward_solution_left = a + m * hgcrt_mod_right_total_iff_forward_solution_left) /\ (exists hgcrt_mod_left_total_iff_forward_solution_right hgcrt_mod_right_total_iff_forward_solution_right. x + n * hgcrt_mod_left_total_iff_forward_solution_right = b + n * hgcrt_mod_right_total_iff_forward_solution_right)))) -&gt; (exists hgcrt_mod_left_total_iff_forward_compatibility hgcrt_mod_right_total_iff_forward_compatibility. a + g * hgcrt_mod_left_total_iff_forward_compatibility = b + g * hgcrt_mod_right_total_iff_forward_compatibility)) /\ ((exists hgcrt_mod_left_total_iff_reverse_compatibility hgcrt_mod_right_total_iff_reverse_compatibility. a + g * hgcrt_mod_left_total_iff_reverse_compatibility = b + g * hgcrt_mod_right_total_iff_reverse_compatibility) -&gt; exists x. (((exists hgcrt_mod_left_total_iff_reverse_solution_left hgcrt_mod_right_total_iff_reverse_solution_left. x + m * hgcrt_mod_left_total_iff_reverse_solution_left = a + m * hgcrt_mod_right_total_iff_reverse_solution_left) /\ (exists hgcrt_mod_left_total_iff_reverse_solution_right hgcrt_mod_right_total_iff_reverse_solution_right. x + n * hgcrt_mod_left_total_iff_reverse_solution_right = b + n * hgcrt_mod_right_total_iff_reverse_solution_right)))))
use crt_common_solution_implies_gcd_compatible
use generalized_binary_crt_sufficient
intro g
intro m
intro n
intro a
intro b
intro hg
split
intro hsolution
cases hsolution
specialize crt_common_solution_implies_gcd_compatible g
specialize crt_common_solution_implies_gcd_compatible m
specialize crt_common_solution_implies_gcd_compatible n
specialize crt_common_solution_implies_gcd_compatible a
specialize crt_common_solution_implies_gcd_compatible b
specialize crt_common_solution_implies_gcd_compatible x
apply crt_common_solution_implies_gcd_compatible
exact hg
exact hsolution_witness
intro hcompat
specialize generalized_binary_crt_sufficient g
specialize generalized_binary_crt_sufficient m
specialize generalized_binary_crt_sufficient n
specialize generalized_binary_crt_sufficient a
specialize generalized_binary_crt_sufficient b
apply generalized_binary_crt_sufficient
exact hg
exact hcompat
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>11,825</dd></div>
        <div><dt>Distinct objects</dt><dd>3,658</dd></div>
        <div><dt>Reused references</dt><dd>173</dd></div>
        <div><dt>Depth</dt><dd>80</dd></div>
        <div><dt>Cuts</dt><dd>347</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="f3767085f6310aeae43f0440867091a5493297fa35501bd41869127a9570f201">f3767085f631…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_solvable_iff">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_solvable_iff</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_zero_boundary_candidate.py#L275">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_solvable_iff.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_ordered_gap_multiple"
  data-name="mod_eq_ordered_gap_multiple" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="add_comm,add_assoc,add_left_cancel,factor_difference"
  data-search="mod_eq_ordered_gap_multiple mod eq ordered gap multiple the directed gap between two congruent naturals is a multiple of the modulus. forall d k x y. k + x = y -&gt; (exists hgcrt_mod_left_ordered_gap_assumption hgcrt_mod_right_ordered_gap_assumption. x + d * hgcrt_mod_left_ordered_gap_assumption = y + d * hgcrt_mod_right_ordered_gap_assumption) -&gt; (exists hgcrt_divides_factor_ordered_gap_result. k = d * hgcrt_divides_factor_ordered_gap_result) congruence add_comm add_assoc add_left_cancel factor_difference">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_ordered_gap_multiple</code><span>Mod eq ordered gap multiple</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The directed gap between two congruent naturals is a multiple of the modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="add_comm" href="#theorem-add_comm"><code>add_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="add_assoc" href="#theorem-add_assoc"><code>add_assoc</code></a> <a class="pa-theorem-chip" data-theorem-link="add_left_cancel" href="#theorem-add_left_cancel"><code>add_left_cancel</code></a> <a class="pa-theorem-chip" data-theorem-link="factor_difference" href="#theorem-factor_difference"><code>factor_difference</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_merge" href="#theorem-mod_eq_lcm_merge"><code>mod_eq_lcm_merge</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_ordered_gap_multiple">Copy statement</button>
        <pre id="statement-mod_eq_ordered_gap_multiple"><code>forall d k x y. k + x = y -&gt; (exists hgcrt_mod_left_ordered_gap_assumption hgcrt_mod_right_ordered_gap_assumption. x + d * hgcrt_mod_left_ordered_gap_assumption = y + d * hgcrt_mod_right_ordered_gap_assumption) -&gt; (exists hgcrt_divides_factor_ordered_gap_result. k = d * hgcrt_divides_factor_ordered_gap_result)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_ordered_gap_multiple">Copy proof</button>
        <pre id="proof-mod_eq_ordered_gap_multiple"><code>pa prove forall d k x y. k + x = y -&gt; (exists hgcrt_mod_left_ordered_gap_assumption hgcrt_mod_right_ordered_gap_assumption. x + d * hgcrt_mod_left_ordered_gap_assumption = y + d * hgcrt_mod_right_ordered_gap_assumption) -&gt; (exists hgcrt_divides_factor_ordered_gap_result. k = d * hgcrt_divides_factor_ordered_gap_result)
use add_comm
use add_assoc
use add_left_cancel
use factor_difference
intro d
intro k
intro x
intro y
intro hgap
intro hmod
cases hmod
cases hmod_witness
rewrite &lt;- hgap at hmod_witness_witness
have hcancel : d * x1 = k + d * x2
specialize add_left_cancel x
specialize add_left_cancel (d * x1)
specialize add_left_cancel (k + d * x2)
apply add_left_cancel
trans (k + x) + d * x2
exact hmod_witness_witness
trans (x + k) + d * x2
congr
apply add_comm
refl
apply add_assoc
have hfactor : d * x1 = d * x2 + k
trans k + d * x2
exact hcancel
apply add_comm
specialize factor_difference d
specialize factor_difference x1
specialize factor_difference x2
specialize factor_difference k
apply factor_difference
exact hfactor
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>558</dd></div>
        <div><dt>Distinct objects</dt><dd>310</dd></div>
        <div><dt>Reused references</dt><dd>16</dd></div>
        <div><dt>Depth</dt><dd>30</dd></div>
        <div><dt>Cuts</dt><dd>17</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="49758875c6ef5d4c1f532dfdba89ad902489175f2593d94ef097938b4e208327">49758875c6ef…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_ordered_gap_multiple">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_ordered_gap_multiple</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_classification_candidate.py#L190">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_ordered_gap_multiple.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_lcm_merge"
  data-name="mod_eq_lcm_merge" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="le_total,mod_eq_symm,mod_eq_ordered_gap_multiple,is_lcm_least,mul_comm,remainder_decomposition_to_mod_eq"
  data-search="mod_eq_lcm_merge mod eq lcm merge congruence modulo both inputs merges to congruence modulo a relational lcm. forall l m n x y. ((((exists hlcm_left_factor_merge. l = m * hlcm_left_factor_merge) /\ (exists hlcm_right_factor_merge. l = n * hlcm_right_factor_merge)) /\ forall hlcm_common_merge. (exists hlcm_left_common_merge. hlcm_common_merge = m * hlcm_left_common_merge) -&gt; (exists hlcm_right_common_merge. hlcm_common_merge = n * hlcm_right_common_merge) -&gt; exists hlcm_least_factor_merge. hlcm_common_merge = l * hlcm_least_factor_merge)) -&gt; (exists hgcrt_mod_left_merge_m hgcrt_mod_right_merge_m. x + m * hgcrt_mod_left_merge_m = y + m * hgcrt_mod_right_merge_m) -&gt; (exists hgcrt_mod_left_merge_n hgcrt_mod_right_merge_n. x + n * hgcrt_mod_left_merge_n = y + n * hgcrt_mod_right_merge_n) -&gt; (exists hgcrt_mod_left_merge_l hgcrt_mod_right_merge_l. x + l * hgcrt_mod_left_merge_l = y + l * hgcrt_mod_right_merge_l) congruence le_total mod_eq_symm mod_eq_ordered_gap_multiple is_lcm_least mul_comm remainder_decomposition_to_mod_eq">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_lcm_merge</code><span>Mod eq lcm merge</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Congruence modulo both inputs merges to congruence modulo a relational lcm.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="le_total" href="#theorem-le_total"><code>le_total</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_ordered_gap_multiple" href="#theorem-mod_eq_ordered_gap_multiple"><code>mod_eq_ordered_gap_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_least" href="#theorem-is_lcm_least"><code>is_lcm_least</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_iff_pair" href="#theorem-mod_eq_lcm_iff_pair"><code>mod_eq_lcm_iff_pair</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_lcm_merge">Copy statement</button>
        <pre id="statement-mod_eq_lcm_merge"><code>forall l m n x y. ((((exists hlcm_left_factor_merge. l = m * hlcm_left_factor_merge) /\ (exists hlcm_right_factor_merge. l = n * hlcm_right_factor_merge)) /\ forall hlcm_common_merge. (exists hlcm_left_common_merge. hlcm_common_merge = m * hlcm_left_common_merge) -&gt; (exists hlcm_right_common_merge. hlcm_common_merge = n * hlcm_right_common_merge) -&gt; exists hlcm_least_factor_merge. hlcm_common_merge = l * hlcm_least_factor_merge)) -&gt; (exists hgcrt_mod_left_merge_m hgcrt_mod_right_merge_m. x + m * hgcrt_mod_left_merge_m = y + m * hgcrt_mod_right_merge_m) -&gt; (exists hgcrt_mod_left_merge_n hgcrt_mod_right_merge_n. x + n * hgcrt_mod_left_merge_n = y + n * hgcrt_mod_right_merge_n) -&gt; (exists hgcrt_mod_left_merge_l hgcrt_mod_right_merge_l. x + l * hgcrt_mod_left_merge_l = y + l * hgcrt_mod_right_merge_l)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_lcm_merge">Copy proof</button>
        <pre id="proof-mod_eq_lcm_merge"><code>pa prove forall l m n x y. ((((exists hlcm_left_factor_merge. l = m * hlcm_left_factor_merge) /\ (exists hlcm_right_factor_merge. l = n * hlcm_right_factor_merge)) /\ forall hlcm_common_merge. (exists hlcm_left_common_merge. hlcm_common_merge = m * hlcm_left_common_merge) -&gt; (exists hlcm_right_common_merge. hlcm_common_merge = n * hlcm_right_common_merge) -&gt; exists hlcm_least_factor_merge. hlcm_common_merge = l * hlcm_least_factor_merge)) -&gt; (exists hgcrt_mod_left_merge_m hgcrt_mod_right_merge_m. x + m * hgcrt_mod_left_merge_m = y + m * hgcrt_mod_right_merge_m) -&gt; (exists hgcrt_mod_left_merge_n hgcrt_mod_right_merge_n. x + n * hgcrt_mod_left_merge_n = y + n * hgcrt_mod_right_merge_n) -&gt; (exists hgcrt_mod_left_merge_l hgcrt_mod_right_merge_l. x + l * hgcrt_mod_left_merge_l = y + l * hgcrt_mod_right_merge_l)
use le_total
use mod_eq_symm
use mod_eq_ordered_gap_multiple
use is_lcm_least
use mul_comm
use remainder_decomposition_to_mod_eq
intro l
intro m
intro n
intro x
intro y
intro hl
intro hm
intro hn
have horder : x &lt;= y \/ y &lt;= x
specialize le_total x
specialize le_total y
exact le_total
cases horder
cases horder_left
have hmk : exists q. x1 = m * q
specialize mod_eq_ordered_gap_multiple m
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple x
specialize mod_eq_ordered_gap_multiple y
apply mod_eq_ordered_gap_multiple
exact horder_left_witness
exact hm
have hnk : exists q. x1 = n * q
specialize mod_eq_ordered_gap_multiple n
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple x
specialize mod_eq_ordered_gap_multiple y
apply mod_eq_ordered_gap_multiple
exact horder_left_witness
exact hn
have hlk : exists q. x1 = l * q
specialize is_lcm_least l
specialize is_lcm_least m
specialize is_lcm_least n
specialize is_lcm_least x1
apply is_lcm_least
exact hl
exact hmk
exact hnk
cases hlk
have hdecomp : y = x2 * l + x
trans x1 + x
symm
exact horder_left_witness
rewrite hlk_witness
congr
apply mul_comm
refl
have hyx : exists hgcrt_mod_left_merge_l_reverse hgcrt_mod_right_merge_l_reverse. y + l * hgcrt_mod_left_merge_l_reverse = x + l * hgcrt_mod_right_merge_l_reverse
specialize remainder_decomposition_to_mod_eq l
specialize remainder_decomposition_to_mod_eq y
specialize remainder_decomposition_to_mod_eq x2
specialize remainder_decomposition_to_mod_eq x
apply remainder_decomposition_to_mod_eq
exact hdecomp
specialize mod_eq_symm l
specialize mod_eq_symm y
specialize mod_eq_symm x
apply mod_eq_symm
exact hyx
cases horder_right
have hmyx : exists hgcrt_mod_left_merge_m_reverse hgcrt_mod_right_merge_m_reverse. y + m * hgcrt_mod_left_merge_m_reverse = x + m * hgcrt_mod_right_merge_m_reverse
specialize mod_eq_symm m
specialize mod_eq_symm x
specialize mod_eq_symm y
apply mod_eq_symm
exact hm
have hnyx : exists hgcrt_mod_left_merge_n_reverse hgcrt_mod_right_merge_n_reverse. y + n * hgcrt_mod_left_merge_n_reverse = x + n * hgcrt_mod_right_merge_n_reverse
specialize mod_eq_symm n
specialize mod_eq_symm x
specialize mod_eq_symm y
apply mod_eq_symm
exact hn
have hmk : exists q. x1 = m * q
specialize mod_eq_ordered_gap_multiple m
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple y
specialize mod_eq_ordered_gap_multiple x
apply mod_eq_ordered_gap_multiple
exact horder_right_witness
exact hmyx
have hnk : exists q. x1 = n * q
specialize mod_eq_ordered_gap_multiple n
specialize mod_eq_ordered_gap_multiple x1
specialize mod_eq_ordered_gap_multiple y
specialize mod_eq_ordered_gap_multiple x
apply mod_eq_ordered_gap_multiple
exact horder_right_witness
exact hnyx
have hlk : exists q. x1 = l * q
specialize is_lcm_least l
specialize is_lcm_least m
specialize is_lcm_least n
specialize is_lcm_least x1
apply is_lcm_least
exact hl
exact hmk
exact hnk
cases hlk
have hdecomp : x = x2 * l + y
trans x1 + y
symm
exact horder_right_witness
rewrite hlk_witness
congr
apply mul_comm
refl
specialize remainder_decomposition_to_mod_eq l
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x2
specialize remainder_decomposition_to_mod_eq y
apply remainder_decomposition_to_mod_eq
exact hdecomp
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,315</dd></div>
        <div><dt>Distinct objects</dt><dd>653</dd></div>
        <div><dt>Reused references</dt><dd>33</dd></div>
        <div><dt>Depth</dt><dd>33</dd></div>
        <div><dt>Cuts</dt><dd>39</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="437802e4814c550b5a66138aef6ed6269d2f64ef6b02c4b2425167423933098a">437802e4814c…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_lcm_merge">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_lcm_merge</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_classification_candidate.py#L230">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_lcm_merge.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_lcm_iff_pair"
  data-name="mod_eq_lcm_iff_pair" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="is_lcm_multiple_left,is_lcm_multiple_right,mod_eq_of_mod_eq_multiple,mod_eq_lcm_merge"
  data-search="mod_eq_lcm_iff_pair mod eq lcm iff pair congruence modulo a relational lcm is equivalent to congruence modulo both inputs. forall l m n x y. ((((exists hlcm_left_factor_iff_pair. l = m * hlcm_left_factor_iff_pair) /\ (exists hlcm_right_factor_iff_pair. l = n * hlcm_right_factor_iff_pair)) /\ forall hlcm_common_iff_pair. (exists hlcm_left_common_iff_pair. hlcm_common_iff_pair = m * hlcm_left_common_iff_pair) -&gt; (exists hlcm_right_common_iff_pair. hlcm_common_iff_pair = n * hlcm_right_common_iff_pair) -&gt; exists hlcm_least_factor_iff_pair. hlcm_common_iff_pair = l * hlcm_least_factor_iff_pair)) -&gt; (((exists hgcrt_mod_left_iff_l_forward hgcrt_mod_right_iff_l_forward. x + l * hgcrt_mod_left_iff_l_forward = y + l * hgcrt_mod_right_iff_l_forward) -&gt; ((exists hgcrt_mod_left_iff_m_forward hgcrt_mod_right_iff_m_forward. x + m * hgcrt_mod_left_iff_m_forward = y + m * hgcrt_mod_right_iff_m_forward) /\ (exists hgcrt_mod_left_iff_n_forward hgcrt_mod_right_iff_n_forward. x + n * hgcrt_mod_left_iff_n_forward = y + n * hgcrt_mod_right_iff_n_forward))) /\ (((exists hgcrt_mod_left_iff_m_reverse hgcrt_mod_right_iff_m_reverse. x + m * hgcrt_mod_left_iff_m_reverse = y + m * hgcrt_mod_right_iff_m_reverse) /\ (exists hgcrt_mod_left_iff_n_reverse hgcrt_mod_right_iff_n_reverse. x + n * hgcrt_mod_left_iff_n_reverse = y + n * hgcrt_mod_right_iff_n_reverse)) -&gt; (exists hgcrt_mod_left_iff_l_reverse hgcrt_mod_right_iff_l_reverse. x + l * hgcrt_mod_left_iff_l_reverse = y + l * hgcrt_mod_right_iff_l_reverse))) congruence is_lcm_multiple_left is_lcm_multiple_right mod_eq_of_mod_eq_multiple mod_eq_lcm_merge">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_lcm_iff_pair</code><span>Mod eq lcm iff pair</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Congruence modulo a relational lcm is equivalent to congruence modulo both inputs.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="is_lcm_multiple_left" href="#theorem-is_lcm_multiple_left"><code>is_lcm_multiple_left</code></a> <a class="pa-theorem-chip" data-theorem-link="is_lcm_multiple_right" href="#theorem-is_lcm_multiple_right"><code>is_lcm_multiple_right</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_of_mod_eq_multiple" href="#theorem-mod_eq_of_mod_eq_multiple"><code>mod_eq_of_mod_eq_multiple</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_merge" href="#theorem-mod_eq_lcm_merge"><code>mod_eq_lcm_merge</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_solution_class_iff_lcm" href="#theorem-crt_solution_class_iff_lcm"><code>crt_solution_class_iff_lcm</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_lcm_iff_pair">Copy statement</button>
        <pre id="statement-mod_eq_lcm_iff_pair"><code>forall l m n x y. ((((exists hlcm_left_factor_iff_pair. l = m * hlcm_left_factor_iff_pair) /\ (exists hlcm_right_factor_iff_pair. l = n * hlcm_right_factor_iff_pair)) /\ forall hlcm_common_iff_pair. (exists hlcm_left_common_iff_pair. hlcm_common_iff_pair = m * hlcm_left_common_iff_pair) -&gt; (exists hlcm_right_common_iff_pair. hlcm_common_iff_pair = n * hlcm_right_common_iff_pair) -&gt; exists hlcm_least_factor_iff_pair. hlcm_common_iff_pair = l * hlcm_least_factor_iff_pair)) -&gt; (((exists hgcrt_mod_left_iff_l_forward hgcrt_mod_right_iff_l_forward. x + l * hgcrt_mod_left_iff_l_forward = y + l * hgcrt_mod_right_iff_l_forward) -&gt; ((exists hgcrt_mod_left_iff_m_forward hgcrt_mod_right_iff_m_forward. x + m * hgcrt_mod_left_iff_m_forward = y + m * hgcrt_mod_right_iff_m_forward) /\ (exists hgcrt_mod_left_iff_n_forward hgcrt_mod_right_iff_n_forward. x + n * hgcrt_mod_left_iff_n_forward = y + n * hgcrt_mod_right_iff_n_forward))) /\ (((exists hgcrt_mod_left_iff_m_reverse hgcrt_mod_right_iff_m_reverse. x + m * hgcrt_mod_left_iff_m_reverse = y + m * hgcrt_mod_right_iff_m_reverse) /\ (exists hgcrt_mod_left_iff_n_reverse hgcrt_mod_right_iff_n_reverse. x + n * hgcrt_mod_left_iff_n_reverse = y + n * hgcrt_mod_right_iff_n_reverse)) -&gt; (exists hgcrt_mod_left_iff_l_reverse hgcrt_mod_right_iff_l_reverse. x + l * hgcrt_mod_left_iff_l_reverse = y + l * hgcrt_mod_right_iff_l_reverse)))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_lcm_iff_pair">Copy proof</button>
        <pre id="proof-mod_eq_lcm_iff_pair"><code>pa prove forall l m n x y. ((((exists hlcm_left_factor_iff_pair. l = m * hlcm_left_factor_iff_pair) /\ (exists hlcm_right_factor_iff_pair. l = n * hlcm_right_factor_iff_pair)) /\ forall hlcm_common_iff_pair. (exists hlcm_left_common_iff_pair. hlcm_common_iff_pair = m * hlcm_left_common_iff_pair) -&gt; (exists hlcm_right_common_iff_pair. hlcm_common_iff_pair = n * hlcm_right_common_iff_pair) -&gt; exists hlcm_least_factor_iff_pair. hlcm_common_iff_pair = l * hlcm_least_factor_iff_pair)) -&gt; (((exists hgcrt_mod_left_iff_l_forward hgcrt_mod_right_iff_l_forward. x + l * hgcrt_mod_left_iff_l_forward = y + l * hgcrt_mod_right_iff_l_forward) -&gt; ((exists hgcrt_mod_left_iff_m_forward hgcrt_mod_right_iff_m_forward. x + m * hgcrt_mod_left_iff_m_forward = y + m * hgcrt_mod_right_iff_m_forward) /\ (exists hgcrt_mod_left_iff_n_forward hgcrt_mod_right_iff_n_forward. x + n * hgcrt_mod_left_iff_n_forward = y + n * hgcrt_mod_right_iff_n_forward))) /\ (((exists hgcrt_mod_left_iff_m_reverse hgcrt_mod_right_iff_m_reverse. x + m * hgcrt_mod_left_iff_m_reverse = y + m * hgcrt_mod_right_iff_m_reverse) /\ (exists hgcrt_mod_left_iff_n_reverse hgcrt_mod_right_iff_n_reverse. x + n * hgcrt_mod_left_iff_n_reverse = y + n * hgcrt_mod_right_iff_n_reverse)) -&gt; (exists hgcrt_mod_left_iff_l_reverse hgcrt_mod_right_iff_l_reverse. x + l * hgcrt_mod_left_iff_l_reverse = y + l * hgcrt_mod_right_iff_l_reverse)))
use is_lcm_multiple_left
use is_lcm_multiple_right
use mod_eq_of_mod_eq_multiple
use mod_eq_lcm_merge
intro l
intro m
intro n
intro x
intro y
intro hl
split
intro hxy
have hml : exists q. l = m * q
specialize is_lcm_multiple_left l
specialize is_lcm_multiple_left m
specialize is_lcm_multiple_left n
apply is_lcm_multiple_left
exact hl
have hnl : exists q. l = n * q
specialize is_lcm_multiple_right l
specialize is_lcm_multiple_right m
specialize is_lcm_multiple_right n
apply is_lcm_multiple_right
exact hl
split
specialize mod_eq_of_mod_eq_multiple m
specialize mod_eq_of_mod_eq_multiple l
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple y
apply mod_eq_of_mod_eq_multiple
exact hml
exact hxy
specialize mod_eq_of_mod_eq_multiple n
specialize mod_eq_of_mod_eq_multiple l
specialize mod_eq_of_mod_eq_multiple x
specialize mod_eq_of_mod_eq_multiple y
apply mod_eq_of_mod_eq_multiple
exact hnl
exact hxy
intro hpair
cases hpair
specialize mod_eq_lcm_merge l
specialize mod_eq_lcm_merge m
specialize mod_eq_lcm_merge n
specialize mod_eq_lcm_merge x
specialize mod_eq_lcm_merge y
apply mod_eq_lcm_merge
exact hl
exact hpair_left
exact hpair_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>1,570</dd></div>
        <div><dt>Distinct objects</dt><dd>864</dd></div>
        <div><dt>Reused references</dt><dd>45</dd></div>
        <div><dt>Depth</dt><dd>37</dd></div>
        <div><dt>Cuts</dt><dd>46</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="8e89d2f011356482e82ecccc1c80813ac8e420cc0e997f8e4ed06bd8de004b96">8e89d2f01135…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_lcm_iff_pair">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_lcm_iff_pair</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_classification_candidate.py#L359">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_lcm_iff_pair.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-crt_solution_class_iff_lcm"
  data-name="crt_solution_class_iff_lcm" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="crt_solution_pair_congruent,mod_eq_lcm_iff_pair,mod_eq_trans"
  data-search="crt_solution_class_iff_lcm crt solution class iff lcm relative to one fixed common solution, all solutions are exactly its relational-lcm congruence class. forall l m n a b x y. ((((exists hlcm_left_factor_solution_class. l = m * hlcm_left_factor_solution_class) /\ (exists hlcm_right_factor_solution_class. l = n * hlcm_right_factor_solution_class)) /\ forall hlcm_common_solution_class. (exists hlcm_left_common_solution_class. hlcm_common_solution_class = m * hlcm_left_common_solution_class) -&gt; (exists hlcm_right_common_solution_class. hlcm_common_solution_class = n * hlcm_right_common_solution_class) -&gt; exists hlcm_least_factor_solution_class. hlcm_common_solution_class = l * hlcm_least_factor_solution_class)) -&gt; (((exists hgcrt_mod_left_class_fixed_left hgcrt_mod_right_class_fixed_left. x + m * hgcrt_mod_left_class_fixed_left = a + m * hgcrt_mod_right_class_fixed_left) /\ (exists hgcrt_mod_left_class_fixed_right hgcrt_mod_right_class_fixed_right. x + n * hgcrt_mod_left_class_fixed_right = b + n * hgcrt_mod_right_class_fixed_right))) -&gt; (((((exists hgcrt_mod_left_class_candidate_forward_left hgcrt_mod_right_class_candidate_forward_left. y + m * hgcrt_mod_left_class_candidate_forward_left = a + m * hgcrt_mod_right_class_candidate_forward_left) /\ (exists hgcrt_mod_left_class_candidate_forward_right hgcrt_mod_right_class_candidate_forward_right. y + n * hgcrt_mod_left_class_candidate_forward_right = b + n * hgcrt_mod_right_class_candidate_forward_right))) -&gt; (exists hgcrt_mod_left_class_l_forward hgcrt_mod_right_class_l_forward. y + l * hgcrt_mod_left_class_l_forward = x + l * hgcrt_mod_right_class_l_forward)) /\ ((exists hgcrt_mod_left_class_l_reverse hgcrt_mod_right_class_l_reverse. y + l * hgcrt_mod_left_class_l_reverse = x + l * hgcrt_mod_right_class_l_reverse) -&gt; (((exists hgcrt_mod_left_class_candidate_reverse_left hgcrt_mod_right_class_candidate_reverse_left. y + m * hgcrt_mod_left_class_candidate_reverse_left = a + m * hgcrt_mod_right_class_candidate_reverse_left) /\ (exists hgcrt_mod_left_class_candidate_reverse_right hgcrt_mod_right_class_candidate_reverse_right. y + n * hgcrt_mod_left_class_candidate_reverse_right = b + n * hgcrt_mod_right_class_candidate_reverse_right))))) congruence crt_solution_pair_congruent mod_eq_lcm_iff_pair mod_eq_trans">
  <details>
    <summary>
      <span class="pa-card-title"><code>crt_solution_class_iff_lcm</code><span>Crt solution class iff lcm</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Relative to one fixed common solution, all solutions are exactly its relational-lcm congruence class.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_solution_pair_congruent" href="#theorem-crt_solution_pair_congruent"><code>crt_solution_pair_congruent</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_lcm_iff_pair" href="#theorem-mod_eq_lcm_iff_pair"><code>mod_eq_lcm_iff_pair</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_trans" href="#theorem-mod_eq_trans"><code>mod_eq_trans</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_solution_unique_lcm_zero" href="#theorem-crt_solution_unique_lcm_zero"><code>crt_solution_unique_lcm_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_canonical_remainder_nonzero" href="#theorem-crt_solution_canonical_remainder_nonzero"><code>crt_solution_canonical_remainder_nonzero</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-crt_solution_class_iff_lcm">Copy statement</button>
        <pre id="statement-crt_solution_class_iff_lcm"><code>forall l m n a b x y. ((((exists hlcm_left_factor_solution_class. l = m * hlcm_left_factor_solution_class) /\ (exists hlcm_right_factor_solution_class. l = n * hlcm_right_factor_solution_class)) /\ forall hlcm_common_solution_class. (exists hlcm_left_common_solution_class. hlcm_common_solution_class = m * hlcm_left_common_solution_class) -&gt; (exists hlcm_right_common_solution_class. hlcm_common_solution_class = n * hlcm_right_common_solution_class) -&gt; exists hlcm_least_factor_solution_class. hlcm_common_solution_class = l * hlcm_least_factor_solution_class)) -&gt; (((exists hgcrt_mod_left_class_fixed_left hgcrt_mod_right_class_fixed_left. x + m * hgcrt_mod_left_class_fixed_left = a + m * hgcrt_mod_right_class_fixed_left) /\ (exists hgcrt_mod_left_class_fixed_right hgcrt_mod_right_class_fixed_right. x + n * hgcrt_mod_left_class_fixed_right = b + n * hgcrt_mod_right_class_fixed_right))) -&gt; (((((exists hgcrt_mod_left_class_candidate_forward_left hgcrt_mod_right_class_candidate_forward_left. y + m * hgcrt_mod_left_class_candidate_forward_left = a + m * hgcrt_mod_right_class_candidate_forward_left) /\ (exists hgcrt_mod_left_class_candidate_forward_right hgcrt_mod_right_class_candidate_forward_right. y + n * hgcrt_mod_left_class_candidate_forward_right = b + n * hgcrt_mod_right_class_candidate_forward_right))) -&gt; (exists hgcrt_mod_left_class_l_forward hgcrt_mod_right_class_l_forward. y + l * hgcrt_mod_left_class_l_forward = x + l * hgcrt_mod_right_class_l_forward)) /\ ((exists hgcrt_mod_left_class_l_reverse hgcrt_mod_right_class_l_reverse. y + l * hgcrt_mod_left_class_l_reverse = x + l * hgcrt_mod_right_class_l_reverse) -&gt; (((exists hgcrt_mod_left_class_candidate_reverse_left hgcrt_mod_right_class_candidate_reverse_left. y + m * hgcrt_mod_left_class_candidate_reverse_left = a + m * hgcrt_mod_right_class_candidate_reverse_left) /\ (exists hgcrt_mod_left_class_candidate_reverse_right hgcrt_mod_right_class_candidate_reverse_right. y + n * hgcrt_mod_left_class_candidate_reverse_right = b + n * hgcrt_mod_right_class_candidate_reverse_right)))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-crt_solution_class_iff_lcm">Copy proof</button>
        <pre id="proof-crt_solution_class_iff_lcm"><code>pa prove forall l m n a b x y. ((((exists hlcm_left_factor_solution_class. l = m * hlcm_left_factor_solution_class) /\ (exists hlcm_right_factor_solution_class. l = n * hlcm_right_factor_solution_class)) /\ forall hlcm_common_solution_class. (exists hlcm_left_common_solution_class. hlcm_common_solution_class = m * hlcm_left_common_solution_class) -&gt; (exists hlcm_right_common_solution_class. hlcm_common_solution_class = n * hlcm_right_common_solution_class) -&gt; exists hlcm_least_factor_solution_class. hlcm_common_solution_class = l * hlcm_least_factor_solution_class)) -&gt; (((exists hgcrt_mod_left_class_fixed_left hgcrt_mod_right_class_fixed_left. x + m * hgcrt_mod_left_class_fixed_left = a + m * hgcrt_mod_right_class_fixed_left) /\ (exists hgcrt_mod_left_class_fixed_right hgcrt_mod_right_class_fixed_right. x + n * hgcrt_mod_left_class_fixed_right = b + n * hgcrt_mod_right_class_fixed_right))) -&gt; (((((exists hgcrt_mod_left_class_candidate_forward_left hgcrt_mod_right_class_candidate_forward_left. y + m * hgcrt_mod_left_class_candidate_forward_left = a + m * hgcrt_mod_right_class_candidate_forward_left) /\ (exists hgcrt_mod_left_class_candidate_forward_right hgcrt_mod_right_class_candidate_forward_right. y + n * hgcrt_mod_left_class_candidate_forward_right = b + n * hgcrt_mod_right_class_candidate_forward_right))) -&gt; (exists hgcrt_mod_left_class_l_forward hgcrt_mod_right_class_l_forward. y + l * hgcrt_mod_left_class_l_forward = x + l * hgcrt_mod_right_class_l_forward)) /\ ((exists hgcrt_mod_left_class_l_reverse hgcrt_mod_right_class_l_reverse. y + l * hgcrt_mod_left_class_l_reverse = x + l * hgcrt_mod_right_class_l_reverse) -&gt; (((exists hgcrt_mod_left_class_candidate_reverse_left hgcrt_mod_right_class_candidate_reverse_left. y + m * hgcrt_mod_left_class_candidate_reverse_left = a + m * hgcrt_mod_right_class_candidate_reverse_left) /\ (exists hgcrt_mod_left_class_candidate_reverse_right hgcrt_mod_right_class_candidate_reverse_right. y + n * hgcrt_mod_left_class_candidate_reverse_right = b + n * hgcrt_mod_right_class_candidate_reverse_right)))))
use crt_solution_pair_congruent
use mod_eq_lcm_iff_pair
use mod_eq_trans
intro l
intro m
intro n
intro a
intro b
intro x
intro y
intro hl
intro hx
split
intro hy
have hpair : ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))
specialize crt_solution_pair_congruent m
specialize crt_solution_pair_congruent n
specialize crt_solution_pair_congruent a
specialize crt_solution_pair_congruent b
specialize crt_solution_pair_congruent y
specialize crt_solution_pair_congruent x
apply crt_solution_pair_congruent
exact hy
exact hx
have hiff : (((exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux) -&gt; ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))) /\ (((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n)) -&gt; (exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux)))
specialize mod_eq_lcm_iff_pair l
specialize mod_eq_lcm_iff_pair m
specialize mod_eq_lcm_iff_pair n
specialize mod_eq_lcm_iff_pair y
specialize mod_eq_lcm_iff_pair x
apply mod_eq_lcm_iff_pair
exact hl
cases hiff
apply hiff_right
exact hpair
intro hlyx
have hiff2 : (((exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux) -&gt; ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))) /\ (((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n)) -&gt; (exists hgcrt_mod_left_class_l_aux hgcrt_mod_right_class_l_aux. y + l * hgcrt_mod_left_class_l_aux = x + l * hgcrt_mod_right_class_l_aux)))
specialize mod_eq_lcm_iff_pair l
specialize mod_eq_lcm_iff_pair m
specialize mod_eq_lcm_iff_pair n
specialize mod_eq_lcm_iff_pair y
specialize mod_eq_lcm_iff_pair x
apply mod_eq_lcm_iff_pair
exact hl
cases hiff2
have hpair2 : ((exists hgcrt_mod_left_class_pair_m hgcrt_mod_right_class_pair_m. y + m * hgcrt_mod_left_class_pair_m = x + m * hgcrt_mod_right_class_pair_m) /\ (exists hgcrt_mod_left_class_pair_n hgcrt_mod_right_class_pair_n. y + n * hgcrt_mod_left_class_pair_n = x + n * hgcrt_mod_right_class_pair_n))
apply hiff2_left
exact hlyx
cases hpair2
cases hx
split
specialize mod_eq_trans m
specialize mod_eq_trans y
specialize mod_eq_trans x
specialize mod_eq_trans a
apply mod_eq_trans
exact hpair2_left
exact hx_left
specialize mod_eq_trans n
specialize mod_eq_trans y
specialize mod_eq_trans x
specialize mod_eq_trans b
apply mod_eq_trans
exact hpair2_right
exact hx_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,208</dd></div>
        <div><dt>Distinct objects</dt><dd>1,055</dd></div>
        <div><dt>Reused references</dt><dd>50</dd></div>
        <div><dt>Depth</dt><dd>39</dd></div>
        <div><dt>Cuts</dt><dd>63</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7917de5c171d7feda70becaf504baebfaf95952d4246bb83204bbe60c66fd373">7917de5c171d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for crt_solution_class_iff_lcm">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib crt_solution_class_iff_lcm</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_classification_candidate.py#L422">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/crt_solution_class_iff_lcm.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-crt_solution_unique_lcm_zero"
  data-name="crt_solution_unique_lcm_zero" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="crt_solution_class_iff_lcm,mod_eq_zero_iff_eq"
  data-search="crt_solution_unique_lcm_zero crt solution unique lcm zero at relational lcm zero, every common solution equals a fixed common solution. forall l m n a b x y. l = 0 -&gt; ((((exists hlcm_left_factor_unique_zero. l = m * hlcm_left_factor_unique_zero) /\ (exists hlcm_right_factor_unique_zero. l = n * hlcm_right_factor_unique_zero)) /\ forall hlcm_common_unique_zero. (exists hlcm_left_common_unique_zero. hlcm_common_unique_zero = m * hlcm_left_common_unique_zero) -&gt; (exists hlcm_right_common_unique_zero. hlcm_common_unique_zero = n * hlcm_right_common_unique_zero) -&gt; exists hlcm_least_factor_unique_zero. hlcm_common_unique_zero = l * hlcm_least_factor_unique_zero)) -&gt; (((exists hgcrt_mod_left_unique_zero_fixed_left hgcrt_mod_right_unique_zero_fixed_left. x + m * hgcrt_mod_left_unique_zero_fixed_left = a + m * hgcrt_mod_right_unique_zero_fixed_left) /\ (exists hgcrt_mod_left_unique_zero_fixed_right hgcrt_mod_right_unique_zero_fixed_right. x + n * hgcrt_mod_left_unique_zero_fixed_right = b + n * hgcrt_mod_right_unique_zero_fixed_right))) -&gt; (((exists hgcrt_mod_left_unique_zero_candidate_left hgcrt_mod_right_unique_zero_candidate_left. y + m * hgcrt_mod_left_unique_zero_candidate_left = a + m * hgcrt_mod_right_unique_zero_candidate_left) /\ (exists hgcrt_mod_left_unique_zero_candidate_right hgcrt_mod_right_unique_zero_candidate_right. y + n * hgcrt_mod_left_unique_zero_candidate_right = b + n * hgcrt_mod_right_unique_zero_candidate_right))) -&gt; y = x congruence crt_solution_class_iff_lcm mod_eq_zero_iff_eq">
  <details>
    <summary>
      <span class="pa-card-title"><code>crt_solution_unique_lcm_zero</code><span>Crt solution unique lcm zero</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">At relational lcm zero, every common solution equals a fixed common solution.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="crt_solution_class_iff_lcm" href="#theorem-crt_solution_class_iff_lcm"><code>crt_solution_class_iff_lcm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_zero_iff_eq" href="#theorem-mod_eq_zero_iff_eq"><code>mod_eq_zero_iff_eq</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_canonical_boundary" href="#theorem-generalized_binary_crt_canonical_boundary"><code>generalized_binary_crt_canonical_boundary</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-crt_solution_unique_lcm_zero">Copy statement</button>
        <pre id="statement-crt_solution_unique_lcm_zero"><code>forall l m n a b x y. l = 0 -&gt; ((((exists hlcm_left_factor_unique_zero. l = m * hlcm_left_factor_unique_zero) /\ (exists hlcm_right_factor_unique_zero. l = n * hlcm_right_factor_unique_zero)) /\ forall hlcm_common_unique_zero. (exists hlcm_left_common_unique_zero. hlcm_common_unique_zero = m * hlcm_left_common_unique_zero) -&gt; (exists hlcm_right_common_unique_zero. hlcm_common_unique_zero = n * hlcm_right_common_unique_zero) -&gt; exists hlcm_least_factor_unique_zero. hlcm_common_unique_zero = l * hlcm_least_factor_unique_zero)) -&gt; (((exists hgcrt_mod_left_unique_zero_fixed_left hgcrt_mod_right_unique_zero_fixed_left. x + m * hgcrt_mod_left_unique_zero_fixed_left = a + m * hgcrt_mod_right_unique_zero_fixed_left) /\ (exists hgcrt_mod_left_unique_zero_fixed_right hgcrt_mod_right_unique_zero_fixed_right. x + n * hgcrt_mod_left_unique_zero_fixed_right = b + n * hgcrt_mod_right_unique_zero_fixed_right))) -&gt; (((exists hgcrt_mod_left_unique_zero_candidate_left hgcrt_mod_right_unique_zero_candidate_left. y + m * hgcrt_mod_left_unique_zero_candidate_left = a + m * hgcrt_mod_right_unique_zero_candidate_left) /\ (exists hgcrt_mod_left_unique_zero_candidate_right hgcrt_mod_right_unique_zero_candidate_right. y + n * hgcrt_mod_left_unique_zero_candidate_right = b + n * hgcrt_mod_right_unique_zero_candidate_right))) -&gt; y = x</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-crt_solution_unique_lcm_zero">Copy proof</button>
        <pre id="proof-crt_solution_unique_lcm_zero"><code>pa prove forall l m n a b x y. l = 0 -&gt; ((((exists hlcm_left_factor_unique_zero. l = m * hlcm_left_factor_unique_zero) /\ (exists hlcm_right_factor_unique_zero. l = n * hlcm_right_factor_unique_zero)) /\ forall hlcm_common_unique_zero. (exists hlcm_left_common_unique_zero. hlcm_common_unique_zero = m * hlcm_left_common_unique_zero) -&gt; (exists hlcm_right_common_unique_zero. hlcm_common_unique_zero = n * hlcm_right_common_unique_zero) -&gt; exists hlcm_least_factor_unique_zero. hlcm_common_unique_zero = l * hlcm_least_factor_unique_zero)) -&gt; (((exists hgcrt_mod_left_unique_zero_fixed_left hgcrt_mod_right_unique_zero_fixed_left. x + m * hgcrt_mod_left_unique_zero_fixed_left = a + m * hgcrt_mod_right_unique_zero_fixed_left) /\ (exists hgcrt_mod_left_unique_zero_fixed_right hgcrt_mod_right_unique_zero_fixed_right. x + n * hgcrt_mod_left_unique_zero_fixed_right = b + n * hgcrt_mod_right_unique_zero_fixed_right))) -&gt; (((exists hgcrt_mod_left_unique_zero_candidate_left hgcrt_mod_right_unique_zero_candidate_left. y + m * hgcrt_mod_left_unique_zero_candidate_left = a + m * hgcrt_mod_right_unique_zero_candidate_left) /\ (exists hgcrt_mod_left_unique_zero_candidate_right hgcrt_mod_right_unique_zero_candidate_right. y + n * hgcrt_mod_left_unique_zero_candidate_right = b + n * hgcrt_mod_right_unique_zero_candidate_right))) -&gt; y = x
use crt_solution_class_iff_lcm
use mod_eq_zero_iff_eq
intro l
intro m
intro n
intro a
intro b
intro x
intro y
intro hl
intro hlcm
intro hx
intro hy
have hiff : (((((exists hgcrt_mod_left_unique_zero_iff_forward_left hgcrt_mod_right_unique_zero_iff_forward_left. y + m * hgcrt_mod_left_unique_zero_iff_forward_left = a + m * hgcrt_mod_right_unique_zero_iff_forward_left) /\ (exists hgcrt_mod_left_unique_zero_iff_forward_right hgcrt_mod_right_unique_zero_iff_forward_right. y + n * hgcrt_mod_left_unique_zero_iff_forward_right = b + n * hgcrt_mod_right_unique_zero_iff_forward_right))) -&gt; (exists hgcrt_mod_left_unique_zero_mod_forward hgcrt_mod_right_unique_zero_mod_forward. y + l * hgcrt_mod_left_unique_zero_mod_forward = x + l * hgcrt_mod_right_unique_zero_mod_forward)) /\ ((exists hgcrt_mod_left_unique_zero_mod_reverse hgcrt_mod_right_unique_zero_mod_reverse. y + l * hgcrt_mod_left_unique_zero_mod_reverse = x + l * hgcrt_mod_right_unique_zero_mod_reverse) -&gt; (((exists hgcrt_mod_left_unique_zero_iff_reverse_left hgcrt_mod_right_unique_zero_iff_reverse_left. y + m * hgcrt_mod_left_unique_zero_iff_reverse_left = a + m * hgcrt_mod_right_unique_zero_iff_reverse_left) /\ (exists hgcrt_mod_left_unique_zero_iff_reverse_right hgcrt_mod_right_unique_zero_iff_reverse_right. y + n * hgcrt_mod_left_unique_zero_iff_reverse_right = b + n * hgcrt_mod_right_unique_zero_iff_reverse_right)))))
specialize crt_solution_class_iff_lcm l
specialize crt_solution_class_iff_lcm m
specialize crt_solution_class_iff_lcm n
specialize crt_solution_class_iff_lcm a
specialize crt_solution_class_iff_lcm b
specialize crt_solution_class_iff_lcm x
specialize crt_solution_class_iff_lcm y
apply crt_solution_class_iff_lcm
exact hlcm
exact hx
cases hiff
have hmod : exists hgcrt_mod_left_unique_zero_mod_result hgcrt_mod_right_unique_zero_mod_result. y + l * hgcrt_mod_left_unique_zero_mod_result = x + l * hgcrt_mod_right_unique_zero_mod_result
apply hiff_left
exact hy
rewrite hl at hmod
rewrite hl at hmod
specialize mod_eq_zero_iff_eq y
specialize mod_eq_zero_iff_eq x
cases mod_eq_zero_iff_eq
apply mod_eq_zero_iff_eq_left
exact hmod
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,300</dd></div>
        <div><dt>Distinct objects</dt><dd>1,126</dd></div>
        <div><dt>Reused references</dt><dd>51</dd></div>
        <div><dt>Depth</dt><dd>40</dd></div>
        <div><dt>Cuts</dt><dd>66</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="05a457c953d53a52baac0aaa765eeafea9a324804bf7a1cbab5ca912d1c7a77e">05a457c953d5…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for crt_solution_unique_lcm_zero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib crt_solution_unique_lcm_zero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_canonical_boundary_candidate.py#L394">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/crt_solution_unique_lcm_zero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-crt_solution_canonical_remainder_nonzero"
  data-name="crt_solution_canonical_remainder_nonzero" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="division_remainder_exists,mul_comm,remainder_decomposition_to_mod_eq,mod_eq_symm,crt_solution_class_iff_lcm,mod_eq_bounded_unique"
  data-search="crt_solution_canonical_remainder_nonzero crt solution canonical remainder nonzero at nonzero relational lcm, every solvable binary crt system has a unique solution below the lcm. forall l m n a b x. ~(l = 0) -&gt; ((((exists hlcm_left_factor_canonical_nonzero. l = m * hlcm_left_factor_canonical_nonzero) /\ (exists hlcm_right_factor_canonical_nonzero. l = n * hlcm_right_factor_canonical_nonzero)) /\ forall hlcm_common_canonical_nonzero. (exists hlcm_left_common_canonical_nonzero. hlcm_common_canonical_nonzero = m * hlcm_left_common_canonical_nonzero) -&gt; (exists hlcm_right_common_canonical_nonzero. hlcm_common_canonical_nonzero = n * hlcm_right_common_canonical_nonzero) -&gt; exists hlcm_least_factor_canonical_nonzero. hlcm_common_canonical_nonzero = l * hlcm_least_factor_canonical_nonzero)) -&gt; (((exists hgcrt_mod_left_canonical_nonzero_fixed_left hgcrt_mod_right_canonical_nonzero_fixed_left. x + m * hgcrt_mod_left_canonical_nonzero_fixed_left = a + m * hgcrt_mod_right_canonical_nonzero_fixed_left) /\ (exists hgcrt_mod_left_canonical_nonzero_fixed_right hgcrt_mod_right_canonical_nonzero_fixed_right. x + n * hgcrt_mod_left_canonical_nonzero_fixed_right = b + n * hgcrt_mod_right_canonical_nonzero_fixed_right))) -&gt; exists r. (((exists hgcrt_below_gap_canonical_nonzero_result. hgcrt_below_gap_canonical_nonzero_result + s r = l) /\ (((exists hgcrt_mod_left_canonical_nonzero_result_left hgcrt_mod_right_canonical_nonzero_result_left. r + m * hgcrt_mod_left_canonical_nonzero_result_left = a + m * hgcrt_mod_right_canonical_nonzero_result_left) /\ (exists hgcrt_mod_left_canonical_nonzero_result_right hgcrt_mod_right_canonical_nonzero_result_right. r + n * hgcrt_mod_left_canonical_nonzero_result_right = b + n * hgcrt_mod_right_canonical_nonzero_result_right)))) /\ ((exists hgcrt_mod_left_canonical_nonzero_result hgcrt_mod_right_canonical_nonzero_result. r + l * hgcrt_mod_left_canonical_nonzero_result = x + l * hgcrt_mod_right_canonical_nonzero_result) /\ forall s. (exists hgcrt_below_gap_canonical_nonzero_comparison. hgcrt_below_gap_canonical_nonzero_comparison + s s = l) -&gt; (((exists hgcrt_mod_left_canonical_nonzero_comparison_left hgcrt_mod_right_canonical_nonzero_comparison_left. s + m * hgcrt_mod_left_canonical_nonzero_comparison_left = a + m * hgcrt_mod_right_canonical_nonzero_comparison_left) /\ (exists hgcrt_mod_left_canonical_nonzero_comparison_right hgcrt_mod_right_canonical_nonzero_comparison_right. s + n * hgcrt_mod_left_canonical_nonzero_comparison_right = b + n * hgcrt_mod_right_canonical_nonzero_comparison_right))) -&gt; s = r)) congruence division_remainder_exists mul_comm remainder_decomposition_to_mod_eq mod_eq_symm crt_solution_class_iff_lcm mod_eq_bounded_unique">
  <details>
    <summary>
      <span class="pa-card-title"><code>crt_solution_canonical_remainder_nonzero</code><span>Crt solution canonical remainder nonzero</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">At nonzero relational lcm, every solvable binary CRT system has a unique solution below the lcm.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="division_remainder_exists" href="#theorem-division_remainder_exists"><code>division_remainder_exists</code></a> <a class="pa-theorem-chip" data-theorem-link="mul_comm" href="#theorem-mul_comm"><code>mul_comm</code></a> <a class="pa-theorem-chip" data-theorem-link="remainder_decomposition_to_mod_eq" href="#theorem-remainder_decomposition_to_mod_eq"><code>remainder_decomposition_to_mod_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_symm" href="#theorem-mod_eq_symm"><code>mod_eq_symm</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_class_iff_lcm" href="#theorem-crt_solution_class_iff_lcm"><code>crt_solution_class_iff_lcm</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_bounded_unique" href="#theorem-mod_eq_bounded_unique"><code>mod_eq_bounded_unique</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_canonical_boundary" href="#theorem-generalized_binary_crt_canonical_boundary"><code>generalized_binary_crt_canonical_boundary</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-crt_solution_canonical_remainder_nonzero">Copy statement</button>
        <pre id="statement-crt_solution_canonical_remainder_nonzero"><code>forall l m n a b x. ~(l = 0) -&gt; ((((exists hlcm_left_factor_canonical_nonzero. l = m * hlcm_left_factor_canonical_nonzero) /\ (exists hlcm_right_factor_canonical_nonzero. l = n * hlcm_right_factor_canonical_nonzero)) /\ forall hlcm_common_canonical_nonzero. (exists hlcm_left_common_canonical_nonzero. hlcm_common_canonical_nonzero = m * hlcm_left_common_canonical_nonzero) -&gt; (exists hlcm_right_common_canonical_nonzero. hlcm_common_canonical_nonzero = n * hlcm_right_common_canonical_nonzero) -&gt; exists hlcm_least_factor_canonical_nonzero. hlcm_common_canonical_nonzero = l * hlcm_least_factor_canonical_nonzero)) -&gt; (((exists hgcrt_mod_left_canonical_nonzero_fixed_left hgcrt_mod_right_canonical_nonzero_fixed_left. x + m * hgcrt_mod_left_canonical_nonzero_fixed_left = a + m * hgcrt_mod_right_canonical_nonzero_fixed_left) /\ (exists hgcrt_mod_left_canonical_nonzero_fixed_right hgcrt_mod_right_canonical_nonzero_fixed_right. x + n * hgcrt_mod_left_canonical_nonzero_fixed_right = b + n * hgcrt_mod_right_canonical_nonzero_fixed_right))) -&gt; exists r. (((exists hgcrt_below_gap_canonical_nonzero_result. hgcrt_below_gap_canonical_nonzero_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_nonzero_result_left hgcrt_mod_right_canonical_nonzero_result_left. r + m * hgcrt_mod_left_canonical_nonzero_result_left = a + m * hgcrt_mod_right_canonical_nonzero_result_left) /\ (exists hgcrt_mod_left_canonical_nonzero_result_right hgcrt_mod_right_canonical_nonzero_result_right. r + n * hgcrt_mod_left_canonical_nonzero_result_right = b + n * hgcrt_mod_right_canonical_nonzero_result_right)))) /\ ((exists hgcrt_mod_left_canonical_nonzero_result hgcrt_mod_right_canonical_nonzero_result. r + l * hgcrt_mod_left_canonical_nonzero_result = x + l * hgcrt_mod_right_canonical_nonzero_result) /\ forall s. (exists hgcrt_below_gap_canonical_nonzero_comparison. hgcrt_below_gap_canonical_nonzero_comparison + S s = l) -&gt; (((exists hgcrt_mod_left_canonical_nonzero_comparison_left hgcrt_mod_right_canonical_nonzero_comparison_left. s + m * hgcrt_mod_left_canonical_nonzero_comparison_left = a + m * hgcrt_mod_right_canonical_nonzero_comparison_left) /\ (exists hgcrt_mod_left_canonical_nonzero_comparison_right hgcrt_mod_right_canonical_nonzero_comparison_right. s + n * hgcrt_mod_left_canonical_nonzero_comparison_right = b + n * hgcrt_mod_right_canonical_nonzero_comparison_right))) -&gt; s = r))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-crt_solution_canonical_remainder_nonzero">Copy proof</button>
        <pre id="proof-crt_solution_canonical_remainder_nonzero"><code>pa prove forall l m n a b x. ~(l = 0) -&gt; ((((exists hlcm_left_factor_canonical_nonzero. l = m * hlcm_left_factor_canonical_nonzero) /\ (exists hlcm_right_factor_canonical_nonzero. l = n * hlcm_right_factor_canonical_nonzero)) /\ forall hlcm_common_canonical_nonzero. (exists hlcm_left_common_canonical_nonzero. hlcm_common_canonical_nonzero = m * hlcm_left_common_canonical_nonzero) -&gt; (exists hlcm_right_common_canonical_nonzero. hlcm_common_canonical_nonzero = n * hlcm_right_common_canonical_nonzero) -&gt; exists hlcm_least_factor_canonical_nonzero. hlcm_common_canonical_nonzero = l * hlcm_least_factor_canonical_nonzero)) -&gt; (((exists hgcrt_mod_left_canonical_nonzero_fixed_left hgcrt_mod_right_canonical_nonzero_fixed_left. x + m * hgcrt_mod_left_canonical_nonzero_fixed_left = a + m * hgcrt_mod_right_canonical_nonzero_fixed_left) /\ (exists hgcrt_mod_left_canonical_nonzero_fixed_right hgcrt_mod_right_canonical_nonzero_fixed_right. x + n * hgcrt_mod_left_canonical_nonzero_fixed_right = b + n * hgcrt_mod_right_canonical_nonzero_fixed_right))) -&gt; exists r. (((exists hgcrt_below_gap_canonical_nonzero_result. hgcrt_below_gap_canonical_nonzero_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_nonzero_result_left hgcrt_mod_right_canonical_nonzero_result_left. r + m * hgcrt_mod_left_canonical_nonzero_result_left = a + m * hgcrt_mod_right_canonical_nonzero_result_left) /\ (exists hgcrt_mod_left_canonical_nonzero_result_right hgcrt_mod_right_canonical_nonzero_result_right. r + n * hgcrt_mod_left_canonical_nonzero_result_right = b + n * hgcrt_mod_right_canonical_nonzero_result_right)))) /\ ((exists hgcrt_mod_left_canonical_nonzero_result hgcrt_mod_right_canonical_nonzero_result. r + l * hgcrt_mod_left_canonical_nonzero_result = x + l * hgcrt_mod_right_canonical_nonzero_result) /\ forall s. (exists hgcrt_below_gap_canonical_nonzero_comparison. hgcrt_below_gap_canonical_nonzero_comparison + S s = l) -&gt; (((exists hgcrt_mod_left_canonical_nonzero_comparison_left hgcrt_mod_right_canonical_nonzero_comparison_left. s + m * hgcrt_mod_left_canonical_nonzero_comparison_left = a + m * hgcrt_mod_right_canonical_nonzero_comparison_left) /\ (exists hgcrt_mod_left_canonical_nonzero_comparison_right hgcrt_mod_right_canonical_nonzero_comparison_right. s + n * hgcrt_mod_left_canonical_nonzero_comparison_right = b + n * hgcrt_mod_right_canonical_nonzero_comparison_right))) -&gt; s = r))
use division_remainder_exists
use mul_comm
use remainder_decomposition_to_mod_eq
use mod_eq_symm
use crt_solution_class_iff_lcm
use mod_eq_bounded_unique
intro l
intro m
intro n
intro a
intro b
intro x
intro hl
intro hlcm
intro hx
have hdivision : exists q r. x = l * q + r /\ exists gap. gap + S r = l
specialize division_remainder_exists l
specialize division_remainder_exists x
apply division_remainder_exists
exact hl
cases hdivision
cases hdivision_witness
cases hdivision_witness_witness
have hxdecomp : x = x1 * l + x2
trans l * x1 + x2
exact hdivision_witness_witness_left
congr
apply mul_comm
refl
have hxx2 : exists hgcrt_mod_left_canonical_runtime_x_x2 hgcrt_mod_right_canonical_runtime_x_x2. x + l * hgcrt_mod_left_canonical_runtime_x_x2 = x2 + l * hgcrt_mod_right_canonical_runtime_x_x2
specialize remainder_decomposition_to_mod_eq l
specialize remainder_decomposition_to_mod_eq x
specialize remainder_decomposition_to_mod_eq x1
specialize remainder_decomposition_to_mod_eq x2
apply remainder_decomposition_to_mod_eq
exact hxdecomp
have hx2x : exists hgcrt_mod_left_canonical_runtime_x2_x hgcrt_mod_right_canonical_runtime_x2_x. x2 + l * hgcrt_mod_left_canonical_runtime_x2_x = x + l * hgcrt_mod_right_canonical_runtime_x2_x
specialize mod_eq_symm l
specialize mod_eq_symm x
specialize mod_eq_symm x2
apply mod_eq_symm
exact hxx2
have hclass : (((((exists hgcrt_mod_left_canonical_runtime_class_forward_left hgcrt_mod_right_canonical_runtime_class_forward_left. x2 + m * hgcrt_mod_left_canonical_runtime_class_forward_left = a + m * hgcrt_mod_right_canonical_runtime_class_forward_left) /\ (exists hgcrt_mod_left_canonical_runtime_class_forward_right hgcrt_mod_right_canonical_runtime_class_forward_right. x2 + n * hgcrt_mod_left_canonical_runtime_class_forward_right = b + n * hgcrt_mod_right_canonical_runtime_class_forward_right))) -&gt; (exists hgcrt_mod_left_canonical_runtime_class_forward hgcrt_mod_right_canonical_runtime_class_forward. x2 + l * hgcrt_mod_left_canonical_runtime_class_forward = x + l * hgcrt_mod_right_canonical_runtime_class_forward)) /\ ((exists hgcrt_mod_left_canonical_runtime_class_reverse hgcrt_mod_right_canonical_runtime_class_reverse. x2 + l * hgcrt_mod_left_canonical_runtime_class_reverse = x + l * hgcrt_mod_right_canonical_runtime_class_reverse) -&gt; (((exists hgcrt_mod_left_canonical_runtime_class_reverse_left hgcrt_mod_right_canonical_runtime_class_reverse_left. x2 + m * hgcrt_mod_left_canonical_runtime_class_reverse_left = a + m * hgcrt_mod_right_canonical_runtime_class_reverse_left) /\ (exists hgcrt_mod_left_canonical_runtime_class_reverse_right hgcrt_mod_right_canonical_runtime_class_reverse_right. x2 + n * hgcrt_mod_left_canonical_runtime_class_reverse_right = b + n * hgcrt_mod_right_canonical_runtime_class_reverse_right)))))
specialize crt_solution_class_iff_lcm l
specialize crt_solution_class_iff_lcm m
specialize crt_solution_class_iff_lcm n
specialize crt_solution_class_iff_lcm a
specialize crt_solution_class_iff_lcm b
specialize crt_solution_class_iff_lcm x
specialize crt_solution_class_iff_lcm x2
apply crt_solution_class_iff_lcm
exact hlcm
exact hx
cases hclass
have hrsol : ((exists hgcrt_mod_left_canonical_runtime_result_left hgcrt_mod_right_canonical_runtime_result_left. x2 + m * hgcrt_mod_left_canonical_runtime_result_left = a + m * hgcrt_mod_right_canonical_runtime_result_left) /\ (exists hgcrt_mod_left_canonical_runtime_result_right hgcrt_mod_right_canonical_runtime_result_right. x2 + n * hgcrt_mod_left_canonical_runtime_result_right = b + n * hgcrt_mod_right_canonical_runtime_result_right))
apply hclass_right
exact hx2x
exists x2
split
split
exact hdivision_witness_witness_right
exact hrsol
split
exact hx2x
intro s
intro hsbound
intro hssol
have hclasss : (((((exists hgcrt_mod_left_canonical_runtime_comparison_forward_left hgcrt_mod_right_canonical_runtime_comparison_forward_left. s + m * hgcrt_mod_left_canonical_runtime_comparison_forward_left = a + m * hgcrt_mod_right_canonical_runtime_comparison_forward_left) /\ (exists hgcrt_mod_left_canonical_runtime_comparison_forward_right hgcrt_mod_right_canonical_runtime_comparison_forward_right. s + n * hgcrt_mod_left_canonical_runtime_comparison_forward_right = b + n * hgcrt_mod_right_canonical_runtime_comparison_forward_right))) -&gt; (exists hgcrt_mod_left_canonical_runtime_comparison_forward hgcrt_mod_right_canonical_runtime_comparison_forward. s + l * hgcrt_mod_left_canonical_runtime_comparison_forward = x2 + l * hgcrt_mod_right_canonical_runtime_comparison_forward)) /\ ((exists hgcrt_mod_left_canonical_runtime_comparison_reverse hgcrt_mod_right_canonical_runtime_comparison_reverse. s + l * hgcrt_mod_left_canonical_runtime_comparison_reverse = x2 + l * hgcrt_mod_right_canonical_runtime_comparison_reverse) -&gt; (((exists hgcrt_mod_left_canonical_runtime_comparison_reverse_left hgcrt_mod_right_canonical_runtime_comparison_reverse_left. s + m * hgcrt_mod_left_canonical_runtime_comparison_reverse_left = a + m * hgcrt_mod_right_canonical_runtime_comparison_reverse_left) /\ (exists hgcrt_mod_left_canonical_runtime_comparison_reverse_right hgcrt_mod_right_canonical_runtime_comparison_reverse_right. s + n * hgcrt_mod_left_canonical_runtime_comparison_reverse_right = b + n * hgcrt_mod_right_canonical_runtime_comparison_reverse_right)))))
specialize crt_solution_class_iff_lcm l
specialize crt_solution_class_iff_lcm m
specialize crt_solution_class_iff_lcm n
specialize crt_solution_class_iff_lcm a
specialize crt_solution_class_iff_lcm b
specialize crt_solution_class_iff_lcm x2
specialize crt_solution_class_iff_lcm s
apply crt_solution_class_iff_lcm
exact hlcm
exact hrsol
cases hclasss
have hsmod : exists hgcrt_mod_left_canonical_runtime_comparison_result hgcrt_mod_right_canonical_runtime_comparison_result. s + l * hgcrt_mod_left_canonical_runtime_comparison_result = x2 + l * hgcrt_mod_right_canonical_runtime_comparison_result
apply hclasss_left
exact hssol
specialize mod_eq_bounded_unique l
specialize mod_eq_bounded_unique s
specialize mod_eq_bounded_unique x2
apply mod_eq_bounded_unique
exact hsbound
exact hdivision_witness_witness_right
exact hsmod
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>4,086</dd></div>
        <div><dt>Distinct objects</dt><dd>1,668</dd></div>
        <div><dt>Reused references</dt><dd>79</dd></div>
        <div><dt>Depth</dt><dd>65</dd></div>
        <div><dt>Cuts</dt><dd>116</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="c3c9f2d9d2cbb8583b2fe40aa40c63c382f907e18fc78b392e538bc3ab6bd72d">c3c9f2d9d2cb…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for crt_solution_canonical_remainder_nonzero">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib crt_solution_canonical_remainder_nonzero</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_canonical_boundary_candidate.py#L436">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/crt_solution_canonical_remainder_nonzero.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_canonical_boundary"
  data-name="generalized_binary_crt_canonical_boundary" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="eq_decidable,generalized_binary_crt_sufficient,crt_solution_unique_lcm_zero,crt_solution_canonical_remainder_nonzero"
  data-search="generalized_binary_crt_canonical_boundary generalized binary crt canonical boundary every compatible binary crt system has the correct canonical boundary: exact uniqueness at lcm zero or one unique bounded representative at nonzero lcm. forall g l m n a b. ((((exists hag_left_factor_canonical_boundary. m = g * hag_left_factor_canonical_boundary) /\ (exists hag_right_factor_canonical_boundary. n = g * hag_right_factor_canonical_boundary)) /\ forall hag_divisor_canonical_boundary. (exists hag_common_left_canonical_boundary. m = hag_divisor_canonical_boundary * hag_common_left_canonical_boundary) -&gt; (exists hag_common_right_canonical_boundary. n = hag_divisor_canonical_boundary * hag_common_right_canonical_boundary) -&gt; exists hag_greatest_factor_canonical_boundary. g = hag_divisor_canonical_boundary * hag_greatest_factor_canonical_boundary)) -&gt; ((((exists hlcm_left_factor_canonical_boundary. l = m * hlcm_left_factor_canonical_boundary) /\ (exists hlcm_right_factor_canonical_boundary. l = n * hlcm_right_factor_canonical_boundary)) /\ forall hlcm_common_canonical_boundary. (exists hlcm_left_common_canonical_boundary. hlcm_common_canonical_boundary = m * hlcm_left_common_canonical_boundary) -&gt; (exists hlcm_right_common_canonical_boundary. hlcm_common_canonical_boundary = n * hlcm_right_common_canonical_boundary) -&gt; exists hlcm_least_factor_canonical_boundary. hlcm_common_canonical_boundary = l * hlcm_least_factor_canonical_boundary)) -&gt; (exists hgcrt_mod_left_canonical_boundary_compatibility hgcrt_mod_right_canonical_boundary_compatibility. a + g * hgcrt_mod_left_canonical_boundary_compatibility = b + g * hgcrt_mod_right_canonical_boundary_compatibility) -&gt; (((l = 0 /\ exists x. ((((exists hgcrt_mod_left_canonical_boundary_fixed_left hgcrt_mod_right_canonical_boundary_fixed_left. x + m * hgcrt_mod_left_canonical_boundary_fixed_left = a + m * hgcrt_mod_right_canonical_boundary_fixed_left) /\ (exists hgcrt_mod_left_canonical_boundary_fixed_right hgcrt_mod_right_canonical_boundary_fixed_right. x + n * hgcrt_mod_left_canonical_boundary_fixed_right = b + n * hgcrt_mod_right_canonical_boundary_fixed_right))) /\ forall y. (((exists hgcrt_mod_left_canonical_boundary_zero_candidate_left hgcrt_mod_right_canonical_boundary_zero_candidate_left. y + m * hgcrt_mod_left_canonical_boundary_zero_candidate_left = a + m * hgcrt_mod_right_canonical_boundary_zero_candidate_left) /\ (exists hgcrt_mod_left_canonical_boundary_zero_candidate_right hgcrt_mod_right_canonical_boundary_zero_candidate_right. y + n * hgcrt_mod_left_canonical_boundary_zero_candidate_right = b + n * hgcrt_mod_right_canonical_boundary_zero_candidate_right))) -&gt; y = x))) \/ ((~(l = 0) /\ exists r. (((exists hgcrt_below_gap_canonical_boundary_result. hgcrt_below_gap_canonical_boundary_result + s r = l) /\ (((exists hgcrt_mod_left_canonical_boundary_result_left hgcrt_mod_right_canonical_boundary_result_left. r + m * hgcrt_mod_left_canonical_boundary_result_left = a + m * hgcrt_mod_right_canonical_boundary_result_left) /\ (exists hgcrt_mod_left_canonical_boundary_result_right hgcrt_mod_right_canonical_boundary_result_right. r + n * hgcrt_mod_left_canonical_boundary_result_right = b + n * hgcrt_mod_right_canonical_boundary_result_right)))) /\ forall s. (exists hgcrt_below_gap_canonical_boundary_comparison. hgcrt_below_gap_canonical_boundary_comparison + s s = l) -&gt; (((exists hgcrt_mod_left_canonical_boundary_comparison_left hgcrt_mod_right_canonical_boundary_comparison_left. s + m * hgcrt_mod_left_canonical_boundary_comparison_left = a + m * hgcrt_mod_right_canonical_boundary_comparison_left) /\ (exists hgcrt_mod_left_canonical_boundary_comparison_right hgcrt_mod_right_canonical_boundary_comparison_right. s + n * hgcrt_mod_left_canonical_boundary_comparison_right = b + n * hgcrt_mod_right_canonical_boundary_comparison_right))) -&gt; s = r)))) congruence eq_decidable generalized_binary_crt_sufficient crt_solution_unique_lcm_zero crt_solution_canonical_remainder_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_canonical_boundary</code><span>Generalized binary crt canonical boundary</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every compatible binary CRT system has the correct canonical boundary: exact uniqueness at lcm zero or one unique bounded representative at nonzero lcm.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient" href="#theorem-generalized_binary_crt_sufficient"><code>generalized_binary_crt_sufficient</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_unique_lcm_zero" href="#theorem-crt_solution_unique_lcm_zero"><code>crt_solution_unique_lcm_zero</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_solution_canonical_remainder_nonzero" href="#theorem-crt_solution_canonical_remainder_nonzero"><code>crt_solution_canonical_remainder_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_canonical_boundary">Copy statement</button>
        <pre id="statement-generalized_binary_crt_canonical_boundary"><code>forall g l m n a b. ((((exists hag_left_factor_canonical_boundary. m = g * hag_left_factor_canonical_boundary) /\ (exists hag_right_factor_canonical_boundary. n = g * hag_right_factor_canonical_boundary)) /\ forall hag_divisor_canonical_boundary. (exists hag_common_left_canonical_boundary. m = hag_divisor_canonical_boundary * hag_common_left_canonical_boundary) -&gt; (exists hag_common_right_canonical_boundary. n = hag_divisor_canonical_boundary * hag_common_right_canonical_boundary) -&gt; exists hag_greatest_factor_canonical_boundary. g = hag_divisor_canonical_boundary * hag_greatest_factor_canonical_boundary)) -&gt; ((((exists hlcm_left_factor_canonical_boundary. l = m * hlcm_left_factor_canonical_boundary) /\ (exists hlcm_right_factor_canonical_boundary. l = n * hlcm_right_factor_canonical_boundary)) /\ forall hlcm_common_canonical_boundary. (exists hlcm_left_common_canonical_boundary. hlcm_common_canonical_boundary = m * hlcm_left_common_canonical_boundary) -&gt; (exists hlcm_right_common_canonical_boundary. hlcm_common_canonical_boundary = n * hlcm_right_common_canonical_boundary) -&gt; exists hlcm_least_factor_canonical_boundary. hlcm_common_canonical_boundary = l * hlcm_least_factor_canonical_boundary)) -&gt; (exists hgcrt_mod_left_canonical_boundary_compatibility hgcrt_mod_right_canonical_boundary_compatibility. a + g * hgcrt_mod_left_canonical_boundary_compatibility = b + g * hgcrt_mod_right_canonical_boundary_compatibility) -&gt; (((l = 0 /\ exists x. ((((exists hgcrt_mod_left_canonical_boundary_fixed_left hgcrt_mod_right_canonical_boundary_fixed_left. x + m * hgcrt_mod_left_canonical_boundary_fixed_left = a + m * hgcrt_mod_right_canonical_boundary_fixed_left) /\ (exists hgcrt_mod_left_canonical_boundary_fixed_right hgcrt_mod_right_canonical_boundary_fixed_right. x + n * hgcrt_mod_left_canonical_boundary_fixed_right = b + n * hgcrt_mod_right_canonical_boundary_fixed_right))) /\ forall y. (((exists hgcrt_mod_left_canonical_boundary_zero_candidate_left hgcrt_mod_right_canonical_boundary_zero_candidate_left. y + m * hgcrt_mod_left_canonical_boundary_zero_candidate_left = a + m * hgcrt_mod_right_canonical_boundary_zero_candidate_left) /\ (exists hgcrt_mod_left_canonical_boundary_zero_candidate_right hgcrt_mod_right_canonical_boundary_zero_candidate_right. y + n * hgcrt_mod_left_canonical_boundary_zero_candidate_right = b + n * hgcrt_mod_right_canonical_boundary_zero_candidate_right))) -&gt; y = x))) \/ ((~(l = 0) /\ exists r. (((exists hgcrt_below_gap_canonical_boundary_result. hgcrt_below_gap_canonical_boundary_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_boundary_result_left hgcrt_mod_right_canonical_boundary_result_left. r + m * hgcrt_mod_left_canonical_boundary_result_left = a + m * hgcrt_mod_right_canonical_boundary_result_left) /\ (exists hgcrt_mod_left_canonical_boundary_result_right hgcrt_mod_right_canonical_boundary_result_right. r + n * hgcrt_mod_left_canonical_boundary_result_right = b + n * hgcrt_mod_right_canonical_boundary_result_right)))) /\ forall s. (exists hgcrt_below_gap_canonical_boundary_comparison. hgcrt_below_gap_canonical_boundary_comparison + S s = l) -&gt; (((exists hgcrt_mod_left_canonical_boundary_comparison_left hgcrt_mod_right_canonical_boundary_comparison_left. s + m * hgcrt_mod_left_canonical_boundary_comparison_left = a + m * hgcrt_mod_right_canonical_boundary_comparison_left) /\ (exists hgcrt_mod_left_canonical_boundary_comparison_right hgcrt_mod_right_canonical_boundary_comparison_right. s + n * hgcrt_mod_left_canonical_boundary_comparison_right = b + n * hgcrt_mod_right_canonical_boundary_comparison_right))) -&gt; s = r))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_canonical_boundary">Copy proof</button>
        <pre id="proof-generalized_binary_crt_canonical_boundary"><code>pa prove forall g l m n a b. ((((exists hag_left_factor_canonical_boundary. m = g * hag_left_factor_canonical_boundary) /\ (exists hag_right_factor_canonical_boundary. n = g * hag_right_factor_canonical_boundary)) /\ forall hag_divisor_canonical_boundary. (exists hag_common_left_canonical_boundary. m = hag_divisor_canonical_boundary * hag_common_left_canonical_boundary) -&gt; (exists hag_common_right_canonical_boundary. n = hag_divisor_canonical_boundary * hag_common_right_canonical_boundary) -&gt; exists hag_greatest_factor_canonical_boundary. g = hag_divisor_canonical_boundary * hag_greatest_factor_canonical_boundary)) -&gt; ((((exists hlcm_left_factor_canonical_boundary. l = m * hlcm_left_factor_canonical_boundary) /\ (exists hlcm_right_factor_canonical_boundary. l = n * hlcm_right_factor_canonical_boundary)) /\ forall hlcm_common_canonical_boundary. (exists hlcm_left_common_canonical_boundary. hlcm_common_canonical_boundary = m * hlcm_left_common_canonical_boundary) -&gt; (exists hlcm_right_common_canonical_boundary. hlcm_common_canonical_boundary = n * hlcm_right_common_canonical_boundary) -&gt; exists hlcm_least_factor_canonical_boundary. hlcm_common_canonical_boundary = l * hlcm_least_factor_canonical_boundary)) -&gt; (exists hgcrt_mod_left_canonical_boundary_compatibility hgcrt_mod_right_canonical_boundary_compatibility. a + g * hgcrt_mod_left_canonical_boundary_compatibility = b + g * hgcrt_mod_right_canonical_boundary_compatibility) -&gt; (((l = 0 /\ exists x. ((((exists hgcrt_mod_left_canonical_boundary_fixed_left hgcrt_mod_right_canonical_boundary_fixed_left. x + m * hgcrt_mod_left_canonical_boundary_fixed_left = a + m * hgcrt_mod_right_canonical_boundary_fixed_left) /\ (exists hgcrt_mod_left_canonical_boundary_fixed_right hgcrt_mod_right_canonical_boundary_fixed_right. x + n * hgcrt_mod_left_canonical_boundary_fixed_right = b + n * hgcrt_mod_right_canonical_boundary_fixed_right))) /\ forall y. (((exists hgcrt_mod_left_canonical_boundary_zero_candidate_left hgcrt_mod_right_canonical_boundary_zero_candidate_left. y + m * hgcrt_mod_left_canonical_boundary_zero_candidate_left = a + m * hgcrt_mod_right_canonical_boundary_zero_candidate_left) /\ (exists hgcrt_mod_left_canonical_boundary_zero_candidate_right hgcrt_mod_right_canonical_boundary_zero_candidate_right. y + n * hgcrt_mod_left_canonical_boundary_zero_candidate_right = b + n * hgcrt_mod_right_canonical_boundary_zero_candidate_right))) -&gt; y = x))) \/ ((~(l = 0) /\ exists r. (((exists hgcrt_below_gap_canonical_boundary_result. hgcrt_below_gap_canonical_boundary_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_boundary_result_left hgcrt_mod_right_canonical_boundary_result_left. r + m * hgcrt_mod_left_canonical_boundary_result_left = a + m * hgcrt_mod_right_canonical_boundary_result_left) /\ (exists hgcrt_mod_left_canonical_boundary_result_right hgcrt_mod_right_canonical_boundary_result_right. r + n * hgcrt_mod_left_canonical_boundary_result_right = b + n * hgcrt_mod_right_canonical_boundary_result_right)))) /\ forall s. (exists hgcrt_below_gap_canonical_boundary_comparison. hgcrt_below_gap_canonical_boundary_comparison + S s = l) -&gt; (((exists hgcrt_mod_left_canonical_boundary_comparison_left hgcrt_mod_right_canonical_boundary_comparison_left. s + m * hgcrt_mod_left_canonical_boundary_comparison_left = a + m * hgcrt_mod_right_canonical_boundary_comparison_left) /\ (exists hgcrt_mod_left_canonical_boundary_comparison_right hgcrt_mod_right_canonical_boundary_comparison_right. s + n * hgcrt_mod_left_canonical_boundary_comparison_right = b + n * hgcrt_mod_right_canonical_boundary_comparison_right))) -&gt; s = r))))
use eq_decidable
use generalized_binary_crt_sufficient
use crt_solution_unique_lcm_zero
use crt_solution_canonical_remainder_nonzero
intro g
intro l
intro m
intro n
intro a
intro b
intro hg
intro hl
intro hab
have hexists : exists x. (((exists hgcrt_mod_left_canonical_boundary_fixed_left hgcrt_mod_right_canonical_boundary_fixed_left. x + m * hgcrt_mod_left_canonical_boundary_fixed_left = a + m * hgcrt_mod_right_canonical_boundary_fixed_left) /\ (exists hgcrt_mod_left_canonical_boundary_fixed_right hgcrt_mod_right_canonical_boundary_fixed_right. x + n * hgcrt_mod_left_canonical_boundary_fixed_right = b + n * hgcrt_mod_right_canonical_boundary_fixed_right)))
specialize generalized_binary_crt_sufficient g
specialize generalized_binary_crt_sufficient m
specialize generalized_binary_crt_sufficient n
specialize generalized_binary_crt_sufficient a
specialize generalized_binary_crt_sufficient b
apply generalized_binary_crt_sufficient
exact hg
exact hab
cases hexists
have hlzero : l = 0 \/ ~(l = 0)
specialize eq_decidable l
specialize eq_decidable 0
exact eq_decidable
cases hlzero
left
split
exact hlzero_left
exists x
split
exact hexists_witness
intro y
intro hy
specialize crt_solution_unique_lcm_zero l
specialize crt_solution_unique_lcm_zero m
specialize crt_solution_unique_lcm_zero n
specialize crt_solution_unique_lcm_zero a
specialize crt_solution_unique_lcm_zero b
specialize crt_solution_unique_lcm_zero x
specialize crt_solution_unique_lcm_zero y
apply crt_solution_unique_lcm_zero
exact hlzero_left
exact hl
exact hexists_witness
exact hy
right
split
exact hlzero_right
have hcanonical : exists r. (((exists hgcrt_below_gap_canonical_boundary_runtime_result. hgcrt_below_gap_canonical_boundary_runtime_result + S r = l) /\ (((exists hgcrt_mod_left_canonical_boundary_runtime_result_left hgcrt_mod_right_canonical_boundary_runtime_result_left. r + m * hgcrt_mod_left_canonical_boundary_runtime_result_left = a + m * hgcrt_mod_right_canonical_boundary_runtime_result_left) /\ (exists hgcrt_mod_left_canonical_boundary_runtime_result_right hgcrt_mod_right_canonical_boundary_runtime_result_right. r + n * hgcrt_mod_left_canonical_boundary_runtime_result_right = b + n * hgcrt_mod_right_canonical_boundary_runtime_result_right)))) /\ ((exists hgcrt_mod_left_canonical_boundary_runtime_mod hgcrt_mod_right_canonical_boundary_runtime_mod. r + l * hgcrt_mod_left_canonical_boundary_runtime_mod = x + l * hgcrt_mod_right_canonical_boundary_runtime_mod) /\ forall s. (exists hgcrt_below_gap_canonical_boundary_runtime_comparison. hgcrt_below_gap_canonical_boundary_runtime_comparison + S s = l) -&gt; (((exists hgcrt_mod_left_canonical_boundary_runtime_comparison_left hgcrt_mod_right_canonical_boundary_runtime_comparison_left. s + m * hgcrt_mod_left_canonical_boundary_runtime_comparison_left = a + m * hgcrt_mod_right_canonical_boundary_runtime_comparison_left) /\ (exists hgcrt_mod_left_canonical_boundary_runtime_comparison_right hgcrt_mod_right_canonical_boundary_runtime_comparison_right. s + n * hgcrt_mod_left_canonical_boundary_runtime_comparison_right = b + n * hgcrt_mod_right_canonical_boundary_runtime_comparison_right))) -&gt; s = r))
specialize crt_solution_canonical_remainder_nonzero l
specialize crt_solution_canonical_remainder_nonzero m
specialize crt_solution_canonical_remainder_nonzero n
specialize crt_solution_canonical_remainder_nonzero a
specialize crt_solution_canonical_remainder_nonzero b
specialize crt_solution_canonical_remainder_nonzero x
apply crt_solution_canonical_remainder_nonzero
exact hlzero_right
exact hl
exact hexists_witness
cases hcanonical
exists x1
split
cases hcanonical_witness
exact hcanonical_witness_left
cases hcanonical_witness
cases hcanonical_witness_right
exact hcanonical_witness_right_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>17,750</dd></div>
        <div><dt>Distinct objects</dt><dd>4,239</dd></div>
        <div><dt>Reused references</dt><dd>188</dd></div>
        <div><dt>Depth</dt><dd>80</dd></div>
        <div><dt>Cuts</dt><dd>517</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="59bc1b3f5a5b3c8614a55524e09ca1617d0091c7ef10c22e9a0790195c9ff4b5">59bc1b3f5a5b…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_canonical_boundary">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_canonical_boundary</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_canonical_boundary_candidate.py#L541">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_canonical_boundary.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-mod_eq_decidable"
  data-name="mod_eq_decidable" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="eq_decidable,mod_eq_zero_iff_eq,mod_eq_decidable_nonzero"
  data-search="mod_eq_decidable mod eq decidable balanced congruence is constructively decidable for every natural modulus. forall d a b. (exists hgcrt_mod_left_decision_yes hgcrt_mod_right_decision_yes. a + d * hgcrt_mod_left_decision_yes = b + d * hgcrt_mod_right_decision_yes) \/ ~(exists hgcrt_mod_left_decision_no hgcrt_mod_right_decision_no. a + d * hgcrt_mod_left_decision_no = b + d * hgcrt_mod_right_decision_no) congruence eq_decidable mod_eq_zero_iff_eq mod_eq_decidable_nonzero">
  <details>
    <summary>
      <span class="pa-card-title"><code>mod_eq_decidable</code><span>Mod eq decidable</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Balanced congruence is constructively decidable for every natural modulus.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="eq_decidable" href="#theorem-eq_decidable"><code>eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_zero_iff_eq" href="#theorem-mod_eq_zero_iff_eq"><code>mod_eq_zero_iff_eq</code></a> <a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable_nonzero" href="#theorem-mod_eq_decidable_nonzero"><code>mod_eq_decidable_nonzero</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_solution_or_obstruction" href="#theorem-generalized_binary_crt_solution_or_obstruction"><code>generalized_binary_crt_solution_or_obstruction</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-mod_eq_decidable">Copy statement</button>
        <pre id="statement-mod_eq_decidable"><code>forall d a b. (exists hgcrt_mod_left_decision_yes hgcrt_mod_right_decision_yes. a + d * hgcrt_mod_left_decision_yes = b + d * hgcrt_mod_right_decision_yes) \/ ~(exists hgcrt_mod_left_decision_no hgcrt_mod_right_decision_no. a + d * hgcrt_mod_left_decision_no = b + d * hgcrt_mod_right_decision_no)</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-mod_eq_decidable">Copy proof</button>
        <pre id="proof-mod_eq_decidable"><code>pa prove forall d a b. (exists hgcrt_mod_left_decision_yes hgcrt_mod_right_decision_yes. a + d * hgcrt_mod_left_decision_yes = b + d * hgcrt_mod_right_decision_yes) \/ ~(exists hgcrt_mod_left_decision_no hgcrt_mod_right_decision_no. a + d * hgcrt_mod_left_decision_no = b + d * hgcrt_mod_right_decision_no)
use eq_decidable
use mod_eq_zero_iff_eq
use mod_eq_decidable_nonzero
intro d
intro a
intro b
have hd : d = 0 \/ ~(d = 0)
specialize eq_decidable d
specialize eq_decidable 0
exact eq_decidable
cases hd
have hzero : (((exists hgcrt_mod_left_decision_zero_forward hgcrt_mod_right_decision_zero_forward. a + 0 * hgcrt_mod_left_decision_zero_forward = b + 0 * hgcrt_mod_right_decision_zero_forward) -&gt; a = b) /\ (a = b -&gt; (exists hgcrt_mod_left_decision_zero_reverse hgcrt_mod_right_decision_zero_reverse. a + 0 * hgcrt_mod_left_decision_zero_reverse = b + 0 * hgcrt_mod_right_decision_zero_reverse)))
specialize mod_eq_zero_iff_eq a
specialize mod_eq_zero_iff_eq b
exact mod_eq_zero_iff_eq
cases hzero
have hab : a = b \/ ~(a = b)
specialize eq_decidable a
specialize eq_decidable b
exact eq_decidable
cases hab
left
rewrite hd_left
rewrite hd_left
apply hzero_right
exact hab_left
right
intro hmod
rewrite hd_left at hmod
rewrite hd_left at hmod
apply hab_right
apply hzero_left
exact hmod
specialize mod_eq_decidable_nonzero d
specialize mod_eq_decidable_nonzero a
specialize mod_eq_decidable_nonzero b
apply mod_eq_decidable_nonzero
exact hd_right
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>2,339</dd></div>
        <div><dt>Distinct objects</dt><dd>1,217</dd></div>
        <div><dt>Reused references</dt><dd>62</dd></div>
        <div><dt>Depth</dt><dd>70</dd></div>
        <div><dt>Cuts</dt><dd>65</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="7ffa64c2d06d69fa0e3d670a19fa905d8ad9162bc7e9486be2bdbed41d299854">7ffa64c2d06d…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for mod_eq_decidable">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib mod_eq_decidable</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_decision_candidate.py#L108">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/mod_eq_decidable.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_solution_or_obstruction"
  data-name="generalized_binary_crt_solution_or_obstruction" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="mod_eq_decidable,generalized_binary_crt_sufficient,crt_incompatibility_obstructs_solution"
  data-search="generalized_binary_crt_solution_or_obstruction generalized binary crt solution or obstruction every generalized binary crt instance constructively returns a solution or a certified incompatibility obstruction. forall g m n a b. ((((exists hag_left_factor_decision_boundary. m = g * hag_left_factor_decision_boundary) /\ (exists hag_right_factor_decision_boundary. n = g * hag_right_factor_decision_boundary)) /\ forall hag_divisor_decision_boundary. (exists hag_common_left_decision_boundary. m = hag_divisor_decision_boundary * hag_common_left_decision_boundary) -&gt; (exists hag_common_right_decision_boundary. n = hag_divisor_decision_boundary * hag_common_right_decision_boundary) -&gt; exists hag_greatest_factor_decision_boundary. g = hag_divisor_decision_boundary * hag_greatest_factor_decision_boundary)) -&gt; (((exists hgcrt_mod_left_decision_boundary_compatible hgcrt_mod_right_decision_boundary_compatible. a + g * hgcrt_mod_left_decision_boundary_compatible = b + g * hgcrt_mod_right_decision_boundary_compatible) /\ exists x. (((exists hgcrt_mod_left_decision_boundary_positive_left hgcrt_mod_right_decision_boundary_positive_left. x + m * hgcrt_mod_left_decision_boundary_positive_left = a + m * hgcrt_mod_right_decision_boundary_positive_left) /\ (exists hgcrt_mod_left_decision_boundary_positive_right hgcrt_mod_right_decision_boundary_positive_right. x + n * hgcrt_mod_left_decision_boundary_positive_right = b + n * hgcrt_mod_right_decision_boundary_positive_right)))) \/ (~(exists hgcrt_mod_left_decision_boundary_incompatible hgcrt_mod_right_decision_boundary_incompatible. a + g * hgcrt_mod_left_decision_boundary_incompatible = b + g * hgcrt_mod_right_decision_boundary_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_decision_boundary_negative_left hgcrt_mod_right_decision_boundary_negative_left. x + m * hgcrt_mod_left_decision_boundary_negative_left = a + m * hgcrt_mod_right_decision_boundary_negative_left) /\ (exists hgcrt_mod_left_decision_boundary_negative_right hgcrt_mod_right_decision_boundary_negative_right. x + n * hgcrt_mod_left_decision_boundary_negative_right = b + n * hgcrt_mod_right_decision_boundary_negative_right)))))) congruence mod_eq_decidable generalized_binary_crt_sufficient crt_incompatibility_obstructs_solution">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_solution_or_obstruction</code><span>Generalized binary crt solution or obstruction</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every generalized binary CRT instance constructively returns a solution or a certified incompatibility obstruction.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="mod_eq_decidable" href="#theorem-mod_eq_decidable"><code>mod_eq_decidable</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_sufficient" href="#theorem-generalized_binary_crt_sufficient"><code>generalized_binary_crt_sufficient</code></a> <a class="pa-theorem-chip" data-theorem-link="crt_incompatibility_obstructs_solution" href="#theorem-crt_incompatibility_obstructs_solution"><code>crt_incompatibility_obstructs_solution</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_total_decision" href="#theorem-generalized_binary_crt_total_decision"><code>generalized_binary_crt_total_decision</code></a></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_solution_or_obstruction">Copy statement</button>
        <pre id="statement-generalized_binary_crt_solution_or_obstruction"><code>forall g m n a b. ((((exists hag_left_factor_decision_boundary. m = g * hag_left_factor_decision_boundary) /\ (exists hag_right_factor_decision_boundary. n = g * hag_right_factor_decision_boundary)) /\ forall hag_divisor_decision_boundary. (exists hag_common_left_decision_boundary. m = hag_divisor_decision_boundary * hag_common_left_decision_boundary) -&gt; (exists hag_common_right_decision_boundary. n = hag_divisor_decision_boundary * hag_common_right_decision_boundary) -&gt; exists hag_greatest_factor_decision_boundary. g = hag_divisor_decision_boundary * hag_greatest_factor_decision_boundary)) -&gt; (((exists hgcrt_mod_left_decision_boundary_compatible hgcrt_mod_right_decision_boundary_compatible. a + g * hgcrt_mod_left_decision_boundary_compatible = b + g * hgcrt_mod_right_decision_boundary_compatible) /\ exists x. (((exists hgcrt_mod_left_decision_boundary_positive_left hgcrt_mod_right_decision_boundary_positive_left. x + m * hgcrt_mod_left_decision_boundary_positive_left = a + m * hgcrt_mod_right_decision_boundary_positive_left) /\ (exists hgcrt_mod_left_decision_boundary_positive_right hgcrt_mod_right_decision_boundary_positive_right. x + n * hgcrt_mod_left_decision_boundary_positive_right = b + n * hgcrt_mod_right_decision_boundary_positive_right)))) \/ (~(exists hgcrt_mod_left_decision_boundary_incompatible hgcrt_mod_right_decision_boundary_incompatible. a + g * hgcrt_mod_left_decision_boundary_incompatible = b + g * hgcrt_mod_right_decision_boundary_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_decision_boundary_negative_left hgcrt_mod_right_decision_boundary_negative_left. x + m * hgcrt_mod_left_decision_boundary_negative_left = a + m * hgcrt_mod_right_decision_boundary_negative_left) /\ (exists hgcrt_mod_left_decision_boundary_negative_right hgcrt_mod_right_decision_boundary_negative_right. x + n * hgcrt_mod_left_decision_boundary_negative_right = b + n * hgcrt_mod_right_decision_boundary_negative_right))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_solution_or_obstruction">Copy proof</button>
        <pre id="proof-generalized_binary_crt_solution_or_obstruction"><code>pa prove forall g m n a b. ((((exists hag_left_factor_decision_boundary. m = g * hag_left_factor_decision_boundary) /\ (exists hag_right_factor_decision_boundary. n = g * hag_right_factor_decision_boundary)) /\ forall hag_divisor_decision_boundary. (exists hag_common_left_decision_boundary. m = hag_divisor_decision_boundary * hag_common_left_decision_boundary) -&gt; (exists hag_common_right_decision_boundary. n = hag_divisor_decision_boundary * hag_common_right_decision_boundary) -&gt; exists hag_greatest_factor_decision_boundary. g = hag_divisor_decision_boundary * hag_greatest_factor_decision_boundary)) -&gt; (((exists hgcrt_mod_left_decision_boundary_compatible hgcrt_mod_right_decision_boundary_compatible. a + g * hgcrt_mod_left_decision_boundary_compatible = b + g * hgcrt_mod_right_decision_boundary_compatible) /\ exists x. (((exists hgcrt_mod_left_decision_boundary_positive_left hgcrt_mod_right_decision_boundary_positive_left. x + m * hgcrt_mod_left_decision_boundary_positive_left = a + m * hgcrt_mod_right_decision_boundary_positive_left) /\ (exists hgcrt_mod_left_decision_boundary_positive_right hgcrt_mod_right_decision_boundary_positive_right. x + n * hgcrt_mod_left_decision_boundary_positive_right = b + n * hgcrt_mod_right_decision_boundary_positive_right)))) \/ (~(exists hgcrt_mod_left_decision_boundary_incompatible hgcrt_mod_right_decision_boundary_incompatible. a + g * hgcrt_mod_left_decision_boundary_incompatible = b + g * hgcrt_mod_right_decision_boundary_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_decision_boundary_negative_left hgcrt_mod_right_decision_boundary_negative_left. x + m * hgcrt_mod_left_decision_boundary_negative_left = a + m * hgcrt_mod_right_decision_boundary_negative_left) /\ (exists hgcrt_mod_left_decision_boundary_negative_right hgcrt_mod_right_decision_boundary_negative_right. x + n * hgcrt_mod_left_decision_boundary_negative_right = b + n * hgcrt_mod_right_decision_boundary_negative_right))))))
use mod_eq_decidable
use generalized_binary_crt_sufficient
use crt_incompatibility_obstructs_solution
intro g
intro m
intro n
intro a
intro b
intro hgcd
have hcompat : (exists hgcrt_mod_left_decision_runtime_compatible hgcrt_mod_right_decision_runtime_compatible. a + g * hgcrt_mod_left_decision_runtime_compatible = b + g * hgcrt_mod_right_decision_runtime_compatible) \/ ~(exists hgcrt_mod_left_decision_runtime_incompatible hgcrt_mod_right_decision_runtime_incompatible. a + g * hgcrt_mod_left_decision_runtime_incompatible = b + g * hgcrt_mod_right_decision_runtime_incompatible)
specialize mod_eq_decidable g
specialize mod_eq_decidable a
specialize mod_eq_decidable b
apply mod_eq_decidable
cases hcompat
left
split
exact hcompat_left
specialize generalized_binary_crt_sufficient g
specialize generalized_binary_crt_sufficient m
specialize generalized_binary_crt_sufficient n
specialize generalized_binary_crt_sufficient a
specialize generalized_binary_crt_sufficient b
apply generalized_binary_crt_sufficient
exact hgcd
exact hcompat_left
right
split
exact hcompat_right
intro hsolution
specialize crt_incompatibility_obstructs_solution g
specialize crt_incompatibility_obstructs_solution m
specialize crt_incompatibility_obstructs_solution n
specialize crt_incompatibility_obstructs_solution a
specialize crt_incompatibility_obstructs_solution b
apply crt_incompatibility_obstructs_solution
exact hgcd
exact hcompat_right
exact hsolution
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>14,182</dd></div>
        <div><dt>Distinct objects</dt><dd>3,909</dd></div>
        <div><dt>Reused references</dt><dd>182</dd></div>
        <div><dt>Depth</dt><dd>80</dd></div>
        <div><dt>Cuts</dt><dd>414</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="3eda3a7622215d619fee518e43343496c306083c2b7898c64ef8013309da67a5">3eda3a762221…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_solution_or_obstruction">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_solution_or_obstruction</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_decision_candidate.py#L156">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_solution_or_obstruction.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card" id="theorem-generalized_binary_crt_total_decision"
  data-name="generalized_binary_crt_total_decision" data-domain="congruence"
  data-status="checked_m20"
  data-dependencies="gcd_exists_relational,generalized_binary_crt_solution_or_obstruction"
  data-search="generalized_binary_crt_total_decision generalized binary crt total decision every raw binary crt input returns a relational gcd and either a solution or a certified incompatibility obstruction. forall m n a b. exists g. (((((exists hag_left_factor_total_decision. m = g * hag_left_factor_total_decision) /\ (exists hag_right_factor_total_decision. n = g * hag_right_factor_total_decision)) /\ forall hag_divisor_total_decision. (exists hag_common_left_total_decision. m = hag_divisor_total_decision * hag_common_left_total_decision) -&gt; (exists hag_common_right_total_decision. n = hag_divisor_total_decision * hag_common_right_total_decision) -&gt; exists hag_greatest_factor_total_decision. g = hag_divisor_total_decision * hag_greatest_factor_total_decision)) /\ (((exists hgcrt_mod_left_total_decision_compatible hgcrt_mod_right_total_decision_compatible. a + g * hgcrt_mod_left_total_decision_compatible = b + g * hgcrt_mod_right_total_decision_compatible) /\ exists x. (((exists hgcrt_mod_left_total_decision_positive_left hgcrt_mod_right_total_decision_positive_left. x + m * hgcrt_mod_left_total_decision_positive_left = a + m * hgcrt_mod_right_total_decision_positive_left) /\ (exists hgcrt_mod_left_total_decision_positive_right hgcrt_mod_right_total_decision_positive_right. x + n * hgcrt_mod_left_total_decision_positive_right = b + n * hgcrt_mod_right_total_decision_positive_right)))) \/ (~(exists hgcrt_mod_left_total_decision_incompatible hgcrt_mod_right_total_decision_incompatible. a + g * hgcrt_mod_left_total_decision_incompatible = b + g * hgcrt_mod_right_total_decision_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_total_decision_negative_left hgcrt_mod_right_total_decision_negative_left. x + m * hgcrt_mod_left_total_decision_negative_left = a + m * hgcrt_mod_right_total_decision_negative_left) /\ (exists hgcrt_mod_left_total_decision_negative_right hgcrt_mod_right_total_decision_negative_right. x + n * hgcrt_mod_left_total_decision_negative_right = b + n * hgcrt_mod_right_total_decision_negative_right))))))) congruence gcd_exists_relational generalized_binary_crt_solution_or_obstruction">
  <details>
    <summary>
      <span class="pa-card-title"><code>generalized_binary_crt_total_decision</code><span>Generalized binary crt total decision</span></span>
      <span class="pa-badge pa-domain-congruence">Congruence &amp; CRT</span>
      <span class="pa-badge pa-status-checked">checked</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">Every raw binary CRT input returns a relational gcd and either a solution or a certified incompatibility obstruction.</p>
      <div class="pa-relation-grid" aria-label="Theorem dependency neighborhood">
        <div><strong>Prerequisites</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_relational" href="#theorem-gcd_exists_relational"><code>gcd_exists_relational</code></a> <a class="pa-theorem-chip" data-theorem-link="generalized_binary_crt_solution_or_obstruction" href="#theorem-generalized_binary_crt_solution_or_obstruction"><code>generalized_binary_crt_solution_or_obstruction</code></a></div></div>
        <div><strong>Used directly by</strong><div class="pa-chip-row"><span class="pa-empty-relation">no direct dependent</span></div></div>
      </div>

      <details class="pa-proof-dropdown">
        <summary>Exact expanded PA statement</summary>
        <button class="pa-copy-button" type="button" data-copy-target="statement-generalized_binary_crt_total_decision">Copy statement</button>
        <pre id="statement-generalized_binary_crt_total_decision"><code>forall m n a b. exists g. (((((exists hag_left_factor_total_decision. m = g * hag_left_factor_total_decision) /\ (exists hag_right_factor_total_decision. n = g * hag_right_factor_total_decision)) /\ forall hag_divisor_total_decision. (exists hag_common_left_total_decision. m = hag_divisor_total_decision * hag_common_left_total_decision) -&gt; (exists hag_common_right_total_decision. n = hag_divisor_total_decision * hag_common_right_total_decision) -&gt; exists hag_greatest_factor_total_decision. g = hag_divisor_total_decision * hag_greatest_factor_total_decision)) /\ (((exists hgcrt_mod_left_total_decision_compatible hgcrt_mod_right_total_decision_compatible. a + g * hgcrt_mod_left_total_decision_compatible = b + g * hgcrt_mod_right_total_decision_compatible) /\ exists x. (((exists hgcrt_mod_left_total_decision_positive_left hgcrt_mod_right_total_decision_positive_left. x + m * hgcrt_mod_left_total_decision_positive_left = a + m * hgcrt_mod_right_total_decision_positive_left) /\ (exists hgcrt_mod_left_total_decision_positive_right hgcrt_mod_right_total_decision_positive_right. x + n * hgcrt_mod_left_total_decision_positive_right = b + n * hgcrt_mod_right_total_decision_positive_right)))) \/ (~(exists hgcrt_mod_left_total_decision_incompatible hgcrt_mod_right_total_decision_incompatible. a + g * hgcrt_mod_left_total_decision_incompatible = b + g * hgcrt_mod_right_total_decision_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_total_decision_negative_left hgcrt_mod_right_total_decision_negative_left. x + m * hgcrt_mod_left_total_decision_negative_left = a + m * hgcrt_mod_right_total_decision_negative_left) /\ (exists hgcrt_mod_left_total_decision_negative_right hgcrt_mod_right_total_decision_negative_right. x + n * hgcrt_mod_left_total_decision_negative_right = b + n * hgcrt_mod_right_total_decision_negative_right)))))))</code></pre>
      </details>

      <details class="pa-proof-dropdown">
        <summary>Complete replay recipe: dependency imports + authored proof</summary>
        <button class="pa-copy-button" type="button" data-copy-target="proof-generalized_binary_crt_total_decision">Copy proof</button>
        <pre id="proof-generalized_binary_crt_total_decision"><code>pa prove forall m n a b. exists g. (((((exists hag_left_factor_total_decision. m = g * hag_left_factor_total_decision) /\ (exists hag_right_factor_total_decision. n = g * hag_right_factor_total_decision)) /\ forall hag_divisor_total_decision. (exists hag_common_left_total_decision. m = hag_divisor_total_decision * hag_common_left_total_decision) -&gt; (exists hag_common_right_total_decision. n = hag_divisor_total_decision * hag_common_right_total_decision) -&gt; exists hag_greatest_factor_total_decision. g = hag_divisor_total_decision * hag_greatest_factor_total_decision)) /\ (((exists hgcrt_mod_left_total_decision_compatible hgcrt_mod_right_total_decision_compatible. a + g * hgcrt_mod_left_total_decision_compatible = b + g * hgcrt_mod_right_total_decision_compatible) /\ exists x. (((exists hgcrt_mod_left_total_decision_positive_left hgcrt_mod_right_total_decision_positive_left. x + m * hgcrt_mod_left_total_decision_positive_left = a + m * hgcrt_mod_right_total_decision_positive_left) /\ (exists hgcrt_mod_left_total_decision_positive_right hgcrt_mod_right_total_decision_positive_right. x + n * hgcrt_mod_left_total_decision_positive_right = b + n * hgcrt_mod_right_total_decision_positive_right)))) \/ (~(exists hgcrt_mod_left_total_decision_incompatible hgcrt_mod_right_total_decision_incompatible. a + g * hgcrt_mod_left_total_decision_incompatible = b + g * hgcrt_mod_right_total_decision_incompatible) /\ ~(exists x. (((exists hgcrt_mod_left_total_decision_negative_left hgcrt_mod_right_total_decision_negative_left. x + m * hgcrt_mod_left_total_decision_negative_left = a + m * hgcrt_mod_right_total_decision_negative_left) /\ (exists hgcrt_mod_left_total_decision_negative_right hgcrt_mod_right_total_decision_negative_right. x + n * hgcrt_mod_left_total_decision_negative_right = b + n * hgcrt_mod_right_total_decision_negative_right)))))))
use gcd_exists_relational
use generalized_binary_crt_solution_or_obstruction
intro m
intro n
intro a
intro b
specialize gcd_exists_relational m
specialize gcd_exists_relational n
cases gcd_exists_relational
exists x
split
exact gcd_exists_relational_witness
specialize generalized_binary_crt_solution_or_obstruction x
specialize generalized_binary_crt_solution_or_obstruction m
specialize generalized_binary_crt_solution_or_obstruction n
specialize generalized_binary_crt_solution_or_obstruction a
specialize generalized_binary_crt_solution_or_obstruction b
apply generalized_binary_crt_solution_or_obstruction
exact gcd_exists_relational_witness
qed</code></pre>
      </details>

      <dl class="pa-proof-receipt">
        <div><dt>Occurrences</dt><dd>15,492</dd></div>
        <div><dt>Distinct objects</dt><dd>4,052</dd></div>
        <div><dt>Reused references</dt><dd>189</dd></div>
        <div><dt>Depth</dt><dd>82</dd></div>
        <div><dt>Cuts</dt><dd>454</dd></div>
        <div><dt>Certificate SHA-256</dt><dd><code title="20ff304fface82b86017d67beabea7cf6a02f4d560552ce3112e417255d5d754">20ff304fface…</code></dd></div>
      </dl>

      <nav class="pa-card-links" aria-label="Links for generalized_binary_crt_total_decision">
        <span class="pa-deployment-note" title="Stable repository theorem; hosted-runtime deployment is a separate channel"><code>pa lib generalized_binary_crt_total_decision</code> · Stable</span>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/peano-lab/py/peano_lab/library/ha_generalized_crt_total_decision_candidate.py#L62">Native source</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/vault/lemmas/generalized_binary_crt_total_decision.md">Vault note</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/artifacts/peano-library/catalog-v1.json">Snapshot record</a>
        <a href="https://github.com/nasqret/vietnam2026/blob/2037b87905817ada187e2477af22c57ff47fb512/research/arithmetic-library/catalog.json">Research catalog</a>
        <a href="divisibility-and-congruence.html">Read the chapter</a>
      </nav>
    </div>
  </details>
</article>

<article class="pa-theorem-card pa-blocked-card" id="boundary-bezout_integer_coefficients"
  data-name="bezout_integer_coefficients" data-domain="gcd_coprime"
  data-status="blocked_by_language"
  data-dependencies="gcd_exists_relational"
  data-search="bezout_integer_coefficients bézout identity with integer coefficients the conventional reusable theorem quantifies over signed coefficients. peano lab quantifies only over naturals and has no integer encoding or subtraction. a balanced natural reformulation is possible, but it is a different interface and has now been designed explicitly and checked under a separate name.">
  <details>
    <summary>
      <span class="pa-card-title"><code>bezout_integer_coefficients</code><span>Bézout identity with integer coefficients</span></span>
      <span class="pa-badge pa-domain-gcd_coprime">GCD, Bézout &amp; coprimality</span>
      <span class="pa-badge pa-status-blocked">representation boundary</span>
    </summary>
    <div class="pa-card-body">
      <p class="pa-card-summary">The conventional reusable theorem quantifies over signed coefficients.</p>
      <p>Peano Lab quantifies only over naturals and has no integer encoding or subtraction. A balanced natural reformulation is possible, but it is a different interface and has now been designed explicitly and checked under a separate name.</p>
      <div><strong>Depends conceptually on</strong><div class="pa-chip-row"><a class="pa-theorem-chip" data-theorem-link="gcd_exists_relational" href="#theorem-gcd_exists_relational"><code>gcd_exists_relational</code></a></div></div>
      <p><strong>Related representational choices:</strong> a reviewed integer-pair encoding; or a separately named balanced-natural Bézout relation.</p>
      <p>This card deliberately contains no native proof script or certificate. The separately named balanced four-natural Bézout theorem is checked.</p>
    </div>
  </details>
</article>
  </div>
</div>
```

## How to use this atlas

- Start with the {doc}`guided route <guided-tour>` if the exact formulas are
  unfamiliar.
- Select `division_remainder_exists`, `euclid_prime_dvd_product`,
  `beta_prefix_product_trace_exists`, `prime_factorization_existence`, or
  `fundamental_theorem_of_arithmetic` in the focused navigator to see the main
  dependency spine.
- A theorem card's prerequisite and dependent chips are bidirectional links.
  Browser Back and Forward therefore become mathematical navigation controls.
- The `pa lib NAME` label identifies a theorem in the Stable checked-use
  registry. “Native source” and “Vault note” point to immutable proof material;
  hosted-browser deployment is tracked separately.
- The single boundary card is intentionally not presented as proved. It keeps
  the conventional integer-coefficient Bézout interface distinct from the
  checked balanced-natural theorem.

This page is regenerated with:

```console
python3 scripts/build_arithmetic_book_atlas.py
python3 scripts/build_arithmetic_book_atlas.py --check
```
