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

Theorem efgredlemg 17978
 Description: Lemma for efgred 17984. (Contributed by Mario Carneiro, 4-Jun-2016.)
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)))
efgredlem.1 (𝜑 → ∀𝑎 ∈ dom 𝑆𝑏 ∈ dom 𝑆((#‘(𝑆𝑎)) < (#‘(𝑆𝐴)) → ((𝑆𝑎) = (𝑆𝑏) → (𝑎‘0) = (𝑏‘0))))
efgredlem.2 (𝜑𝐴 ∈ dom 𝑆)
efgredlem.3 (𝜑𝐵 ∈ dom 𝑆)
efgredlem.4 (𝜑 → (𝑆𝐴) = (𝑆𝐵))
efgredlem.5 (𝜑 → ¬ (𝐴‘0) = (𝐵‘0))
efgredlemb.k 𝐾 = (((#‘𝐴) − 1) − 1)
efgredlemb.l 𝐿 = (((#‘𝐵) − 1) − 1)
efgredlemb.p (𝜑𝑃 ∈ (0...(#‘(𝐴𝐾))))
efgredlemb.q (𝜑𝑄 ∈ (0...(#‘(𝐵𝐿))))
efgredlemb.u (𝜑𝑈 ∈ (𝐼 × 2𝑜))
efgredlemb.v (𝜑𝑉 ∈ (𝐼 × 2𝑜))
efgredlemb.6 (𝜑 → (𝑆𝐴) = (𝑃(𝑇‘(𝐴𝐾))𝑈))
efgredlemb.7 (𝜑 → (𝑆𝐵) = (𝑄(𝑇‘(𝐵𝐿))𝑉))
Assertion
Ref Expression
efgredlemg (𝜑 → (#‘(𝐴𝐾)) = (#‘(𝐵𝐿)))
Distinct variable groups:   𝑎,𝑏,𝐴   𝑦,𝑎,𝑧,𝑏   𝐿,𝑎,𝑏   𝐾,𝑎,𝑏   𝑡,𝑛,𝑣,𝑤,𝑦,𝑧,𝑃   𝑚,𝑎,𝑛,𝑡,𝑣,𝑤,𝑥,𝑀,𝑏   𝑈,𝑛,𝑣,𝑤,𝑦,𝑧   𝑘,𝑎,𝑇,𝑏,𝑚,𝑡,𝑥   𝑛,𝑉,𝑣,𝑤,𝑦,𝑧   𝑄,𝑛,𝑡,𝑣,𝑤,𝑦,𝑧   𝑊,𝑎,𝑏   𝑘,𝑛,𝑣,𝑤,𝑦,𝑧,𝑊,𝑚,𝑡,𝑥   ,𝑎,𝑏,𝑚,𝑡,𝑥,𝑦,𝑧   𝐵,𝑎,𝑏   𝑆,𝑎,𝑏   𝐼,𝑎,𝑏,𝑚,𝑛,𝑡,𝑣,𝑤,𝑥,𝑦,𝑧   𝐷,𝑎,𝑏,𝑚,𝑡
Allowed substitution hints:   𝜑(𝑥,𝑦,𝑧,𝑤,𝑣,𝑡,𝑘,𝑚,𝑛,𝑎,𝑏)   𝐴(𝑥,𝑦,𝑧,𝑤,𝑣,𝑡,𝑘,𝑚,𝑛)   𝐵(𝑥,𝑦,𝑧,𝑤,𝑣,𝑡,𝑘,𝑚,𝑛)   𝐷(𝑥,𝑦,𝑧,𝑤,𝑣,𝑘,𝑛)   𝑃(𝑥,𝑘,𝑚,𝑎,𝑏)   𝑄(𝑥,𝑘,𝑚,𝑎,𝑏)   (𝑤,𝑣,𝑘,𝑛)   𝑆(𝑥,𝑦,𝑧,𝑤,𝑣,𝑡,𝑘,𝑚,𝑛)   𝑇(𝑦,𝑧,𝑤,𝑣,𝑛)   𝑈(𝑥,𝑡,𝑘,𝑚,𝑎,𝑏)   𝐼(𝑘)   𝐾(𝑥,𝑦,𝑧,𝑤,𝑣,𝑡,𝑘,𝑚,𝑛)   𝐿(𝑥,𝑦,𝑧,𝑤,𝑣,𝑡,𝑘,𝑚,𝑛)   𝑀(𝑦,𝑧,𝑘)   𝑉(𝑥,𝑡,𝑘,𝑚,𝑎,𝑏)

Proof of Theorem efgredlemg
StepHypRef Expression
1 efgval.w . . . . . 6 𝑊 = ( I ‘Word (𝐼 × 2𝑜))
2 fviss 6166 . . . . . 6 ( I ‘Word (𝐼 × 2𝑜)) ⊆ Word (𝐼 × 2𝑜)
31, 2eqsstri 3598 . . . . 5 𝑊 ⊆ Word (𝐼 × 2𝑜)
4 efgval.r . . . . . . 7 = ( ~FG𝐼)
5 efgval2.m . . . . . . 7 𝑀 = (𝑦𝐼, 𝑧 ∈ 2𝑜 ↦ ⟨𝑦, (1𝑜𝑧)⟩)
6 efgval2.t . . . . . . 7 𝑇 = (𝑣𝑊 ↦ (𝑛 ∈ (0...(#‘𝑣)), 𝑤 ∈ (𝐼 × 2𝑜) ↦ (𝑣 splice ⟨𝑛, 𝑛, ⟨“𝑤(𝑀𝑤)”⟩⟩)))
7 efgred.d . . . . . . 7 𝐷 = (𝑊 𝑥𝑊 ran (𝑇𝑥))
8 efgred.s . . . . . . 7 𝑆 = (𝑚 ∈ {𝑡 ∈ (Word 𝑊 ∖ {∅}) ∣ ((𝑡‘0) ∈ 𝐷 ∧ ∀𝑘 ∈ (1..^(#‘𝑡))(𝑡𝑘) ∈ ran (𝑇‘(𝑡‘(𝑘 − 1))))} ↦ (𝑚‘((#‘𝑚) − 1)))
9 efgredlem.1 . . . . . . 7 (𝜑 → ∀𝑎 ∈ dom 𝑆𝑏 ∈ dom 𝑆((#‘(𝑆𝑎)) < (#‘(𝑆𝐴)) → ((𝑆𝑎) = (𝑆𝑏) → (𝑎‘0) = (𝑏‘0))))
10 efgredlem.2 . . . . . . 7 (𝜑𝐴 ∈ dom 𝑆)
11 efgredlem.3 . . . . . . 7 (𝜑𝐵 ∈ dom 𝑆)
12 efgredlem.4 . . . . . . 7 (𝜑 → (𝑆𝐴) = (𝑆𝐵))
13 efgredlem.5 . . . . . . 7 (𝜑 → ¬ (𝐴‘0) = (𝐵‘0))
14 efgredlemb.k . . . . . . 7 𝐾 = (((#‘𝐴) − 1) − 1)
15 efgredlemb.l . . . . . . 7 𝐿 = (((#‘𝐵) − 1) − 1)
161, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15efgredlemf 17977 . . . . . 6 (𝜑 → ((𝐴𝐾) ∈ 𝑊 ∧ (𝐵𝐿) ∈ 𝑊))
1716simpld 474 . . . . 5 (𝜑 → (𝐴𝐾) ∈ 𝑊)
183, 17sseldi 3566 . . . 4 (𝜑 → (𝐴𝐾) ∈ Word (𝐼 × 2𝑜))
19 lencl 13179 . . . 4 ((𝐴𝐾) ∈ Word (𝐼 × 2𝑜) → (#‘(𝐴𝐾)) ∈ ℕ0)
2018, 19syl 17 . . 3 (𝜑 → (#‘(𝐴𝐾)) ∈ ℕ0)
2120nn0cnd 11230 . 2 (𝜑 → (#‘(𝐴𝐾)) ∈ ℂ)
2216simprd 478 . . . . 5 (𝜑 → (𝐵𝐿) ∈ 𝑊)
233, 22sseldi 3566 . . . 4 (𝜑 → (𝐵𝐿) ∈ Word (𝐼 × 2𝑜))
24 lencl 13179 . . . 4 ((𝐵𝐿) ∈ Word (𝐼 × 2𝑜) → (#‘(𝐵𝐿)) ∈ ℕ0)
2523, 24syl 17 . . 3 (𝜑 → (#‘(𝐵𝐿)) ∈ ℕ0)
2625nn0cnd 11230 . 2 (𝜑 → (#‘(𝐵𝐿)) ∈ ℂ)
27 2cnd 10970 . 2 (𝜑 → 2 ∈ ℂ)
281, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13efgredlema 17976 . . . . . . 7 (𝜑 → (((#‘𝐴) − 1) ∈ ℕ ∧ ((#‘𝐵) − 1) ∈ ℕ))
2928simpld 474 . . . . . 6 (𝜑 → ((#‘𝐴) − 1) ∈ ℕ)
301, 4, 5, 6, 7, 8efgsdmi 17968 . . . . . 6 ((𝐴 ∈ dom 𝑆 ∧ ((#‘𝐴) − 1) ∈ ℕ) → (𝑆𝐴) ∈ ran (𝑇‘(𝐴‘(((#‘𝐴) − 1) − 1))))
3110, 29, 30syl2anc 691 . . . . 5 (𝜑 → (𝑆𝐴) ∈ ran (𝑇‘(𝐴‘(((#‘𝐴) − 1) − 1))))
3214fveq2i 6106 . . . . . . 7 (𝐴𝐾) = (𝐴‘(((#‘𝐴) − 1) − 1))
3332fveq2i 6106 . . . . . 6 (𝑇‘(𝐴𝐾)) = (𝑇‘(𝐴‘(((#‘𝐴) − 1) − 1)))
3433rneqi 5273 . . . . 5 ran (𝑇‘(𝐴𝐾)) = ran (𝑇‘(𝐴‘(((#‘𝐴) − 1) − 1)))
3531, 34syl6eleqr 2699 . . . 4 (𝜑 → (𝑆𝐴) ∈ ran (𝑇‘(𝐴𝐾)))
361, 4, 5, 6efgtlen 17962 . . . 4 (((𝐴𝐾) ∈ 𝑊 ∧ (𝑆𝐴) ∈ ran (𝑇‘(𝐴𝐾))) → (#‘(𝑆𝐴)) = ((#‘(𝐴𝐾)) + 2))
3717, 35, 36syl2anc 691 . . 3 (𝜑 → (#‘(𝑆𝐴)) = ((#‘(𝐴𝐾)) + 2))
3828simprd 478 . . . . . . 7 (𝜑 → ((#‘𝐵) − 1) ∈ ℕ)
391, 4, 5, 6, 7, 8efgsdmi 17968 . . . . . . 7 ((𝐵 ∈ dom 𝑆 ∧ ((#‘𝐵) − 1) ∈ ℕ) → (𝑆𝐵) ∈ ran (𝑇‘(𝐵‘(((#‘𝐵) − 1) − 1))))
4011, 38, 39syl2anc 691 . . . . . 6 (𝜑 → (𝑆𝐵) ∈ ran (𝑇‘(𝐵‘(((#‘𝐵) − 1) − 1))))
4112, 40eqeltrd 2688 . . . . 5 (𝜑 → (𝑆𝐴) ∈ ran (𝑇‘(𝐵‘(((#‘𝐵) − 1) − 1))))
4215fveq2i 6106 . . . . . . 7 (𝐵𝐿) = (𝐵‘(((#‘𝐵) − 1) − 1))
4342fveq2i 6106 . . . . . 6 (𝑇‘(𝐵𝐿)) = (𝑇‘(𝐵‘(((#‘𝐵) − 1) − 1)))
4443rneqi 5273 . . . . 5 ran (𝑇‘(𝐵𝐿)) = ran (𝑇‘(𝐵‘(((#‘𝐵) − 1) − 1)))
4541, 44syl6eleqr 2699 . . . 4 (𝜑 → (𝑆𝐴) ∈ ran (𝑇‘(𝐵𝐿)))
461, 4, 5, 6efgtlen 17962 . . . 4 (((𝐵𝐿) ∈ 𝑊 ∧ (𝑆𝐴) ∈ ran (𝑇‘(𝐵𝐿))) → (#‘(𝑆𝐴)) = ((#‘(𝐵𝐿)) + 2))
4722, 45, 46syl2anc 691 . . 3 (𝜑 → (#‘(𝑆𝐴)) = ((#‘(𝐵𝐿)) + 2))
4837, 47eqtr3d 2646 . 2 (𝜑 → ((#‘(𝐴𝐾)) + 2) = ((#‘(𝐵𝐿)) + 2))