Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  signsvfnn Structured version   Visualization version   GIF version

Theorem signsvfnn 35014
Description: Adding a letter of a different sign as the highest coefficient changes the sign. (Contributed by Thierry Arnoux, 12-Oct-2018.)
Hypotheses
Ref Expression
signsv.p = (𝑎 ∈ {-1, 0, 1}, 𝑏 ∈ {-1, 0, 1} ↦ if(𝑏 = 0, 𝑎, 𝑏))
signsv.w 𝑊 = {⟨(Base‘ndx), {-1, 0, 1}⟩, ⟨(+g‘ndx), ⟩}
signsv.t 𝑇 = (𝑓 ∈ Word ℝ ↦ (𝑛 ∈ (0..^(♯‘𝑓)) ↦ (𝑊 Σg (𝑖 ∈ (0...𝑛) ↦ (sgn‘(𝑓𝑖))))))
signsv.v 𝑉 = (𝑓 ∈ Word ℝ ↦ Σ𝑗 ∈ (1..^(♯‘𝑓))if(((𝑇𝑓)‘𝑗) ≠ ((𝑇𝑓)‘(𝑗 − 1)), 1, 0))
signsvf.e (𝜑𝐸 ∈ (Word ℝ ∖ {∅}))
signsvf.0 (𝜑 → (𝐸‘0) ≠ 0)
signsvf.f (𝜑𝐹 = (𝐸 ++ ⟨“𝐴”⟩))
signsvf.a (𝜑𝐴 ∈ ℝ)
signsvf.n 𝑁 = (♯‘𝐸)
signsvf.b 𝐵 = (𝐸‘(𝑁 − 1))
Assertion
Ref Expression
signsvfnn ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((𝑉𝐹) − (𝑉𝐸)) = 1)
Distinct variable groups:   𝑎,𝑏,   𝑓,𝑖,𝑛,𝐹   𝑓,𝑊,𝑖,𝑛   𝑓,𝑎,𝑖,𝑗,𝑛,𝐴,𝑏   𝐸,𝑎,𝑏,𝑓,𝑖,𝑗,𝑛   𝑁,𝑎,𝑏,𝑓,𝑖,𝑛   𝑇,𝑎,𝑏,𝑓,𝑗,𝑛
Allowed substitution hints:   𝜑(𝑓, 𝑖, 𝑗, 𝑛, 𝑎, 𝑏)   𝐵(𝑓, 𝑖, 𝑗, 𝑛, 𝑎, 𝑏)   (𝑓, 𝑖, 𝑗, 𝑛)   𝑇(𝑖)   𝐹(𝑗, 𝑎, 𝑏)   𝑁(𝑗)   𝑉(𝑓, 𝑖, 𝑗, 𝑛, 𝑎, 𝑏)   𝑊(𝑗, 𝑎, 𝑏)

