File: Mathlib/Algebra/ModEq.lean

full_name: AddCommGroup.ModEq
code: /-- `a ≡ b [PMOD p]` means that `b` is congruent to `a` modulo `p`.

Equivalently (as shown in `Algebra.Order.ToIntervalMod`), `b` does not lie in the open interval
`(a, a + p)` modulo `p`, or `toIcoMod hp a` disagrees with `toIocMod hp a` at `b`, or
`toIcoDiv hp a` disagrees with `toIocDiv hp a` at `b`. -/
def ModEq (p a b : α) : Prop 
goal: Prop

full_name: AddCommGroup._aux_Mathlib_Algebra_ModEq___unexpand_AddCommGroup_ModEq_1
code: @[inherit_doc]
notation:50 a " ≡ " b " [PMOD " p "]" => ModEq p a b
goal: Lean.PrettyPrinter.Unexpander

full_name: AddCommGroup.«_aux_Mathlib_Algebra_ModEq___macroRules_AddCommGroup_term_≡_[PMOD_]_1»
code: @[inherit_doc]
notation:50 a " ≡ " b " [PMOD " p "]" => ModEq p a b
goal: Lean.Macro

full_name: AddCommGroup.modEq_refl
code: @[refl, simp]
theorem modEq_refl (a : α) : a ≡ a [PMOD p] 
goal: a ≡ a [PMOD p]

full_name: AddCommGroup.modEq_rfl
code: theorem modEq_rfl : a ≡ a [PMOD p] 
goal: a ≡ a [PMOD p]

full_name: AddCommGroup.modEq_comm
code: theorem modEq_comm : a ≡ b [PMOD p] ↔ b ≡ a [PMOD p] 
goal: a ≡ b [PMOD p] ↔ b ≡ a [PMOD p]

full_name: AddCommGroup.ModEq.trans
code: @[trans]
theorem ModEq.trans : a ≡ b [PMOD p] → b ≡ c [PMOD p] → a ≡ c [PMOD p] 
goal: a ≡ b [PMOD p] → b ≡ c [PMOD p] → a ≡ c [PMOD p]

full_name: AddCommGroup.instIsReflModEq
code: instance : IsRefl _ (ModEq p) 
goal: IsRefl α (AddCommGroup.ModEq p)

full_name: AddCommGroup.neg_modEq_neg
code: @[simp]
theorem neg_modEq_neg : -a ≡ -b [PMOD p] ↔ a ≡ b [PMOD p] 
goal: -a ≡ -b [PMOD p] ↔ a ≡ b [PMOD p]

full_name: AddCommGroup.modEq_neg
code: @[simp]
theorem modEq_neg : a ≡ b [PMOD -p] ↔ a ≡ b [PMOD p] 
goal: a ≡ b [PMOD -p] ↔ a ≡ b [PMOD p]

full_name: AddCommGroup.modEq_sub
code: theorem modEq_sub (a b : α) : a ≡ b [PMOD b - a] 
goal: a ≡ b [PMOD b - a]

full_name: AddCommGroup.modEq_zero
code: @[simp]
theorem modEq_zero : a ≡ b [PMOD 0] ↔ a = b 
goal: a ≡ b [PMOD 0] ↔ a = b

full_name: AddCommGroup.self_modEq_zero
code: @[simp]
theorem self_modEq_zero : p ≡ 0 [PMOD p] 
goal: p ≡ 0 [PMOD p]

full_name: AddCommGroup.zsmul_modEq_zero
code: @[simp]
theorem zsmul_modEq_zero (z : ℤ) : z • p ≡ 0 [PMOD p] 
goal: z • p ≡ 0 [PMOD p]

full_name: AddCommGroup.add_zsmul_modEq
code: theorem add_zsmul_modEq (z : ℤ) : a + z • p ≡ a [PMOD p] 
goal: a + z • p ≡ a [PMOD p]

