Metamath Proof Explorer


Theorem mulerpqlem

Description: Lemma for mulerpq . (Contributed by Mario Carneiro, 8-May-2013) (New usage is discouraged.)

Ref Expression
Assertion mulerpqlem ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( 𝐴 ·pQ 𝐶 ) ~Q ( 𝐵 ·pQ 𝐶 ) ) )

Proof

Step Hyp Ref Expression
1 xp1st ( 𝐴 ∈ ( N × N ) → ( 1st𝐴 ) ∈ N )
2 1 3ad2ant1 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 1st𝐴 ) ∈ N )
3 xp1st ( 𝐶 ∈ ( N × N ) → ( 1st𝐶 ) ∈ N )
4 3 3ad2ant3 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 1st𝐶 ) ∈ N )
5 mulclpi ( ( ( 1st𝐴 ) ∈ N ∧ ( 1st𝐶 ) ∈ N ) → ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ∈ N )
6 2 4 5 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ∈ N )
7 xp2nd ( 𝐴 ∈ ( N × N ) → ( 2nd𝐴 ) ∈ N )
8 7 3ad2ant1 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 2nd𝐴 ) ∈ N )
9 xp2nd ( 𝐶 ∈ ( N × N ) → ( 2nd𝐶 ) ∈ N )
10 9 3ad2ant3 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 2nd𝐶 ) ∈ N )
11 mulclpi ( ( ( 2nd𝐴 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N )
12 8 10 11 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N )
13 xp1st ( 𝐵 ∈ ( N × N ) → ( 1st𝐵 ) ∈ N )
14 13 3ad2ant2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 1st𝐵 ) ∈ N )
15 mulclpi ( ( ( 1st𝐵 ) ∈ N ∧ ( 1st𝐶 ) ∈ N ) → ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ∈ N )
16 14 4 15 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ∈ N )
17 xp2nd ( 𝐵 ∈ ( N × N ) → ( 2nd𝐵 ) ∈ N )
18 17 3ad2ant2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 2nd𝐵 ) ∈ N )
19 mulclpi ( ( ( 2nd𝐵 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N )
20 18 10 19 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N )
21 enqbreq ( ( ( ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ∈ N ∧ ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N ) ∧ ( ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ∈ N ∧ ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N ) ) → ( ⟨ ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ ~Q ⟨ ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ ↔ ( ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ) ) )
22 6 12 16 20 21 syl22anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ⟨ ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ ~Q ⟨ ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ ↔ ( ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ) ) )
23 mulpipq2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ·pQ 𝐶 ) = ⟨ ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ )
24 23 3adant2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ·pQ 𝐶 ) = ⟨ ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ )
25 mulpipq2 ( ( 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐵 ·pQ 𝐶 ) = ⟨ ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ )
26 25 3adant1 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐵 ·pQ 𝐶 ) = ⟨ ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ )
27 24 26 breq12d ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 𝐴 ·pQ 𝐶 ) ~Q ( 𝐵 ·pQ 𝐶 ) ↔ ⟨ ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ ~Q ⟨ ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ ) )
28 enqbreq2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
29 28 3adant3 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
30 mulclpi ( ( ( 1st𝐶 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ∈ N )
31 4 10 30 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ∈ N )
32 mulclpi ( ( ( 1st𝐴 ) ∈ N ∧ ( 2nd𝐵 ) ∈ N ) → ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ∈ N )
33 2 18 32 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ∈ N )
34 mulcanpi ( ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ∈ N ∧ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ∈ N ) → ( ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
35 31 33 34 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
36 mulcompi ( ( ( 1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ompi ( ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ·N ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) )
50 45 48 49 3eqtri ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) )
51 44 50 eqeq12i ( ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ↔ ( ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ) )
52 51 a1i ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 1st𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ↔ ( ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ) ) )
53 29 35 52 3bitr2d ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( ( ( 1st𝐴 ) ·N ( 1st𝐶 ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 1st𝐶 ) ) ) ) )
54 22 27 53 3bitr4rd ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( 𝐴 ·pQ 𝐶 ) ~Q ( 𝐵 ·pQ 𝐶 ) ) )