MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  efgsfo Structured version   Visualization version   GIF version

Theorem efgsfo 19345
Description: For any word, there is a sequence of extensions starting at a reduced word and ending at the target word, such that each word in the chain is an extension of the previous (inserting an element and its inverse at adjacent indices somewhere in the sequence). (Contributed by Mario Carneiro, 27-Sep-2015.)
Hypotheses
Ref Expression
efgval.w 𝑊 = ( I ‘Word (𝐼 × 2o))
efgval.r = ( ~FG𝐼)
efgval2.m 𝑀 = (𝑦𝐼, 𝑧 ∈ 2o ↦ ⟨𝑦, (1o𝑧)⟩)
efgval2.t 𝑇 = (𝑣𝑊 ↦ (𝑛 ∈ (0...(♯‘𝑣)), 𝑤 ∈ (𝐼 × 2o) ↦ (𝑣 splice ⟨𝑛, 𝑛, ⟨“𝑤(𝑀𝑤)”⟩⟩)))
efgred.d 𝐷 = (𝑊 𝑥𝑊 ran (𝑇𝑥))
efgred.s 𝑆 = (𝑚 ∈ {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))} ↦ (𝑚‘((♯‘𝑚) − 1)))
Assertion
Ref Expression
efgsfo 𝑆:dom 𝑆onto𝑊
Distinct variable groups:   𝑦,𝑧   𝑡,𝑛,𝑣,𝑤,𝑦,𝑧,𝑚,𝑥   𝑚,𝑀   𝑥,𝑛,𝑀,𝑡,𝑣,𝑤   𝑘,𝑚,𝑡,𝑥,𝑇   𝑘,𝑛,𝑣,𝑤,𝑦,𝑧,𝑊,𝑚,𝑡,𝑥   ,𝑚,𝑡,𝑥,𝑦,𝑧   𝑚,𝐼,𝑛,𝑡,𝑣,𝑤,𝑥,𝑦,𝑧   𝐷,𝑚,𝑡
Allowed substitution hints:   𝐷(𝑥,𝑦,𝑧,𝑤,𝑣,𝑘,𝑛)   (𝑤,𝑣,𝑘,𝑛)   𝑆(𝑥,𝑦,𝑧,𝑤,𝑣,𝑡,𝑘,𝑚,𝑛)   𝑇(𝑦,𝑧,𝑤,𝑣,𝑛)   𝐼(𝑘)   𝑀(𝑦,𝑧,𝑘)

