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 35417
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 4061 . . . . . . . . . . . . . . 15 (𝜑 → 𝐸 ∈ Word ℝ)
5 wrdf 14725 . . . . . . . . . . . . . . 15 (𝐸 ∈ Word ℝ → 𝐸:(0..^(♯‘𝐸))⟶ℝ)
64, 5syl 18 . . . . . . . . . . . . . 14 (𝜑 → 𝐸:(0..^(♯‘𝐸))⟶ℝ)
7 signsvf.n . . . . . . . . . . . . . . . 16 𝑁 = (♯‘𝐸)
87oveq1i 7480 . . . . . . . . . . . . . . 15 (𝑁 − 1) = ((♯‘𝐸) − 1)
9 eldifsn 4758 . . . . . . . . . . . . . . . . 17 (𝐸 ∈ (Word ℝ ∖ {∅}) ↔ (𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅))
101, 9sylib 221 . . . . . . . . . . . . . . . 16 (𝜑 → (𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅))
11 lennncl 14741 . . . . . . . . . . . . . . . 16 ((𝐸 ∈ Word ℝ ∧ 𝐸 ≠ ∅) → (♯‘𝐸) ∈ ℕ)
12 fzo0end 13954 . . . . . . . . . . . . . . . 16 ((♯‘𝐸) ∈ ℕ → ((♯‘𝐸) − 1) ∈ (0..^(♯‘𝐸)))
1310, 11, 123syl 19 . . . . . . . . . . . . . . 15 (𝜑 → ((♯‘𝐸) − 1) ∈ (0..^(♯‘𝐸)))
148, 13eqeltrid 2879 . . . . . . . . . . . . . 14 (𝜑 → (𝑁 − 1) ∈ (0..^(♯‘𝐸)))
156, 14ffvelcdmd 7135 . . . . . . . . . . . . 13 (𝜑 → (𝐸‘(𝑁 − 1)) ∈ ℝ)
1615recnd 11395 . . . . . . . . . . . 12 (𝜑 → (𝐸‘(𝑁 − 1)) ∈ ℂ)
173, 16eqeltrid 2879 . . . . . . . . . . 11 (𝜑 → 𝐵 ∈ ℂ)
1817adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ∈ ℂ)
19 signsvf.a . . . . . . . . . . . 12 (𝜑 → 𝐴 ∈ ℝ)
2019recnd 11395 . . . . . . . . . . 11 (𝜑 → 𝐴 ∈ ℂ)
2120adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐴 ∈ ℂ)
22 simpr 490 . . . . . . . . . . 11 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (𝐵 · 𝐴) < 0)
2322lt0ne0d 11940 . . . . . . . . . 10 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (𝐵 · 𝐴) ≠ 0)
2418, 21, 23mulne0bad 12030 . . . . . . . . 9 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ≠ 0)
253, 24eqnetrrid 3045 . . . . . . . 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 35401 . . . . . . . . 9 ((𝐸 ∈ (Word ℝ ∖ {∅}) ∧ (𝐸‘(𝑁 − 1)) ≠ 0) → ((𝑇‘𝐸)‘(𝑁 − 1)) = (sgn‘(𝐸‘(𝑁 − 1))))
313fveq2i 6937 . . . . . . . . 9 (sgn‘𝐵) = (sgn‘(𝐸‘(𝑁 − 1)))
3230, 31eqtr4di 2827 . . . . . . . 8 ((𝐸 ∈ (Word ℝ ∖ {∅}) ∧ (𝐸‘(𝑁 − 1)) ≠ 0) → ((𝑇‘𝐸)‘(𝑁 − 1)) = (sgn‘𝐵))
332, 25, 32syl2anc 596 . . . . . . 7 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((𝑇‘𝐸)‘(𝑁 − 1)) = (sgn‘𝐵))
3433fveq2d 6938 . . . . . 6 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘((𝑇‘𝐸)‘(𝑁 − 1))) = (sgn‘(sgn‘𝐵)))
353, 15eqeltrid 2879 . . . . . . . . 9 (𝜑 → 𝐵 ∈ ℝ)
3635adantr 486 . . . . . . . 8 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ∈ ℝ)
3736rexrd 11417 . . . . . . 7 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐵 ∈ ℝ*)
38 sgnsgn 33654 . . . . . . 7 (𝐵 ∈ ℝ* → (sgn‘(sgn‘𝐵)) = (sgn‘𝐵))
3937, 38syl 18 . . . . . 6 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘(sgn‘𝐵)) = (sgn‘𝐵))
4034, 39eqtrd 2809 . . . . 5 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘((𝑇‘𝐸)‘(𝑁 − 1))) = (sgn‘𝐵))
4140oveq2d 7486 . . . 4 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((sgn‘𝐴) · (sgn‘((𝑇‘𝐸)‘(𝑁 − 1)))) = ((sgn‘𝐴) · (sgn‘𝐵)))
4220, 17mulcomd 11388 . . . . . . 7 (𝜑 → (𝐴 · 𝐵) = (𝐵 · 𝐴))
4342breq1d 5126 . . . . . 6 (𝜑 → ((𝐴 · 𝐵) < 0 ↔ (𝐵 · 𝐴) < 0))
44 sgnmulsgn 15326 . . . . . . 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 5141 . . 3 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((sgn‘𝐴) · (sgn‘((𝑇‘𝐸)‘(𝑁 − 1)))) < 0)
4919adantr 486 . . . 4 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → 𝐴 ∈ ℝ)
50 sgnclre 15319 . . . . . 6 (𝐵 ∈ ℝ → (sgn‘𝐵) ∈ ℝ)
5136, 50syl 18 . . . . 5 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → (sgn‘𝐵) ∈ ℝ)
5233, 51eqeltrd 2875 . . . 4 ((𝜑 ∧ (𝐵 · 𝐴) < 0) → ((𝑇‘𝐸)‘(𝑁 − 1)) ∈ ℝ)
53 sgnmulsgn 15326 . . . 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 2774 . . 3 ((𝑇‘𝐸)‘(𝑁 − 1)) = ((𝑇‘𝐸)‘(𝑁 − 1))
5926, 27, 28, 29, 1, 56, 57, 19, 7, 58signsvtn 35415 . 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 1572   ∈ wcel 2156   ≠ wne 2970   ∖ cdif 4055  ∅c0 4288  ifcif 4492  {csn 4595  {cpr 4597  {ctp 4599  ⟨cop 4848   class class class wbr 5116   ↦ cmpt 5200  ⟶wf 6575  ‘cfv 6579  (class class class)co 7470   ∈ cmpo 7472  ℂcc 11256  ℝcr 11257  0cc0 11258  1c1 11259   · cmul 11263  ℝ*cxr 11400   < clt 11401   − cmin 11599   -cneg 11600  ℕcn 12394  ...cfz 13698  ..^cfzo 13847  ♯chash 14536  Word cword 14720   ++ cconcat 14777  ⟨“cs1 14804  sgncsgn 15303  Σcsu 15918  ndxcnx 17439  Basecbs 17455  +gcplusg 17496   Σg cgsu 17689
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1834  ax-4 1848  ax-5 1951  ax-6 2009  ax-7 2050  ax-8 2158  ax-9 2166  ax-10 2189  ax-11 2206  ax-12 2225  ax-ext 2746  ax-rep 5246  ax-sep 5263  ax-nul 5274  ax-pow 5342  ax-pr 5406  ax-un 7802  ax-inf2 9698  ax-cnex 11314  ax-resscn 11315  ax-1cn 11316  ax-icn 11317  ax-addcl 11318  ax-addrcl 11319  ax-mulcl 11320  ax-mulrcl 11321  ax-mulcom 11322  ax-addass 11323  ax-mulass 11324  ax-distr 11325  ax-i2m1 11326  ax-1ne0 11327  ax-1rid 11328  ax-rnegex 11329  ax-rrecex 11330  ax-cnre 11331  ax-pre-lttri 11332  ax-pre-lttrn 11333  ax-pre-ltadd 11334  ax-pre-mulgt0 11335  ax-pre-sup 11336
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1105  df-3an 1106  df-tru 1575  df-fal 1585  df-ex 1819  df-nf 1823  df-sb 2110  df-mo 2576  df-eu 2606  df-clab 2753  df-cleq 2766  df-clel 2850  df-nfc 2924  df-ne 2971  df-nel 3077  df-ral 3092  df-rex 3102  df-rmo 3376  df-reu 3377  df-rab 3424  df-v 3463  df-sbc 3750  df-csb 3859  df-ss 3908  df-pss 4024  df-dif 4057  df-in 4101  df-un 4161  df-nul 4289  df-if 4493  df-pw 4569  df-sn 4596  df-pr 4598  df-tp 4600  df-op 4849  df-uni 4881  df-int 4921  df-iun 4966  df-br 5117  df-opab 5182  df-mpt 5201  df-tr 5227  df-id 5561  df-eprel 5566  df-po 5574  df-so 5575  df-fr 5619  df-se 5620  df-we 5621  df-xp 5672  df-rel 5673  df-cnv 5674  df-co 5675  df-dm 5676  df-rn 5677  df-res 5678  df-ima 5679  df-pred 6343  df-ord 6404  df-on 6405  df-lim 6406  df-suc 6407  df-iota 6533  df-fun 6581  df-fn 6582  df-f 6583  df-f1 6584  df-fo 6585  df-f1o 6586  df-fv 6587  df-isom 6588  df-riota 7426  df-ov 7473  df-oprab 7474  df-mpo 7475  df-om 7931  df-1st 8054  df-2nd 8055  df-supp 8234  df-frecs 8356  df-wrecs 8387  df-recs 8436  df-rdg 8475  df-1o 8533  df-er 8774  df-en 9031  df-dom 9032  df-sdom 9033  df-fin 9034  df-sup 9490  df-oi 9560  df-card 10076  df-pnf 11403  df-mnf 11404  df-xr 11405  df-ltxr 11406  df-le 11407  df-sub 11601  df-neg 11602  df-div 12033  df-nn 12395  df-2 12464  df-3 12465  df-n0 12666  df-xnn0 12739  df-z 12753  df-uz 13025  df-rp 13180  df-fz 13699  df-fzo 13848  df-seq 14206  df-exp 14266  df-hash 14537  df-word 14721  df-lsw 14770  df-concat 14778  df-s1 14805  df-substr 14852  df-pfx 14884  df-sgn 15304  df-cj 15330  df-re 15331  df-im 15332  df-sqrt 15466  df-abs 15467  df-clim 15720  df-sum 15919  df-struct 17393  df-slot 17428  df-ndx 17440  df-base 17456  df-plusg 17510  df-0g 17690  df-gsum 17691  df-mgm 18894  df-sgrp 18986  df-mnd 19002  df-mulg 19358  df-cntz 19612
This theorem is used by: (None)
  Copyright terms: Public domain W3C validator