MC0006

prime_factor_toggle_positive

Every raw toggle of a positive input by a nonzero p remains positive, including the quotient branch.

Alpha v34 checked-use · first admitted v31 · independently kernel and Lean verified; not Stable

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved.

The input n is positive. Signed code 2 denotes +1, so the actual sum is +1 at n=1 and zero for n>1. The positive-values result permits arbitrary F(0), which the divisor mask excludes. Prime-square multiples contribute zero. Full G007 inversion is established in its separate family.

Exact theorem in conservative defined notation

∀ p. ∀ d. ∀ e. ¬p = 0 → ¬d = 0 → PrimeFactorToggle(p,d,e) → ¬e = 0

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall p d e. ~(p=0) -> ~(d=0) -> ((((~(exists pvs_factor_toggle_positive_graphfresh_input. (d) = (p) * pvs_factor_toggle_positive_graphfresh_input)) /\ ((e)=(p)*(d)))) \/ (((((d)=(p)*(e)) /\ (~(exists pvs_factor_toggle_positive_graphfresh_output. (e) = (p) * pvs_factor_toggle_positive_graphfresh_output)))) \/ (((exists pvs_factor_toggle_positive_graphsquare. (d) = ((p)*(p)) * pvs_factor_toggle_positive_graphsquare) /\ ((e)=(d)))))) -> ~(e=0)

Complete tactic proof in conservative notation

All 29 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

29 script commands · 11 reading checkpoints · 0 local claims

This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

01Fix variables and assumptionsL1–7

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

  1. L1
    intro p
  2. L2
    intro d
  3. L3
    intro e
  4. L4
    intro hp
  5. L5
    intro hd
  6. L6
    intro he
  7. L7
    intro hz
02Separate the logical casesL8–9

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L8
    cases he
  2. L9
    cases he_left
03Use earlier factsL10–14

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

  1. L10
    specialize mul_ne_zero (p)
  2. L11
    specialize mul_ne_zero (d)
  3. L12
    apply mul_ne_zero
  4. L13
    exact hp
  5. L14
    exact hd
04Calculate and transport equalitiesL15–15

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L15
    rewrite he_left_right at hz
05Use earlier factsL16–16

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

  1. L16
    exact hz
06Separate the logical casesL17–18

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L17
    cases he_right
  2. L18
    cases he_right_left
07Use earlier factsL19–25

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

  1. L19
    specialize factor_nonzero_right (d)
  2. L20
    specialize factor_nonzero_right (p)
  3. L21
    specialize factor_nonzero_right (e)
  4. L22
    apply factor_nonzero_right
  5. L23
    exact hd
  6. L24
    exact he_right_left_left
  7. L25
    exact hz
08Separate the logical casesL26–26

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L26
    cases he_right_right
09Use earlier factsL27–27

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

  1. L27
    apply hd
10Calculate and transport equalitiesL28–28

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L28
    rewrite he_right_right_right at hz
11Use earlier factsL29–29

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

  1. L29
    exact hz

Library-wide reading audit

Original defined command ledger · 29 lines
  1. 0001intro p
  2. 0002intro d
  3. 0003intro e
  4. 0004intro hp
  5. 0005intro hd
  6. 0006intro he
  7. 0007intro hz
  8. 0008cases he
  9. 0009cases he_left
  10. 0010specialize mul_ne_zero (p)
  11. 0011specialize mul_ne_zero (d)
  12. 0012apply mul_ne_zero
  13. 0013exact hp
  14. 0014exact hd
  15. 0015rewrite he_left_right at hz
  16. 0016exact hz
  17. 0017cases he_right
  18. 0018cases he_right_left
  19. 0019specialize factor_nonzero_right (d)
  20. 0020specialize factor_nonzero_right (p)
  21. 0021specialize factor_nonzero_right (e)
  22. 0022apply factor_nonzero_right
  23. 0023exact hd
  24. 0024exact he_right_left_left
  25. 0025exact hz
  26. 0026cases he_right_right
  27. 0027apply hd
  28. 0028rewrite he_right_right_right at hz
  29. 0029exact hz