full_name: AddCommGroup.zsmul_add_modEq
code: theorem zsmul_add_modEq (z : ℤ) : z • p + a ≡ a [PMOD p] 
goal: z • p + a ≡ a [PMOD p]

full_name: AddCommGroup.add_nsmul_modEq
code: theorem add_nsmul_modEq (n : ℕ) : a + n • p ≡ a [PMOD p] 
goal: a + n • p ≡ a [PMOD p]

full_name: AddCommGroup.nsmul_add_modEq
code: theorem nsmul_add_modEq (n : ℕ) : n • p + a ≡ a [PMOD p] 
goal: n • p + a ≡ a [PMOD p]

full_name: AddCommGroup.ModEq.add_zsmul
code: protected theorem add_zsmul (z : ℤ) : a ≡ b [PMOD p] → a + z • p ≡ b [PMOD p] 
goal: a ≡ b [PMOD p] → a + z • p ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.zsmul_add
code: protected theorem zsmul_add (z : ℤ) : a ≡ b [PMOD p] → z • p + a ≡ b [PMOD p] 
goal: a ≡ b [PMOD p] → z • p + a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.add_nsmul
code: protected theorem add_nsmul (n : ℕ) : a ≡ b [PMOD p] → a + n • p ≡ b [PMOD p] 
goal: a ≡ b [PMOD p] → a + n • p ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.nsmul_add
code: protected theorem nsmul_add (n : ℕ) : a ≡ b [PMOD p] → n • p + a ≡ b [PMOD p] 
goal: a ≡ b [PMOD p] → n • p + a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.of_zsmul
code: protected theorem of_zsmul : a ≡ b [PMOD z • p] → a ≡ b [PMOD p] 
goal: a ≡ b [PMOD z • p] → a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.of_nsmul
code: protected theorem of_nsmul : a ≡ b [PMOD n • p] → a ≡ b [PMOD p] 
goal: a ≡ b [PMOD n • p] → a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.zsmul
code: protected theorem zsmul : a ≡ b [PMOD p] → z • a ≡ z • b [PMOD z • p] 
goal: a ≡ b [PMOD p] → z • a ≡ z • b [PMOD z • p]

full_name: AddCommGroup.ModEq.nsmul
code: protected theorem nsmul : a ≡ b [PMOD p] → n • a ≡ n • b [PMOD n • p] 
goal: a ≡ b [PMOD p] → n • a ≡ n • b [PMOD n • p]

full_name: AddCommGroup.zsmul_modEq_zsmul
code: @[simp]
theorem zsmul_modEq_zsmul [NoZeroSMulDivisors ℤ α] (hn : z ≠ 0) :
    z • a ≡ z • b [PMOD z • p] ↔ a ≡ b [PMOD p] 
goal: z • a ≡ z • b [PMOD z • p] ↔ a ≡ b [PMOD p]

full_name: AddCommGroup.nsmul_modEq_nsmul
code: @[simp]
theorem nsmul_modEq_nsmul [NoZeroSMulDivisors ℕ α] (hn : n ≠ 0) :
    n • a ≡ n • b [PMOD n • p] ↔ a ≡ b [PMOD p] 
goal: n • a ≡ n • b [PMOD n • p] ↔ a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.add_iff_left
code: @[simp]
protected theorem add_iff_left :
    a₁ ≡ b₁ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₂ ≡ b₂ [PMOD p]) 
goal: a₁ ≡ b₁ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₂ ≡ b₂ [PMOD p])

full_name: AddCommGroup.ModEq.add_iff_right
code: @[simp]
protected theorem add_iff_right :
    a₂ ≡ b₂ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₁ ≡ b₁ [PMOD p]) 
goal: a₂ ≡ b₂ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₁ ≡ b₁ [PMOD p])

full_name: AddCommGroup.ModEq.sub_iff_left
code: @[simp]
protected theorem sub_iff_left :
    a₁ ≡ b₁ [PMOD p] → (a₁ - a₂ ≡ b₁ - b₂ [PMOD p] ↔ a₂ ≡ b₂ [PMOD p]) 
