Proof of Theorem signsvtn
Step | Hyp | Ref
| Expression |
1 | | signsvf.f |
. . . . . 6
⊢ (𝜑 → 𝐹 = (𝐸 ++ 〈“𝐴”〉)) |
2 | 1 | fveq2d 6778 |
. . . . 5
⊢ (𝜑 → (𝑉‘𝐹) = (𝑉‘(𝐸 ++ 〈“𝐴”〉))) |
3 | | signsvf.e |
. . . . . 6
⊢ (𝜑 → 𝐸 ∈ (Word ℝ ∖
{∅})) |
4 | | signsvf.0 |
. . . . . 6
⊢ (𝜑 → (𝐸‘0) ≠ 0) |
5 | | signsvf.a |
. . . . . 6
⊢ (𝜑 → 𝐴 ∈ ℝ) |
6 | | signsv.p |
. . . . . . 7
⊢ ⨣ =
(𝑎 ∈ {-1, 0, 1}, 𝑏 ∈ {-1, 0, 1} ↦
if(𝑏 = 0, 𝑎, 𝑏)) |
7 | | signsv.w |
. . . . . . 7
⊢ 𝑊 = {〈(Base‘ndx), {-1,
0, 1}〉, 〈(+g‘ndx), ⨣
〉} |
8 | | signsv.t |
. . . . . . 7
⊢ 𝑇 = (𝑓 ∈ Word ℝ ↦ (𝑛 ∈
(0..^(♯‘𝑓))
↦ (𝑊
Σg (𝑖 ∈ (0...𝑛) ↦ (sgn‘(𝑓‘𝑖)))))) |
9 | | signsv.v |
. . . . . . 7
⊢ 𝑉 = (𝑓 ∈ Word ℝ ↦ Σ𝑗 ∈
(1..^(♯‘𝑓))if(((𝑇‘𝑓)‘𝑗) ≠ ((𝑇‘𝑓)‘(𝑗 − 1)), 1, 0)) |
10 | 6, 7, 8, 9 | signsvfn 32561 |
. . . . . 6
⊢ (((𝐸 ∈ (Word ℝ ∖
{∅}) ∧ (𝐸‘0) ≠ 0) ∧ 𝐴 ∈ ℝ) → (𝑉‘(𝐸 ++ 〈“𝐴”〉)) = ((𝑉‘𝐸) + if((((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) < 0, 1, 0))) |
11 | 3, 4, 5, 10 | syl21anc 835 |
. . . . 5
⊢ (𝜑 → (𝑉‘(𝐸 ++ 〈“𝐴”〉)) = ((𝑉‘𝐸) + if((((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) < 0, 1, 0))) |
12 | 2, 11 | eqtrd 2778 |
. . . 4
⊢ (𝜑 → (𝑉‘𝐹) = ((𝑉‘𝐸) + if((((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) < 0, 1, 0))) |
13 | 12 | adantr 481 |
. . 3
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝑉‘𝐹) = ((𝑉‘𝐸) + if((((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) < 0, 1, 0))) |
14 | | signsvt.b |
. . . . . . . 8
⊢ 𝐵 = ((𝑇‘𝐸)‘(𝑁 − 1)) |
15 | | signsvf.n |
. . . . . . . . . 10
⊢ 𝑁 = (♯‘𝐸) |
16 | 15 | oveq1i 7285 |
. . . . . . . . 9
⊢ (𝑁 − 1) =
((♯‘𝐸) −
1) |
17 | 16 | fveq2i 6777 |
. . . . . . . 8
⊢ ((𝑇‘𝐸)‘(𝑁 − 1)) = ((𝑇‘𝐸)‘((♯‘𝐸) − 1)) |
18 | 14, 17 | eqtri 2766 |
. . . . . . 7
⊢ 𝐵 = ((𝑇‘𝐸)‘((♯‘𝐸) − 1)) |
19 | 18 | oveq1i 7285 |
. . . . . 6
⊢ (𝐵 · 𝐴) = (((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) |
20 | 3 | adantr 481 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐸 ∈ (Word ℝ ∖
{∅})) |
21 | 20 | eldifad 3899 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐸 ∈ Word ℝ) |
22 | 6, 7, 8, 9 | signstf 32545 |
. . . . . . . . . . . 12
⊢ (𝐸 ∈ Word ℝ →
(𝑇‘𝐸) ∈ Word ℝ) |
23 | | wrdf 14222 |
. . . . . . . . . . . 12
⊢ ((𝑇‘𝐸) ∈ Word ℝ → (𝑇‘𝐸):(0..^(♯‘(𝑇‘𝐸)))⟶ℝ) |
24 | 21, 22, 23 | 3syl 18 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝑇‘𝐸):(0..^(♯‘(𝑇‘𝐸)))⟶ℝ) |
25 | | eldifsn 4720 |
. . . . . . . . . . . . . . 15
⊢ (𝐸 ∈ (Word ℝ ∖
{∅}) ↔ (𝐸 ∈
Word ℝ ∧ 𝐸 ≠
∅)) |
26 | 3, 25 | sylib 217 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅)) |
27 | 26 | adantr 481 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅)) |
28 | | lennncl 14237 |
. . . . . . . . . . . . 13
⊢ ((𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅) →
(♯‘𝐸) ∈
ℕ) |
29 | | fzo0end 13479 |
. . . . . . . . . . . . 13
⊢
((♯‘𝐸)
∈ ℕ → ((♯‘𝐸) − 1) ∈
(0..^(♯‘𝐸))) |
30 | 27, 28, 29 | 3syl 18 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → ((♯‘𝐸) − 1) ∈
(0..^(♯‘𝐸))) |
31 | 6, 7, 8, 9 | signstlen 32546 |
. . . . . . . . . . . . . 14
⊢ (𝐸 ∈ Word ℝ →
(♯‘(𝑇‘𝐸)) = (♯‘𝐸)) |
32 | 21, 31 | syl 17 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (♯‘(𝑇‘𝐸)) = (♯‘𝐸)) |
33 | 32 | oveq2d 7291 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (0..^(♯‘(𝑇‘𝐸))) = (0..^(♯‘𝐸))) |
34 | 30, 33 | eleqtrrd 2842 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → ((♯‘𝐸) − 1) ∈
(0..^(♯‘(𝑇‘𝐸)))) |
35 | 24, 34 | ffvelrnd 6962 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → ((𝑇‘𝐸)‘((♯‘𝐸) − 1)) ∈
ℝ) |
36 | 18, 35 | eqeltrid 2843 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐵 ∈ ℝ) |
37 | 36 | recnd 11003 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐵 ∈ ℂ) |
38 | 5 | adantr 481 |
. . . . . . . . 9
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐴 ∈ ℝ) |
39 | 38 | recnd 11003 |
. . . . . . . 8
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐴 ∈ ℂ) |
40 | 37, 39 | mulcomd 10996 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝐵 · 𝐴) = (𝐴 · 𝐵)) |
41 | | simpr 485 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝐴 · 𝐵) < 0) |
42 | 40, 41 | eqbrtrd 5096 |
. . . . . 6
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝐵 · 𝐴) < 0) |
43 | 19, 42 | eqbrtrrid 5110 |
. . . . 5
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) < 0) |
44 | 43 | iftrued 4467 |
. . . 4
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → if((((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) < 0, 1, 0) = 1) |
45 | 44 | oveq2d 7291 |
. . 3
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → ((𝑉‘𝐸) + if((((𝑇‘𝐸)‘((♯‘𝐸) − 1)) · 𝐴) < 0, 1, 0)) = ((𝑉‘𝐸) + 1)) |
46 | 13, 45 | eqtr2d 2779 |
. 2
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → ((𝑉‘𝐸) + 1) = (𝑉‘𝐹)) |
47 | 6, 7, 8, 9 | signsvvf 32558 |
. . . . . 6
⊢ 𝑉:Word
ℝ⟶ℕ0 |
48 | 47 | a1i 11 |
. . . . 5
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝑉:Word
ℝ⟶ℕ0) |
49 | 1 | adantr 481 |
. . . . . 6
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐹 = (𝐸 ++ 〈“𝐴”〉)) |
50 | 38 | s1cld 14308 |
. . . . . . 7
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 〈“𝐴”〉 ∈ Word
ℝ) |
51 | | ccatcl 14277 |
. . . . . . 7
⊢ ((𝐸 ∈ Word ℝ ∧
〈“𝐴”〉
∈ Word ℝ) → (𝐸 ++ 〈“𝐴”〉) ∈ Word
ℝ) |
52 | 21, 50, 51 | syl2anc 584 |
. . . . . 6
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝐸 ++ 〈“𝐴”〉) ∈ Word
ℝ) |
53 | 49, 52 | eqeltrd 2839 |
. . . . 5
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 𝐹 ∈ Word ℝ) |
54 | 48, 53 | ffvelrnd 6962 |
. . . 4
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝑉‘𝐹) ∈
ℕ0) |
55 | 54 | nn0cnd 12295 |
. . 3
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝑉‘𝐹) ∈ ℂ) |
56 | 48, 21 | ffvelrnd 6962 |
. . . 4
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝑉‘𝐸) ∈
ℕ0) |
57 | 56 | nn0cnd 12295 |
. . 3
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (𝑉‘𝐸) ∈ ℂ) |
58 | | 1cnd 10970 |
. . 3
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → 1 ∈
ℂ) |
59 | 55, 57, 58 | subaddd 11350 |
. 2
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → (((𝑉‘𝐹) − (𝑉‘𝐸)) = 1 ↔ ((𝑉‘𝐸) + 1) = (𝑉‘𝐹))) |
60 | 46, 59 | mpbird 256 |
1
⊢ ((𝜑 ∧ (𝐴 · 𝐵) < 0) → ((𝑉‘𝐹) − (𝑉‘𝐸)) = 1) |