MC000A

divisor_prime_toggle_symmetric

For a prime divisor of positive n, toggling preserves positive divisors and reverses the actual graph; omitted indices stay fixed.

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

∀ n. ∀ p. ∀ d. ∀ e. ¬n = 0 → Prime(p)Dvd(p,n)DivisorPrimeToggle(n,p,d,e)DivisorPrimeToggle(n,p,e,d)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall n p d e. ~(n=0) -> (~((p) = 1) /\ forall pvs_left_divisor_symmetric_prime pvs_right_divisor_symmetric_prime. (p) = pvs_left_divisor_symmetric_prime * pvs_right_divisor_symmetric_prime -> pvs_left_divisor_symmetric_prime = 1 \/ pvs_right_divisor_symmetric_prime = 1) -> (exists pvs_factor_divisor_symmetric_prime_divisor. (n) = (p) * pvs_factor_divisor_symmetric_prime_divisor) -> ((((~((d)=0)) /\ (((exists pvs_factor_divisor_symmetric_sourcedivisor. (n) = (d) * pvs_factor_divisor_symmetric_sourcedivisor) /\ ((((~(exists pvs_factor_divisor_symmetric_sourcetogglefresh_input. (d) = (p) * pvs_factor_divisor_symmetric_sourcetogglefresh_input)) /\ ((e)=(p)*(d)))) \/ (((((d)=(p)*(e)) /\ (~(exists pvs_factor_divisor_symmetric_sourcetogglefresh_output. (e) = (p) * pvs_factor_divisor_symmetric_sourcetogglefresh_output)))) \/ (((exists pvs_factor_divisor_symmetric_sourcetogglesquare. (d) = ((p)*(p)) * pvs_factor_divisor_symmetric_sourcetogglesquare) /\ ((e)=(d)))))))))) \/ ((((d)=0 \/ ~(exists pvs_factor_divisor_symmetric_sourcenondivisor. (n) = (d) * pvs_factor_divisor_symmetric_sourcenondivisor)) /\ ((e)=(d))))) -> ((((~((e)=0)) /\ (((exists pvs_factor_divisor_symmetric_targetdivisor. (n) = (e) * pvs_factor_divisor_symmetric_targetdivisor) /\ ((((~(exists pvs_factor_divisor_symmetric_targettogglefresh_input. (e) = (p) * pvs_factor_divisor_symmetric_targettogglefresh_input)) /\ ((d)=(p)*(e)))) \/ (((((e)=(p)*(d)) /\ (~(exists pvs_factor_divisor_symmetric_targettogglefresh_output. (d) = (p) * pvs_factor_divisor_symmetric_targettogglefresh_output)))) \/ (((exists pvs_factor_divisor_symmetric_targettogglesquare. (e) = ((p)*(p)) * pvs_factor_divisor_symmetric_targettogglesquare) /\ ((d)=(e)))))))))) \/ ((((e)=0 \/ ~(exists pvs_factor_divisor_symmetric_targetnondivisor. (n) = (e) * pvs_factor_divisor_symmetric_targetnondivisor)) /\ ((d)=(e)))))

Complete tactic proof in conservative notation

All 56 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

56 script commands · 14 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.

Named ingredients (3)
01Fix variables and assumptionsL1–8

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

  1. L1
    intro n
  2. L2
    intro p
  3. L3
    intro d
  4. L4
    intro e
  5. L5
    intro hn
  6. L6
    intro hp
  7. L7
    intro hpn
  8. L8
    intro h
02Separate the logical casesL9–13

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

  1. L9
    cases h
  2. L10
    cases h_left
  3. L11
    cases h_left_right
  4. L12
    left
  5. L13
    split
03Fix variables and assumptionsL14–14

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

  1. L14
    intro hzero
04Use earlier factsL15–18

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

  1. L15
    specialize prime_factor_toggle_positive (p)
  2. L16
    specialize prime_factor_toggle_positive (d)
  3. L17
    specialize prime_factor_toggle_positive (e)
  4. L18
    apply prime_factor_toggle_positive
05Fix variables and assumptionsL19–19

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

  1. L19
    intro hpzero
