ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  modqsubdir GIF version

Theorem modqsubdir 9395
Description: Distribute the modulo operation over a subtraction. (Contributed by Jim Kingdon, 26-Oct-2021.)
Assertion
Ref Expression
modqsubdir (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐵 mod 𝐶) ≤ (𝐴 mod 𝐶) ↔ ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))))

Proof of Theorem modqsubdir
StepHypRef Expression
1 simpll 495 . . . . 5 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐴 ∈ ℚ)
2 simprl 497 . . . . 5 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐶 ∈ ℚ)
3 simprr 498 . . . . 5 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 0 < 𝐶)
41, 2, 3modqcld 9330 . . . 4 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐴 mod 𝐶) ∈ ℚ)
5 qre 8710 . . . 4 ((𝐴 mod 𝐶) ∈ ℚ → (𝐴 mod 𝐶) ∈ ℝ)
64, 5syl 14 . . 3 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐴 mod 𝐶) ∈ ℝ)
7 simplr 496 . . . . 5 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐵 ∈ ℚ)
87, 2, 3modqcld 9330 . . . 4 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐵 mod 𝐶) ∈ ℚ)
9 qre 8710 . . . 4 ((𝐵 mod 𝐶) ∈ ℚ → (𝐵 mod 𝐶) ∈ ℝ)
108, 9syl 14 . . 3 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐵 mod 𝐶) ∈ ℝ)
116, 10subge0d 7635 . 2 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ↔ (𝐵 mod 𝐶) ≤ (𝐴 mod 𝐶)))
12 qsubcl 8723 . . . . . . . 8 ((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) → (𝐴𝐵) ∈ ℚ)
1312adantr 270 . . . . . . 7 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐴𝐵) ∈ ℚ)
143gt0ne0d 7613 . . . . . . . . . 10 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐶 ≠ 0)
15 qdivcl 8728 . . . . . . . . . 10 ((𝐴 ∈ ℚ ∧ 𝐶 ∈ ℚ ∧ 𝐶 ≠ 0) → (𝐴 / 𝐶) ∈ ℚ)
161, 2, 14, 15syl3anc 1169 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐴 / 𝐶) ∈ ℚ)
1716flqcld 9279 . . . . . . . 8 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (⌊‘(𝐴 / 𝐶)) ∈ ℤ)
18 qdivcl 8728 . . . . . . . . . 10 ((𝐵 ∈ ℚ ∧ 𝐶 ∈ ℚ ∧ 𝐶 ≠ 0) → (𝐵 / 𝐶) ∈ ℚ)
197, 2, 14, 18syl3anc 1169 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐵 / 𝐶) ∈ ℚ)
2019flqcld 9279 . . . . . . . 8 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (⌊‘(𝐵 / 𝐶)) ∈ ℤ)
2117, 20zsubcld 8474 . . . . . . 7 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶))) ∈ ℤ)
22 modqcyc2 9362 . . . . . . 7 ((((𝐴𝐵) ∈ ℚ ∧ ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶))) ∈ ℤ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (((𝐴𝐵) − (𝐶 · ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶))))) mod 𝐶) = ((𝐴𝐵) mod 𝐶))
2313, 21, 2, 3, 22syl22anc 1170 . . . . . 6 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (((𝐴𝐵) − (𝐶 · ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶))))) mod 𝐶) = ((𝐴𝐵) mod 𝐶))
24 qcn 8719 . . . . . . . . . 10 (𝐴 ∈ ℚ → 𝐴 ∈ ℂ)
251, 24syl 14 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐴 ∈ ℂ)
26 qcn 8719 . . . . . . . . . 10 (𝐵 ∈ ℚ → 𝐵 ∈ ℂ)
277, 26syl 14 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐵 ∈ ℂ)
28 zq 8711 . . . . . . . . . . . 12 ((⌊‘(𝐴 / 𝐶)) ∈ ℤ → (⌊‘(𝐴 / 𝐶)) ∈ ℚ)
2917, 28syl 14 . . . . . . . . . . 11 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (⌊‘(𝐴 / 𝐶)) ∈ ℚ)
30 qmulcl 8722 . . . . . . . . . . 11 ((𝐶 ∈ ℚ ∧ (⌊‘(𝐴 / 𝐶)) ∈ ℚ) → (𝐶 · (⌊‘(𝐴 / 𝐶))) ∈ ℚ)
312, 29, 30syl2anc 403 . . . . . . . . . 10 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐶 · (⌊‘(𝐴 / 𝐶))) ∈ ℚ)
32 qcn 8719 . . . . . . . . . 10 ((𝐶 · (⌊‘(𝐴 / 𝐶))) ∈ ℚ → (𝐶 · (⌊‘(𝐴 / 𝐶))) ∈ ℂ)
3331, 32syl 14 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐶 · (⌊‘(𝐴 / 𝐶))) ∈ ℂ)
34 zq 8711 . . . . . . . . . . . 12 ((⌊‘(𝐵 / 𝐶)) ∈ ℤ → (⌊‘(𝐵 / 𝐶)) ∈ ℚ)
3520, 34syl 14 . . . . . . . . . . 11 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (⌊‘(𝐵 / 𝐶)) ∈ ℚ)
36 qmulcl 8722 . . . . . . . . . . 11 ((𝐶 ∈ ℚ ∧ (⌊‘(𝐵 / 𝐶)) ∈ ℚ) → (𝐶 · (⌊‘(𝐵 / 𝐶))) ∈ ℚ)
372, 35, 36syl2anc 403 . . . . . . . . . 10 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐶 · (⌊‘(𝐵 / 𝐶))) ∈ ℚ)
38 qcn 8719 . . . . . . . . . 10 ((𝐶 · (⌊‘(𝐵 / 𝐶))) ∈ ℚ → (𝐶 · (⌊‘(𝐵 / 𝐶))) ∈ ℂ)
3937, 38syl 14 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐶 · (⌊‘(𝐵 / 𝐶))) ∈ ℂ)
4025, 27, 33, 39sub4d 7468 . . . . . . . 8 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴𝐵) − ((𝐶 · (⌊‘(𝐴 / 𝐶))) − (𝐶 · (⌊‘(𝐵 / 𝐶))))) = ((𝐴 − (𝐶 · (⌊‘(𝐴 / 𝐶)))) − (𝐵 − (𝐶 · (⌊‘(𝐵 / 𝐶))))))
41 qcn 8719 . . . . . . . . . . 11 (𝐶 ∈ ℚ → 𝐶 ∈ ℂ)
422, 41syl 14 . . . . . . . . . 10 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐶 ∈ ℂ)
4317zcnd 8470 . . . . . . . . . 10 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (⌊‘(𝐴 / 𝐶)) ∈ ℂ)
4420zcnd 8470 . . . . . . . . . 10 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (⌊‘(𝐵 / 𝐶)) ∈ ℂ)
4542, 43, 44subdid 7518 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐶 · ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶)))) = ((𝐶 · (⌊‘(𝐴 / 𝐶))) − (𝐶 · (⌊‘(𝐵 / 𝐶)))))
4645oveq2d 5548 . . . . . . . 8 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴𝐵) − (𝐶 · ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶))))) = ((𝐴𝐵) − ((𝐶 · (⌊‘(𝐴 / 𝐶))) − (𝐶 · (⌊‘(𝐵 / 𝐶))))))
47 modqval 9326 . . . . . . . . . 10 ((𝐴 ∈ ℚ ∧ 𝐶 ∈ ℚ ∧ 0 < 𝐶) → (𝐴 mod 𝐶) = (𝐴 − (𝐶 · (⌊‘(𝐴 / 𝐶)))))
481, 2, 3, 47syl3anc 1169 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐴 mod 𝐶) = (𝐴 − (𝐶 · (⌊‘(𝐴 / 𝐶)))))
49 modqval 9326 . . . . . . . . . 10 ((𝐵 ∈ ℚ ∧ 𝐶 ∈ ℚ ∧ 0 < 𝐶) → (𝐵 mod 𝐶) = (𝐵 − (𝐶 · (⌊‘(𝐵 / 𝐶)))))
507, 2, 3, 49syl3anc 1169 . . . . . . . . 9 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐵 mod 𝐶) = (𝐵 − (𝐶 · (⌊‘(𝐵 / 𝐶)))))
5148, 50oveq12d 5550 . . . . . . . 8 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) = ((𝐴 − (𝐶 · (⌊‘(𝐴 / 𝐶)))) − (𝐵 − (𝐶 · (⌊‘(𝐵 / 𝐶))))))
5240, 46, 513eqtr4d 2123 . . . . . . 7 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴𝐵) − (𝐶 · ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶))))) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)))
5352oveq1d 5547 . . . . . 6 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (((𝐴𝐵) − (𝐶 · ((⌊‘(𝐴 / 𝐶)) − (⌊‘(𝐵 / 𝐶))))) mod 𝐶) = (((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) mod 𝐶))
5423, 53eqtr3d 2115 . . . . 5 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴𝐵) mod 𝐶) = (((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) mod 𝐶))
5554adantr 270 . . . 4 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → ((𝐴𝐵) mod 𝐶) = (((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) mod 𝐶))
56 qsubcl 8723 . . . . . . 7 (((𝐴 mod 𝐶) ∈ ℚ ∧ (𝐵 mod 𝐶) ∈ ℚ) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ∈ ℚ)
574, 8, 56syl2anc 403 . . . . . 6 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ∈ ℚ)
5857adantr 270 . . . . 5 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ∈ ℚ)
592adantr 270 . . . . 5 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → 𝐶 ∈ ℚ)
60 simpr 108 . . . . 5 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)))
616, 10resubcld 7485 . . . . . . 7 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ∈ ℝ)
62 qre 8710 . . . . . . . 8 (𝐶 ∈ ℚ → 𝐶 ∈ ℝ)
632, 62syl 14 . . . . . . 7 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 𝐶 ∈ ℝ)
64 modqge0 9334 . . . . . . . . 9 ((𝐵 ∈ ℚ ∧ 𝐶 ∈ ℚ ∧ 0 < 𝐶) → 0 ≤ (𝐵 mod 𝐶))
657, 2, 3, 64syl3anc 1169 . . . . . . . 8 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 0 ≤ (𝐵 mod 𝐶))
666, 10subge02d 7637 . . . . . . . 8 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (0 ≤ (𝐵 mod 𝐶) ↔ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ≤ (𝐴 mod 𝐶)))
6765, 66mpbid 145 . . . . . . 7 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ≤ (𝐴 mod 𝐶))
68 modqlt 9335 . . . . . . . 8 ((𝐴 ∈ ℚ ∧ 𝐶 ∈ ℚ ∧ 0 < 𝐶) → (𝐴 mod 𝐶) < 𝐶)
691, 2, 3, 68syl3anc 1169 . . . . . . 7 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (𝐴 mod 𝐶) < 𝐶)
7061, 6, 63, 67, 69lelttrd 7234 . . . . . 6 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) < 𝐶)
7170adantr 270 . . . . 5 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) < 𝐶)
72 modqid 9351 . . . . 5 (((((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ∈ ℚ ∧ 𝐶 ∈ ℚ) ∧ (0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ∧ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) < 𝐶)) → (((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)))
7358, 59, 60, 71, 72syl22anc 1170 . . . 4 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → (((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)))
7455, 73eqtrd 2113 . . 3 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)))
75 modqge0 9334 . . . . . 6 (((𝐴𝐵) ∈ ℚ ∧ 𝐶 ∈ ℚ ∧ 0 < 𝐶) → 0 ≤ ((𝐴𝐵) mod 𝐶))
7613, 2, 3, 75syl3anc 1169 . . . . 5 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → 0 ≤ ((𝐴𝐵) mod 𝐶))
7776adantr 270 . . . 4 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → 0 ≤ ((𝐴𝐵) mod 𝐶))
78 simpr 108 . . . 4 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)))
7977, 78breqtrd 3809 . . 3 ((((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) ∧ ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))) → 0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)))
8074, 79impbida 560 . 2 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → (0 ≤ ((𝐴 mod 𝐶) − (𝐵 mod 𝐶)) ↔ ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))))
8111, 80bitr3d 188 1 (((𝐴 ∈ ℚ ∧ 𝐵 ∈ ℚ) ∧ (𝐶 ∈ ℚ ∧ 0 < 𝐶)) → ((𝐵 mod 𝐶) ≤ (𝐴 mod 𝐶) ↔ ((𝐴𝐵) mod 𝐶) = ((𝐴 mod 𝐶) − (𝐵 mod 𝐶))))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 102  wb 103   = wceq 1284  wcel 1433  wne 2245   class class class wbr 3785  cfv 4922  (class class class)co 5532  cc 6979  cr 6980  0cc0 6981   · cmul 6986   < clt 7153  cle 7154  cmin 7279   / cdiv 7760  cz 8351  cq 8704  cfl 9272   mod cmo 9324
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 576  ax-in2 577  ax-io 662  ax-5 1376  ax-7 1377  ax-gen 1378  ax-ie1 1422  ax-ie2 1423  ax-8 1435  ax-10 1436  ax-11 1437  ax-i12 1438  ax-bndl 1439  ax-4 1440  ax-13 1444  ax-14 1445  ax-17 1459  ax-i9 1463  ax-ial 1467  ax-i5r 1468  ax-ext 2063  ax-sep 3896  ax-pow 3948  ax-pr 3964  ax-un 4188  ax-setind 4280  ax-cnex 7067  ax-resscn 7068  ax-1cn 7069  ax-1re 7070  ax-icn 7071  ax-addcl 7072  ax-addrcl 7073  ax-mulcl 7074  ax-mulrcl 7075  ax-addcom 7076  ax-mulcom 7077  ax-addass 7078  ax-mulass 7079  ax-distr 7080  ax-i2m1 7081  ax-0lt1 7082  ax-1rid 7083  ax-0id 7084  ax-rnegex 7085  ax-precex 7086  ax-cnre 7087  ax-pre-ltirr 7088  ax-pre-ltwlin 7089  ax-pre-lttrn 7090  ax-pre-apti 7091  ax-pre-ltadd 7092  ax-pre-mulgt0 7093  ax-pre-mulext 7094  ax-arch 7095
This theorem depends on definitions:  df-bi 115  df-3or 920  df-3an 921  df-tru 1287  df-fal 1290  df-nf 1390  df-sb 1686  df-eu 1944  df-mo 1945  df-clab 2068  df-cleq 2074  df-clel 2077  df-nfc 2208  df-ne 2246  df-nel 2340  df-ral 2353  df-rex 2354  df-reu 2355  df-rmo 2356  df-rab 2357  df-v 2603  df-sbc 2816  df-csb 2909  df-dif 2975  df-un 2977  df-in 2979  df-ss 2986  df-pw 3384  df-sn 3404  df-pr 3405  df-op 3407  df-uni 3602  df-int 3637  df-iun 3680  df-br 3786  df-opab 3840  df-mpt 3841  df-id 4048  df-po 4051  df-iso 4052  df-xp 4369  df-rel 4370  df-cnv 4371  df-co 4372  df-dm 4373  df-rn 4374  df-res 4375  df-ima 4376  df-iota 4887  df-fun 4924  df-fn 4925  df-f 4926  df-fv 4930  df-riota 5488  df-ov 5535  df-oprab 5536  df-mpt2 5537  df-1st 5787  df-2nd 5788  df-pnf 7155  df-mnf 7156  df-xr 7157  df-ltxr 7158  df-le 7159  df-sub 7281  df-neg 7282  df-reap 7675  df-ap 7682  df-div 7761  df-inn 8040  df-n0 8289  df-z 8352  df-q 8705  df-rp 8735  df-fl 9274  df-mod 9325
This theorem is referenced by:  modqeqmodmin  9396
  Copyright terms: Public domain W3C validator