Proof of Theorem signsvfnn
StepHypRef Expression
1 signsvf.e . . . . . . . . 9 (𝜑𝐸 ∈ (Word ℝ ∖ {∅}))
21adantr 486 . . . . . . . 8 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐸 ∈ (Word ℝ ∖ {∅}))
3 signsvf.b . . . . . . . . 9 𝐵 = (𝐸‘(𝑁 − 1))
41eldifad 3918 . . . . . . . . . . . . . . 15 (𝜑𝐸 ∈ Word ℝ)
5 wrdf 14569 . . . . . . . . . . . . . . 15 (𝐸 ∈ Word ℝ → 𝐸:(0..^(♯‘𝐸))⟶ℝ)
64, 5syl 18 . . . . . . . . . . . . . 14 (𝜑𝐸:(0..^(♯‘𝐸))⟶ℝ)
7 signsvf.n . . . . . . . . . . . . . . . 16 𝑁 = (♯‘𝐸)
87oveq1i 7426 . . . . . . . . . . . . . . 15 (𝑁 − 1) = ((♯‘𝐸) − 1)
9 eldifsn 4755 . . . . . . . . . . . . . . . . 17 (𝐸 ∈ (Word ℝ ∖ {∅}) ↔ (𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅))
101, 9sylib 221 . . . . . . . . . . . . . . . 16 (𝜑 → (𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅))
11 lennncl 14585 . . . . . . . . . . . . . . . 16 ((𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅) → (♯‘𝐸) ∈ ℕ)
12 fzo0end 13800 . . . . . . . . . . . . . . . 16 ((♯‘𝐸) ∈ ℕ → ((♯‘𝐸) − 1) ∈ (0..^(♯‘𝐸)))
1310, 11, 123syl 19 . . . . . . . . . . . . . . 15 (𝜑 → ((♯‘𝐸) − 1) ∈ (0..^(♯‘𝐸)))
148, 13eqeltrid 2869 . . . . . . . . . . . . . 14 (𝜑 → (𝑁 − 1) ∈ (0..^(♯‘𝐸)))
156, 14ffvelcdmd 7084 . . . . . . . . . . . . 13 (𝜑 → (𝐸‘(𝑁 − 1)) ∈ ℝ)
1615recnd 11248 . . . . . . . . . . . 12 (𝜑 → (𝐸‘(𝑁 − 1)) ∈ ℂ)
173, 16eqeltrid 2869 . . . . . . . . . . 11 (𝜑𝐵 ∈ ℂ)
1817adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ∈ ℂ)
19 signsvf.a . . . . . . . . . . . 12 (𝜑𝐴 ∈ ℝ)
2019recnd 11248 . . . . . . . . . . 11 (𝜑𝐴 ∈ ℂ)
2120adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐴 ∈ ℂ)
22 simpr 490 . . . . . . . . . . 11 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (𝐵 · 𝐴) < 0)
2322lt0ne0d 11790 . . . . . . . . . 10 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (𝐵 · 𝐴) ≠ 0)
2418, 21, 23mulne0bad 11880 . . . . . . . . 9 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ≠ 0)
253, 24eqnetrrid 3035 . . . . . . . 8 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (𝐸‘(𝑁 − 1)) ≠ 0)
26 signsv.p . . . . . . . . . 10 = (𝑎 ∈ {-1, 0, 1}, 𝑏 ∈ {-1, 0, 1} ↦ if(𝑏 = 0, 𝑎, 𝑏))
27 signsv.w . . . . . . . . . 10 𝑊 = {⟨(Base‘ndx), {-1, 0, 1}⟩, ⟨(+g‘ndx), ⟩}
28 signsv.t . . . . . . . . . 10 𝑇 = (𝑓 ∈ Word ℝ ↦ (𝑛 ∈ (0..^(♯‘𝑓)) ↦ (𝑊 Σg (𝑖 ∈ (0...𝑛) ↦ (sgn‘(𝑓𝑖))))))
29 signsv.v . . . . . . . . . 10 𝑉 = (𝑓 ∈ Word ℝ ↦ Σ𝑗 ∈ (1..^(♯‘𝑓))if(((𝑇𝑓)‘𝑗) ≠ ((𝑇𝑓)‘(𝑗 − 1)), 1, 0))
3026, 27, 28, 29, 7signsvtn0 34998 . . . . . . . . 9 ((𝐸 ∈ (Word ℝ ∖ {∅}) ∧ (𝐸‘(𝑁 − 1)) ≠ 0) → ((𝑇𝐸)‘(𝑁 − 1)) = (sgn‘(𝐸‘(𝑁 − 1))))
313fveq2i 6888 . . . . . . . . 9 (sgn‘𝐵) = (sgn‘(𝐸‘(𝑁 − 1)))
3230, 31eqtr4di 2818 . . . . . . . 8 ((𝐸 ∈ (Word ℝ ∖ {∅}) ∧ (𝐸‘(𝑁 − 1)) ≠ 0) → ((𝑇𝐸)‘(𝑁 − 1)) = (sgn‘𝐵))
332, 25, 32syl2anc 596 . . . . . . 7 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((𝑇𝐸)‘(𝑁 − 1)) = (sgn‘𝐵))
3433fveq2d 6889 . . . . . 6 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘((𝑇𝐸)‘(𝑁 − 1))) = (sgn‘(sgn‘𝐵)))
353, 15eqeltrid 2869 . . . . . . . . 9 (𝜑𝐵 ∈ ℝ)
3635adantr 486 . . . . . . . 8 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ∈ ℝ)
3736rexrd 11270 . . . . . . 7 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ∈ ℝ*)
38 sgnsgn 33221 . . . . . . 7 (𝐵 ∈ ℝ* → (sgn‘(sgn‘𝐵)) = (sgn‘𝐵))
3937, 38syl 18 . . . . . 6 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘(sgn‘𝐵)) = (sgn‘𝐵))
4034, 39eqtrd 2800 . . . . 5 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘((𝑇𝐸)‘(𝑁 − 1))) = (sgn‘𝐵))
4140oveq2d 7432 . . . 4 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((sgn‘𝐴) · (sgn‘((𝑇𝐸)‘(𝑁 − 1)))) = ((sgn‘𝐴) · (sgn‘𝐵)))
4220, 17mulcomd 11241 . . . . . . 7 (𝜑 → (𝐴 · 𝐵) = (𝐵 · 𝐴))
4342breq1d 5121 . . . . . 6 (𝜑 → ((𝐴 · 𝐵) < 0 ↔ (𝐵 · 𝐴) < 0))
44 sgnmulsgn 15166 . . . . . . 7 ((𝐴 ∈ ℝ ∧ 𝐵 ∈ ℝ) → ((𝐴 · 𝐵) < 0 ↔ ((sgn‘𝐴) · (sgn‘𝐵)) < 0))
4519, 35, 44syl2anc 596 . . . . . 6 (𝜑 → ((𝐴 · 𝐵) < 0 ↔ ((sgn‘𝐴) · (sgn‘𝐵)) < 0))
4643, 45bitr3d 284 . . . . 5 (𝜑 → ((𝐵 · 𝐴) < 0 ↔ ((sgn‘𝐴) · (sgn‘𝐵)) < 0))
4746biimpa 482 . . . 4 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((sgn‘𝐴) · (sgn‘𝐵)) < 0)
4841, 47eqbrtrd 5135 . . 3 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((sgn‘𝐴) · (sgn‘((𝑇𝐸)‘(𝑁 − 1)))) < 0)
4919adantr 486 . . . 4 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐴 ∈ ℝ)
50 sgnclre 15159 . . . . . 6 (𝐵 ∈ ℝ → (sgn‘𝐵) ∈ ℝ)
5136, 50syl 18 . . . . 5 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘𝐵) ∈ ℝ)
5233, 51eqeltrd 2865 . . . 4 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((𝑇𝐸)‘(𝑁 − 1)) ∈ ℝ)
53 sgnmulsgn 15166 . . . 4 ((𝐴 ∈ ℝ ∧ ((𝑇𝐸)‘(𝑁 − 1)) ∈ ℝ) → ((𝐴 · ((𝑇𝐸)‘(𝑁 − 1))) < 0 ↔ ((sgn‘𝐴) · (sgn‘((𝑇𝐸)‘(𝑁 − 1)))) < 0))
5449, 52, 53syl2anc 596 . . 3 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((𝐴 · ((𝑇𝐸)‘(𝑁 − 1))) < 0 ↔ ((sgn‘𝐴) · (sgn‘((𝑇𝐸)‘(𝑁 − 1)))) < 0))
5548, 54mpbird 260 . 2 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (𝐴 · ((𝑇𝐸)‘(𝑁 − 1))) < 0)
56 signsvf.0 . . 3 (𝜑 → (𝐸‘0) ≠ 0)
57 signsvf.f . . 3 (𝜑𝐹 = (𝐸 ++ ⟨“𝐴”⟩))
58 eqid 2765 . . 3 ((𝑇𝐸)‘(𝑁 − 1)) = ((𝑇𝐸)‘(𝑁 − 1))
5926, 27, 28, 29, 1, 56, 57, 19, 7, 58signsvtn 35012 . 2 ((𝜑 ∧ (𝐴 · ((𝑇𝐸)‘(𝑁 − 1))) < 0) → ((𝑉𝐹) − (𝑉𝐸)) = 1)
6055, 59syldan 603 1 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((𝑉𝐹) − (𝑉𝐸)) = 1)
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  wi 4  wb 209  wa 401   = wceq 1570  wcel 2146  wne 2960  cdif 3903  c0 4286  ifcif 4489  {csn 4591  {cpr 4593  {ctp 4595  cop 4597   class class class wbr 5111  cmpt 5194  wf 6536  cfv 6540  (class class class)co 7416  cmpo 7418  cc 11109  cr 11110  0cc0 11111  1c1 11112   · cmul 11116  *cxr 11253   < clt 11254  cmin 11452  -cneg 11453  cn 12244  ...cfz 13547  ..^cfzo 13695  chash 14380  Word cword 14564   ++ cconcat 14621  ⟨“cs1 14648  sgncsgn 15143  Σcsu 15757  ndxcnx 17271  Basecbs 17287  +gcplusg 17328   Σg cgsu 17511
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2148  ax-9 2156  ax-10 2179  ax-11 2195  ax-12 2216  ax-ext 2737  ax-rep 5240  ax-sep 5259  ax-nul 5271  ax-pow 5338  ax-pr 5406  ax-un 7738  ax-inf2 9613  ax-cnex 11167  ax-resscn 11168  ax-1cn 11169  ax-icn 11170  ax-addcl 11171  ax-addrcl 11172  ax-mulcl 11173  ax-mulrcl 11174  ax-mulcom 11175  ax-addass 11176  ax-mulass 11177  ax-distr 11178  ax-i2m1 11179  ax-1ne0 11180  ax-1rid 11181  ax-rnegex 11182  ax-rrecex 11183  ax-cnre 11184  ax-pre-lttri 11185  ax-pre-lttrn 11186  ax-pre-ltadd 11187  ax-pre-mulgt0 11188  ax-pre-sup 11189
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2569  df-eu 2599  df-clab 2744  df-cleq 2757  df-clel 2840  df-nfc 2914  df-ne 2961  df-nel 3067  df-ral 3082  df-rex 3092  df-rmo 3371  df-reu 3372  df-rab 3419  df-v 3459  df-sbc 3747  df-csb 3855  df-dif 3909  df-un 3911  df-in 3913  df-ss 3923  df-pss 3926  df-nul 4287  df-if 4490  df-pw 4566  df-sn 4592  df-pr 4594  df-tp 4596  df-op 4598  df-uni 4875  df-int 4915  df-iun 4960  df-br 5112  df-opab 5176  df-mpt 5195  df-tr 5221  df-id 5558  df-eprel 5563  df-po 5571  df-so 5572  df-fr 5616  df-se 5617  df-we 5618  df-xp 5669  df-rel 5670  df-cnv 5671  df-co 5672  df-dm 5673  df-rn 5674  df-res 5675  df-ima 5676  df-pred 6306  df-ord 6367  df-on 6368  df-lim 6369  df-suc 6370  df-iota 6496  df-fun 6542  df-fn 6543  df-f 6544  df-f1 6545  df-fo 6546  df-f1o 6547  df-fv 6548  df-isom 6549  df-riota 7373  df-ov 7419  df-oprab 7420  df-mpo 7421  df-om 7865  df-1st 7988  df-2nd 7989  df-supp 8159  df-frecs 8280  df-wrecs 8311  df-recs 8360  df-rdg 8399  df-1o 8455  df-er 8696  df-en 8946  df-dom 8947  df-sdom 8948  df-fin 8949  df-sup 9405  df-oi 9475  df-card 9937  df-pnf 11256  df-mnf 11257  df-xr 11258  df-ltxr 11259  df-le 11260  df-sub 11454  df-neg 11455  df-div 11883  df-nn 12245  df-2 12314  df-3 12315  df-n0 12516  df-xnn0 12589  df-z 12603  df-uz 12875  df-rp 13029  df-fz 13548  df-fzo 13696  df-seq 14052  df-exp 14112  df-hash 14381  df-word 14565  df-lsw 14614  df-concat 14622  df-s1 14649  df-substr 14695  df-pfx 14727  df-sgn 15144  df-cj 15170  df-re 15171  df-im 15172  df-sqrt 15306  df-abs 15307  df-clim 15559  df-sum 15758  df-struct 17225  df-slot 17260  df-ndx 17272  df-base 17288  df-plusg 17341  df-0g 17512  df-gsum 17513  df-mgm 18716  df-sgrp 18799  df-mnd 18815  df-mulg 19158  df-cntz 19411
This theorem is used by: (None)
  Copyright terms: Public domain W3C validator