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

Theorem efgsfo 18373
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 (𝐼 × 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 18363 . . 3 𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊
87fdmi 6276 . . . 4 dom 𝑆 = {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}
98feq2i 6258 . . 3 (𝑆:dom 𝑆𝑊𝑆:{𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(♯‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))}⟶𝑊)
107, 9mpbir 222 . 2 𝑆:dom 𝑆𝑊
11 frn 6272 . . . 4 (𝑆:dom 𝑆𝑊 → ran 𝑆𝑊)
1210, 11ax-mp 5 . . 3 ran 𝑆𝑊
13 fviss 6487 . . . . . . . . 9 ( I ‘Word (𝐼 × 2𝑜)) ⊆ Word (𝐼 × 2𝑜)
141, 13eqsstri 3843 . . . . . . . 8 𝑊 ⊆ Word (𝐼 × 2𝑜)
1514sseli 3805 . . . . . . 7 (𝑐𝑊𝑐 ∈ Word (𝐼 × 2𝑜))
16 lencl 13555 . . . . . . 7 (𝑐 ∈ Word (𝐼 × 2𝑜) → (♯‘𝑐) ∈ ℕ0)
1715, 16syl 17 . . . . . 6 (𝑐𝑊 → (♯‘𝑐) ∈ ℕ0)
18 peano2nn0 11619 . . . . . 6 ((♯‘𝑐) ∈ ℕ0 → ((♯‘𝑐) + 1) ∈ ℕ0)
1914sseli 3805 . . . . . . . . . . . 12 (𝑎𝑊𝑎 ∈ Word (𝐼 × 2𝑜))
20 lencl 13555 . . . . . . . . . . . 12 (𝑎 ∈ Word (𝐼 × 2𝑜) → (♯‘𝑎) ∈ ℕ0)
2119, 20syl 17 . . . . . . . . . . 11 (𝑎𝑊 → (♯‘𝑎) ∈ ℕ0)
22 nn0nlt0 11605 . . . . . . . . . . . 12 ((♯‘𝑎) ∈ ℕ0 → ¬ (♯‘𝑎) < 0)
23 breq2 4859 . . . . . . . . . . . . 13 (𝑏 = 0 → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < 0))
2423notbid 309 . . . . . . . . . . . 12 (𝑏 = 0 → (¬ (♯‘𝑎) < 𝑏 ↔ ¬ (♯‘𝑎) < 0))
2522, 24syl5ibr 237 . . . . . . . . . . 11 (𝑏 = 0 → ((♯‘𝑎) ∈ ℕ0 → ¬ (♯‘𝑎) < 𝑏))
2621, 25syl5 34 . . . . . . . . . 10 (𝑏 = 0 → (𝑎𝑊 → ¬ (♯‘𝑎) < 𝑏))
2726ralrimiv 3164 . . . . . . . . 9 (𝑏 = 0 → ∀𝑎𝑊 ¬ (♯‘𝑎) < 𝑏)
28 rabeq0 4168 . . . . . . . . 9 ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = ∅ ↔ ∀𝑎𝑊 ¬ (♯‘𝑎) < 𝑏)
2927, 28sylibr 225 . . . . . . . 8 (𝑏 = 0 → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = ∅)
3029sseq1d 3840 . . . . . . 7 (𝑏 = 0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ ∅ ⊆ ran 𝑆))
31 breq2 4859 . . . . . . . . 9 (𝑏 = 𝑑 → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < 𝑑))
3231rabbidv 3390 . . . . . . . 8 (𝑏 = 𝑑 → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑})
3332sseq1d 3840 . . . . . . 7 (𝑏 = 𝑑 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆))
34 breq2 4859 . . . . . . . . 9 (𝑏 = (𝑑 + 1) → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < (𝑑 + 1)))
3534rabbidv 3390 . . . . . . . 8 (𝑏 = (𝑑 + 1) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)})
3635sseq1d 3840 . . . . . . 7 (𝑏 = (𝑑 + 1) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
37 breq2 4859 . . . . . . . . 9 (𝑏 = ((♯‘𝑐) + 1) → ((♯‘𝑎) < 𝑏 ↔ (♯‘𝑎) < ((♯‘𝑐) + 1)))
3837rabbidv 3390 . . . . . . . 8 (𝑏 = ((♯‘𝑐) + 1) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} = {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)})
3938sseq1d 3840 . . . . . . 7 (𝑏 = ((♯‘𝑐) + 1) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑏} ⊆ ran 𝑆 ↔ {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆))
40 0ss 4181 . . . . . . 7 ∅ ⊆ ran 𝑆
41 simpr 473 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆)
42 fveqeq2 6427 . . . . . . . . . . . 12 (𝑎 = 𝑐 → ((♯‘𝑎) = 𝑑 ↔ (♯‘𝑐) = 𝑑))
4342cbvrabv 3400 . . . . . . . . . . 11 {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑} = {𝑐𝑊 ∣ (♯‘𝑐) = 𝑑}
44 eliun 4727 . . . . . . . . . . . . . . 15 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥))
45 fveq2 6418 . . . . . . . . . . . . . . . . . 18 (𝑥 = 𝑏 → (𝑇𝑥) = (𝑇𝑏))
4645rneqd 5568 . . . . . . . . . . . . . . . . 17 (𝑥 = 𝑏 → ran (𝑇𝑥) = ran (𝑇𝑏))
4746eleq2d 2882 . . . . . . . . . . . . . . . 16 (𝑥 = 𝑏 → (𝑐 ∈ ran (𝑇𝑥) ↔ 𝑐 ∈ ran (𝑇𝑏)))
4847cbvrexv 3372 . . . . . . . . . . . . . . 15 (∃𝑥𝑊 𝑐 ∈ ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
4944, 48bitri 266 . . . . . . . . . . . . . 14 (𝑐 𝑥𝑊 ran (𝑇𝑥) ↔ ∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏))
50 simpl1r 1288 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆)
51 simprl 778 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏𝑊)
5214, 51sseldi 3807 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ Word (𝐼 × 2𝑜))
53 lencl 13555 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑏 ∈ Word (𝐼 × 2𝑜) → (♯‘𝑏) ∈ ℕ0)
5452, 53syl 17 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) ∈ ℕ0)
5554nn0red 11638 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) ∈ ℝ)
56 2rp 12071 . . . . . . . . . . . . . . . . . . . . 21 2 ∈ ℝ+
57 ltaddrp 12101 . . . . . . . . . . . . . . . . . . . . 21 (((♯‘𝑏) ∈ ℝ ∧ 2 ∈ ℝ+) → (♯‘𝑏) < ((♯‘𝑏) + 2))
5855, 56, 57sylancl 576 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) < ((♯‘𝑏) + 2))
591, 2, 3, 4efgtlen 18360 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) → (♯‘𝑐) = ((♯‘𝑏) + 2))
6059adantl 469 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑐) = ((♯‘𝑏) + 2))
61 simpl3 1239 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑐) = 𝑑)
6260, 61eqtr3d 2853 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ((♯‘𝑏) + 2) = 𝑑)
6358, 62breqtrd 4881 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → (♯‘𝑏) < 𝑑)
64 fveq2 6418 . . . . . . . . . . . . . . . . . . . . 21 (𝑎 = 𝑏 → (♯‘𝑎) = (♯‘𝑏))
6564breq1d 4865 . . . . . . . . . . . . . . . . . . . 20 (𝑎 = 𝑏 → ((♯‘𝑎) < 𝑑 ↔ (♯‘𝑏) < 𝑑))
6665elrab 3570 . . . . . . . . . . . . . . . . . . 19 (𝑏 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ↔ (𝑏𝑊 ∧ (♯‘𝑏) < 𝑑))
6751, 63, 66sylanbrc 574 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑})
6850, 67sseldd 3810 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑏 ∈ ran 𝑆)
69 ffn 6266 . . . . . . . . . . . . . . . . . . 19 (𝑆:dom 𝑆𝑊𝑆 Fn dom 𝑆)
7010, 69ax-mp 5 . . . . . . . . . . . . . . . . . 18 𝑆 Fn dom 𝑆
71 fvelrnb 6474 . . . . . . . . . . . . . . . . . 18 (𝑆 Fn dom 𝑆 → (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏))
7270, 71ax-mp 5 . . . . . . . . . . . . . . . . 17 (𝑏 ∈ ran 𝑆 ↔ ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
7368, 72sylib 209 . . . . . . . . . . . . . . . 16 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → ∃𝑜 ∈ dom 𝑆(𝑆𝑜) = 𝑏)
74 simprrl 790 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ dom 𝑆)
751, 2, 3, 4, 5, 6efgsdm 18364 . . . . . . . . . . . . . . . . . . . . 21 (𝑜 ∈ dom 𝑆 ↔ (𝑜 ∈ (Word 𝑊 ∖ {∅}) ∧ (𝑜‘0) ∈ 𝐷 ∧ ∀𝑖 ∈ (1..^(♯‘𝑜))(𝑜𝑖) ∈ ran (𝑇‘(𝑜‘(𝑖 − 1)))))
7675simp1bi 1168 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ dom 𝑆𝑜 ∈ (Word 𝑊 ∖ {∅}))
77 eldifi 3942 . . . . . . . . . . . . . . . . . . . 20 (𝑜 ∈ (Word 𝑊 ∖ {∅}) → 𝑜 ∈ Word 𝑊)
7874, 76, 773syl 18 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑜 ∈ Word 𝑊)
79 simpl2 1237 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐𝑊)
80 simprlr 789 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇𝑏))
81 simprrr 791 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆𝑜) = 𝑏)
8281fveq2d 6422 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑇‘(𝑆𝑜)) = (𝑇𝑏))
8382rneqd 5568 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → ran (𝑇‘(𝑆𝑜)) = ran (𝑇𝑏))
8480, 83eleqtrrd 2899 . . . . . . . . . . . . . . . . . . . 20 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran (𝑇‘(𝑆𝑜)))
851, 2, 3, 4, 5, 6efgsp1 18371 . . . . . . . . . . . . . . . . . . . 20 ((𝑜 ∈ dom 𝑆𝑐 ∈ ran (𝑇‘(𝑆𝑜))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
8674, 84, 85syl2anc 575 . . . . . . . . . . . . . . . . . . 19 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆)
871, 2, 3, 4, 5, 6efgsval2 18367 . . . . . . . . . . . . . . . . . . 19 ((𝑜 ∈ Word 𝑊𝑐𝑊 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
8878, 79, 86, 87syl3anc 1483 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) = 𝑐)
89 fnfvelrn 6588 . . . . . . . . . . . . . . . . . . 19 ((𝑆 Fn dom 𝑆 ∧ (𝑜 ++ ⟨“𝑐”⟩) ∈ dom 𝑆) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
9070, 86, 89sylancr 577 . . . . . . . . . . . . . . . . . 18 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → (𝑆‘(𝑜 ++ ⟨“𝑐”⟩)) ∈ ran 𝑆)
9188, 90eqeltrrd 2897 . . . . . . . . . . . . . . . . 17 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ ((𝑏𝑊𝑐 ∈ ran (𝑇𝑏)) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏))) → 𝑐 ∈ ran 𝑆)
9291anassrs 455 . . . . . . . . . . . . . . . 16 (((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) ∧ (𝑜 ∈ dom 𝑆 ∧ (𝑆𝑜) = 𝑏)) → 𝑐 ∈ ran 𝑆)
9373, 92rexlimddv 3234 . . . . . . . . . . . . . . 15 ((((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) ∧ (𝑏𝑊𝑐 ∈ ran (𝑇𝑏))) → 𝑐 ∈ ran 𝑆)
9493rexlimdvaa 3231 . . . . . . . . . . . . . 14 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (∃𝑏𝑊 𝑐 ∈ ran (𝑇𝑏) → 𝑐 ∈ ran 𝑆))
9549, 94syl5bi 233 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
96 eldif 3790 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) ↔ (𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)))
975eleq2i 2888 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)))
981, 2, 3, 4, 5, 6efgs1 18369 . . . . . . . . . . . . . . . . . . . 20 (𝑐𝐷 → ⟨“𝑐”⟩ ∈ dom 𝑆)
9997, 98sylbir 226 . . . . . . . . . . . . . . . . . . 19 (𝑐 ∈ (𝑊 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
10096, 99sylbir 226 . . . . . . . . . . . . . . . . . 18 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → ⟨“𝑐”⟩ ∈ dom 𝑆)
1011, 2, 3, 4, 5, 6efgsval 18365 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩ ∈ dom 𝑆 → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)))
102100, 101syl 17 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)))
103 s1len 13621 . . . . . . . . . . . . . . . . . . . . 21 (♯‘⟨“𝑐”⟩) = 1
104103oveq1i 6894 . . . . . . . . . . . . . . . . . . . 20 ((♯‘⟨“𝑐”⟩) − 1) = (1 − 1)
105 1m1e0 11385 . . . . . . . . . . . . . . . . . . . 20 (1 − 1) = 0
106104, 105eqtri 2839 . . . . . . . . . . . . . . . . . . 19 ((♯‘⟨“𝑐”⟩) − 1) = 0
107106fveq2i 6421 . . . . . . . . . . . . . . . . . 18 (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0)
108107a1i 11 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘((♯‘⟨“𝑐”⟩) − 1)) = (⟨“𝑐”⟩‘0))
109 s1fv 13625 . . . . . . . . . . . . . . . . . 18 (𝑐𝑊 → (⟨“𝑐”⟩‘0) = 𝑐)
110109adantr 468 . . . . . . . . . . . . . . . . 17 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (⟨“𝑐”⟩‘0) = 𝑐)
111102, 108, 1103eqtrd 2855 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) = 𝑐)
112 fnfvelrn 6588 . . . . . . . . . . . . . . . . 17 ((𝑆 Fn dom 𝑆 ∧ ⟨“𝑐”⟩ ∈ dom 𝑆) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
11370, 100, 112sylancr 577 . . . . . . . . . . . . . . . 16 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → (𝑆‘⟨“𝑐”⟩) ∈ ran 𝑆)
114111, 113eqeltrrd 2897 . . . . . . . . . . . . . . 15 ((𝑐𝑊 ∧ ¬ 𝑐 𝑥𝑊 ran (𝑇𝑥)) → 𝑐 ∈ ran 𝑆)
115114ex 399 . . . . . . . . . . . . . 14 (𝑐𝑊 → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
1161153ad2ant2 1157 . . . . . . . . . . . . 13 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → (¬ 𝑐 𝑥𝑊 ran (𝑇𝑥) → 𝑐 ∈ ran 𝑆))
11795, 116pm2.61d 171 . . . . . . . . . . . 12 (((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) ∧ 𝑐𝑊 ∧ (♯‘𝑐) = 𝑑) → 𝑐 ∈ ran 𝑆)
118117rabssdv 3890 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑐𝑊 ∣ (♯‘𝑐) = 𝑑} ⊆ ran 𝑆)
11943, 118syl5eqss 3857 . . . . . . . . . 10 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑} ⊆ ran 𝑆)
12041, 119unssd 3999 . . . . . . . . 9 ((𝑑 ∈ ℕ0 ∧ {𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆) → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆)
121120ex 399 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆))
122 id 22 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℕ0)
123 nn0leltp1 11722 . . . . . . . . . . . . 13 (((♯‘𝑎) ∈ ℕ0𝑑 ∈ ℕ0) → ((♯‘𝑎) ≤ 𝑑 ↔ (♯‘𝑎) < (𝑑 + 1)))
12421, 122, 123syl2anr 586 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) ≤ 𝑑 ↔ (♯‘𝑎) < (𝑑 + 1)))
12521nn0red 11638 . . . . . . . . . . . . 13 (𝑎𝑊 → (♯‘𝑎) ∈ ℝ)
126 nn0re 11588 . . . . . . . . . . . . 13 (𝑑 ∈ ℕ0𝑑 ∈ ℝ)
127 leloe 10419 . . . . . . . . . . . . 13 (((♯‘𝑎) ∈ ℝ ∧ 𝑑 ∈ ℝ) → ((♯‘𝑎) ≤ 𝑑 ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
128125, 126, 127syl2anr 586 . . . . . . . . . . . 12 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) ≤ 𝑑 ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
129124, 128bitr3d 272 . . . . . . . . . . 11 ((𝑑 ∈ ℕ0𝑎𝑊) → ((♯‘𝑎) < (𝑑 + 1) ↔ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)))
130129rabbidva 3389 . . . . . . . . . 10 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} = {𝑎𝑊 ∣ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)})
131 unrab 4110 . . . . . . . . . 10 ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) = {𝑎𝑊 ∣ ((♯‘𝑎) < 𝑑 ∨ (♯‘𝑎) = 𝑑)}
132130, 131syl6eqr 2869 . . . . . . . . 9 (𝑑 ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} = ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}))
133132sseq1d 3840 . . . . . . . 8 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆 ↔ ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ∪ {𝑎𝑊 ∣ (♯‘𝑎) = 𝑑}) ⊆ ran 𝑆))
134121, 133sylibrd 250 . . . . . . 7 (𝑑 ∈ ℕ0 → ({𝑎𝑊 ∣ (♯‘𝑎) < 𝑑} ⊆ ran 𝑆 → {𝑎𝑊 ∣ (♯‘𝑎) < (𝑑 + 1)} ⊆ ran 𝑆))
13530, 33, 36, 39, 40, 134nn0ind 11758 . . . . . 6 (((♯‘𝑐) + 1) ∈ ℕ0 → {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆)
13617, 18, 1353syl 18 . . . . 5 (𝑐𝑊 → {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ⊆ ran 𝑆)
137 id 22 . . . . . 6 (𝑐𝑊𝑐𝑊)
13817nn0red 11638 . . . . . . 7 (𝑐𝑊 → (♯‘𝑐) ∈ ℝ)
139138ltp1d 11249 . . . . . 6 (𝑐𝑊 → (♯‘𝑐) < ((♯‘𝑐) + 1))
140 fveq2 6418 . . . . . . . 8 (𝑎 = 𝑐 → (♯‘𝑎) = (♯‘𝑐))
141140breq1d 4865 . . . . . . 7 (𝑎 = 𝑐 → ((♯‘𝑎) < ((♯‘𝑐) + 1) ↔ (♯‘𝑐) < ((♯‘𝑐) + 1)))
142141elrab 3570 . . . . . 6 (𝑐 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)} ↔ (𝑐𝑊 ∧ (♯‘𝑐) < ((♯‘𝑐) + 1)))
143137, 139, 142sylanbrc 574 . . . . 5 (𝑐𝑊𝑐 ∈ {𝑎𝑊 ∣ (♯‘𝑎) < ((♯‘𝑐) + 1)})
144136, 143sseldd 3810 . . . 4 (𝑐𝑊𝑐 ∈ ran 𝑆)
145144ssriv 3813 . . 3 𝑊 ⊆ ran 𝑆
14612, 145eqssi 3825 . 2 ran 𝑆 = 𝑊
147 dffo2 6345 . 2 (𝑆:dom 𝑆onto𝑊 ↔ (𝑆:dom 𝑆𝑊 ∧ ran 𝑆 = 𝑊))
14810, 146, 147mpbir2an 693 1 𝑆:dom 𝑆onto𝑊
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 197  wa 384  wo 865  w3a 1100   = wceq 1637  wcel 2157  wral 3107  wrex 3108  {crab 3111  cdif 3777  cun 3778  wss 3780  c0 4127  {csn 4381  cop 4387  cotp 4389   ciun 4723   class class class wbr 4855  cmpt 4934   I cid 5231   × cxp 5322  dom cdm 5324  ran crn 5325   Fn wfn 6106  wf 6107  ontowfo 6109  cfv 6111  (class class class)co 6884  cmpt2 6886  1𝑜c1o 7799  2𝑜c2o 7800  cr 10230  0cc0 10231  1c1 10232   + caddc 10234   < clt 10369  cle 10370  cmin 10561  2c2 11368  0cn0 11579  +crp 12066  ...cfz 12569  ..^cfzo 12709  chash 13357  Word cword 13522   ++ cconcat 13524  ⟨“cs1 13525   splice csplice 13527  ⟨“cs2 13830   ~FG cefg 18340
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1877  ax-4 1894  ax-5 2001  ax-6 2069  ax-7 2105  ax-8 2159  ax-9 2166  ax-10 2186  ax-11 2202  ax-12 2215  ax-13 2422  ax-ext 2795  ax-rep 4977  ax-sep 4988  ax-nul 4996  ax-pow 5048  ax-pr 5109  ax-un 7189  ax-cnex 10287  ax-resscn 10288  ax-1cn 10289  ax-icn 10290  ax-addcl 10291  ax-addrcl 10292  ax-mulcl 10293  ax-mulrcl 10294  ax-mulcom 10295  ax-addass 10296  ax-mulass 10297  ax-distr 10298  ax-i2m1 10299  ax-1ne0 10300  ax-1rid 10301  ax-rnegex 10302  ax-rrecex 10303  ax-cnre 10304  ax-pre-lttri 10305  ax-pre-lttrn 10306  ax-pre-ltadd 10307  ax-pre-mulgt0 10308
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 866  df-3or 1101  df-3an 1102  df-tru 1641  df-ex 1860  df-nf 1864  df-sb 2062  df-mo 2635  df-eu 2642  df-clab 2804  df-cleq 2810  df-clel 2813  df-nfc 2948  df-ne 2990  df-nel 3093  df-ral 3112  df-rex 3113  df-reu 3114  df-rab 3116  df-v 3404  df-sbc 3645  df-csb 3740  df-dif 3783  df-un 3785  df-in 3787  df-ss 3794  df-pss 3796  df-nul 4128  df-if 4291  df-pw 4364  df-sn 4382  df-pr 4384  df-tp 4386  df-op 4388  df-ot 4390  df-uni 4642  df-int 4681  df-iun 4725  df-br 4856  df-opab 4918  df-mpt 4935  df-tr 4958  df-id 5232  df-eprel 5237  df-po 5245  df-so 5246  df-fr 5283  df-we 5285  df-xp 5330  df-rel 5331  df-cnv 5332  df-co 5333  df-dm 5334  df-rn 5335  df-res 5336  df-ima 5337  df-pred 5907  df-ord 5953  df-on 5954  df-lim 5955  df-suc 5956  df-iota 6074  df-fun 6113  df-fn 6114  df-f 6115  df-f1 6116  df-fo 6117  df-f1o 6118  df-fv 6119  df-riota 6845  df-ov 6887  df-oprab 6888  df-mpt2 6889  df-om 7306  df-1st 7408  df-2nd 7409  df-wrecs 7652  df-recs 7714  df-rdg 7752  df-1o 7806  df-2o 7807  df-oadd 7810  df-er 7989  df-map 8104  df-pm 8105  df-en 8203  df-dom 8204  df-sdom 8205  df-fin 8206  df-card 9058  df-pnf 10371  df-mnf 10372  df-xr 10373  df-ltxr 10374  df-le 10375  df-sub 10563  df-neg 10564  df-nn 11316  df-2 11376  df-n0 11580  df-z 11664  df-uz 11925  df-rp 12067  df-fz 12570  df-fzo 12710  df-hash 13358  df-word 13530  df-concat 13532  df-s1 13533  df-substr 13534  df-splice 13535  df-s2 13837
This theorem is referenced by:  efgredlemc  18379  efgrelexlemb  18384  efgredeu  18386  efgred2  18387
  Copyright terms: Public domain W3C validator