Metamath Proof Explorer


Theorem 2pthdlem1

Description: Lemma 1 for 2pthd . (Contributed by AV, 14-Feb-2021)

Ref Expression
Hypotheses 2wlkd.p 𝑃 = ⟨“ 𝐴 𝐵 𝐶 ”⟩
2wlkd.f 𝐹 = ⟨“ 𝐽 𝐾 ”⟩
2wlkd.s ( 𝜑 → ( 𝐴𝑉𝐵𝑉𝐶𝑉 ) )
2wlkd.n ( 𝜑 → ( 𝐴𝐵𝐵𝐶 ) )
Assertion 2pthdlem1 ( 𝜑 → ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ∀ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) )

Proof

Step Hyp Ref Expression
1 2wlkd.p 𝑃 = ⟨“ 𝐴 𝐵 𝐶 ”⟩
2 2wlkd.f 𝐹 = ⟨“ 𝐽 𝐾 ”⟩
3 2wlkd.s ( 𝜑 → ( 𝐴𝑉𝐵𝑉𝐶𝑉 ) )
4 2wlkd.n ( 𝜑 → ( 𝐴𝐵𝐵𝐶 ) )
5 1 2 3 2wlkdlem3 ( 𝜑 → ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) )
6 simpl ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) → ( 𝑃 ‘ 0 ) = 𝐴 )
7 simpr ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) → ( 𝑃 ‘ 1 ) = 𝐵 )
8 6 7 neeq12d ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) → ( ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ↔ 𝐴𝐵 ) )
9 8 bicomd ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ) → ( 𝐴𝐵 ↔ ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) )
10 9 3adant3 ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝐴𝐵 ↔ ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) )
11 10 biimpcd ( 𝐴𝐵 → ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) )
12 11 adantr ( ( 𝐴𝐵𝐵𝐶 ) → ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) )
13 12 imp ( ( ( 𝐴𝐵𝐵𝐶 ) ∧ ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) ) → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) )
14 13 a1d ( ( ( 𝐴𝐵𝐵𝐶 ) ∧ ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) ) → ( 0 ≠ 1 → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) )
15 eqid 1 = 1
16 eqneqall ( 1 = 1 → ( 1 ≠ 1 → ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) )
17 15 16 mp1i ( ( ( 𝐴𝐵𝐵𝐶 ) ∧ ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) ) → ( 1 ≠ 1 → ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) )
18 simpr ( ( ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝑃 ‘ 2 ) = 𝐶 )
19 simpl ( ( ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝑃 ‘ 1 ) = 𝐵 )
20 18 19 neeq12d ( ( ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ↔ 𝐶𝐵 ) )
21 necom ( 𝐶𝐵𝐵𝐶 )
22 20 21 bitr2di ( ( ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝐵𝐶 ↔ ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) )
23 22 3adant1 ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝐵𝐶 ↔ ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) )
24 23 biimpcd ( 𝐵𝐶 → ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) )
25 24 adantl ( ( 𝐴𝐵𝐵𝐶 ) → ( ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) )
26 25 imp ( ( ( 𝐴𝐵𝐵𝐶 ) ∧ ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) ) → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) )
27 26 a1d ( ( ( 𝐴𝐵𝐵𝐶 ) ∧ ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) ) → ( 2 ≠ 1 → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) )
28 14 17 27 3jca ( ( ( 𝐴𝐵𝐵𝐶 ) ∧ ( ( 𝑃 ‘ 0 ) = 𝐴 ∧ ( 𝑃 ‘ 1 ) = 𝐵 ∧ ( 𝑃 ‘ 2 ) = 𝐶 ) ) → ( ( 0 ≠ 1 → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 1 ≠ 1 → ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 2 ≠ 1 → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
29 4 5 28 syl2anc ( 𝜑 → ( ( 0 ≠ 1 → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 1 ≠ 1 → ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 2 ≠ 1 → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
30 1 fveq2i ( ♯ ‘ 𝑃 ) = ( ♯ ‘ ⟨“ 𝐴 𝐵 𝐶 ”⟩ )
31 s3len ( ♯ ‘ ⟨“ 𝐴 𝐵 𝐶 ”⟩ ) = 3
32 30 31 eqtri ( ♯ ‘ 𝑃 ) = 3
33 32 oveq2i ( 0 ..^ ( ♯ ‘ 𝑃 ) ) = ( 0 ..^ 3 )
34 fzo0to3tp ( 0 ..^ 3 ) = { 0 , 1 , 2 }
35 33 34 eqtri ( 0 ..^ ( ♯ ‘ 𝑃 ) ) = { 0 , 1 , 2 }
36 35 raleqi ( ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) ↔ ∀ 𝑘 ∈ { 0 , 1 , 2 } ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) )
37 c0ex 0 ∈ V
38 1ex 1 ∈ V
39 2ex 2 ∈ V
40 neeq1 ( 𝑘 = 0 → ( 𝑘 ≠ 1 ↔ 0 ≠ 1 ) )
41 fveq2 ( 𝑘 = 0 → ( 𝑃𝑘 ) = ( 𝑃 ‘ 0 ) )
42 41 neeq1d ( 𝑘 = 0 → ( ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ↔ ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) )
43 40 42 imbi12d ( 𝑘 = 0 → ( ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) ↔ ( 0 ≠ 1 → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
44 neeq1 ( 𝑘 = 1 → ( 𝑘 ≠ 1 ↔ 1 ≠ 1 ) )
45 fveq2 ( 𝑘 = 1 → ( 𝑃𝑘 ) = ( 𝑃 ‘ 1 ) )
46 45 neeq1d ( 𝑘 = 1 → ( ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ↔ ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) )
47 44 46 imbi12d ( 𝑘 = 1 → ( ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) ↔ ( 1 ≠ 1 → ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
48 neeq1 ( 𝑘 = 2 → ( 𝑘 ≠ 1 ↔ 2 ≠ 1 ) )
49 fveq2 ( 𝑘 = 2 → ( 𝑃𝑘 ) = ( 𝑃 ‘ 2 ) )
50 49 neeq1d ( 𝑘 = 2 → ( ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ↔ ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) )
51 48 50 imbi12d ( 𝑘 = 2 → ( ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) ↔ ( 2 ≠ 1 → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
52 37 38 39 43 47 51 raltp ( ∀ 𝑘 ∈ { 0 , 1 , 2 } ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) ↔ ( ( 0 ≠ 1 → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 1 ≠ 1 → ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 2 ≠ 1 → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
53 36 52 bitri ( ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) ↔ ( ( 0 ≠ 1 → ( 𝑃 ‘ 0 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 1 ≠ 1 → ( 𝑃 ‘ 1 ) ≠ ( 𝑃 ‘ 1 ) ) ∧ ( 2 ≠ 1 → ( 𝑃 ‘ 2 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
54 29 53 sylibr ( 𝜑 → ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) )
55 2 fveq2i ( ♯ ‘ 𝐹 ) = ( ♯ ‘ ⟨“ 𝐽 𝐾 ”⟩ )
56 s2len ( ♯ ‘ ⟨“ 𝐽 𝐾 ”⟩ ) = 2
57 55 56 eqtri ( ♯ ‘ 𝐹 ) = 2
58 57 oveq2i ( 1 ..^ ( ♯ ‘ 𝐹 ) ) = ( 1 ..^ 2 )
59 fzo12sn ( 1 ..^ 2 ) = { 1 }
60 58 59 eqtri ( 1 ..^ ( ♯ ‘ 𝐹 ) ) = { 1 }
61 60 raleqi ( ∀ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) ↔ ∀ 𝑗 ∈ { 1 } ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) )
62 neeq2 ( 𝑗 = 1 → ( 𝑘𝑗𝑘 ≠ 1 ) )
63 fveq2 ( 𝑗 = 1 → ( 𝑃𝑗 ) = ( 𝑃 ‘ 1 ) )
64 63 neeq2d ( 𝑗 = 1 → ( ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ↔ ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) )
65 62 64 imbi12d ( 𝑗 = 1 → ( ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) ↔ ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) ) )
66 38 65 ralsn ( ∀ 𝑗 ∈ { 1 } ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) ↔ ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) )
67 61 66 bitri ( ∀ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) ↔ ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) )
68 67 ralbii ( ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ∀ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) ↔ ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ( 𝑘 ≠ 1 → ( 𝑃𝑘 ) ≠ ( 𝑃 ‘ 1 ) ) )
69 54 68 sylibr ( 𝜑 → ∀ 𝑘 ∈ ( 0 ..^ ( ♯ ‘ 𝑃 ) ) ∀ 𝑗 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝑘𝑗 → ( 𝑃𝑘 ) ≠ ( 𝑃𝑗 ) ) )