Proof of Theorem sticksstones9
Step | Hyp | Ref
| Expression |
1 | | sticksstones9.2 |
. . . . 5
⊢ (𝜑 → 𝐾 = 0) |
2 | 1 | iftrued 4464 |
. . . 4
⊢ (𝜑 → if(𝐾 = 0, {〈1, 𝑁〉}, (𝑘 ∈ (1...(𝐾 + 1)) ↦ if(𝑘 = (𝐾 + 1), ((𝑁 + 𝐾) − (𝑏‘𝐾)), if(𝑘 = 1, ((𝑏‘1) − 1), (((𝑏‘𝑘) − (𝑏‘(𝑘 − 1))) − 1))))) = {〈1,
𝑁〉}) |
3 | 2 | adantr 480 |
. . 3
⊢ ((𝜑 ∧ 𝑏 ∈ 𝐵) → if(𝐾 = 0, {〈1, 𝑁〉}, (𝑘 ∈ (1...(𝐾 + 1)) ↦ if(𝑘 = (𝐾 + 1), ((𝑁 + 𝐾) − (𝑏‘𝐾)), if(𝑘 = 1, ((𝑏‘1) − 1), (((𝑏‘𝑘) − (𝑏‘(𝑘 − 1))) − 1))))) = {〈1,
𝑁〉}) |
4 | | eqid 2738 |
. . . . . . . . . . 11
⊢ {〈1,
𝑁〉} = {〈1, 𝑁〉} |
5 | | 1nn 11914 |
. . . . . . . . . . . . 13
⊢ 1 ∈
ℕ |
6 | 5 | a1i 11 |
. . . . . . . . . . . 12
⊢ (𝜑 → 1 ∈
ℕ) |
7 | | sticksstones9.1 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝑁 ∈
ℕ0) |
8 | | fsng 6991 |
. . . . . . . . . . . 12
⊢ ((1
∈ ℕ ∧ 𝑁
∈ ℕ0) → ({〈1, 𝑁〉}:{1}⟶{𝑁} ↔ {〈1, 𝑁〉} = {〈1, 𝑁〉})) |
9 | 6, 7, 8 | syl2anc 583 |
. . . . . . . . . . 11
⊢ (𝜑 → ({〈1, 𝑁〉}:{1}⟶{𝑁} ↔ {〈1, 𝑁〉} = {〈1, 𝑁〉})) |
10 | 4, 9 | mpbiri 257 |
. . . . . . . . . 10
⊢ (𝜑 → {〈1, 𝑁〉}:{1}⟶{𝑁}) |
11 | 7 | snssd 4739 |
. . . . . . . . . 10
⊢ (𝜑 → {𝑁} ⊆
ℕ0) |
12 | 10, 11 | jca 511 |
. . . . . . . . 9
⊢ (𝜑 → ({〈1, 𝑁〉}:{1}⟶{𝑁} ∧ {𝑁} ⊆
ℕ0)) |
13 | | fss 6601 |
. . . . . . . . 9
⊢
(({〈1, 𝑁〉}:{1}⟶{𝑁} ∧ {𝑁} ⊆ ℕ0) →
{〈1, 𝑁〉}:{1}⟶ℕ0) |
14 | 12, 13 | syl 17 |
. . . . . . . 8
⊢ (𝜑 → {〈1, 𝑁〉}:{1}⟶ℕ0) |
15 | 1 | oveq1d 7270 |
. . . . . . . . . . . . 13
⊢ (𝜑 → (𝐾 + 1) = (0 + 1)) |
16 | | 0p1e1 12025 |
. . . . . . . . . . . . 13
⊢ (0 + 1) =
1 |
17 | 15, 16 | eqtrdi 2795 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝐾 + 1) = 1) |
18 | 17 | oveq2d 7271 |
. . . . . . . . . . 11
⊢ (𝜑 → (1...(𝐾 + 1)) = (1...1)) |
19 | | 1zzd 12281 |
. . . . . . . . . . . 12
⊢ (𝜑 → 1 ∈
ℤ) |
20 | | fzsn 13227 |
. . . . . . . . . . . 12
⊢ (1 ∈
ℤ → (1...1) = {1}) |
21 | 19, 20 | syl 17 |
. . . . . . . . . . 11
⊢ (𝜑 → (1...1) =
{1}) |
22 | 18, 21 | eqtrd 2778 |
. . . . . . . . . 10
⊢ (𝜑 → (1...(𝐾 + 1)) = {1}) |
23 | 22 | eqcomd 2744 |
. . . . . . . . 9
⊢ (𝜑 → {1} = (1...(𝐾 + 1))) |
24 | 23 | feq2d 6570 |
. . . . . . . 8
⊢ (𝜑 → ({〈1, 𝑁〉}:{1}⟶ℕ0
↔ {〈1, 𝑁〉}:(1...(𝐾 +
1))⟶ℕ0)) |
25 | 14, 24 | mpbid 231 |
. . . . . . 7
⊢ (𝜑 → {〈1, 𝑁〉}:(1...(𝐾 +
1))⟶ℕ0) |
26 | 22 | sumeq1d 15341 |
. . . . . . . 8
⊢ (𝜑 → Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = Σ𝑖 ∈ {1} ({〈1, 𝑁〉}‘𝑖)) |
27 | | fvsng 7034 |
. . . . . . . . . . . . 13
⊢ ((1
∈ ℕ ∧ 𝑁
∈ ℕ0) → ({〈1, 𝑁〉}‘1) = 𝑁) |
28 | 6, 7, 27 | syl2anc 583 |
. . . . . . . . . . . 12
⊢ (𝜑 → ({〈1, 𝑁〉}‘1) = 𝑁) |
29 | 7 | nn0cnd 12225 |
. . . . . . . . . . . 12
⊢ (𝜑 → 𝑁 ∈ ℂ) |
30 | 28, 29 | eqeltrd 2839 |
. . . . . . . . . . 11
⊢ (𝜑 → ({〈1, 𝑁〉}‘1) ∈
ℂ) |
31 | 6, 30 | jca 511 |
. . . . . . . . . 10
⊢ (𝜑 → (1 ∈ ℕ ∧
({〈1, 𝑁〉}‘1) ∈
ℂ)) |
32 | | fveq2 6756 |
. . . . . . . . . . 11
⊢ (𝑖 = 1 → ({〈1, 𝑁〉}‘𝑖) = ({〈1, 𝑁〉}‘1)) |
33 | 32 | sumsn 15386 |
. . . . . . . . . 10
⊢ ((1
∈ ℕ ∧ ({〈1, 𝑁〉}‘1) ∈ ℂ) →
Σ𝑖 ∈ {1}
({〈1, 𝑁〉}‘𝑖) = ({〈1, 𝑁〉}‘1)) |
34 | 31, 33 | syl 17 |
. . . . . . . . 9
⊢ (𝜑 → Σ𝑖 ∈ {1} ({〈1, 𝑁〉}‘𝑖) = ({〈1, 𝑁〉}‘1)) |
35 | 6, 7 | jca 511 |
. . . . . . . . . 10
⊢ (𝜑 → (1 ∈ ℕ ∧
𝑁 ∈
ℕ0)) |
36 | 35, 27 | syl 17 |
. . . . . . . . 9
⊢ (𝜑 → ({〈1, 𝑁〉}‘1) = 𝑁) |
37 | 34, 36 | eqtrd 2778 |
. . . . . . . 8
⊢ (𝜑 → Σ𝑖 ∈ {1} ({〈1, 𝑁〉}‘𝑖) = 𝑁) |
38 | 26, 37 | eqtrd 2778 |
. . . . . . 7
⊢ (𝜑 → Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = 𝑁) |
39 | 25, 38 | jca 511 |
. . . . . 6
⊢ (𝜑 → ({〈1, 𝑁〉}:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = 𝑁)) |
40 | 39 | adantr 480 |
. . . . 5
⊢ ((𝜑 ∧ 𝑏 ∈ 𝐵) → ({〈1, 𝑁〉}:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = 𝑁)) |
41 | | snex 5349 |
. . . . . 6
⊢ {〈1,
𝑁〉} ∈
V |
42 | | feq1 6565 |
. . . . . . . 8
⊢ (𝑔 = {〈1, 𝑁〉} → (𝑔:(1...(𝐾 + 1))⟶ℕ0 ↔
{〈1, 𝑁〉}:(1...(𝐾 +
1))⟶ℕ0)) |
43 | | simpl 482 |
. . . . . . . . . . 11
⊢ ((𝑔 = {〈1, 𝑁〉} ∧ 𝑖 ∈ (1...(𝐾 + 1))) → 𝑔 = {〈1, 𝑁〉}) |
44 | 43 | fveq1d 6758 |
. . . . . . . . . 10
⊢ ((𝑔 = {〈1, 𝑁〉} ∧ 𝑖 ∈ (1...(𝐾 + 1))) → (𝑔‘𝑖) = ({〈1, 𝑁〉}‘𝑖)) |
45 | 44 | sumeq2dv 15343 |
. . . . . . . . 9
⊢ (𝑔 = {〈1, 𝑁〉} → Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖)) |
46 | 45 | eqeq1d 2740 |
. . . . . . . 8
⊢ (𝑔 = {〈1, 𝑁〉} → (Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = 𝑁 ↔ Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = 𝑁)) |
47 | 42, 46 | anbi12d 630 |
. . . . . . 7
⊢ (𝑔 = {〈1, 𝑁〉} → ((𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = 𝑁) ↔ ({〈1, 𝑁〉}:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = 𝑁))) |
48 | 47 | elabg 3600 |
. . . . . 6
⊢
({〈1, 𝑁〉}
∈ V → ({〈1, 𝑁〉} ∈ {𝑔 ∣ (𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = 𝑁)} ↔ ({〈1, 𝑁〉}:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = 𝑁))) |
49 | 41, 48 | ax-mp 5 |
. . . . 5
⊢
({〈1, 𝑁〉}
∈ {𝑔 ∣ (𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = 𝑁)} ↔ ({〈1, 𝑁〉}:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))({〈1, 𝑁〉}‘𝑖) = 𝑁)) |
50 | 40, 49 | sylibr 233 |
. . . 4
⊢ ((𝜑 ∧ 𝑏 ∈ 𝐵) → {〈1, 𝑁〉} ∈ {𝑔 ∣ (𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = 𝑁)}) |
51 | | sticksstones9.4 |
. . . . 5
⊢ 𝐴 = {𝑔 ∣ (𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = 𝑁)} |
52 | 51 | a1i 11 |
. . . 4
⊢ ((𝜑 ∧ 𝑏 ∈ 𝐵) → 𝐴 = {𝑔 ∣ (𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧
Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔‘𝑖) = 𝑁)}) |
53 | 50, 52 | eleqtrrd 2842 |
. . 3
⊢ ((𝜑 ∧ 𝑏 ∈ 𝐵) → {〈1, 𝑁〉} ∈ 𝐴) |
54 | 3, 53 | eqeltrd 2839 |
. 2
⊢ ((𝜑 ∧ 𝑏 ∈ 𝐵) → if(𝐾 = 0, {〈1, 𝑁〉}, (𝑘 ∈ (1...(𝐾 + 1)) ↦ if(𝑘 = (𝐾 + 1), ((𝑁 + 𝐾) − (𝑏‘𝐾)), if(𝑘 = 1, ((𝑏‘1) − 1), (((𝑏‘𝑘) − (𝑏‘(𝑘 − 1))) − 1))))) ∈ 𝐴) |
55 | | sticksstones9.3 |
. 2
⊢ 𝐺 = (𝑏 ∈ 𝐵 ↦ if(𝐾 = 0, {〈1, 𝑁〉}, (𝑘 ∈ (1...(𝐾 + 1)) ↦ if(𝑘 = (𝐾 + 1), ((𝑁 + 𝐾) − (𝑏‘𝐾)), if(𝑘 = 1, ((𝑏‘1) − 1), (((𝑏‘𝑘) − (𝑏‘(𝑘 − 1))) −
1)))))) |
56 | 54, 55 | fmptd 6970 |
1
⊢ (𝜑 → 𝐺:𝐵⟶𝐴) |