/-
Copyright 2025 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/modulepublicimportMathlib.Data.Nat.Init@[expose]publicsectionnamespaceNatvariable{abc:ℕ}All goals completed! 🐙@[simp]protectedlemmadvd_add_self_mul:a∣b+a*c↔a∣b:=bya:ℕb:ℕc:ℕ⊢ a∣b+a*c↔a∣brw[Nat.mul_comm,a:ℕb:ℕc:ℕ⊢ a∣b+c*a↔a∣bAll goals completed! 🐙Nat.dvd_add_mul_selfa:ℕb:ℕc:ℕ⊢ a∣b↔a∣bAll goals completed! 🐙]All goals completed! 🐙@[simp]protectedlemmadvd_mul_self_add:a∣b*a+c↔a∣c:=bya:ℕb:ℕc:ℕ⊢ a∣b*a+c↔a∣crw[Nat.add_comm,a:ℕb:ℕc:ℕ⊢ a∣c+b*a↔a∣cAll goals completed! 🐙Nat.dvd_add_mul_selfa:ℕb:ℕc:ℕ⊢ a∣c↔a∣cAll goals completed! 🐙]All goals completed! 🐙@[simp]protectedlemmadvd_self_mul_add:a∣a*b+c↔a∣c:=bya:ℕb:ℕc:ℕ⊢ a∣a*b+c↔a∣crw[Nat.mul_comm,a:ℕb:ℕc:ℕ⊢ a∣b*a+c↔a∣cAll goals completed! 🐙Nat.dvd_mul_self_adda:ℕb:ℕc:ℕ⊢ a∣c↔a∣cAll goals completed! 🐙]All goals completed! 🐙@[simp]lemmadvd_sub_iff_right'(hab:a∣b):a∣b-c↔a∣c∨b≤c:=bya:ℕb:ℕc:ℕhab:a∣b⊢ a∣b-c↔a∣c∨b≤cobtainhbc|hcb:=b.le_totalcinla:ℕb:ℕc:ℕhab:a∣bhbc:b≤c⊢ a∣b-c↔a∣c∨b≤cinra:ℕb:ℕc:ℕhab:a∣bhcb:c≤b⊢ a∣b-c↔a∣c∨b≤c·inla:ℕb:ℕc:ℕhab:a∣bhbc:b≤c⊢ a∣b-c↔a∣c∨b≤csimp[*]All goals completed! 🐙·inra:ℕb:ℕc:ℕhab:a∣bhcb:c≤b⊢ a∣b-c↔a∣c∨b≤csimp+contextual[Nat.dvd_sub_iff_right,Nat.le_antisymmhcb,*]All goals completed! 🐙@[simp]lemmadvd_sub_iff_left'(hac:a∣c):a∣b-c↔a∣b∨b≤c:=bya:ℕb:ℕc:ℕhac:a∣c⊢ a∣b-c↔a∣b∨b≤cobtainhbc|hcb:=b.le_totalcinla:ℕb:ℕc:ℕhac:a∣chbc:b≤c⊢ a∣b-c↔a∣b∨b≤cinra:ℕb:ℕc:ℕhac:a∣chcb:c≤b⊢ a∣b-c↔a∣b∨b≤c·inla:ℕb:ℕc:ℕhac:a∣chbc:b≤c⊢ a∣b-c↔a∣b∨b≤csimp[*]All goals completed! 🐙·inra:ℕb:ℕc:ℕhac:a∣chcb:c≤b⊢ a∣b-c↔a∣b∨b≤csimp+contextual[Nat.dvd_sub_iff_left,←Nat.le_antisymmhcb,*]All goals completed! 🐙@[simp]protectedlemmadvd_sub_mul_self:a∣b-c*a↔a∣b∨b≤c*a:=bya:ℕb:ℕc:ℕ⊢ a∣b-c*a↔a∣b∨b≤c*arw[Nat.dvd_sub_iff_left'(Nat.dvd_mul_left__)a:ℕb:ℕc:ℕ⊢ a∣b∨b≤c*a↔a∣b∨b≤c*aAll goals completed! 🐙]All goals completed! 🐙@[simp]protectedlemmadvd_sub_self_mul:a∣b-a*c↔a∣b∨b≤c*a:=bya:ℕb:ℕc:ℕ⊢ a∣b-a*c↔a∣b∨b≤c*arw[Nat.mul_comm,a:ℕb:ℕc:ℕ⊢ a∣b-c*a↔a∣b∨b≤c*aAll goals completed! 🐙Nat.dvd_sub_mul_selfa:ℕb:ℕc:ℕ⊢ a∣b∨b≤c*a↔a∣b∨b≤c*aAll goals completed! 🐙]All goals completed! 🐙@[simp]protectedlemmadvd_mul_self_sub:a∣b*a-c↔a∣c∨b*a≤c:=bya:ℕb:ℕc:ℕ⊢ a∣b*a-c↔a∣c∨b*a≤crw[Nat.dvd_sub_iff_right'(Nat.dvd_mul_left__)a:ℕb:ℕc:ℕ⊢ a∣c∨b*a≤c↔a∣c∨b*a≤cAll goals completed! 🐙]All goals completed! 🐙@[simp]protectedlemmadvd_self_mul_sub:a∣a*b-c↔a∣c∨b*a≤c:=bya:ℕb:ℕc:ℕ⊢ a∣a*b-c↔a∣c∨b*a≤crw[Nat.mul_comm,a:ℕb:ℕc:ℕ⊢ a∣b*a-c↔a∣c∨b*a≤cAll goals completed! 🐙Nat.dvd_mul_self_suba:ℕb:ℕc:ℕ⊢ a∣c∨b*a≤c↔a∣c∨b*a≤cAll goals completed! 🐙]All goals completed! 🐙endNat