goal: a₁ ≡ b₁ [PMOD p] → (a₁ - a₂ ≡ b₁ - b₂ [PMOD p] ↔ a₂ ≡ b₂ [PMOD p])

full_name: AddCommGroup.ModEq.sub_iff_right
code: @[simp]
protected theorem sub_iff_right :
    a₂ ≡ b₂ [PMOD p] → (a₁ - a₂ ≡ b₁ - b₂ [PMOD p] ↔ a₁ ≡ b₁ [PMOD p]) 
goal: a₂ ≡ b₂ [PMOD p] → (a₁ - a₂ ≡ b₁ - b₂ [PMOD p] ↔ a₁ ≡ b₁ [PMOD p])

full_name: AddCommGroup.ModEq.add_left
code: protected theorem add_left (c : α) (h : a ≡ b [PMOD p]) : c + a ≡ c + b [PMOD p] 
goal: c + a ≡ c + b [PMOD p]

full_name: AddCommGroup.ModEq.sub_left
code: protected theorem sub_left (c : α) (h : a ≡ b [PMOD p]) : c - a ≡ c - b [PMOD p] 
goal: c - a ≡ c - b [PMOD p]

full_name: AddCommGroup.ModEq.add_right
code: protected theorem add_right (c : α) (h : a ≡ b [PMOD p]) : a + c ≡ b + c [PMOD p] 
goal: a + c ≡ b + c [PMOD p]

full_name: AddCommGroup.ModEq.sub_right
code: protected theorem sub_right (c : α) (h : a ≡ b [PMOD p]) : a - c ≡ b - c [PMOD p] 
goal: a - c ≡ b - c [PMOD p]

full_name: AddCommGroup.ModEq.add_left_cancel'
code: protected theorem add_left_cancel' (c : α) : c + a ≡ c + b [PMOD p] → a ≡ b [PMOD p] 
goal: c + a ≡ c + b [PMOD p] → a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.add_right_cancel'
code: protected theorem add_right_cancel' (c : α) : a + c ≡ b + c [PMOD p] → a ≡ b [PMOD p] 
goal: a + c ≡ b + c [PMOD p] → a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.sub_left_cancel'
code: protected theorem sub_left_cancel' (c : α) : c - a ≡ c - b [PMOD p] → a ≡ b [PMOD p] 
goal: c - a ≡ c - b [PMOD p] → a ≡ b [PMOD p]

full_name: AddCommGroup.ModEq.sub_right_cancel'
code: protected theorem sub_right_cancel' (c : α) : a - c ≡ b - c [PMOD p] → a ≡ b [PMOD p] 
goal: a - c ≡ b - c [PMOD p] → a ≡ b [PMOD p]

full_name: AddCommGroup.modEq_sub_iff_add_modEq'
code: theorem modEq_sub_iff_add_modEq' : a ≡ b - c [PMOD p] ↔ c + a ≡ b [PMOD p] 
goal: a ≡ b - c [PMOD p] ↔ c + a ≡ b [PMOD p]

full_name: AddCommGroup.modEq_sub_iff_add_modEq
code: theorem modEq_sub_iff_add_modEq : a ≡ b - c [PMOD p] ↔ a + c ≡ b [PMOD p] 
goal: a ≡ b - c [PMOD p] ↔ a + c ≡ b [PMOD p]

full_name: AddCommGroup.sub_modEq_iff_modEq_add'
code: theorem sub_modEq_iff_modEq_add' : a - b ≡ c [PMOD p] ↔ a ≡ b + c [PMOD p] 
goal: a - b ≡ c [PMOD p] ↔ a ≡ b + c [PMOD p]

full_name: AddCommGroup.sub_modEq_iff_modEq_add
code: theorem sub_modEq_iff_modEq_add : a - b ≡ c [PMOD p] ↔ a ≡ c + b [PMOD p] 
goal: a - b ≡ c [PMOD p] ↔ a ≡ c + b [PMOD p]

