We prove the intermediate
claim LnS:
SNo n.
An
exact proof term for the current goal is
nat_p_SNo n Hn.
We prove the intermediate
claim Lno:
ordinal n.
We prove the intermediate
claim L1:
1 ∈ n.
An exact proof term for the current goal is H3.
Apply H2 to the current goal.
An exact proof term for the current goal is H3.
Let i be given.
Apply cases_1 i Hi to the current goal.
An exact proof term for the current goal is H1.
Let p be given.
Assume H.
Apply H to the current goal.
We use p to witness the existential quantifier.
Apply andI to the current goal.
Apply H3 to the current goal.
Assume H _.
Apply H to the current goal.
Assume _.
Apply andI to the current goal.
An exact proof term for the current goal is H3.
An exact proof term for the current goal is H4.
Apply L2 to the current goal.
Let p be given.
Assume H.
Apply H to the current goal.
Assume H.
Apply H to the current goal.
Assume H.
Apply H to the current goal.
Apply Hpp to the current goal.
Assume H _.
Apply H to the current goal.
Apply Hpn to the current goal.
Assume _ H.
Apply H to the current goal.
Let m be given.
Assume H.
Apply H to the current goal.
rewrite the current goal using
mul_nat_mul_SNo p HpN m Hm (from left to right).
We prove the intermediate
claim LmS:
SNo m.
An
exact proof term for the current goal is
omega_SNo m Hm.
We prove the intermediate
claim LmN:
nat_p m.
An
exact proof term for the current goal is
omega_nat_p m Hm.
We prove the intermediate
claim Lmo:
ordinal m.
We prove the intermediate
claim LpS:
SNo p.
An
exact proof term for the current goal is
omega_SNo p HpN.
We prove the intermediate
claim LpN:
nat_p p.
An
exact proof term for the current goal is
omega_nat_p p HpN.
We prove the intermediate
claim Lpo:
ordinal p.
We prove the intermediate
claim Lmp:
m * p = n.
rewrite the current goal using
mul_SNo_com m p LmS LpS (from left to right).
An exact proof term for the current goal is Hpm.
We prove the intermediate
claim L1p:
1 < p.
An exact proof term for the current goal is H1p.
We prove the intermediate
claim Lmpos:
0 < m.
An exact proof term for the current goal is H3.
We prove the intermediate
claim Ln0:
n = 0.
rewrite the current goal using Hpm (from right to left).
rewrite the current goal using H3 (from right to left).
rewrite the current goal using Ln0 (from left to right) at position 1.
An exact proof term for the current goal is H1.
We prove the intermediate
claim L3:
m < n.
rewrite the current goal using Lmp (from right to left).
rewrite the current goal using
mul_SNo_oneR m LmS (from right to left) at position 1.
We will
prove m * 1 < m * p.
We prove the intermediate
claim L4:
m ∈ n.
We prove the intermediate
claim L5:
0 ∈ m.
Apply IH m L4 L5 to the current goal.
Let k be given.
Assume H.
Apply H to the current goal.
Assume H.
Apply H to the current goal.
Let f be given.
Assume H.
Apply H to the current goal.
Assume H.
Apply H to the current goal.
We prove the intermediate
claim LkN:
nat_p k.
An
exact proof term for the current goal is
omega_nat_p k Hk.
We prove the intermediate
claim Lf1:
∀i ∈ k, prime_nat (f i).
Let i be given.
Apply Hf i Hi to the current goal.
Assume _.
An exact proof term for the current goal is H3.
We prove the intermediate
claim Lf2:
∀i ∈ k, f i ∈ ω.
Let i be given.
Apply Lf1 i Hi to the current goal.
Assume H.
Apply H to the current goal.
Assume _ _.
An exact proof term for the current goal is H3.
We prove the intermediate
claim Lg:
∃g : set → set, g k = p ∧ ∀i ∈ k, g i = f i.
Set g to be the term
λi ⇒ if i ∈ k then f i else p of type
set → set.
We use g to witness the existential quantifier.
Apply andI to the current goal.
An
exact proof term for the current goal is
If_i_0 (k ∈ k) (f k) p (In_irref k).
Let i be given.
An
exact proof term for the current goal is
If_i_1 (i ∈ k) (f i) p Hi.
Apply Lg to the current goal.
Let g be given.
Assume H.
Apply H to the current goal.
We use
(ordsucc k) to
witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hk.
We use g to witness the existential quantifier.
Apply and3I to the current goal.
Let i be given.
Apply ordsuccE k i Hi to the current goal.
rewrite the current goal using Hgi i H3 (from left to right).
Apply Hf i H3 to the current goal.
Apply andI to the current goal.
An exact proof term for the current goal is H4.
Let j be given.
We prove the intermediate
claim Lj:
j ∈ k.
An
exact proof term for the current goal is
nat_trans k LkN i H3 j Hj.
rewrite the current goal using Hgi j Lj (from left to right).
An exact proof term for the current goal is H5 j Hj.
rewrite the current goal using H3 (from left to right).
rewrite the current goal using Hgk (from left to right).
Apply andI to the current goal.
An exact proof term for the current goal is Hpp.
Let j be given.
rewrite the current goal using Hgi j Hj (from left to right).
We prove the intermediate
claim LfjN:
nat_p (f j).
An
exact proof term for the current goal is
omega_nat_p (f j) (Lf2 j Hj).
We prove the intermediate
claim LfjS:
SNo (f j).
An
exact proof term for the current goal is
nat_p_SNo (f j) LfjN.
We prove the intermediate
claim Lfjo:
ordinal (f j).
An
exact proof term for the current goal is
nat_p_ordinal (f j) LfjN.
Apply SNoLtLe_or (f j) p LfjS LpS to the current goal.
Apply Hpleast (f j) to the current goal.
An exact proof term for the current goal is H4.
Apply andI to the current goal.
An exact proof term for the current goal is Lf1 j Hj.
rewrite the current goal using Hfkm (from right to left).
An
exact proof term for the current goal is
Pi_SNo_divides f k LkN Lf2 j Hj.
rewrite the current goal using Lmp (from right to left).
An exact proof term for the current goal is H4.
rewrite the current goal using
Pi_SNo_S g k LkN (from left to right).
rewrite the current goal using Lmp (from right to left).
Use f_equal.
rewrite the current goal using
Pi_SNo_eq g f k LkN Hgi (from left to right).
An exact proof term for the current goal is Hfkm.
An exact proof term for the current goal is Hgk.
Let k' be given.
Let g' be given.
We prove the intermediate
claim Lg'1:
∀i ∈ k', prime_nat (g' i).
Let i be given.
Apply Hg' i Hi to the current goal.
Assume _.
An exact proof term for the current goal is H4.
We prove the intermediate
claim Lg'2:
∀i ∈ k', g' i ∈ ω.
Let i be given.
Apply Lg'1 i Hi to the current goal.
Assume H.
Apply H to the current goal.
Assume _ _.
An exact proof term for the current goal is H4.
We prove the intermediate
claim Lk'N:
nat_p k'.
An
exact proof term for the current goal is
omega_nat_p k' Hk'.
Apply nat_inv k' Lk'N to the current goal.
Apply H2 to the current goal.
rewrite the current goal using Hg'k' (from right to left).
rewrite the current goal using Hk' (from left to right).
Assume H.
Apply H to the current goal.
Let k'' be given.
Assume H.
Apply H to the current goal.
Let i be given.
We prove the intermediate
claim Li:
i ∈ k'.
rewrite the current goal using Hk'k'' (from left to right).
An exact proof term for the current goal is Hi.
An exact proof term for the current goal is Hg' i Li.
We prove the intermediate
claim LPg'k''N:
Pi_SNo g' k'' ∈ ω.
Let i be given.
We prove the intermediate
claim Li:
i ∈ k'.
rewrite the current goal using Hk'k'' (from left to right).
An exact proof term for the current goal is Hi.
An exact proof term for the current goal is Lg'2 i Li.
We prove the intermediate
claim LPg'k''S:
SNo (Pi_SNo g' k'').
An
exact proof term for the current goal is
omega_SNo (Pi_SNo g' k'') LPg'k''N.
We prove the intermediate
claim L7:
g' k'' = p.
We prove the intermediate
claim L7a:
prime_nat (g' k'') ∧ ∀j ∈ k'', g' k'' ≤ g' j.
Apply Hg' k'' to the current goal.
rewrite the current goal using Hk'k'' (from left to right).
Apply L7a to the current goal.
Apply Hg'k''P to the current goal.
Assume H _.
Apply H to the current goal.
We prove the intermediate
claim Lg'k''N:
nat_p (g' k'').
An
exact proof term for the current goal is
omega_nat_p (g' k'') H4.
We prove the intermediate
claim Lg'k''o:
ordinal (g' k'').
An
exact proof term for the current goal is
nat_p_ordinal (g' k'') Lg'k''N.
We prove the intermediate
claim Lg'k''S:
SNo (g' k'').
An
exact proof term for the current goal is
nat_p_SNo (g' k'') Lg'k''N.
We prove the intermediate
claim L7b:
divides_nat (g' k'') n.
rewrite the current goal using Hg'k' (from right to left).
rewrite the current goal using Hk'k'' (from left to right).
rewrite the current goal using
Pi_SNo_S g' k'' Hk'' (from left to right).
An exact proof term for the current goal is LPg'k''N.
An exact proof term for the current goal is H4.
Apply Hg'k' (λu v ⇒ divides_int p v) to the current goal.
An exact proof term for the current goal is Hpn.
An exact proof term for the current goal is LPg'k''N.
We will
prove g' k'' ∈ int.
An exact proof term for the current goal is H4.
rewrite the current goal using
Pi_SNo_S g' k'' Hk'' (from right to left).
rewrite the current goal using Hk'k'' (from right to left).
An exact proof term for the current goal is L7c.
We prove the intermediate
claim L7e:
∀i ∈ k'', g' i ∈ int.
Let i be given.
Assume Hi.
Apply Lg'2 to the current goal.
rewrite the current goal using Hk'k'' (from left to right).
An exact proof term for the current goal is Hi.
Apply L7d to the current goal.
We will
prove g' k'' = p.
Apply Hpleast (g' k'') to the current goal.
We will
prove g' k'' ∈ p.
An
exact proof term for the current goal is
ordinal_SNoLt_In (g' k'') p Lg'k''o Lpo H7.
Apply andI to the current goal.
An exact proof term for the current goal is Hg'k''P.
An exact proof term for the current goal is L7b.
An exact proof term for the current goal is H7.
Let j be given.
Assume H.
Apply H to the current goal.
We prove the intermediate
claim L7f:
prime_nat (g' j).
Apply Lg'1 to the current goal.
rewrite the current goal using Hk'k'' (from left to right).
An exact proof term for the current goal is Hj.
We prove the intermediate
claim L7g:
p = g' j.
Apply SNoLtLe_tra p (g' k'') p LpS Lg'k''S LpS H7 to the current goal.
We will
prove g' k'' ≤ p.
rewrite the current goal using L7g (from left to right).
We will
prove g' k'' ≤ g' j.
Apply Hg'k''minimal to the current goal.
An exact proof term for the current goal is Hj.
We will
prove g' k'' = p.
Use symmetry.
Apply Lg'1 to the current goal.
rewrite the current goal using Hk'k'' (from left to right).
An exact proof term for the current goal is H6.
We prove the intermediate
claim L8:
Pi_SNo g' k'' = m.
An exact proof term for the current goal is LpS.
rewrite the current goal using H4 (from right to left) at position 2.
An exact proof term for the current goal is LPg'k''S.
An exact proof term for the current goal is LmS.
rewrite the current goal using Hpm (from left to right).
rewrite the current goal using Hg'k' (from right to left).
rewrite the current goal using Hk'k'' (from left to right).
rewrite the current goal using
Pi_SNo_S g' k'' Hk'' (from left to right).
rewrite the current goal using L7 (from left to right).
An
exact proof term for the current goal is
mul_SNo_com p (Pi_SNo g' k'') LpS LPg'k''S.
Apply Huniq k'' (nat_p_omega k'' Hk'') g' L6 L8 to the current goal.
Apply andI to the current goal.
rewrite the current goal using Hk'k'' (from left to right).
Use f_equal.
An exact proof term for the current goal is H3.
Let i be given.
Apply ordsuccE k i Hi to the current goal.
We will
prove g' i = g i.
rewrite the current goal using Hgi i H5 (from left to right).
We will
prove g' i = f i.
An exact proof term for the current goal is H4 i H5.
We will
prove g' i = g i.
rewrite the current goal using H5 (from left to right).
rewrite the current goal using Hgk (from left to right).
rewrite the current goal using H3 (from right to left).
An exact proof term for the current goal is L7.
∎