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

Theorem efgsfo 18073
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 indexes somewhere in the sequence). (Contributed by Mario Carneiro, 27-Sep-2015.)
Hypotheses
Ref Expression
efgval.w 𝑊 = ( I ‘Word (𝐼 × 2𝑜))
efgval.r = ( ~FG𝐼)
efgval2.m 𝑀 = (𝑦𝐼, 𝑧 ∈ 2𝑜 ↦ ⟨𝑦, (1𝑜𝑧)⟩)
efgval2.t 𝑇 = (𝑣𝑊 ↦ (𝑛 ∈ (0...(#‘𝑣)), 𝑤 ∈ (𝐼 × 2𝑜) ↦ (𝑣 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 (𝐼 × 2𝑜))
2 efgval.r . . . 4 = ( ~FG𝐼)
3 efgval2.m . . . 4 𝑀 = (𝑦𝐼, 𝑧 ∈ 2𝑜 ↦ ⟨𝑦, (1𝑜𝑧)⟩)
4 efgval2.t . . . 4 𝑇 = (𝑣𝑊 ↦ (𝑛 ∈ (0...(#‘𝑣)), 𝑤 ∈ (𝐼 × 2𝑜) ↦ (𝑣 splice ⟨𝑛, 𝑛, ⟨“𝑤(𝑀𝑤)”⟩⟩)))
5 efgred.d . . . 4 𝐷 = (𝑊 𝑥𝑊 ran (𝑇𝑥))
6 efgred.s . . . 4 𝑆 = (𝑚 ∈ {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(#‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))} ↦ (𝑚‘((#‘𝑚) − 1)))
71, 2, 3, 4, 5, 6efgsf 18063 . . 3 𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(#‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊
87fdmi 6009 . . . 4 dom 𝑆 = {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(#‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}
98feq2i 5994 . . 3 (𝑆:dom 𝑆𝑊𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(#‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊)
107, 9mpbir 221 . 2 𝑆:dom 𝑆𝑊
11 frn 6010 . . . 4 (𝑆:dom 𝑆𝑊 → ran 𝑆𝑊)
1210, 11ax-mp 5 . . 3 ran 𝑆𝑊
13 fviss 6213 . . . . . . . . 9 ( I ‘Word (𝐼 × 2𝑜)) ⊆ Word (𝐼 × 2𝑜)
141, 13eqsstri 3614 . . . . . . . 8 𝑊 ⊆ Word (𝐼 × 2𝑜)
1514sseli 3579 . . . . . . 7 (𝑐𝑊𝑐 ∈ Word (𝐼 × 2𝑜))
16 lencl 13263 . . . . . . 7 (𝑐 ∈ Word (𝐼 × 2𝑜) → (#‘𝑐) ∈ ℕ0)
1715, 16syl 17 . . . . . 6 (𝑐𝑊 → (#‘𝑐) ∈ ℕ0)
18 peano2nn0 11277 . . . . . 6 ((#‘𝑐) ∈ ℕ0 → ((#‘𝑐) + 1) ∈ ℕ0)
1914sseli 3579 . . . . . . . . . . . 12 (𝑎𝑊𝑎 ∈ Word (𝐼 × 2𝑜))
20 lencl 13263 . . . . . . . . . . . 12 (𝑎 ∈ Word (𝐼 × 2𝑜) → (#‘𝑎) ∈ ℕ0)
2119, 20syl 17 . . . . . . . . . . 11 (𝑎𝑊 → (#‘𝑎) ∈ ℕ0)
22 nn0nlt0 11263 . . . . . . . . . . . 12 ((#‘𝑎) ∈ ℕ0 → ¬ (#‘𝑎) < 0)
23 breq2 4617 . . . . . . . . . . . . 13 (𝑏 = 0 → ((#‘𝑎) < 𝑏 ↔ (#‘𝑎) < 0))
2423notbid 308 . . . . . . . . . . . 12 (𝑏 = 0 → (¬ (#‘𝑎) < 𝑏 ↔ ¬ (#‘𝑎) < 0))
2522, 24syl5ibr 236 . . . . . . . . . . 11 (𝑏 = 0 → ((#‘𝑎) ∈ ℕ0 → ¬ (#‘𝑎) < 𝑏))
2621, 25syl5 34 . . . . . . . . . 10 (𝑏 = 0 → (𝑎𝑊 → ¬ (#‘𝑎) < 𝑏))
2726ralrimiv 2959 . . . . . . . . 9 (𝑏 = 0 → ∀𝑎𝑊 ¬ (#‘𝑎) < 𝑏)
28 rabeq0 3931 . . . . . . . . 9 ({𝑎𝑊 ∣ (#‘𝑎) < 𝑏} = ∅ ↔ ∀𝑎𝑊 ¬ (#‘𝑎) < 𝑏)
2927, 28sylibr 224 . . . . . . . 8 (𝑏 = 0 → {𝑎𝑊 ∣ (#‘𝑎) < 𝑏} = ∅)
3029sseq1d 3611 . . . . . . 7 (𝑏 = 0 → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ ∅ ⊆ ran 𝑆))
31 breq2 4617 . . . . . . . . 9 (𝑏 = 𝑑 → ((#‘𝑎) < 𝑏 ↔ (#‘𝑎) < 𝑑))
3231rabbidv 3177 . . . . . . . 8 (𝑏 = 𝑑 → {𝑎𝑊 ∣ (#‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (#‘𝑎) < 𝑑})
3332sseq1d 3611 . . . . . . 7 (𝑏 = 𝑑 → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆))
34 breq2 4617 . . . . . . . . 9 (𝑏 = (𝑑 + 1) → ((#‘𝑎) < 𝑏 ↔ (#‘𝑎) < (𝑑 + 1)))
3534rabbidv 3177 . . . . . . . 8 (𝑏 = (𝑑 + 1) → {𝑎𝑊 ∣ (#‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (#‘𝑎) < (𝑑 + 1)})
3635sseq1d 3611 . . . . . . 7 (𝑏 = (𝑑 + 1) → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (#‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
37 breq2 4617 . . . . . . . . 9 (𝑏 = ((#‘𝑐) + 1) → ((#‘𝑎) < 𝑏 ↔ (#‘𝑎) < ((#‘𝑐) + 1)))
3837rabbidv 3177 . . . . . . . 8 (𝑏 = ((#‘𝑐) + 1) → {𝑎𝑊 ∣ (#‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (#‘𝑎) < ((#‘𝑐) + 1)})
3938sseq1d 3611 . . . . . . 7 (𝑏 = ((#‘𝑐) + 1) → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (#‘𝑎) < ((#‘𝑐) + 1)} ⊆ ran 𝑆))
40 0ss 3944 . . . . . . 7 ∅ ⊆ ran 𝑆
41 simpr 477 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆)
42 fveq2 6148 . . . . . . . . . . . . 13 (𝑎 = 𝑐 → (#‘𝑎) = (#‘𝑐))
4342eqeq1d 2623 . . . . . . . . . . . 12 (𝑎 = 𝑐 → ((#‘𝑎) = 𝑑 ↔ (#‘𝑐) = 𝑑))
4443cbvrabv 3185 . . . . . . . . . . 11 {𝑎𝑊 ∣ (#‘𝑎) = 𝑑} = {𝑐𝑊 ∣ (#‘𝑐) = 𝑑}
45 eliun 4490 . . . . . . . . . . . . . . 15 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥))
46 fveq2 6148 . . . . . . . . . . . . . . . . . 18 (𝑥 = 𝑏 → (𝑇𝑥) = (𝑇𝑏))
4746rneqd 5313 . . . . . . . . . . . . . . . . 17 (𝑥 = 𝑏 → ran (𝑇𝑥) = ran (𝑇𝑏))
4847eleq2d 2684 . . . . . . . . . . . . . . . 16 (𝑥 = 𝑏 → (𝑐 ∈ ran (𝑇𝑥) ↔ 𝑐 ∈ ran (𝑇𝑏)))
4948cbvrexv 3160 . . . . . . . . . . . . . . 15 (∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
5045, 49bitri 264 . . . . . . . . . . . . . 14 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
51 simpl1r 1111 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆)
52 simprl 793 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏𝑊)
5314, 52sseldi 3581 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ Word (𝐼 × 2𝑜))
54 lencl 13263 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑏 ∈ Word (𝐼 × 2𝑜) → (#‘𝑏) ∈ ℕ0)
5553, 54syl 17 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (#‘𝑏) ∈ ℕ0)
5655nn0red 11296 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (#‘𝑏) ∈ ℝ)
57 2rp 11781 . . . . . . . . . . . . . . . . . . . . 21 2 ∈ ℝ+
58 ltaddrp 11811 . . . . . . . . . . . . . . . . . . . . 21 (((#‘𝑏) ∈ ℝ ∧ 2 ∈ ℝ+) → (#‘𝑏) < ((#‘𝑏) + 2))
5956, 57, 58sylancl 693 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (#‘𝑏) < ((#‘𝑏) + 2))
601, 2, 3, 4efgtlen 18060 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) → (#‘𝑐) = ((#‘𝑏) + 2))
6160adantl 482 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (#‘𝑐) = ((#‘𝑏) + 2))
62 simpl3 1064 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (#‘𝑐) = 𝑑)
6361, 62eqtr3d 2657 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ((#‘𝑏) + 2) = 𝑑)
6459, 63breqtrd 4639 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (#‘𝑏) < 𝑑)
65 fveq2 6148 . . . . . . . . . . . . . . . . . . . . 21 (𝑎 = 𝑏 → (#‘𝑎) = (#‘𝑏))
6665breq1d 4623 . . . . . . . . . . . . . . . . . . . 20 (𝑎 = 𝑏 → ((#‘𝑎) < 𝑑 ↔ (#‘𝑏) < 𝑑))
6766elrab 3346 . . . . . . . . . . . . . . . . . . 19 (𝑏 ∈ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ↔ (𝑏𝑊 ∧ (#‘𝑏) < 𝑑))
6852, 64, 67sylanbrc 697 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑})
6951, 68sseldd 3584 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ ran 𝑆)
70 ffn 6002 . . . . . . . . . . . . . . . . . . 19 (𝑆:dom 𝑆𝑊𝑆 Fn dom 𝑆)
7110, 70ax-mp 5 . . . . . . . . . . . . . . . . . 18 𝑆 Fn dom 𝑆
72 fvelrnb 6200 . . . . . . . . . . . . . . . . . 18 (𝑆 Fn dom 𝑆 → (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏))
7371, 72ax-mp 5 . . . . . . . . . . . . . . . . 17 (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
7469, 73sylib 208 . . . . . . . . . . . . . . . 16 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
75 simprrl 803 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ dom 𝑆)
761, 2, 3, 4, 5, 6efgsdm 18064 . . . . . . . . . . . . . . . . . . . . 21 (𝑜 ∈ dom 𝑆 ↔ (𝑜 ∈ (Word 𝑊 ∖ {∅}) ∧ (𝑜‘0) ∈ 𝐷 ∧ ∀𝑖 ∈ (1..^(#‘𝑜))(𝑜𝑖) ∈ ran (𝑇‘(𝑜‘(𝑖 − 1)))))
7776simp1bi 1074 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ dom 𝑆𝑜 ∈ (Word 𝑊 ∖ {∅}))
78 eldifi 3710 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ (Word 𝑊 ∖ {∅}) → 𝑜 ∈ Word 𝑊)
7975, 77, 783syl 18 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ Word 𝑊)
80 simpl2 1063 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐𝑊)
81 simprlr 802 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇𝑏))
82 simprrr 804 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆𝑜) = 𝑏)
8382fveq2d 6152 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑇‘(𝑆𝑜)) = (𝑇𝑏))
8483rneqd 5313 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → ran (𝑇‘(𝑆𝑜)) = ran (𝑇𝑏))
8581, 84eleqtrrd 2701 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇‘(𝑆𝑜)))
861, 2, 3, 4, 5, 6efgsp1 18071 . . . . . . . . . . . . . . . . . . . 20 ((𝑜 ∈ dom 𝑆𝑐 ∈ ran (𝑇‘(𝑆𝑜))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
8775, 85, 86syl2anc 692 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
881, 2, 3, 4, 5, 6efgsval2 18067 . . . . . . . . . . . . . . . . . . 19 ((𝑜 ∈ Word 𝑊𝑐𝑊 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
8979, 80, 87, 88syl3anc 1323 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
90 fnfvelrn 6312 . . . . . . . . . . . . . . . . . . 19 ((𝑆 Fn dom 𝑆 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
9171, 87, 90sylancr 694 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
9289, 91eqeltrrd 2699 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran 𝑆)
9392anassrs 679 . . . . . . . . . . . . . . . 16 (((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏)) → 𝑐 ∈ ran 𝑆)
9474, 93rexlimddv 3028 . . . . . . . . . . . . . . 15 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑐 ∈ ran 𝑆)
9594rexlimdvaa 3025 . . . . . . . . . . . . . 14 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) → (∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏) → 𝑐 ∈ ran 𝑆))
9650, 95syl5bi 232 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) → (𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
97 eldif 3565 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) ↔ (𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)))
985eleq2i 2690 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)))
991, 2, 3, 4, 5, 6efgs1 18069 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷 → ⟨“𝑐”⟩ ∈ dom 𝑆)
10098, 99sylbir 225 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
10197, 100sylbir 225 . . . . . . . . . . . . . . . . . 18 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
1021, 2, 3, 4, 5, 6efgsval 18065 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩ ∈ dom 𝑆 → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((#‘⟨“𝑐”⟩) − 1)))
103101, 102syl 17 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((#‘⟨“𝑐”⟩) − 1)))
104 s1len 13324 . . . . . . . . . . . . . . . . . . . . 21 (#‘⟨“𝑐”⟩) = 1
105104oveq1i 6614 . . . . . . . . . . . . . . . . . . . 20 ((#‘⟨“𝑐”⟩) − 1) = (1 − 1)
106 1m1e0 11033 . . . . . . . . . . . . . . . . . . . 20 (1 − 1) = 0
107105, 106eqtri 2643 . . . . . . . . . . . . . . . . . . 19 ((#‘⟨“𝑐”⟩) − 1) = 0
108107fveq2i 6151 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩‘((#‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0)
109108a1i 11 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘((#‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0))
110 s1fv 13329 . . . . . . . . . . . . . . . . . 18 (𝑐𝑊 → (⟨“𝑐”⟩‘0) = 𝑐)
111110adantr 481 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘0) = 𝑐)
112103, 109, 1113eqtrd 2659 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = 𝑐)
113 fnfvelrn 6312 . . . . . . . . . . . . . . . . 17 ((𝑆 Fn dom 𝑆 ∧ ⟨“𝑐”⟩ ∈ dom 𝑆) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
11471, 101, 113sylancr 694 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
115112, 114eqeltrrd 2699 . . . . . . . . . . . . . . 15 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → 𝑐 ∈ ran 𝑆)
116115ex 450 . . . . . . . . . . . . . 14 (𝑐𝑊 → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
1171163ad2ant2 1081 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
11896, 117pm2.61d 170 . . . . . . . . . . . 12 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (#‘𝑐) = 𝑑) → 𝑐 ∈ ran 𝑆)
119118rabssdv 3661 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑐𝑊 ∣ (#‘𝑐) = 𝑑} ⊆ ran 𝑆)
12044, 119syl5eqss 3628 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (#‘𝑎) = 𝑑} ⊆ ran 𝑆)
12141, 120unssd 3767 . . . . . . . . 9 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆) → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (#‘𝑎) = 𝑑}) ⊆ ran 𝑆)
122121ex 450 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆 → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (#‘𝑎) = 𝑑}) ⊆ ran 𝑆))
123 id 22 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℕ0)
124 nn0leltp1 11380 . . . . . . . . . . . . 13 (((#‘𝑎) ∈ ℕ0𝑑 ∈ ℕ0) → ((#‘𝑎) ≤ 𝑑 ↔ (#‘𝑎) < (𝑑 + 1)))
12521, 123, 124syl2anr 495 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((#‘𝑎) ≤ 𝑑 ↔ (#‘𝑎) < (𝑑 + 1)))
12621nn0red 11296 . . . . . . . . . . . . 13 (𝑎𝑊 → (#‘𝑎) ∈ ℝ)
127 nn0re 11245 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℝ)
128 leloe 10068 . . . . . . . . . . . . 13 (((#‘𝑎) ∈ ℝ ∧ 𝑑 ∈ ℝ) → ((#‘𝑎) ≤ 𝑑 ↔ ((#‘𝑎) < 𝑑 ∨ (#‘𝑎) = 𝑑)))
129126, 127, 128syl2anr 495 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((#‘𝑎) ≤ 𝑑 ↔ ((#‘𝑎) < 𝑑 ∨ (#‘𝑎) = 𝑑)))
130125, 129bitr3d 270 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0𝑎𝑊) → ((#‘𝑎) < (𝑑 + 1) ↔ ((#‘𝑎) < 𝑑 ∨ (#‘𝑎) = 𝑑)))
131130rabbidva 3176 . . . . . . . . . 10 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (#‘𝑎) < (𝑑 + 1)} = {𝑎𝑊 ∣ ((#‘𝑎) < 𝑑 ∨ (#‘𝑎) = 𝑑)})
132 unrab 3874 . . . . . . . . . 10 ({𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (#‘𝑎) = 𝑑}) = {𝑎𝑊 ∣ ((#‘𝑎) < 𝑑 ∨ (#‘𝑎) = 𝑑)}
133131, 132syl6eqr 2673 . . . . . . . . 9 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (#‘𝑎) < (𝑑 + 1)} = ({𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (#‘𝑎) = 𝑑}))
134133sseq1d 3611 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (#‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆 ↔ ({𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (#‘𝑎) = 𝑑}) ⊆ ran 𝑆))
135122, 134sylibrd 249 . . . . . . 7 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (#‘𝑎) < 𝑑} ⊆ ran 𝑆 → {𝑎𝑊 ∣ (#‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
13630, 33, 36, 39, 40, 135nn0ind 11416 . . . . . 6 (((#‘𝑐) + 1) ∈ ℕ0 → {𝑎𝑊 ∣ (#‘𝑎) < ((#‘𝑐) + 1)} ⊆ ran 𝑆)
13717, 18, 1363syl 18 . . . . 5 (𝑐𝑊 → {𝑎𝑊 ∣ (#‘𝑎) < ((#‘𝑐) + 1)} ⊆ ran 𝑆)
138 id 22 . . . . . 6 (𝑐𝑊𝑐𝑊)
13917nn0red 11296 . . . . . . 7 (𝑐𝑊 → (#‘𝑐) ∈ ℝ)
140139ltp1d 10898 . . . . . 6 (𝑐𝑊 → (#‘𝑐) < ((#‘𝑐) + 1))
14142breq1d 4623 . . . . . . 7 (𝑎 = 𝑐 → ((#‘𝑎) < ((#‘𝑐) + 1) ↔ (#‘𝑐) < ((#‘𝑐) + 1)))
142141elrab 3346 . . . . . 6 (𝑐 ∈ {𝑎𝑊 ∣ (#‘𝑎) < ((#‘𝑐) + 1)} ↔ (𝑐𝑊 ∧ (#‘𝑐) < ((#‘𝑐) + 1)))
143138, 140, 142sylanbrc 697 . . . . 5 (𝑐𝑊𝑐 ∈ {𝑎𝑊 ∣ (#‘𝑎) < ((#‘𝑐) + 1)})
144137, 143sseldd 3584 . . . 4 (𝑐𝑊𝑐 ∈ ran 𝑆)
145144ssriv 3587 . . 3 𝑊 ⊆ ran 𝑆
14612, 145eqssi 3599 . 2 ran 𝑆 = 𝑊
147 dffo2 6076 . 2 (𝑆:dom 𝑆onto𝑊 ↔ (𝑆:dom 𝑆𝑊 ∧ ran 𝑆 = 𝑊))
14810, 146, 147mpbir2an 954 1 𝑆:dom 𝑆onto𝑊
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wo 383  wa 384  w3a 1036   = wceq 1480  wcel 1987  wral 2907  wrex 2908  {crab 2911  cdif 3552  cun 3553  wss 3555  c0 3891  {csn 4148  cop 4154  cotp 4156   ciun 4485   class class class wbr 4613  cmpt 4673   I cid 4984   × cxp 5072  dom cdm 5074  ran crn 5075   Fn wfn 5842  wf 5843  ontowfo 5845  cfv 5847  (class class class)co 6604  cmpt2 6606  1𝑜c1o 7498  2𝑜c2o 7499  cr 9879  0cc0 9880  1c1 9881   + caddc 9883   < clt 10018  cle 10019  cmin 10210  2c2 11014  0cn0 11236  +crp 11776  ...cfz 12268  ..^cfzo 12406  #chash 13057  Word cword 13230   ++ cconcat 13232  ⟨“cs1 13233   splice csplice 13235  ⟨“cs2 13523   ~FG cefg 18040
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4731  ax-sep 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902  ax-cnex 9936  ax-resscn 9937  ax-1cn 9938  ax-icn 9939  ax-addcl 9940  ax-addrcl 9941  ax-mulcl 9942  ax-mulrcl 9943  ax-mulcom 9944  ax-addass 9945  ax-mulass 9946  ax-distr 9947  ax-i2m1 9948  ax-1ne0 9949  ax-1rid 9950  ax-rnegex 9951  ax-rrecex 9952  ax-cnre 9953  ax-pre-lttri 9954  ax-pre-lttrn 9955  ax-pre-ltadd 9956  ax-pre-mulgt0 9957
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-pss 3571  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-tp 4153  df-op 4155  df-ot 4157  df-uni 4403  df-int 4441  df-iun 4487  df-br 4614  df-opab 4674  df-mpt 4675  df-tr 4713  df-eprel 4985  df-id 4989  df-po 4995  df-so 4996  df-fr 5033  df-we 5035  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-pred 5639  df-ord 5685  df-on 5686  df-lim 5687  df-suc 5688  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-riota 6565  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-om 7013  df-1st 7113  df-2nd 7114  df-wrecs 7352  df-recs 7413  df-rdg 7451  df-1o 7505  df-2o 7506  df-oadd 7509  df-er 7687  df-map 7804  df-pm 7805  df-en 7900  df-dom 7901  df-sdom 7902  df-fin 7903  df-card 8709  df-pnf 10020  df-mnf 10021  df-xr 10022  df-ltxr 10023  df-le 10024  df-sub 10212  df-neg 10213  df-nn 10965  df-2 11023  df-n0 11237  df-z 11322  df-uz 11632  df-rp 11777  df-fz 12269  df-fzo 12407  df-hash 13058  df-word 13238  df-concat 13240  df-s1 13241  df-substr 13242  df-splice 13243  df-s2 13530
This theorem is referenced by:  efgredlemc  18079  efgrelexlemb  18084  efgredeu  18086  efgred2  18087
  Copyright terms: Public domain W3C validator