full_name: AddCommGroup.sub_modEq_zero
code: @[simp]
theorem sub_modEq_zero : a - b ≡ 0 [PMOD p] ↔ a ≡ b [PMOD p] 
goal: a - b ≡ 0 [PMOD p] ↔ a ≡ b [PMOD p]

full_name: AddCommGroup.add_modEq_left
code: @[simp]
theorem add_modEq_left : a + b ≡ a [PMOD p] ↔ b ≡ 0 [PMOD p] 
goal: a + b ≡ a [PMOD p] ↔ b ≡ 0 [PMOD p]

full_name: AddCommGroup.add_modEq_right
code: @[simp]
theorem add_modEq_right : a + b ≡ b [PMOD p] ↔ a ≡ 0 [PMOD p] 
goal: a + b ≡ b [PMOD p] ↔ a ≡ 0 [PMOD p]

full_name: AddCommGroup.modEq_iff_eq_add_zsmul
code: theorem modEq_iff_eq_add_zsmul : a ≡ b [PMOD p] ↔ ∃ z : ℤ, b = a + z • p 
goal: a ≡ b [PMOD p] ↔ ∃ z, b = a + z • p

full_name: AddCommGroup.not_modEq_iff_ne_add_zsmul
code: theorem not_modEq_iff_ne_add_zsmul : ¬a ≡ b [PMOD p] ↔ ∀ z : ℤ, b ≠ a + z • p 
goal: ¬a ≡ b [PMOD p] ↔ ∀ (z : ℤ), b ≠ a + z • p

full_name: AddCommGroup.modEq_iff_eq_mod_zmultiples
code: theorem modEq_iff_eq_mod_zmultiples : a ≡ b [PMOD p] ↔ (b : α ⧸ AddSubgroup.zmultiples p) = a 
goal: a ≡ b [PMOD p] ↔ ↑b = ↑a

full_name: AddCommGroup.not_modEq_iff_ne_mod_zmultiples
code: theorem not_modEq_iff_ne_mod_zmultiples :
    ¬a ≡ b [PMOD p] ↔ (b : α ⧸ AddSubgroup.zmultiples p) ≠ a 
goal: ¬a ≡ b [PMOD p] ↔ ↑b ≠ ↑a

full_name: AddCommGroup.modEq_iff_int_modEq
code: @[simp]
theorem modEq_iff_int_modEq {a b z : ℤ} : a ≡ b [PMOD z] ↔ a ≡ b [ZMOD z] 
goal: a ≡ b [PMOD z] ↔ a ≡ b [ZMOD z]

full_name: AddCommGroup.intCast_modEq_intCast
code: @[simp, norm_cast]
theorem intCast_modEq_intCast {a b z : ℤ} : a ≡ b [PMOD (z : α)] ↔ a ≡ b [PMOD z] 
goal: ↑a ≡ ↑b [PMOD ↑z] ↔ a ≡ b [PMOD z]

full_name: AddCommGroup.intCast_modEq_intCast'
code: @[simp, norm_cast]
lemma intCast_modEq_intCast' {a b : ℤ} {n : ℕ} : a ≡ b [PMOD (n : α)] ↔ a ≡ b [PMOD (n : ℤ)] 
goal: ↑a ≡ ↑b [PMOD ↑n] ↔ a ≡ b [PMOD ↑n]

full_name: AddCommGroup.natCast_modEq_natCast
code: @[simp, norm_cast]
theorem natCast_modEq_natCast {a b n : ℕ} : a ≡ b [PMOD (n : α)] ↔ a ≡ b [MOD n] 
goal: ↑a ≡ ↑b [PMOD ↑n] ↔ a ≡ b [MOD n]

full_name: AddCommGroup.div_modEq_div
code: @[simp] lemma div_modEq_div (hc : c ≠ 0) : a / c ≡ b / c [PMOD p] ↔ a ≡ b [PMOD (p * c)] 
goal: a / c ≡ b / c [PMOD p] ↔ a ≡ b [PMOD p * c]