Proof of Theorem efgsfo
Dummy variables 𝑎 𝑏 𝑐 𝑑 𝑖 𝑜 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 efgval.w . . . 4 𝑊 = ( I ‘Word (𝐼 × 2o))
2 efgval.r . . . 4 = ( ~FG𝐼)
3 efgval2.m . . . 4 𝑀 = (𝑦𝐼, 𝑧 ∈ 2o ↦ ⟨𝑦, (1o𝑧)⟩)
4 efgval2.t . . . 4 𝑇 = (𝑣𝑊 ↦ (𝑛 ∈ (0...(♯‘𝑣)), 𝑤 ∈ (𝐼 × 2o) ↦ (𝑣 splice ⟨𝑛, 𝑛, ⟨“𝑤(𝑀𝑤)”⟩⟩)))
5 efgred.d . . . 4 𝐷 = (𝑊 𝑥𝑊 ran (𝑇𝑥))
6 efgred.s . . . 4 𝑆 = (𝑚 ∈ {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))} ↦ (𝑚‘((♯‘𝑚) − 1)))
71, 2, 3, 4, 5, 6efgsf 19335 . . 3 𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊
87fdmi 6612 . . . 4 dom 𝑆 = {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}
98feq2i 6592 . . 3 (𝑆:dom 𝑆𝑊𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊)
107, 9mpbir 230 . 2 𝑆:dom 𝑆𝑊
11 frn 6607 . . . 4 (𝑆:dom 𝑆𝑊 → ran 𝑆𝑊)
1210, 11ax-mp 5 . . 3 ran 𝑆𝑊
13 fviss 6845 . . . . . . . . 9 ( I ‘Word (𝐼 × 2o)) ⊆ Word (𝐼 × 2o)
141, 13eqsstri 3955 . . . . . . . 8 𝑊 ⊆ Word (𝐼 × 2o)
1514sseli 3917 . . . . . . 7 (𝑐𝑊𝑐 ∈ Word (𝐼 × 2o))
16 lencl 14236 . . . . . . 7 (𝑐 ∈ Word (𝐼 × 2o) → (♯‘𝑐) ∈ ℕ0)
1715, 16syl 17 . . . . . 6 (𝑐𝑊 → (♯‘𝑐) ∈ ℕ0)
18 peano2nn0 12273 . . . . . 6 ((♯‘𝑐) ∈ ℕ0 → ((♯‘𝑐) + 1) ∈ ℕ0)
1914sseli 3917 . . . . . . . . . . . 12 (𝑎𝑊𝑎 ∈ Word (𝐼 × 2o))
20 lencl 14236 . . . . . . . . . . . 12 (𝑎 ∈ Word (𝐼 × 2o) → (♯‘𝑎) ∈ ℕ0)
2119, 20syl 17 . . . . . . . . . . 11 (𝑎𝑊 → (♯‘𝑎) ∈ ℕ0)
22 nn0nlt0 12259 . . . . . . . . . . . 12 ((♯‘𝑎) ∈ ℕ0 → ¬ (♯‘𝑎) < 0)
23 breq2 5078 . . . . . . . . . . . . 13 (𝑏 = 0 → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < 0))
2423notbid 318 . . . . . . . . . . . 12 (𝑏 = 0 → (¬ (♯‘𝑎) < 𝑏 ↔ ¬ (♯‘𝑎) < 0))
2522, 24syl5ibr 245 . . . . . . . . . . 11 (𝑏 = 0 → ((♯‘𝑎) ∈ ℕ0 → ¬ (♯‘𝑎) < 𝑏))
2621, 25syl5 34 . . . . . . . . . 10 (𝑏 = 0 → (𝑎𝑊 → ¬ (♯‘𝑎) < 𝑏))
2726ralrimiv 3102 . . . . . . . . 9 (𝑏 = 0 → ∀𝑎𝑊 ¬ (♯‘𝑎) < 𝑏)
28 rabeq0 4318 . . . . . . . . 9 ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = ∅ ↔ ∀𝑎𝑊 ¬ (♯‘𝑎) < 𝑏)
2927, 28sylibr 233 . . . . . . . 8 (𝑏 = 0 → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = ∅)
3029sseq1d 3952 . . . . . . 7 (𝑏 = 0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ ∅ ⊆ ran 𝑆))
31 breq2 5078 . . . . . . . . 9 (𝑏 = 𝑑 → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < 𝑑))
3231rabbidv 3414 . . . . . . . 8 (𝑏 = 𝑑 → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑})
3332sseq1d 3952 . . . . . . 7 (𝑏 = 𝑑 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆))
34 breq2 5078 . . . . . . . . 9 (𝑏 = (𝑑 + 1) → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < (𝑑 + 1)))
3534rabbidv 3414 . . . . . . . 8 (𝑏 = (𝑑 + 1) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)})
3635sseq1d 3952 . . . . . . 7 (𝑏 = (𝑑 + 1) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
37 breq2 5078 . . . . . . . . 9 (𝑏 = ((♯‘𝑐) + 1) → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < ((♯‘𝑐) + 1)))
3837rabbidv 3414 . . . . . . . 8 (𝑏 = ((♯‘𝑐) + 1) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)})
3938sseq1d 3952 . . . . . . 7 (𝑏 = ((♯‘𝑐) + 1) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆))
40 0ss 4330 . . . . . . 7 ∅ ⊆ ran 𝑆
41 simpr 485 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆)
42 fveqeq2 6783 . . . . . . . . . . . 12 (𝑎 = 𝑐 → ((♯‘𝑎) = 𝑑 ↔ (♯‘𝑐) = 𝑑))
4342cbvrabv 3426 . . . . . . . . . . 11 {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑} = {𝑐𝑊 ∣ (♯‘𝑐) = 𝑑}
44 eliun 4928 . . . . . . . . . . . . . . 15 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥))
45 fveq2 6774 . . . . . . . . . . . . . . . . . 18 (𝑥 = 𝑏 → (𝑇𝑥) = (𝑇𝑏))
4645rneqd 5847 . . . . . . . . . . . . . . . . 17 (𝑥 = 𝑏 → ran (𝑇𝑥) = ran (𝑇𝑏))
4746eleq2d 2824 . . . . . . . . . . . . . . . 16 (𝑥 = 𝑏 → (𝑐 ∈ ran (𝑇𝑥) ↔ 𝑐 ∈ ran (𝑇𝑏)))
4847cbvrexvw 3384 . . . . . . . . . . . . . . 15 (∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
4944, 48bitri 274 . . . . . . . . . . . . . 14 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
50 simpl1r 1224 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆)
51 fveq2 6774 . . . . . . . . . . . . . . . . . . . 20 (𝑎 = 𝑏 → (♯‘𝑎) = (♯‘𝑏))
5251breq1d 5084 . . . . . . . . . . . . . . . . . . 19 (𝑎 = 𝑏 → ((♯‘𝑎) < 𝑑 ↔ (♯‘𝑏) < 𝑑))
53 simprl 768 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏𝑊)
5414, 53sselid 3919 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ Word (𝐼 × 2o))
55 lencl 14236 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑏 ∈ Word (𝐼 × 2o) → (♯‘𝑏) ∈ ℕ0)
5654, 55syl 17 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) ∈ ℕ0)
5756nn0red 12294 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) ∈ ℝ)
58 2rp 12735 . . . . . . . . . . . . . . . . . . . . 21 2 ∈ ℝ+
59 ltaddrp 12767 . . . . . . . . . . . . . . . . . . . . 21 (((♯‘𝑏) ∈ ℝ ∧ 2 ∈ ℝ+) → (♯‘𝑏) < ((♯‘𝑏) + 2))
6057, 58, 59sylancl 586 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) < ((♯‘𝑏) + 2))
611, 2, 3, 4efgtlen 19332 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) → (♯‘𝑐) = ((♯‘𝑏) + 2))
6261adantl 482 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑐) = ((♯‘𝑏) + 2))
63 simpl3 1192 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑐) = 𝑑)
6462, 63eqtr3d 2780 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ((♯‘𝑏) + 2) = 𝑑)
6560, 64breqtrd 5100 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) < 𝑑)
6652, 53, 65elrabd 3626 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑})
6750, 66sseldd 3922 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ ran 𝑆)
68 ffn 6600 . . . . . . . . . . . . . . . . . . 19 (𝑆:dom 𝑆𝑊𝑆 Fn dom 𝑆)
6910, 68ax-mp 5 . . . . . . . . . . . . . . . . . 18 𝑆 Fn dom 𝑆
70 fvelrnb 6830 . . . . . . . . . . . . . . . . . 18 (𝑆 Fn dom 𝑆 → (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏))
7169, 70ax-mp 5 . . . . . . . . . . . . . . . . 17 (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
7267, 71sylib 217 . . . . . . . . . . . . . . . 16 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
73 simprrl 778 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ dom 𝑆)
741, 2, 3, 4, 5, 6efgsdm 19336 . . . . . . . . . . . . . . . . . . . . 21 (𝑜 ∈ dom 𝑆 ↔ (𝑜 ∈ (Word 𝑊 ∖ {∅}) ∧ (𝑜‘0) ∈ 𝐷 ∧ ∀𝑖 ∈ (1..^(♯‘𝑜))(𝑜𝑖) ∈ ran (𝑇‘(𝑜‘(𝑖 − 1)))))
7574simp1bi 1144 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ dom 𝑆𝑜 ∈ (Word 𝑊 ∖ {∅}))
76 eldifi 4061 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ (Word 𝑊 ∖ {∅}) → 𝑜 ∈ Word 𝑊)
7773, 75, 763syl 18 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ Word 𝑊)
78 simpl2 1191 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐𝑊)
79 simprlr 777 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇𝑏))
80 simprrr 779 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆𝑜) = 𝑏)
8180fveq2d 6778 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑇‘(𝑆𝑜)) = (𝑇𝑏))
8281rneqd 5847 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → ran (𝑇‘(𝑆𝑜)) = ran (𝑇𝑏))
8379, 82eleqtrrd 2842 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇‘(𝑆𝑜)))
841, 2, 3, 4, 5, 6efgsp1 19343 . . . . . . . . . . . . . . . . . . . 20 ((𝑜 ∈ dom 𝑆𝑐 ∈ ran (𝑇‘(𝑆𝑜))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
8573, 83, 84syl2anc 584 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
861, 2, 3, 4, 5, 6efgsval2 19339 . . . . . . . . . . . . . . . . . . 19 ((𝑜 ∈ Word 𝑊𝑐𝑊 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
8777, 78, 85, 86syl3anc 1370 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
88 fnfvelrn 6958 . . . . . . . . . . . . . . . . . . 19 ((𝑆 Fn dom 𝑆 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
8969, 85, 88sylancr 587 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
9087, 89eqeltrrd 2840 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran 𝑆)
9190anassrs 468 . . . . . . . . . . . . . . . 16 (((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏)) → 𝑐 ∈ ran 𝑆)
9272, 91rexlimddv 3220 . . . . . . . . . . . . . . 15 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑐 ∈ ran 𝑆)
9392rexlimdvaa 3214 . . . . . . . . . . . . . 14 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏) → 𝑐 ∈ ran 𝑆))
9449, 93syl5bi 241 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
95 eldif 3897 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) ↔ (𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)))
965eleq2i 2830 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)))
971, 2, 3, 4, 5, 6efgs1 19341 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷 → ⟨“𝑐”⟩ ∈ dom 𝑆)
9896, 97sylbir 234 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
9995, 98sylbir 234 . . . . . . . . . . . . . . . . . 18 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
1001, 2, 3, 4, 5, 6efgsval 19337 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩ ∈ dom 𝑆 → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)))
10199, 100syl 17 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)))
102 s1len 14311 . . . . . . . . . . . . . . . . . . . . 21 (♯‘⟨“𝑐”⟩) = 1
103102oveq1i 7285 . . . . . . . . . . . . . . . . . . . 20 ((♯‘⟨“𝑐”⟩) − 1) = (1 − 1)
104 1m1e0 12045 . . . . . . . . . . . . . . . . . . . 20 (1 − 1) = 0
105103, 104eqtri 2766 . . . . . . . . . . . . . . . . . . 19 ((♯‘⟨“𝑐”⟩) − 1) = 0
106105fveq2i 6777 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0)
107106a1i 11 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0))
108 s1fv 14315 . . . . . . . . . . . . . . . . . 18 (𝑐𝑊 → (⟨“𝑐”⟩‘0) = 𝑐)
109108adantr 481 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘0) = 𝑐)
110101, 107, 1093eqtrd 2782 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = 𝑐)
111 fnfvelrn 6958 . . . . . . . . . . . . . . . . 17 ((𝑆 Fn dom 𝑆 ∧ ⟨“𝑐”⟩ ∈ dom 𝑆) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
11269, 99, 111sylancr 587 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
113110, 112eqeltrrd 2840 . . . . . . . . . . . . . . 15 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → 𝑐 ∈ ran 𝑆)
114113ex 413 . . . . . . . . . . . . . 14 (𝑐𝑊 → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
1151143ad2ant2 1133 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
11694, 115pm2.61d 179 . . . . . . . . . . . 12 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → 𝑐 ∈ ran 𝑆)
117116rabssdv 4008 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑐𝑊 ∣ (♯‘𝑐) = 𝑑} ⊆ ran 𝑆)
11843, 117eqsstrid 3969 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑} ⊆ ran 𝑆)
11941, 118unssd 4120 . . . . . . . . 9 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆)
120119ex 413 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆))
121 id 22 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℕ0)
122 nn0leltp1 12379 . . . . . . . . . . . . 13 (((♯‘𝑎) ∈ ℕ0𝑑 ∈ ℕ0) → ((♯‘𝑎) ≤ 𝑑 ↔ (♯‘𝑎) < (𝑑 + 1)))
12321, 121, 122syl2anr 597 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) ≤ 𝑑 ↔ (♯‘𝑎) < (𝑑 + 1)))
12421nn0red 12294 . . . . . . . . . . . . 13 (𝑎𝑊 → (♯‘𝑎) ∈ ℝ)
125 nn0re 12242 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℝ)
126 leloe 11061 . . . . . . . . . . . . 13 (((♯‘𝑎) ∈ ℝ ∧ 𝑑 ∈ ℝ) → ((♯‘𝑎) ≤ 𝑑 ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
127124, 125, 126syl2anr 597 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) ≤ 𝑑 ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
128123, 127bitr3d 280 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) < (𝑑 + 1) ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
129128rabbidva 3413 . . . . . . . . . 10 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} = {𝑎𝑊 ∣ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)})
130 unrab 4239 . . . . . . . . . 10 ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) = {𝑎𝑊 ∣ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)}
131129, 130eqtr4di 2796 . . . . . . . . 9 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} = ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}))
132131sseq1d 3952 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆 ↔ ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆))
133120, 132sylibrd 258 . . . . . . 7 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
13430, 33, 36, 39, 40, 133nn0ind 12415 . . . . . 6 (((♯‘𝑐) + 1) ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆)
13517, 18, 1343syl 18 . . . . 5 (𝑐𝑊 → {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆)
136 fveq2 6774 . . . . . . 7 (𝑎 = 𝑐 → (♯‘𝑎) = (♯‘𝑐))
137136breq1d 5084 . . . . . 6 (𝑎 = 𝑐 → ((♯‘𝑎) < ((♯‘𝑐) + 1) ↔ (♯‘𝑐) < ((♯‘𝑐) + 1)))
138 id 22 . . . . . 6 (𝑐𝑊𝑐𝑊)
13917nn0red 12294 . . . . . . 7 (𝑐𝑊 → (♯‘𝑐) ∈ ℝ)
140139ltp1d 11905 . . . . . 6 (𝑐𝑊 → (♯‘𝑐) < ((♯‘𝑐) + 1))
141137, 138, 140elrabd 3626 . . . . 5 (𝑐𝑊𝑐 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)})
142135, 141sseldd 3922 . . . 4 (𝑐𝑊𝑐 ∈ ran 𝑆)
143142ssriv 3925 . . 3 𝑊 ⊆ ran 𝑆
14412, 143eqssi 3937 . 2 ran 𝑆 = 𝑊
145 dffo2 6692 . 2 (𝑆:dom 𝑆onto𝑊 ↔ (𝑆:dom 𝑆𝑊 ∧ ran 𝑆 = 𝑊))
14610, 144, 145mpbir2an 708 1 𝑆:dom 𝑆onto𝑊
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396  wo 844  w3a 1086   = wceq 1539  wcel 2106  wral 3064  wrex 3065  {crab 3068  cdif 3884  cun 3885  wss 3887  c0 4256  {csn 4561  cop 4567  cotp 4569   ciun 4924   class class class wbr 5074  cmpt 5157   I cid 5488   × cxp 5587  dom cdm 5589  ran crn 5590   Fn wfn 6428  wf 6429  ontowfo 6431  cfv 6433  (class class class)co 7275  cmpo 7277  1oc1o 8290  2oc2o 8291  cr 10870  0cc0 10871  1c1 10872   + caddc 10874   < clt 11009  cle 11010  cmin 11205  2c2 12028  0cn0 12233  +crp 12730  ...cfz 13239  ..^cfzo 13382  chash 14044  Word cword 14217   ++ cconcat 14273  ⟨“cs1 14300   splice csplice 14462  ⟨“cs2 14554   ~FG cefg 19312
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-rep 5209  ax-sep 5223  ax-nul 5230  ax-pow 5288  ax-pr 5352  ax-un 7588  ax-cnex 10927  ax-resscn 10928  ax-1cn 10929  ax-icn 10930  ax-addcl 10931  ax-addrcl 10932  ax-mulcl 10933  ax-mulrcl 10934  ax-mulcom 10935  ax-addass 10936  ax-mulass 10937  ax-distr 10938  ax-i2m1 10939  ax-1ne0 10940  ax-1rid 10941  ax-rnegex 10942  ax-rrecex 10943  ax-cnre 10944  ax-pre-lttri 10945  ax-pre-lttrn 10946  ax-pre-ltadd 10947  ax-pre-mulgt0 10948
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-nel 3050  df-ral 3069  df-rex 3070  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-pss 3906  df-nul 4257  df-if 4460  df-pw 4535  df-sn 4562  df-pr 4564  df-op 4568  df-ot 4570  df-uni 4840  df-int 4880  df-iun 4926  df-br 5075  df-opab 5137  df-mpt 5158  df-tr 5192  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 6202  df-ord 6269  df-on 6270  df-lim 6271  df-suc 6272  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441  df-riota 7232  df-ov 7278  df-oprab 7279  df-mpo 7280  df-om 7713  df-1st 7831  df-2nd 7832  df-frecs 8097  df-wrecs 8128  df-recs 8202  df-rdg 8241  df-1o 8297  df-2o 8298  df-er 8498  df-map 8617  df-en 8734  df-dom 8735  df-sdom 8736  df-fin 8737  df-card 9697  df-pnf 11011  df-mnf 11012  df-xr 11013  df-ltxr 11014  df-le 11015  df-sub 11207  df-neg 11208  df-nn 11974  df-2 12036  df-n0 12234  df-xnn0 12306  df-z 12320  df-uz 12583  df-rp 12731  df-fz 13240  df-fzo 13383  df-hash 14045  df-word 14218  df-concat 14274  df-s1 14301  df-substr 14354  df-pfx 14384  df-splice 14463  df-s2 14561
This theorem is referenced by:  efgredlemc  19351  efgrelexlemb  19356  efgredeu  19358  efgred2  19359
  Copyright terms: Public domain W3C validator