Metamath Proof Explorer


Theorem signswmnd

Description: W is a monoid structure on { -u 1 , 0 , 1 } which operation retains the right side, but skips zeroes. This will be used for skipping zeroes when counting sign changes. (Contributed by Thierry Arnoux, 9-Sep-2018)

Ref Expression
Hypotheses signsw.p ˙=a101,b101ifb=0ab
signsw.w W=Basendx101+ndx˙
Assertion signswmnd WMnd

Proof

Step Hyp Ref Expression
1 signsw.p ˙=a101,b101ifb=0ab
2 signsw.w W=Basendx101+ndx˙
3 1 signspval u101v101u˙v=ifv=0uv
4 ifcl u101v101ifv=0uv101
5 3 4 eqeltrd u101v101u˙v101
6 1 signspval u˙v101w101u˙v˙w=ifw=0u˙vw
7 5 6 stoic3 u101v101w101u˙v˙w=ifw=0u˙vw
8 iftrue w=0ifw=0u˙vw=u˙v
9 7 8 sylan9eq u101v101w101w=0u˙v˙w=u˙v
10 9 adantr u101v101w101w=0v=0u˙v˙w=u˙v
11 3 3adant3 u101v101w101u˙v=ifv=0uv
12 11 ad2antrr u101v101w101w=0v=0u˙v=ifv=0uv
13 iftrue v=0ifv=0uv=u
14 13 adantl u101v101w101w=0v=0ifv=0uv=u
15 10 12 14 3eqtrd u101v101w101w=0v=0u˙v˙w=u
16 simp1 u101v101w101u101
17 1 signspval v101w101v˙w=ifw=0vw
18 17 3adant1 u101v101w101v˙w=ifw=0vw
19 simpl2 u101v101w101w=0v101
20 simpl3 u101v101w101¬w=0w101
21 19 20 ifclda u101v101w101ifw=0vw101
22 18 21 eqeltrd u101v101w101v˙w101
23 1 signspval u101v˙w101u˙v˙w=ifv˙w=0uv˙w
24 16 22 23 syl2anc u101v101w101u˙v˙w=ifv˙w=0uv˙w
25 24 ad2antrr u101v101w101w=0v=0u˙v˙w=ifv˙w=0uv˙w
26 iftrue w=0ifw=0vw=v
27 18 26 sylan9eq u101v101w101w=0v˙w=v
28 id v=0v=0
29 27 28 sylan9eq u101v101w101w=0v=0v˙w=0
30 29 iftrued u101v101w101w=0v=0ifv˙w=0uv˙w=u
31 25 30 eqtrd u101v101w101w=0v=0u˙v˙w=u
32 15 31 eqtr4d u101v101w101w=0v=0u˙v˙w=u˙v˙w
33 7 ad2antrr u101v101w101w=0¬v=0u˙v˙w=ifw=0u˙vw
34 8 ad2antlr u101v101w101w=0¬v=0ifw=0u˙vw=u˙v
35 11 ad2antrr u101v101w101w=0¬v=0u˙v=ifv=0uv
36 iffalse ¬v=0ifv=0uv=v
37 36 adantl u101v101w101w=0¬v=0ifv=0uv=v
38 35 37 eqtrd u101v101w101w=0¬v=0u˙v=v
39 33 34 38 3eqtrd u101v101w101w=0¬v=0u˙v˙w=v
40 24 ad2antrr u101v101w101w=0¬v=0u˙v˙w=ifv˙w=0uv˙w
41 simpr u101v101w101w=0¬v=0¬v=0
42 18 ad2antrr u101v101w101w=0¬v=0v˙w=ifw=0vw
43 26 ad2antlr u101v101w101w=0¬v=0ifw=0vw=v
44 42 43 eqtrd u101v101w101w=0¬v=0v˙w=v
45 44 eqeq1d u101v101w101w=0¬v=0v˙w=0v=0
46 41 45 mtbird u101v101w101w=0¬v=0¬v˙w=0
47 46 iffalsed u101v101w101w=0¬v=0ifv˙w=0uv˙w=v˙w
48 40 47 44 3eqtrd u101v101w101w=0¬v=0u˙v˙w=v
49 39 48 eqtr4d u101v101w101w=0¬v=0u˙v˙w=u˙v˙w
50 32 49 pm2.61dan u101v101w101w=0u˙v˙w=u˙v˙w
51 iffalse ¬w=0ifw=0u˙vw=w
52 7 51 sylan9eq u101v101w101¬w=0u˙v˙w=w
53 24 adantr u101v101w101¬w=0u˙v˙w=ifv˙w=0uv˙w
54 simpr u101v101w101¬w=0¬w=0
55 iffalse ¬w=0ifw=0vw=w
56 18 55 sylan9eq u101v101w101¬w=0v˙w=w
57 56 eqeq1d u101v101w101¬w=0v˙w=0w=0
58 54 57 mtbird u101v101w101¬w=0¬v˙w=0
59 58 iffalsed u101v101w101¬w=0ifv˙w=0uv˙w=v˙w
60 53 59 56 3eqtrd u101v101w101¬w=0u˙v˙w=w
61 52 60 eqtr4d u101v101w101¬w=0u˙v˙w=u˙v˙w
62 50 61 pm2.61dan u101v101w101u˙v˙w=u˙v˙w
63 62 3expa u101v101w101u˙v˙w=u˙v˙w
64 63 ralrimiva u101v101w101u˙v˙w=u˙v˙w
65 5 64 jca u101v101u˙v101w101u˙v˙w=u˙v˙w
66 65 rgen2 u101v101u˙v101w101u˙v˙w=u˙v˙w
67 c0ex 0V
68 67 tpid2 0101
69 1 signsw0glem u1010˙u=uu˙0=u
70 oveq1 e=0e˙u=0˙u
71 70 eqeq1d e=0e˙u=u0˙u=u
72 71 ovanraleqv e=0u101e˙u=uu˙e=uu1010˙u=uu˙0=u
73 72 rspcev 0101u1010˙u=uu˙0=ue101u101e˙u=uu˙e=u
74 68 69 73 mp2an e101u101e˙u=uu˙e=u
75 1 2 signswbase 101=BaseW
76 1 2 signswplusg ˙=+W
77 75 76 ismnd WMndu101v101u˙v101w101u˙v˙w=u˙v˙we101u101e˙u=uu˙e=u
78 66 74 77 mpbir2an WMnd