Exact expanded PA statement
forall n. ((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ ~((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1)))Structural proof guide
Primality of every natural number is constructively decidable.
Direct prerequisites: eq_decidable, prime_or_composite, prime_nonzero. The authored body proceeds by case analysis (10), intermediate claims (4).
Proof neighborhood
Direct dependencies
Direct dependents
Formal native tactic body
Dependencies are hypotheses of this body receipt. The focused endpoint audits separately check the complete empty-context certificates.
- 0001
intro n - 0002
specialize eq_decidable n - 0003
specialize eq_decidable 0 - 0004
have hn0 : n = 0 \/ ~(n = 0) - 0005
apply eq_decidable - 0006
cases hn0 - 0007
right - 0008
intro hp - 0009
specialize prime_nonzero n - 0010
apply prime_nonzero - 0011
exact hp - 0012
exact hn0_left - 0013
specialize eq_decidable_before n - 0014
specialize eq_decidable_before 1 - 0015
have hn1 : n = 1 \/ ~(n = 1) - 0016
apply eq_decidable_before - 0017
cases hn1 - 0018
right - 0019
intro hp - 0020
cases hp - 0021
apply hp_left - 0022
exact hn1_left - 0023
specialize prime_or_composite n - 0024
have hkind : ((~(n = 1) /\ forall a b. n = a * b -> a = 1 \/ b = 1) \/ exists c d. ((~(c = 1) /\ ~(d = 1)) /\ n = c * d)) - 0025
apply prime_or_composite - 0026
exact hn0_right - 0027
exact hn1_right - 0028
cases hkind - 0029
left - 0030
exact hkind_left - 0031
right - 0032
intro hp - 0033
cases hp - 0034
cases hkind_right - 0035
cases hkind_right_witness - 0036
cases hkind_right_witness_witness - 0037
cases hkind_right_witness_witness_left - 0038
specialize hp_right x - 0039
specialize hp_right x1 - 0040
have hunit : x = 1 \/ x1 = 1 - 0041
apply hp_right - 0042
exact hkind_right_witness_witness_right - 0043
cases hunit - 0044
apply hkind_right_witness_witness_left_left - 0045
exact hunit_left - 0046
apply hkind_right_witness_witness_left_right - 0047
exact hunit_right