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

Theorem swrdeq 13653
Description: Two subwords of words are equal iff they have the same length and the same symbols at each position. (Contributed by Alexander van der Vekens, 7-Aug-2018.)
Assertion
Ref Expression
swrdeq (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((𝑊 substr ⟨0, 𝑀⟩) = (𝑈 substr ⟨0, 𝑁⟩) ↔ (𝑀 = 𝑁 ∧ ∀𝑖 ∈ (0..^𝑀)(𝑊𝑖) = (𝑈𝑖))))
Distinct variable groups:   𝑖,𝑀   𝑖,𝑁   𝑈,𝑖   𝑖,𝑉   𝑖,𝑊

Proof of Theorem swrdeq
StepHypRef Expression
1 swrdcl 13627 . . . . 5 (𝑊 ∈ Word 𝑉 → (𝑊 substr ⟨0, 𝑀⟩) ∈ Word 𝑉)
2 swrdcl 13627 . . . . 5 (𝑈 ∈ Word 𝑉 → (𝑈 substr ⟨0, 𝑁⟩) ∈ Word 𝑉)
31, 2anim12i 600 . . . 4 ((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) → ((𝑊 substr ⟨0, 𝑀⟩) ∈ Word 𝑉 ∧ (𝑈 substr ⟨0, 𝑁⟩) ∈ Word 𝑉))
433ad2ant1 1127 . . 3 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((𝑊 substr ⟨0, 𝑀⟩) ∈ Word 𝑉 ∧ (𝑈 substr ⟨0, 𝑁⟩) ∈ Word 𝑉))
5 eqwrd 13543 . . 3 (((𝑊 substr ⟨0, 𝑀⟩) ∈ Word 𝑉 ∧ (𝑈 substr ⟨0, 𝑁⟩) ∈ Word 𝑉) → ((𝑊 substr ⟨0, 𝑀⟩) = (𝑈 substr ⟨0, 𝑁⟩) ↔ ((♯‘(𝑊 substr ⟨0, 𝑀⟩)) = (♯‘(𝑈 substr ⟨0, 𝑁⟩)) ∧ ∀𝑖 ∈ (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩)))((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖))))
64, 5syl 17 . 2 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((𝑊 substr ⟨0, 𝑀⟩) = (𝑈 substr ⟨0, 𝑁⟩) ↔ ((♯‘(𝑊 substr ⟨0, 𝑀⟩)) = (♯‘(𝑈 substr ⟨0, 𝑁⟩)) ∧ ∀𝑖 ∈ (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩)))((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖))))
7 simpl 468 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) → 𝑊 ∈ Word 𝑉)
873ad2ant1 1127 . . . . 5 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑊 ∈ Word 𝑉)
9 simpl 468 . . . . . . 7 ((𝑀 ∈ ℕ0𝑁 ∈ ℕ0) → 𝑀 ∈ ℕ0)
1093ad2ant2 1128 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑀 ∈ ℕ0)
11 lencl 13520 . . . . . . . 8 (𝑊 ∈ Word 𝑉 → (♯‘𝑊) ∈ ℕ0)
1211adantr 466 . . . . . . 7 ((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) → (♯‘𝑊) ∈ ℕ0)
13123ad2ant1 1127 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → (♯‘𝑊) ∈ ℕ0)
14 simpl 468 . . . . . . 7 ((𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈)) → 𝑀 ≤ (♯‘𝑊))
15143ad2ant3 1129 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑀 ≤ (♯‘𝑊))
16 elfz2nn0 12638 . . . . . 6 (𝑀 ∈ (0...(♯‘𝑊)) ↔ (𝑀 ∈ ℕ0 ∧ (♯‘𝑊) ∈ ℕ0𝑀 ≤ (♯‘𝑊)))
1710, 13, 15, 16syl3anbrc 1428 . . . . 5 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑀 ∈ (0...(♯‘𝑊)))
18 swrd0len 13630 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...(♯‘𝑊))) → (♯‘(𝑊 substr ⟨0, 𝑀⟩)) = 𝑀)
198, 17, 18syl2anc 573 . . . 4 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → (♯‘(𝑊 substr ⟨0, 𝑀⟩)) = 𝑀)
20 simpr 471 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) → 𝑈 ∈ Word 𝑉)
21203ad2ant1 1127 . . . . 5 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑈 ∈ Word 𝑉)
22 simpr 471 . . . . . . 7 ((𝑀 ∈ ℕ0𝑁 ∈ ℕ0) → 𝑁 ∈ ℕ0)
23223ad2ant2 1128 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑁 ∈ ℕ0)
24 lencl 13520 . . . . . . . 8 (𝑈 ∈ Word 𝑉 → (♯‘𝑈) ∈ ℕ0)
2524adantl 467 . . . . . . 7 ((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) → (♯‘𝑈) ∈ ℕ0)
26253ad2ant1 1127 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → (♯‘𝑈) ∈ ℕ0)
27 simpr 471 . . . . . . 7 ((𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈)) → 𝑁 ≤ (♯‘𝑈))
28273ad2ant3 1129 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑁 ≤ (♯‘𝑈))
29 elfz2nn0 12638 . . . . . 6 (𝑁 ∈ (0...(♯‘𝑈)) ↔ (𝑁 ∈ ℕ0 ∧ (♯‘𝑈) ∈ ℕ0𝑁 ≤ (♯‘𝑈)))
3023, 26, 28, 29syl3anbrc 1428 . . . . 5 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → 𝑁 ∈ (0...(♯‘𝑈)))
31 swrd0len 13630 . . . . 5 ((𝑈 ∈ Word 𝑉𝑁 ∈ (0...(♯‘𝑈))) → (♯‘(𝑈 substr ⟨0, 𝑁⟩)) = 𝑁)
3221, 30, 31syl2anc 573 . . . 4 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → (♯‘(𝑈 substr ⟨0, 𝑁⟩)) = 𝑁)
3319, 32eqeq12d 2786 . . 3 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((♯‘(𝑊 substr ⟨0, 𝑀⟩)) = (♯‘(𝑈 substr ⟨0, 𝑁⟩)) ↔ 𝑀 = 𝑁))
3433anbi1d 615 . 2 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → (((♯‘(𝑊 substr ⟨0, 𝑀⟩)) = (♯‘(𝑈 substr ⟨0, 𝑁⟩)) ∧ ∀𝑖 ∈ (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩)))((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖)) ↔ (𝑀 = 𝑁 ∧ ∀𝑖 ∈ (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩)))((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖))))
358adantr 466 . . . . . . 7 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → 𝑊 ∈ Word 𝑉)
3617adantr 466 . . . . . . 7 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → 𝑀 ∈ (0...(♯‘𝑊)))
3735, 36, 18syl2anc 573 . . . . . 6 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (♯‘(𝑊 substr ⟨0, 𝑀⟩)) = 𝑀)
3837oveq2d 6812 . . . . 5 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩))) = (0..^𝑀))
3938raleqdv 3293 . . . 4 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (∀𝑖 ∈ (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩)))((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖) ↔ ∀𝑖 ∈ (0..^𝑀)((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖)))
4035adantr 466 . . . . . . 7 (((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) ∧ 𝑖 ∈ (0..^𝑀)) → 𝑊 ∈ Word 𝑉)
4136adantr 466 . . . . . . 7 (((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) ∧ 𝑖 ∈ (0..^𝑀)) → 𝑀 ∈ (0...(♯‘𝑊)))
42 simpr 471 . . . . . . 7 (((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) ∧ 𝑖 ∈ (0..^𝑀)) → 𝑖 ∈ (0..^𝑀))
43 swrd0fv 13648 . . . . . . 7 ((𝑊 ∈ Word 𝑉𝑀 ∈ (0...(♯‘𝑊)) ∧ 𝑖 ∈ (0..^𝑀)) → ((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = (𝑊𝑖))
4440, 41, 42, 43syl3anc 1476 . . . . . 6 (((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) ∧ 𝑖 ∈ (0..^𝑀)) → ((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = (𝑊𝑖))
45 oveq2 6804 . . . . . . . . . . 11 (𝑀 = 𝑁 → (0..^𝑀) = (0..^𝑁))
4645eleq2d 2836 . . . . . . . . . 10 (𝑀 = 𝑁 → (𝑖 ∈ (0..^𝑀) ↔ 𝑖 ∈ (0..^𝑁)))
4746adantl 467 . . . . . . . . 9 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (𝑖 ∈ (0..^𝑀) ↔ 𝑖 ∈ (0..^𝑁)))
4821adantr 466 . . . . . . . . . . . 12 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑈 ∈ Word 𝑉)
4930adantr 466 . . . . . . . . . . . 12 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑁 ∈ (0...(♯‘𝑈)))
50 simpr 471 . . . . . . . . . . . 12 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑖 ∈ (0..^𝑁))
5148, 49, 503jca 1122 . . . . . . . . . . 11 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑈 ∈ Word 𝑉𝑁 ∈ (0...(♯‘𝑈)) ∧ 𝑖 ∈ (0..^𝑁)))
5251ex 397 . . . . . . . . . 10 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → (𝑖 ∈ (0..^𝑁) → (𝑈 ∈ Word 𝑉𝑁 ∈ (0...(♯‘𝑈)) ∧ 𝑖 ∈ (0..^𝑁))))
5352adantr 466 . . . . . . . . 9 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (𝑖 ∈ (0..^𝑁) → (𝑈 ∈ Word 𝑉𝑁 ∈ (0...(♯‘𝑈)) ∧ 𝑖 ∈ (0..^𝑁))))
5447, 53sylbid 230 . . . . . . . 8 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (𝑖 ∈ (0..^𝑀) → (𝑈 ∈ Word 𝑉𝑁 ∈ (0...(♯‘𝑈)) ∧ 𝑖 ∈ (0..^𝑁))))
5554imp 393 . . . . . . 7 (((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) ∧ 𝑖 ∈ (0..^𝑀)) → (𝑈 ∈ Word 𝑉𝑁 ∈ (0...(♯‘𝑈)) ∧ 𝑖 ∈ (0..^𝑁)))
56 swrd0fv 13648 . . . . . . 7 ((𝑈 ∈ Word 𝑉𝑁 ∈ (0...(♯‘𝑈)) ∧ 𝑖 ∈ (0..^𝑁)) → ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖) = (𝑈𝑖))
5755, 56syl 17 . . . . . 6 (((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) ∧ 𝑖 ∈ (0..^𝑀)) → ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖) = (𝑈𝑖))
5844, 57eqeq12d 2786 . . . . 5 (((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) ∧ 𝑖 ∈ (0..^𝑀)) → (((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖) ↔ (𝑊𝑖) = (𝑈𝑖)))
5958ralbidva 3134 . . . 4 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (∀𝑖 ∈ (0..^𝑀)((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖) ↔ ∀𝑖 ∈ (0..^𝑀)(𝑊𝑖) = (𝑈𝑖)))
6039, 59bitrd 268 . . 3 ((((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) ∧ 𝑀 = 𝑁) → (∀𝑖 ∈ (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩)))((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖) ↔ ∀𝑖 ∈ (0..^𝑀)(𝑊𝑖) = (𝑈𝑖)))
6160pm5.32da 568 . 2 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((𝑀 = 𝑁 ∧ ∀𝑖 ∈ (0..^(♯‘(𝑊 substr ⟨0, 𝑀⟩)))((𝑊 substr ⟨0, 𝑀⟩)‘𝑖) = ((𝑈 substr ⟨0, 𝑁⟩)‘𝑖)) ↔ (𝑀 = 𝑁 ∧ ∀𝑖 ∈ (0..^𝑀)(𝑊𝑖) = (𝑈𝑖))))
626, 34, 613bitrd 294 1 (((𝑊 ∈ Word 𝑉𝑈 ∈ Word 𝑉) ∧ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0) ∧ (𝑀 ≤ (♯‘𝑊) ∧ 𝑁 ≤ (♯‘𝑈))) → ((𝑊 substr ⟨0, 𝑀⟩) = (𝑈 substr ⟨0, 𝑁⟩) ↔ (𝑀 = 𝑁 ∧ ∀𝑖 ∈ (0..^𝑀)(𝑊𝑖) = (𝑈𝑖))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 382  w3a 1071   = wceq 1631  wcel 2145  wral 3061  cop 4323   class class class wbr 4787  cfv 6030  (class class class)co 6796  0cc0 10142  cle 10281  0cn0 11499  ...cfz 12533  ..^cfzo 12673  chash 13321  Word cword 13487   substr csubstr 13491
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-8 2147  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751  ax-rep 4905  ax-sep 4916  ax-nul 4924  ax-pow 4975  ax-pr 5035  ax-un 7100  ax-cnex 10198  ax-resscn 10199  ax-1cn 10200  ax-icn 10201  ax-addcl 10202  ax-addrcl 10203  ax-mulcl 10204  ax-mulrcl 10205  ax-mulcom 10206  ax-addass 10207  ax-mulass 10208  ax-distr 10209  ax-i2m1 10210  ax-1ne0 10211  ax-1rid 10212  ax-rnegex 10213  ax-rrecex 10214  ax-cnre 10215  ax-pre-lttri 10216  ax-pre-lttrn 10217  ax-pre-ltadd 10218  ax-pre-mulgt0 10219
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 837  df-3or 1072  df-3an 1073  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-eu 2622  df-mo 2623  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-ne 2944  df-nel 3047  df-ral 3066  df-rex 3067  df-reu 3068  df-rab 3070  df-v 3353  df-sbc 3588  df-csb 3683  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-pss 3739  df-nul 4064  df-if 4227  df-pw 4300  df-sn 4318  df-pr 4320  df-tp 4322  df-op 4324  df-uni 4576  df-int 4613  df-iun 4657  df-br 4788  df-opab 4848  df-mpt 4865  df-tr 4888  df-id 5158  df-eprel 5163  df-po 5171  df-so 5172  df-fr 5209  df-we 5211  df-xp 5256  df-rel 5257  df-cnv 5258  df-co 5259  df-dm 5260  df-rn 5261  df-res 5262  df-ima 5263  df-pred 5822  df-ord 5868  df-on 5869  df-lim 5870  df-suc 5871  df-iota 5993  df-fun 6032  df-fn 6033  df-f 6034  df-f1 6035  df-fo 6036  df-f1o 6037  df-fv 6038  df-riota 6757  df-ov 6799  df-oprab 6800  df-mpt2 6801  df-om 7217  df-1st 7319  df-2nd 7320  df-wrecs 7563  df-recs 7625  df-rdg 7663  df-1o 7717  df-oadd 7721  df-er 7900  df-en 8114  df-dom 8115  df-sdom 8116  df-fin 8117  df-card 8969  df-pnf 10282  df-mnf 10283  df-xr 10284  df-ltxr 10285  df-le 10286  df-sub 10474  df-neg 10475  df-nn 11227  df-n0 11500  df-z 11585  df-uz 11894  df-fz 12534  df-fzo 12674  df-hash 13322  df-word 13495  df-substr 13499
This theorem is referenced by:  clwlkclwwlkf1lem2  27155  clwlksf1clwwlklemOLD  27249
  Copyright terms: Public domain W3C validator