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

Theorem efgsfo 19260
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 19250 . . 3 𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊
87fdmi 6596 . . . 4 dom 𝑆 = {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}
98feq2i 6576 . . 3 (𝑆:dom 𝑆𝑊𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊)
107, 9mpbir 230 . 2 𝑆:dom 𝑆𝑊
11 frn 6591 . . . 4 (𝑆:dom 𝑆𝑊 → ran 𝑆𝑊)
1210, 11ax-mp 5 . . 3 ran 𝑆𝑊
13 fviss 6827 . . . . . . . . 9 ( I ‘Word (𝐼 × 2o)) ⊆ Word (𝐼 × 2o)
141, 13eqsstri 3951 . . . . . . . 8 𝑊 ⊆ Word (𝐼 × 2o)
1514sseli 3913 . . . . . . 7 (𝑐𝑊𝑐 ∈ Word (𝐼 × 2o))
16 lencl 14164 . . . . . . 7 (𝑐 ∈ Word (𝐼 × 2o) → (♯‘𝑐) ∈ ℕ0)
1715, 16syl 17 . . . . . 6 (𝑐𝑊 → (♯‘𝑐) ∈ ℕ0)
18 peano2nn0 12203 . . . . . 6 ((♯‘𝑐) ∈ ℕ0 → ((♯‘𝑐) + 1) ∈ ℕ0)
1914sseli 3913 . . . . . . . . . . . 12 (𝑎𝑊𝑎 ∈ Word (𝐼 × 2o))
20 lencl 14164 . . . . . . . . . . . 12 (𝑎 ∈ Word (𝐼 × 2o) → (♯‘𝑎) ∈ ℕ0)
2119, 20syl 17 . . . . . . . . . . 11 (𝑎𝑊 → (♯‘𝑎) ∈ ℕ0)
22 nn0nlt0 12189 . . . . . . . . . . . 12 ((♯‘𝑎) ∈ ℕ0 → ¬ (♯‘𝑎) < 0)
23 breq2 5074 . . . . . . . . . . . . 13 (𝑏 = 0 → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < 0))
2423notbid 317 . . . . . . . . . . . 12 (𝑏 = 0 → (¬ (♯‘𝑎) < 𝑏 ↔ ¬ (♯‘𝑎) < 0))
2522, 24syl5ibr 245 . . . . . . . . . . 11 (𝑏 = 0 → ((♯‘𝑎) ∈ ℕ0 → ¬ (♯‘𝑎) < 𝑏))
2621, 25syl5 34 . . . . . . . . . 10 (𝑏 = 0 → (𝑎𝑊 → ¬ (♯‘𝑎) < 𝑏))
2726ralrimiv 3106 . . . . . . . . 9 (𝑏 = 0 → ∀𝑎𝑊 ¬ (♯‘𝑎) < 𝑏)
28 rabeq0 4315 . . . . . . . . 9 ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = ∅ ↔ ∀𝑎𝑊 ¬ (♯‘𝑎) < 𝑏)
2927, 28sylibr 233 . . . . . . . 8 (𝑏 = 0 → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = ∅)
3029sseq1d 3948 . . . . . . 7 (𝑏 = 0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ ∅ ⊆ ran 𝑆))
31 breq2 5074 . . . . . . . . 9 (𝑏 = 𝑑 → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < 𝑑))
3231rabbidv 3404 . . . . . . . 8 (𝑏 = 𝑑 → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑})
3332sseq1d 3948 . . . . . . 7 (𝑏 = 𝑑 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆))
34 breq2 5074 . . . . . . . . 9 (𝑏 = (𝑑 + 1) → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < (𝑑 + 1)))
3534rabbidv 3404 . . . . . . . 8 (𝑏 = (𝑑 + 1) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)})
3635sseq1d 3948 . . . . . . 7 (𝑏 = (𝑑 + 1) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
37 breq2 5074 . . . . . . . . 9 (𝑏 = ((♯‘𝑐) + 1) → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < ((♯‘𝑐) + 1)))
3837rabbidv 3404 . . . . . . . 8 (𝑏 = ((♯‘𝑐) + 1) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)})
3938sseq1d 3948 . . . . . . 7 (𝑏 = ((♯‘𝑐) + 1) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆))
40 0ss 4327 . . . . . . 7 ∅ ⊆ ran 𝑆
41 simpr 484 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆)
42 fveqeq2 6765 . . . . . . . . . . . 12 (𝑎 = 𝑐 → ((♯‘𝑎) = 𝑑 ↔ (♯‘𝑐) = 𝑑))
4342cbvrabv 3416 . . . . . . . . . . 11 {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑} = {𝑐𝑊 ∣ (♯‘𝑐) = 𝑑}
44 eliun 4925 . . . . . . . . . . . . . . 15 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥))
45 fveq2 6756 . . . . . . . . . . . . . . . . . 18 (𝑥 = 𝑏 → (𝑇𝑥) = (𝑇𝑏))
4645rneqd 5836 . . . . . . . . . . . . . . . . 17 (𝑥 = 𝑏 → ran (𝑇𝑥) = ran (𝑇𝑏))
4746eleq2d 2824 . . . . . . . . . . . . . . . 16 (𝑥 = 𝑏 → (𝑐 ∈ ran (𝑇𝑥) ↔ 𝑐 ∈ ran (𝑇𝑏)))
4847cbvrexvw 3373 . . . . . . . . . . . . . . 15 (∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
4944, 48bitri 274 . . . . . . . . . . . . . 14 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
50 simpl1r 1223 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆)
51 fveq2 6756 . . . . . . . . . . . . . . . . . . . 20 (𝑎 = 𝑏 → (♯‘𝑎) = (♯‘𝑏))
5251breq1d 5080 . . . . . . . . . . . . . . . . . . 19 (𝑎 = 𝑏 → ((♯‘𝑎) < 𝑑 ↔ (♯‘𝑏) < 𝑑))
53 simprl 767 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏𝑊)
5414, 53sselid 3915 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ Word (𝐼 × 2o))
55 lencl 14164 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑏 ∈ Word (𝐼 × 2o) → (♯‘𝑏) ∈ ℕ0)
5654, 55syl 17 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) ∈ ℕ0)
5756nn0red 12224 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) ∈ ℝ)
58 2rp 12664 . . . . . . . . . . . . . . . . . . . . 21 2 ∈ ℝ+
59 ltaddrp 12696 . . . . . . . . . . . . . . . . . . . . 21 (((♯‘𝑏) ∈ ℝ ∧ 2 ∈ ℝ+) → (♯‘𝑏) < ((♯‘𝑏) + 2))
6057, 58, 59sylancl 585 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) < ((♯‘𝑏) + 2))
611, 2, 3, 4efgtlen 19247 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) → (♯‘𝑐) = ((♯‘𝑏) + 2))
6261adantl 481 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑐) = ((♯‘𝑏) + 2))
63 simpl3 1191 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑐) = 𝑑)
6462, 63eqtr3d 2780 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ((♯‘𝑏) + 2) = 𝑑)
6560, 64breqtrd 5096 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) < 𝑑)
6652, 53, 65elrabd 3619 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑})
6750, 66sseldd 3918 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ ran 𝑆)
68 ffn 6584 . . . . . . . . . . . . . . . . . . 19 (𝑆:dom 𝑆𝑊𝑆 Fn dom 𝑆)
6910, 68ax-mp 5 . . . . . . . . . . . . . . . . . 18 𝑆 Fn dom 𝑆
70 fvelrnb 6812 . . . . . . . . . . . . . . . . . 18 (𝑆 Fn dom 𝑆 → (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏))
7169, 70ax-mp 5 . . . . . . . . . . . . . . . . 17 (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
7267, 71sylib 217 . . . . . . . . . . . . . . . 16 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
73 simprrl 777 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ dom 𝑆)
741, 2, 3, 4, 5, 6efgsdm 19251 . . . . . . . . . . . . . . . . . . . . 21 (𝑜 ∈ dom 𝑆 ↔ (𝑜 ∈ (Word 𝑊 ∖ {∅}) ∧ (𝑜‘0) ∈ 𝐷 ∧ ∀𝑖 ∈ (1..^(♯‘𝑜))(𝑜𝑖) ∈ ran (𝑇‘(𝑜‘(𝑖 − 1)))))
7574simp1bi 1143 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ dom 𝑆𝑜 ∈ (Word 𝑊 ∖ {∅}))
76 eldifi 4057 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ (Word 𝑊 ∖ {∅}) → 𝑜 ∈ Word 𝑊)
7773, 75, 763syl 18 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ Word 𝑊)
78 simpl2 1190 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐𝑊)
79 simprlr 776 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇𝑏))
80 simprrr 778 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆𝑜) = 𝑏)
8180fveq2d 6760 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑇‘(𝑆𝑜)) = (𝑇𝑏))
8281rneqd 5836 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → ran (𝑇‘(𝑆𝑜)) = ran (𝑇𝑏))
8379, 82eleqtrrd 2842 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇‘(𝑆𝑜)))
841, 2, 3, 4, 5, 6efgsp1 19258 . . . . . . . . . . . . . . . . . . . 20 ((𝑜 ∈ dom 𝑆𝑐 ∈ ran (𝑇‘(𝑆𝑜))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
8573, 83, 84syl2anc 583 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
861, 2, 3, 4, 5, 6efgsval2 19254 . . . . . . . . . . . . . . . . . . 19 ((𝑜 ∈ Word 𝑊𝑐𝑊 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
8777, 78, 85, 86syl3anc 1369 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
88 fnfvelrn 6940 . . . . . . . . . . . . . . . . . . 19 ((𝑆 Fn dom 𝑆 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
8969, 85, 88sylancr 586 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
9087, 89eqeltrrd 2840 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran 𝑆)
9190anassrs 467 . . . . . . . . . . . . . . . 16 (((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏)) → 𝑐 ∈ ran 𝑆)
9272, 91rexlimddv 3219 . . . . . . . . . . . . . . 15 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑐 ∈ ran 𝑆)
9392rexlimdvaa 3213 . . . . . . . . . . . . . 14 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏) → 𝑐 ∈ ran 𝑆))
9449, 93syl5bi 241 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
95 eldif 3893 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) ↔ (𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)))
965eleq2i 2830 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)))
971, 2, 3, 4, 5, 6efgs1 19256 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷 → ⟨“𝑐”⟩ ∈ dom 𝑆)
9896, 97sylbir 234 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
9995, 98sylbir 234 . . . . . . . . . . . . . . . . . 18 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
1001, 2, 3, 4, 5, 6efgsval 19252 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩ ∈ dom 𝑆 → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)))
10199, 100syl 17 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)))
102 s1len 14239 . . . . . . . . . . . . . . . . . . . . 21 (♯‘⟨“𝑐”⟩) = 1
103102oveq1i 7265 . . . . . . . . . . . . . . . . . . . 20 ((♯‘⟨“𝑐”⟩) − 1) = (1 − 1)
104 1m1e0 11975 . . . . . . . . . . . . . . . . . . . 20 (1 − 1) = 0
105103, 104eqtri 2766 . . . . . . . . . . . . . . . . . . 19 ((♯‘⟨“𝑐”⟩) − 1) = 0
106105fveq2i 6759 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0)
107106a1i 11 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0))
108 s1fv 14243 . . . . . . . . . . . . . . . . . 18 (𝑐𝑊 → (⟨“𝑐”⟩‘0) = 𝑐)
109108adantr 480 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘0) = 𝑐)
110101, 107, 1093eqtrd 2782 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = 𝑐)
111 fnfvelrn 6940 . . . . . . . . . . . . . . . . 17 ((𝑆 Fn dom 𝑆 ∧ ⟨“𝑐”⟩ ∈ dom 𝑆) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
11269, 99, 111sylancr 586 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
113110, 112eqeltrrd 2840 . . . . . . . . . . . . . . 15 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → 𝑐 ∈ ran 𝑆)
114113ex 412 . . . . . . . . . . . . . 14 (𝑐𝑊 → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
1151143ad2ant2 1132 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
11694, 115pm2.61d 179 . . . . . . . . . . . 12 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → 𝑐 ∈ ran 𝑆)
117116rabssdv 4004 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑐𝑊 ∣ (♯‘𝑐) = 𝑑} ⊆ ran 𝑆)
11843, 117eqsstrid 3965 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑} ⊆ ran 𝑆)
11941, 118unssd 4116 . . . . . . . . 9 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆)
120119ex 412 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆))
121 id 22 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℕ0)
122 nn0leltp1 12309 . . . . . . . . . . . . 13 (((♯‘𝑎) ∈ ℕ0𝑑 ∈ ℕ0) → ((♯‘𝑎) ≤ 𝑑 ↔ (♯‘𝑎) < (𝑑 + 1)))
12321, 121, 122syl2anr 596 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) ≤ 𝑑 ↔ (♯‘𝑎) < (𝑑 + 1)))
12421nn0red 12224 . . . . . . . . . . . . 13 (𝑎𝑊 → (♯‘𝑎) ∈ ℝ)
125 nn0re 12172 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℝ)
126 leloe 10992 . . . . . . . . . . . . 13 (((♯‘𝑎) ∈ ℝ ∧ 𝑑 ∈ ℝ) → ((♯‘𝑎) ≤ 𝑑 ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
127124, 125, 126syl2anr 596 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) ≤ 𝑑 ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
128123, 127bitr3d 280 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) < (𝑑 + 1) ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
129128rabbidva 3402 . . . . . . . . . 10 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} = {𝑎𝑊 ∣ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)})
130 unrab 4236 . . . . . . . . . 10 ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) = {𝑎𝑊 ∣ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)}
131129, 130eqtr4di 2797 . . . . . . . . 9 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} = ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}))
132131sseq1d 3948 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆 ↔ ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆))
133120, 132sylibrd 258 . . . . . . 7 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
13430, 33, 36, 39, 40, 133nn0ind 12345 . . . . . 6 (((♯‘𝑐) + 1) ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆)
13517, 18, 1343syl 18 . . . . 5 (𝑐𝑊 → {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆)
136 fveq2 6756 . . . . . . 7 (𝑎 = 𝑐 → (♯‘𝑎) = (♯‘𝑐))
137136breq1d 5080 . . . . . 6 (𝑎 = 𝑐 → ((♯‘𝑎) < ((♯‘𝑐) + 1) ↔ (♯‘𝑐) < ((♯‘𝑐) + 1)))
138 id 22 . . . . . 6 (𝑐𝑊𝑐𝑊)
13917nn0red 12224 . . . . . . 7 (𝑐𝑊 → (♯‘𝑐) ∈ ℝ)
140139ltp1d 11835 . . . . . 6 (𝑐𝑊 → (♯‘𝑐) < ((♯‘𝑐) + 1))
141137, 138, 140elrabd 3619 . . . . 5 (𝑐𝑊𝑐 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)})
142135, 141sseldd 3918 . . . 4 (𝑐𝑊𝑐 ∈ ran 𝑆)
143142ssriv 3921 . . 3 𝑊 ⊆ ran 𝑆
14412, 143eqssi 3933 . 2 ran 𝑆 = 𝑊
145 dffo2 6676 . 2 (𝑆:dom 𝑆onto𝑊 ↔ (𝑆:dom 𝑆𝑊 ∧ ran 𝑆 = 𝑊))
14610, 144, 145mpbir2an 707 1 𝑆:dom 𝑆onto𝑊
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 395  wo 843  w3a 1085   = wceq 1539  wcel 2108  wral 3063  wrex 3064  {crab 3067  cdif 3880  cun 3881  wss 3883  c0 4253  {csn 4558  cop 4564  cotp 4566   ciun 4921   class class class wbr 5070  cmpt 5153   I cid 5479   × cxp 5578  dom cdm 5580  ran crn 5581   Fn wfn 6413  wf 6414  ontowfo 6416  cfv 6418  (class class class)co 7255  cmpo 7257  1oc1o 8260  2oc2o 8261  cr 10801  0cc0 10802  1c1 10803   + caddc 10805   < clt 10940  cle 10941  cmin 11135  2c2 11958  0cn0 12163  +crp 12659  ...cfz 13168  ..^cfzo 13311  chash 13972  Word cword 14145   ++ cconcat 14201  ⟨“cs1 14228   splice csplice 14390  ⟨“cs2 14482   ~FG cefg 19227
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-rep 5205  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566  ax-cnex 10858  ax-resscn 10859  ax-1cn 10860  ax-icn 10861  ax-addcl 10862  ax-addrcl 10863  ax-mulcl 10864  ax-mulrcl 10865  ax-mulcom 10866  ax-addass 10867  ax-mulass 10868  ax-distr 10869  ax-i2m1 10870  ax-1ne0 10871  ax-1rid 10872  ax-rnegex 10873  ax-rrecex 10874  ax-cnre 10875  ax-pre-lttri 10876  ax-pre-lttrn 10877  ax-pre-ltadd 10878  ax-pre-mulgt0 10879
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-nel 3049  df-ral 3068  df-rex 3069  df-reu 3070  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-tp 4563  df-op 4565  df-ot 4567  df-uni 4837  df-int 4877  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-pred 6191  df-ord 6254  df-on 6255  df-lim 6256  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-riota 7212  df-ov 7258  df-oprab 7259  df-mpo 7260  df-om 7688  df-1st 7804  df-2nd 7805  df-frecs 8068  df-wrecs 8099  df-recs 8173  df-rdg 8212  df-1o 8267  df-2o 8268  df-er 8456  df-map 8575  df-en 8692  df-dom 8693  df-sdom 8694  df-fin 8695  df-card 9628  df-pnf 10942  df-mnf 10943  df-xr 10944  df-ltxr 10945  df-le 10946  df-sub 11137  df-neg 11138  df-nn 11904  df-2 11966  df-n0 12164  df-xnn0 12236  df-z 12250  df-uz 12512  df-rp 12660  df-fz 13169  df-fzo 13312  df-hash 13973  df-word 14146  df-concat 14202  df-s1 14229  df-substr 14282  df-pfx 14312  df-splice 14391  df-s2 14489
This theorem is referenced by:  efgredlemc  19266  efgrelexlemb  19271  efgredeu  19273  efgred2  19274
  Copyright terms: Public domain W3C validator