Metamath Proof Explorer


Theorem adderpqlem

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

Ref Expression
Assertion adderpqlem ( ( 𝐴 ∈ ( 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 xp2nd ( 𝐶 ∈ ( N × N ) → ( 2nd𝐶 ) ∈ N )
4 3 3ad2ant3 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 2nd𝐶 ) ∈ N )
5 mulclpi ( ( ( 1st𝐴 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N )
6 2 4 5 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N )
7 xp1st ( 𝐶 ∈ ( N × N ) → ( 1st𝐶 ) ∈ N )
8 7 3ad2ant3 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 1st𝐶 ) ∈ N )
9 xp2nd ( 𝐴 ∈ ( N × N ) → ( 2nd𝐴 ) ∈ N )
10 9 3ad2ant1 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 2nd𝐴 ) ∈ N )
11 mulclpi ( ( ( 1st𝐶 ) ∈ N ∧ ( 2nd𝐴 ) ∈ N ) → ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ∈ N )
12 8 10 11 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ∈ N )
13 addclpi ( ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N ∧ ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ∈ N ) → ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ∈ N )
14 6 12 13 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ∈ N )
15 mulclpi ( ( ( 2nd𝐴 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N )
16 10 4 15 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N )
17 xp1st ( 𝐵 ∈ ( N × N ) → ( 1st𝐵 ) ∈ N )
18 17 3ad2ant2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 1st𝐵 ) ∈ N )
19 mulclpi ( ( ( 1st𝐵 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N )
20 18 4 19 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N )
21 xp2nd ( 𝐵 ∈ ( N × N ) → ( 2nd𝐵 ) ∈ N )
22 21 3ad2ant2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 2nd𝐵 ) ∈ N )
23 mulclpi ( ( ( 1st𝐶 ) ∈ N ∧ ( 2nd𝐵 ) ∈ N ) → ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ∈ N )
24 8 22 23 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ∈ N )
25 addclpi ( ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N ∧ ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ∈ N ) → ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ∈ N )
26 20 24 25 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ∈ N )
27 mulclpi ( ( ( 2nd𝐵 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N )
28 22 4 27 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N )
29 enqbreq ( ( ( ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ∈ N ∧ ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N ) ∧ ( ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ∈ N ∧ ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ∈ N ) ) → ( ⟨ ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ ~Q ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ ↔ ( ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ) ) )
30 14 16 26 28 29 syl22anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ⟨ ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ ~Q ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ ↔ ( ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ) ) )
31 addpipq2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 +pQ 𝐶 ) = ⟨ ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ )
32 31 3adant2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 +pQ 𝐶 ) = ⟨ ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ )
33 addpipq2 ( ( 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐵 +pQ 𝐶 ) = ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ )
34 33 3adant1 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐵 +pQ 𝐶 ) = ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ )
35 32 34 breq12d ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 𝐴 +pQ 𝐶 ) ~Q ( 𝐵 +pQ 𝐶 ) ↔ ⟨ ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ⟩ ~Q ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ⟩ ) )
36 enqbreq2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
37 36 3adant3 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
38 mulclpi ( ( ( 2nd𝐶 ) ∈ N ∧ ( 2nd𝐶 ) ∈ N ) → ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ∈ N )
39 4 4 38 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ∈ N )
40 mulclpi ( ( ( 1st𝐴 ) ∈ N ∧ ( 2nd𝐵 ) ∈ N ) → ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ∈ N )
41 2 22 40 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ∈ N )
42 mulcanpi ( ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ∈ N ∧ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ∈ N ) → ( ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
43 39 41 42 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
44 mulclpi ( ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ∈ N ∧ ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ∈ N ) → ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ∈ N )
45 16 24 44 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ∈ N )
46 mulclpi ( ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ∈ N ∧ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ∈ N ) → ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) ∈ N )
47 39 41 46 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) ∈ N )
48 addcanpi ( ( ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ∈ N ∧ ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) ∈ N ) → ( ( ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) +N ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) ) = ( ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) +N ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ) ↔ ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ) )
49 45 47 48 syl2anc ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) +N ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) ) = ( ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) +N ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ) ↔ ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ) )
50 mulcompi ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ·N ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) )
51 fvex ( 1st𝐴 ) ∈ V
52 fvex ( 2nd𝐵 ) ∈ V
53 fvex ( 2nd𝐶 ) ∈ V
54 mulcompi ( 𝑥 ·N 𝑦 ) = ( 𝑦 ·N 𝑥 )
55 mulasspi ( ( 𝑥 ·N 𝑦 ) ·N 𝑧 ) = ( 𝑥 ·N ( 𝑦 ·N 𝑧 ) )
56 51 52 53 54 55 53 caov4 ( ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ·N ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) )
57 50 56 eqtri ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 1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↔ ( ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ) )
89 49 88 bitr3di ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) = ( ( ( 2nd𝐶 ) ·N ( 2nd𝐶 ) ) ·N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) ↔ ( ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ) ) )
90 37 43 89 3bitr2d ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( ( ( ( 1st𝐴 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐴 ) ) ) ·N ( ( 2nd𝐵 ) ·N ( 2nd𝐶 ) ) ) = ( ( ( 2nd𝐴 ) ·N ( 2nd𝐶 ) ) ·N ( ( ( 1st𝐵 ) ·N ( 2nd𝐶 ) ) +N ( ( 1st𝐶 ) ·N ( 2nd𝐵 ) ) ) ) ) )
91 30 35 90 3bitr4rd ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ∧ 𝐶 ∈ ( N × N ) ) → ( 𝐴 ~Q 𝐵 ↔ ( 𝐴 +pQ 𝐶 ) ~Q ( 𝐵 +pQ 𝐶 ) ) )