06Use earlier factsL20–26

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

  1. L20
    specialize prime_nonzero (p)
  2. L21
    apply prime_nonzero
  3. L22
    exact hp
  4. L23
    exact hpzero
  5. L24
    exact h_left_left
  6. L25
    exact h_left_right_right
  7. L26
    exact hzero
07Separate the logical casesL27–27

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

  1. L27
    split
08Use earlier factsL28–37

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

  1. L28
    specialize prime_factor_toggle_preserves_divisor (p)
  2. L29
    specialize prime_factor_toggle_preserves_divisor (n)
  3. L30
    specialize prime_factor_toggle_preserves_divisor (d)
  4. L31
    specialize prime_factor_toggle_preserves_divisor (e)
  5. L32
    apply prime_factor_toggle_preserves_divisor
  6. L33
    exact hp
  7. L34
    exact hpn
  8. L35
    exact h_left_right_left
  9. L36
    exact h_left_right_right
  10. L37
    specialize prime_factor_toggle_symmetric (p)
09Use earlier factsL38–41

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

  1. L38
    specialize prime_factor_toggle_symmetric (d)
  2. L39
    specialize prime_factor_toggle_symmetric (e)
  3. L40
    apply prime_factor_toggle_symmetric
  4. L41
    exact h_left_right_right
10Separate the logical casesL42–42

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

  1. L42
    cases h_right
11Calculate and transport equalitiesL43–52

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

  1. L43
    rewrite h_right_right
  2. L44
    rewrite h_right_right
  3. L45
    rewrite h_right_right
  4. L46
    rewrite h_right_right
  5. L47
    rewrite h_right_right
  6. L48
    rewrite h_right_right
  7. L49
    rewrite h_right_right
  8. L50
    rewrite h_right_right
  9. L51
    rewrite h_right_right
  10. L52
    rewrite h_right_right
12Separate the logical casesL53–54

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

  1. L53
    right
  2. L54
    split
13Use earlier factsL55–55

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

  1. L55
    exact h_right_left
14Calculate and transport equalitiesL56–56

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

  1. L56
    refl

Library-wide reading audit

Original defined command ledger · 56 lines
  1. 0001intro n
  2. 0002intro p
  3. 0003intro d
  4. 0004intro e
  5. 0005intro hn
  6. 0006intro hp
  7. 0007intro hpn
  8. 0008intro h
  9. 0009cases h
  10. 0010cases h_left
  11. 0011cases h_left_right
  12. 0012left
  13. 0013split
  14. 0014intro hzero
  15. 0015specialize prime_factor_toggle_positive (p)
  16. 0016specialize prime_factor_toggle_positive (d)
  17. 0017specialize prime_factor_toggle_positive (e)
  18. 0018apply prime_factor_toggle_positive
  19. 0019intro hpzero
  20. 0020specialize prime_nonzero (p)
  21. 0021apply prime_nonzero
  22. 0022exact hp
  23. 0023exact hpzero
  24. 0024exact h_left_left
  25. 0025exact h_left_right_right
  26. 0026exact hzero
  27. 0027split
  28. 0028specialize prime_factor_toggle_preserves_divisor (p)
  29. 0029specialize prime_factor_toggle_preserves_divisor (n)
  30. 0030specialize prime_factor_toggle_preserves_divisor (d)
  31. 0031specialize prime_factor_toggle_preserves_divisor (e)
  32. 0032apply prime_factor_toggle_preserves_divisor
  33. 0033exact hp
  34. 0034exact hpn
  35. 0035exact h_left_right_left
  36. 0036exact h_left_right_right
  37. 0037specialize prime_factor_toggle_symmetric (p)
  38. 0038specialize prime_factor_toggle_symmetric (d)
  39. 0039specialize prime_factor_toggle_symmetric (e)
  40. 0040apply prime_factor_toggle_symmetric
  41. 0041exact h_left_right_right
  42. 0042cases h_right
  43. 0043rewrite h_right_right
  44. 0044rewrite h_right_right
  45. 0045rewrite h_right_right
  46. 0046rewrite h_right_right
  47. 0047rewrite h_right_right
  48. 0048rewrite h_right_right
  49. 0049rewrite h_right_right
  50. 0050rewrite h_right_right
  51. 0051rewrite h_right_right
  52. 0052rewrite h_right_right
  53. 0053right
  54. 0054split
  55. 0055exact h_right_left
  56. 0056refl