Mathbox for Alexander van der Vekens |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > Mathboxes > lswn0 | Structured version Visualization version GIF version |
Description: The last symbol of a not empty word exists. The empty set must be excluded as symbol, because otherwise, it cannot be distinguished between valid cases (∅ is the last symbol) and invalid cases (∅ means that no last symbol exists. This is because of the special definition of a function in set.mm. (Contributed by Alexander van der Vekens, 18-Mar-2018.) |
Ref | Expression |
---|---|
lswn0 | ⊢ ((𝑊 ∈ Word 𝑉 ∧ ∅ ∉ 𝑉 ∧ (♯‘𝑊) ≠ 0) → (lastS‘𝑊) ≠ ∅) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | lsw 14263 | . . 3 ⊢ (𝑊 ∈ Word 𝑉 → (lastS‘𝑊) = (𝑊‘((♯‘𝑊) − 1))) | |
2 | 1 | 3ad2ant1 1132 | . 2 ⊢ ((𝑊 ∈ Word 𝑉 ∧ ∅ ∉ 𝑉 ∧ (♯‘𝑊) ≠ 0) → (lastS‘𝑊) = (𝑊‘((♯‘𝑊) − 1))) |
3 | wrdf 14218 | . . . . . 6 ⊢ (𝑊 ∈ Word 𝑉 → 𝑊:(0..^(♯‘𝑊))⟶𝑉) | |
4 | lencl 14232 | . . . . . 6 ⊢ (𝑊 ∈ Word 𝑉 → (♯‘𝑊) ∈ ℕ0) | |
5 | simpll 764 | . . . . . . . 8 ⊢ (((𝑊:(0..^(♯‘𝑊))⟶𝑉 ∧ (♯‘𝑊) ∈ ℕ0) ∧ (♯‘𝑊) ≠ 0) → 𝑊:(0..^(♯‘𝑊))⟶𝑉) | |
6 | elnnne0 12245 | . . . . . . . . . . . 12 ⊢ ((♯‘𝑊) ∈ ℕ ↔ ((♯‘𝑊) ∈ ℕ0 ∧ (♯‘𝑊) ≠ 0)) | |
7 | 6 | biimpri 227 | . . . . . . . . . . 11 ⊢ (((♯‘𝑊) ∈ ℕ0 ∧ (♯‘𝑊) ≠ 0) → (♯‘𝑊) ∈ ℕ) |
8 | nnm1nn0 12272 | . . . . . . . . . . 11 ⊢ ((♯‘𝑊) ∈ ℕ → ((♯‘𝑊) − 1) ∈ ℕ0) | |
9 | 7, 8 | syl 17 | . . . . . . . . . 10 ⊢ (((♯‘𝑊) ∈ ℕ0 ∧ (♯‘𝑊) ≠ 0) → ((♯‘𝑊) − 1) ∈ ℕ0) |
10 | nn0re 12240 | . . . . . . . . . . . 12 ⊢ ((♯‘𝑊) ∈ ℕ0 → (♯‘𝑊) ∈ ℝ) | |
11 | 10 | ltm1d 11905 | . . . . . . . . . . 11 ⊢ ((♯‘𝑊) ∈ ℕ0 → ((♯‘𝑊) − 1) < (♯‘𝑊)) |
12 | 11 | adantr 481 | . . . . . . . . . 10 ⊢ (((♯‘𝑊) ∈ ℕ0 ∧ (♯‘𝑊) ≠ 0) → ((♯‘𝑊) − 1) < (♯‘𝑊)) |
13 | elfzo0 13424 | . . . . . . . . . 10 ⊢ (((♯‘𝑊) − 1) ∈ (0..^(♯‘𝑊)) ↔ (((♯‘𝑊) − 1) ∈ ℕ0 ∧ (♯‘𝑊) ∈ ℕ ∧ ((♯‘𝑊) − 1) < (♯‘𝑊))) | |
14 | 9, 7, 12, 13 | syl3anbrc 1342 | . . . . . . . . 9 ⊢ (((♯‘𝑊) ∈ ℕ0 ∧ (♯‘𝑊) ≠ 0) → ((♯‘𝑊) − 1) ∈ (0..^(♯‘𝑊))) |
15 | 14 | adantll 711 | . . . . . . . 8 ⊢ (((𝑊:(0..^(♯‘𝑊))⟶𝑉 ∧ (♯‘𝑊) ∈ ℕ0) ∧ (♯‘𝑊) ≠ 0) → ((♯‘𝑊) − 1) ∈ (0..^(♯‘𝑊))) |
16 | 5, 15 | ffvelrnd 6957 | . . . . . . 7 ⊢ (((𝑊:(0..^(♯‘𝑊))⟶𝑉 ∧ (♯‘𝑊) ∈ ℕ0) ∧ (♯‘𝑊) ≠ 0) → (𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉) |
17 | 16 | ex 413 | . . . . . 6 ⊢ ((𝑊:(0..^(♯‘𝑊))⟶𝑉 ∧ (♯‘𝑊) ∈ ℕ0) → ((♯‘𝑊) ≠ 0 → (𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉)) |
18 | 3, 4, 17 | syl2anc 584 | . . . . 5 ⊢ (𝑊 ∈ Word 𝑉 → ((♯‘𝑊) ≠ 0 → (𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉)) |
19 | eleq1a 2836 | . . . . . . . . . 10 ⊢ ((𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉 → (∅ = (𝑊‘((♯‘𝑊) − 1)) → ∅ ∈ 𝑉)) | |
20 | 19 | com12 32 | . . . . . . . . 9 ⊢ (∅ = (𝑊‘((♯‘𝑊) − 1)) → ((𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉 → ∅ ∈ 𝑉)) |
21 | 20 | eqcoms 2748 | . . . . . . . 8 ⊢ ((𝑊‘((♯‘𝑊) − 1)) = ∅ → ((𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉 → ∅ ∈ 𝑉)) |
22 | 21 | com12 32 | . . . . . . 7 ⊢ ((𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉 → ((𝑊‘((♯‘𝑊) − 1)) = ∅ → ∅ ∈ 𝑉)) |
23 | nnel 3060 | . . . . . . 7 ⊢ (¬ ∅ ∉ 𝑉 ↔ ∅ ∈ 𝑉) | |
24 | 22, 23 | syl6ibr 251 | . . . . . 6 ⊢ ((𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉 → ((𝑊‘((♯‘𝑊) − 1)) = ∅ → ¬ ∅ ∉ 𝑉)) |
25 | 24 | necon2ad 2960 | . . . . 5 ⊢ ((𝑊‘((♯‘𝑊) − 1)) ∈ 𝑉 → (∅ ∉ 𝑉 → (𝑊‘((♯‘𝑊) − 1)) ≠ ∅)) |
26 | 18, 25 | syl6 35 | . . . 4 ⊢ (𝑊 ∈ Word 𝑉 → ((♯‘𝑊) ≠ 0 → (∅ ∉ 𝑉 → (𝑊‘((♯‘𝑊) − 1)) ≠ ∅))) |
27 | 26 | com23 86 | . . 3 ⊢ (𝑊 ∈ Word 𝑉 → (∅ ∉ 𝑉 → ((♯‘𝑊) ≠ 0 → (𝑊‘((♯‘𝑊) − 1)) ≠ ∅))) |
28 | 27 | 3imp 1110 | . 2 ⊢ ((𝑊 ∈ Word 𝑉 ∧ ∅ ∉ 𝑉 ∧ (♯‘𝑊) ≠ 0) → (𝑊‘((♯‘𝑊) − 1)) ≠ ∅) |
29 | 2, 28 | eqnetrd 3013 | 1 ⊢ ((𝑊 ∈ Word 𝑉 ∧ ∅ ∉ 𝑉 ∧ (♯‘𝑊) ≠ 0) → (lastS‘𝑊) ≠ ∅) |
Colors of variables: wff setvar class |
Syntax hints: ¬ wn 3 → wi 4 ∧ wa 396 ∧ w3a 1086 = wceq 1542 ∈ wcel 2110 ≠ wne 2945 ∉ wnel 3051 ∅c0 4262 class class class wbr 5079 ⟶wf 6427 ‘cfv 6431 (class class class)co 7269 0cc0 10870 1c1 10871 < clt 11008 − cmin 11203 ℕcn 11971 ℕ0cn0 12231 ..^cfzo 13379 ♯chash 14040 Word cword 14213 lastSclsw 14261 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1802 ax-4 1816 ax-5 1917 ax-6 1975 ax-7 2015 ax-8 2112 ax-9 2120 ax-10 2141 ax-11 2158 ax-12 2175 ax-ext 2711 ax-rep 5214 ax-sep 5227 ax-nul 5234 ax-pow 5292 ax-pr 5356 ax-un 7580 ax-cnex 10926 ax-resscn 10927 ax-1cn 10928 ax-icn 10929 ax-addcl 10930 ax-addrcl 10931 ax-mulcl 10932 ax-mulrcl 10933 ax-mulcom 10934 ax-addass 10935 ax-mulass 10936 ax-distr 10937 ax-i2m1 10938 ax-1ne0 10939 ax-1rid 10940 ax-rnegex 10941 ax-rrecex 10942 ax-cnre 10943 ax-pre-lttri 10944 ax-pre-lttrn 10945 ax-pre-ltadd 10946 ax-pre-mulgt0 10947 |
This theorem depends on definitions: df-bi 206 df-an 397 df-or 845 df-3or 1087 df-3an 1088 df-tru 1545 df-fal 1555 df-ex 1787 df-nf 1791 df-sb 2072 df-mo 2542 df-eu 2571 df-clab 2718 df-cleq 2732 df-clel 2818 df-nfc 2891 df-ne 2946 df-nel 3052 df-ral 3071 df-rex 3072 df-reu 3073 df-rab 3075 df-v 3433 df-sbc 3721 df-csb 3838 df-dif 3895 df-un 3897 df-in 3899 df-ss 3909 df-pss 3911 df-nul 4263 df-if 4466 df-pw 4541 df-sn 4568 df-pr 4570 df-op 4574 df-uni 4846 df-int 4886 df-iun 4932 df-br 5080 df-opab 5142 df-mpt 5163 df-tr 5197 df-id 5489 df-eprel 5495 df-po 5503 df-so 5504 df-fr 5544 df-we 5546 df-xp 5595 df-rel 5596 df-cnv 5597 df-co 5598 df-dm 5599 df-rn 5600 df-res 5601 df-ima 5602 df-pred 6200 df-ord 6267 df-on 6268 df-lim 6269 df-suc 6270 df-iota 6389 df-fun 6433 df-fn 6434 df-f 6435 df-f1 6436 df-fo 6437 df-f1o 6438 df-fv 6439 df-riota 7226 df-ov 7272 df-oprab 7273 df-mpo 7274 df-om 7705 df-1st 7822 df-2nd 7823 df-frecs 8086 df-wrecs 8117 df-recs 8191 df-rdg 8230 df-1o 8286 df-er 8479 df-en 8715 df-dom 8716 df-sdom 8717 df-fin 8718 df-card 9696 df-pnf 11010 df-mnf 11011 df-xr 11012 df-ltxr 11013 df-le 11014 df-sub 11205 df-neg 11206 df-nn 11972 df-n0 12232 df-z 12318 df-uz 12580 df-fz 13237 df-fzo 13380 df-hash 14041 df-word 14214 df-lsw 14262 |
This theorem is referenced by: (None) |
Copyright terms: Public domain | W3C validator |