ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- ZMod.intCast_zmod_cast
@[norm_cast]
theorem intCast_zmod_cast (a : ZMod n) : ((cast a : ℤ) : ZMod n) = a 
Arguments: {n : ℕ} (a : ZMod n)
Goal: ↑a.cast = a
-- ZMod.intCast_rightInverse
theorem intCast_rightInverse : Function.RightInverse (cast : ZMod n → ℤ) ((↑) : ℤ → ZMod n) 
Arguments: {n : ℕ}
Goal: Function.RightInverse ZMod.cast Int.cast
-- ZMod.intCast_surjective
theorem intCast_surjective : Function.Surjective ((↑) : ℤ → ZMod n) 
Arguments: {n : ℕ}
Goal: Function.Surjective Int.cast
-- ZMod.cast_id
theorem cast_id : ∀ (n) (i : ZMod n), (ZMod.cast i : ZMod n) = i
  
Arguments: (n : ℕ) (i : ZMod n)
Goal: i.cast = i
-- ZMod.cast_id'
@[simp]
theorem cast_id' : (ZMod.cast : ZMod n → ZMod n) = id 
Arguments: {n : ℕ}
Goal: ZMod.cast = id
-- ZMod.natCast_comp_val
@[simp]
theorem natCast_comp_val [NeZero n] : ((↑) : ℕ → R) ∘ (val : ZMod n → ℕ) = cast 
Arguments: {n : ℕ} (R : Type u_1) [Ring R] [NeZero n]
Goal: Nat.cast ∘ ZMod.val = ZMod.cast
-- ZMod.intCast_comp_cast
@[simp]
theorem intCast_comp_cast : ((↑) : ℤ → R) ∘ (cast : ZMod n → ℤ) = cast 
Arguments: {n : ℕ} (R : Type u_1) [Ring R]
Goal: Int.cast ∘ ZMod.cast = ZMod.cast
-- ZMod.natCast_val
@[simp]
theorem natCast_val [NeZero n] (i : ZMod n) : (i.val : R) = cast i 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [NeZero n] (i : ZMod n)
Goal: ↑i.val = i.cast
-- ZMod.intCast_cast
@[simp]
theorem intCast_cast (i : ZMod n) : ((cast i : ℤ) : R) = cast i 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] (i : ZMod n)
Goal: ↑i.cast = i.cast
-- ZMod.cast_add_eq_ite
theorem cast_add_eq_ite {n : ℕ} (a b : ZMod n) :
    (cast (a + b) : ℤ) =
      if (n : ℤ) ≤ cast a + cast b then (cast a + cast b - n : ℤ) else cast a + cast b 
Arguments: {n : ℕ} (a b : ZMod n)
Goal: (a + b).cast = if ↑n ≤ a.cast + b.cast then a.cast + b.cast - ↑n else a.cast + b.cast
-- ZMod.cast_one
@[simp]
theorem cast_one (h : m ∣ n) : (cast (1 : ZMod n) : R) = 1 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n)
Goal: ZMod.cast 1 = 1
-- ZMod.cast_add
theorem cast_add (h : m ∣ n) (a b : ZMod n) : (cast (a + b : ZMod n) : R) = cast a + cast b 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n) (a b : ZMod n)
Goal: (a + b).cast = a.cast + b.cast
-- ZMod.cast_mul
theorem cast_mul (h : m ∣ n) (a b : ZMod n) : (cast (a * b : ZMod n) : R) = cast a * cast b 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n) (a b : ZMod n)
Goal: (a * b).cast = a.cast * b.cast
-- ZMod.castHom_apply
@[simp]
theorem castHom_apply {h : m ∣ n} (i : ZMod n) : castHom h R i = cast i 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] {h : m ∣ n} (i : ZMod n)
Goal: (ZMod.castHom h R) i = i.cast
-- ZMod.cast_sub
@[simp]
theorem cast_sub (h : m ∣ n) (a b : ZMod n) : (cast (a - b : ZMod n) : R) = cast a - cast b 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n) (a b : ZMod n)
Goal: (a - b).cast = a.cast - b.cast
-- ZMod.cast_neg
@[simp]
theorem cast_neg (h : m ∣ n) (a : ZMod n) : (cast (-a : ZMod n) : R) = -(cast a) 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n) (a : ZMod n)
Goal: (-a).cast = -a.cast
-- ZMod.cast_pow
@[simp]
theorem cast_pow (h : m ∣ n) (a : ZMod n) (k : ℕ) : (cast (a ^ k : ZMod n) : R) = (cast a) ^ k 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n) (a : ZMod n) (k : ℕ)
Goal: (a ^ k).cast = a.cast ^ k
-- ZMod.cast_natCast
@[simp, norm_cast]
theorem cast_natCast (h : m ∣ n) (k : ℕ) : (cast (k : ZMod n) : R) = k 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n) (k : ℕ)
Goal: (↑k).cast = ↑k
-- ZMod.cast_intCast
@[simp, norm_cast]
theorem cast_intCast (h : m ∣ n) (k : ℤ) : (cast (k : ZMod n) : R) = k 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] {m : ℕ} [CharP R m] (h : m ∣ n) (k : ℤ)
Goal: (↑k).cast = ↑k
-- ZMod.cast_one'
@[simp]
theorem cast_one' : (cast (1 : ZMod n) : R) = 1 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [CharP R n]
Goal: ZMod.cast 1 = 1
-- ZMod.cast_add'
@[simp]
theorem cast_add' (a b : ZMod n) : (cast (a + b : ZMod n) : R) = cast a + cast b 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [CharP R n] (a b : ZMod n)
Goal: (a + b).cast = a.cast + b.cast
-- ZMod.cast_mul'
@[simp]
theorem cast_mul' (a b : ZMod n) : (cast (a * b : ZMod n) : R) = cast a * cast b 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [CharP R n] (a b : ZMod n)
Goal: (a * b).cast = a.cast * b.cast
-- ZMod.cast_sub'
@[simp]
theorem cast_sub' (a b : ZMod n) : (cast (a - b : ZMod n) : R) = cast a - cast b 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [CharP R n] (a b : ZMod n)
Goal: (a - b).cast = a.cast - b.cast
-- ZMod.cast_pow'
@[simp]
theorem cast_pow' (a : ZMod n) (k : ℕ) : (cast (a ^ k : ZMod n) : R) = (cast a : R) ^ k 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [CharP R n] (a : ZMod n) (k : ℕ)
Goal: (a ^ k).cast = a.cast ^ k
-- ZMod.cast_natCast'
@[simp, norm_cast]
theorem cast_natCast' (k : ℕ) : (cast (k : ZMod n) : R) = k 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [CharP R n] (k : ℕ)
Goal: (↑k).cast = ↑k
-- ZMod.cast_intCast'
@[simp, norm_cast]
theorem cast_intCast' (k : ℤ) : (cast (k : ZMod n) : R) = k 
Arguments: {n : ℕ} {R : Type u_1} [Ring R] [CharP R n] (k : ℤ)
Goal: (↑k).cast = ↑k
-- ZMod.castHom_injective
theorem castHom_injective : Function.Injective (ZMod.castHom (dvd_refl n) R) 
Arguments: {n : ℕ} (R : Type u_1) [Ring R] [CharP R n]
Goal: Function.Injective ⇑(ZMod.castHom ⋯ R)
-- ZMod.castHom_bijective
theorem castHom_bijective [Fintype R] (h : Fintype.card R = n) :
    Function.Bijective (ZMod.castHom (dvd_refl n) R) 
Arguments: {n : ℕ} (R : Type u_1) [Ring R] [CharP R n] [Fintype R] (h : Fintype.card R = n)
Goal: Function.Bijective ⇑(ZMod.castHom ⋯ R)
-- ZMod.ringEquivOfPrime_eq_ringEquiv
@[simp]
lemma ringEquivOfPrime_eq_ringEquiv [Fintype R] {p : ℕ} [CharP R p] (hp : p.Prime)
    (hR : Fintype.card R = p) : ringEquivOfPrime R hp hR = ringEquiv R hR 
Arguments: (R : Type u_1) [Ring R] [Fintype R] {p : ℕ} [CharP R p] (hp : Nat.Prime p) (hR : Fintype.card R = p)
Goal: ZMod.ringEquivOfPrime R hp hR = ZMod.ringEquiv R hR
-- ZMod.ringEquivCongr_refl
@[simp] lemma ringEquivCongr_refl (a : ℕ) : ringEquivCongr (rfl : a = a) = .refl _ 
Arguments: (a : ℕ)
Goal: ZMod.ringEquivCongr ⋯ = RingEquiv.refl (ZMod a)
-- ZMod.ringEquivCongr_refl_apply
lemma ringEquivCongr_refl_apply {a : ℕ} (x : ZMod a) : ringEquivCongr rfl x = x 
Arguments: {a : ℕ} (x : ZMod a)
Goal: (ZMod.ringEquivCongr ⋯) x = x
-- ZMod.ringEquivCongr_symm
lemma ringEquivCongr_symm {a b : ℕ} (hab : a = b) :
    (ringEquivCongr hab).symm = ringEquivCongr hab.symm 
Arguments: {a b : ℕ} (hab : a = b)
Goal: (ZMod.ringEquivCongr hab).symm = ZMod.ringEquivCongr ⋯
-- ZMod.ringEquivCongr_trans
lemma ringEquivCongr_trans {a b c : ℕ} (hab : a = b) (hbc : b = c) :
    (ringEquivCongr hab).trans (ringEquivCongr hbc) = ringEquivCongr (hab.trans hbc) 
Arguments: {a b c : ℕ} (hab : a = b) (hbc : b = c)
Goal: (ZMod.ringEquivCongr hab).trans (ZMod.ringEquivCongr hbc) = ZMod.ringEquivCongr ⋯
-- ZMod.ringEquivCongr_ringEquivCongr_apply
lemma ringEquivCongr_ringEquivCongr_apply {a b c : ℕ} (hab : a = b) (hbc : b = c) (x : ZMod a) :
    ringEquivCongr hbc (ringEquivCongr hab x) = ringEquivCongr (hab.trans hbc) x 
Arguments: {a b c : ℕ} (hab : a = b) (hbc : b = c) (x : ZMod a)
Goal: (ZMod.ringEquivCongr hbc) ((ZMod.ringEquivCongr hab) x) = (ZMod.ringEquivCongr ⋯) x
-- ZMod.ringEquivCongr_val
lemma ringEquivCongr_val {a b : ℕ} (h : a = b) (x : ZMod a) :
    ZMod.val ((ZMod.ringEquivCongr h) x) = ZMod.val x 
Arguments: {a b : ℕ} (h : a = b) (x : ZMod a)
Goal: ((ZMod.ringEquivCongr h) x).val = x.val
-- ZMod.ringEquivCongr_intCast
lemma ringEquivCongr_intCast {a b : ℕ} (h : a = b) (z : ℤ) :
    ZMod.ringEquivCongr h z = z 
Arguments: {a b : ℕ} (h : a = b) (z : ℤ)
Goal: (ZMod.ringEquivCongr h) ↑z = ↑z
-- ZMod.intCast_eq_intCast_iff
theorem intCast_eq_intCast_iff (a b : ℤ) (c : ℕ) : (a : ZMod c) = (b : ZMod c) ↔ a ≡ b [ZMOD c] 
Arguments: (a b : ℤ) (c : ℕ)
Goal: ↑a = ↑b ↔ a ≡ b [ZMOD ↑c]
-- ZMod.intCast_eq_intCast_iff'
theorem intCast_eq_intCast_iff' (a b : ℤ) (c : ℕ) : (a : ZMod c) = (b : ZMod c) ↔ a % c = b % c 
Arguments: (a b : ℤ) (c : ℕ)
Goal: ↑a = ↑b ↔ a % ↑c = b % ↑c
-- ZMod.natCast_eq_natCast_iff
theorem natCast_eq_natCast_iff (a b c : ℕ) : (a : ZMod c) = (b : ZMod c) ↔ a ≡ b [MOD c] 
Arguments: (a b c : ℕ)
Goal: ↑a = ↑b ↔ a ≡ b [MOD c]
-- ZMod.natCast_eq_natCast_iff'
theorem natCast_eq_natCast_iff' (a b c : ℕ) : (a : ZMod c) = (b : ZMod c) ↔ a % c = b % c 
Arguments: (a b c : ℕ)
Goal: ↑a = ↑b ↔ a % c = b % c
-- ZMod.intCast_zmod_eq_zero_iff_dvd
theorem intCast_zmod_eq_zero_iff_dvd (a : ℤ) (b : ℕ) : (a : ZMod b) = 0 ↔ (b : ℤ) ∣ a 
Arguments: (a : ℤ) (b : ℕ)
Goal: ↑a = 0 ↔ ↑b ∣ a
-- ZMod.intCast_eq_intCast_iff_dvd_sub
theorem intCast_eq_intCast_iff_dvd_sub (a b : ℤ) (c : ℕ) : (a : ZMod c) = ↑b ↔ ↑c ∣ b - a 
Arguments: (a b : ℤ) (c : ℕ)
Goal: ↑a = ↑b ↔ ↑c ∣ b - a
-- ZMod.natCast_zmod_eq_zero_iff_dvd
theorem natCast_zmod_eq_zero_iff_dvd (a b : ℕ) : (a : ZMod b) = 0 ↔ b ∣ a 
Arguments: (a b : ℕ)
Goal: ↑a = 0 ↔ b ∣ a
-- ZMod.val_intCast
theorem val_intCast {n : ℕ} (a : ℤ) [NeZero n] : ↑(a : ZMod n).val = a % n 
Arguments: {n : ℕ} (a : ℤ) [NeZero n]
Goal: ↑(↑a).val = a % ↑n
-- ZMod.coe_intCast
theorem coe_intCast (a : ℤ) : cast (a : ZMod n) = a % n 
Arguments: {n : ℕ} (a : ℤ)
Goal: (↑a).cast = a % ↑n
-- ZMod.intCast_cast_add
lemma intCast_cast_add (x y : ZMod n) : (cast (x + y) : ℤ) = (cast x + cast y) % n 
Arguments: {n : ℕ} (x y : ZMod n)
Goal: (x + y).cast = (x.cast + y.cast) % ↑n
-- ZMod.intCast_cast_mul
lemma intCast_cast_mul (x y : ZMod n) : (cast (x * y) : ℤ) = cast x * cast y % n 
Arguments: {n : ℕ} (x y : ZMod n)
Goal: (x * y).cast = x.cast * y.cast % ↑n
-- ZMod.intCast_cast_sub
lemma intCast_cast_sub (x y : ZMod n) : (cast (x - y) : ℤ) = (cast x - cast y) % n 
Arguments: {n : ℕ} (x y : ZMod n)
Goal: (x - y).cast = (x.cast - y.cast) % ↑n
-- ZMod.intCast_cast_neg
lemma intCast_cast_neg (x : ZMod n) : (cast (-x) : ℤ) = -cast x % n 
Arguments: {n : ℕ} (x : ZMod n)
Goal: (-x).cast = -x.cast % ↑n
-- ZMod.val_neg_one
@[simp]
theorem val_neg_one (n : ℕ) : (-1 : ZMod n.succ).val = n 
Arguments: (n : ℕ)
Goal: (-1).val = n
-- ZMod.cast_neg_one
theorem cast_neg_one {R : Type*} [Ring R] (n : ℕ) : cast (-1 : ZMod n) = (n - 1 : R) 
Arguments: {R : Type u_1} [Ring R] (n : ℕ)
Goal: (-1).cast = ↑n - 1
-- ZMod.cast_sub_one
theorem cast_sub_one {R : Type*} [Ring R] {n : ℕ} (k : ZMod n) :
    (cast (k - 1 : ZMod n) : R) = (if k = 0 then (n : R) else cast k) - 1 
Arguments: {R : Type u_1} [Ring R] {n : ℕ} (k : ZMod n)
Goal: (k - 1).cast = (if k = 0 then ↑n else k.cast) - 1
-- ZMod.natCast_eq_iff
theorem natCast_eq_iff (p : ℕ) (n : ℕ) (z : ZMod p) [NeZero p] :
    ↑n = z ↔ ∃ k, n = z.val + p * k 
Arguments: (p n : ℕ) (z : ZMod p) [NeZero p]
Goal: ↑n = z ↔ ∃ k, n = z.val + p * k
-- ZMod.intCast_eq_iff
theorem intCast_eq_iff (p : ℕ) (n : ℤ) (z : ZMod p) [NeZero p] :
    ↑n = z ↔ ∃ k, n = z.val + p * k 
Arguments: (p : ℕ) (n : ℤ) (z : ZMod p) [NeZero p]
Goal: ↑n = z ↔ ∃ k, n = ↑z.val + ↑p * k
-- ZMod.intCast_mod
@[push_cast, simp]
theorem intCast_mod (a : ℤ) (b : ℕ) : ((a % b : ℤ) : ZMod b) = (a : ZMod b) 
Arguments: (a : ℤ) (b : ℕ)
Goal: ↑(a % ↑b) = ↑a
-- ZMod.ker_intCastAddHom
theorem ker_intCastAddHom (n : ℕ) :
    (Int.castAddHom (ZMod n)).ker = AddSubgroup.zmultiples (n : ℤ) 
Arguments: (n : ℕ)
Goal: (Int.castAddHom (ZMod n)).ker = AddSubgroup.zmultiples ↑n
-- ZMod.cast_injective_of_le
theorem cast_injective_of_le {m n : ℕ} [nzm : NeZero m] (h : m ≤ n) :
    Function.Injective (@cast (ZMod n) _ m) 
Arguments: {m n : ℕ} [nzm : NeZero m] (h : m ≤ n)
Goal: Function.Injective ZMod.cast
-- ZMod.cast_zmod_eq_zero_iff_of_le
theorem cast_zmod_eq_zero_iff_of_le {m n : ℕ} [NeZero m] (h : m ≤ n) (a : ZMod m) :
    (cast a : ZMod n) = 0 ↔ a = 0 
Arguments: {m n : ℕ} [NeZero m] (h : m ≤ n) (a : ZMod m)
Goal: a.cast = 0 ↔ a = 0
-- ZMod.natCast_toNat
@[simp]
theorem natCast_toNat (p : ℕ) : ∀ {z : ℤ} (_h : 0 ≤ z), (z.toNat : ZMod p) = z
  
Arguments: (p : ℕ) {z : ℤ} (_h : 0 ≤ z)
Goal: ↑z.toNat = ↑z
-- ZMod.val_injective
theorem val_injective (n : ℕ) [NeZero n] : Function.Injective (val : ZMod n → ℕ) 
Arguments: (n : ℕ) [NeZero n]
Goal: Function.Injective ZMod.val
-- ZMod.val_one_eq_one_mod
theorem val_one_eq_one_mod (n : ℕ) : (1 : ZMod n).val = 1 % n 
Arguments: (n : ℕ)
Goal: ZMod.val 1 = 1 % n
-- ZMod.val_one
theorem val_one (n : ℕ) [Fact (1 < n)] : (1 : ZMod n).val = 1 
Arguments: (n : ℕ) [Fact (1 < n)]
Goal: ZMod.val 1 = 1
-- ZMod.val_one''
lemma val_one'' : ∀ {n}, n ≠ 1 → (1 : ZMod n).val = 1
  
Arguments: {n : ℕ}
Goal: n ≠ 1 → ZMod.val 1 = 1
-- ZMod.val_add
theorem val_add {n : ℕ} [NeZero n] (a b : ZMod n) : (a + b).val = (a.val + b.val) % n 
Arguments: {n : ℕ} [NeZero n] (a b : ZMod n)
Goal: (a + b).val = (a.val + b.val) % n
-- ZMod.val_add_of_lt
theorem val_add_of_lt {n : ℕ} {a b : ZMod n} (h : a.val + b.val < n) :
    (a + b).val = a.val + b.val 
Arguments: {n : ℕ} {a b : ZMod n} (h : a.val + b.val < n)
Goal: (a + b).val = a.val + b.val
-- ZMod.val_add_val_of_le
theorem val_add_val_of_le {n : ℕ} [NeZero n] {a b : ZMod n} (h : n ≤ a.val + b.val) :
    a.val + b.val = (a + b).val + n 
Arguments: {n : ℕ} [NeZero n] {a b : ZMod n} (h : n ≤ a.val + b.val)
Goal: a.val + b.val = (a + b).val + n
-- ZMod.val_add_of_le
theorem val_add_of_le {n : ℕ} [NeZero n] {a b : ZMod n} (h : n ≤ a.val + b.val) :
    (a + b).val = a.val + b.val - n 
Arguments: {n : ℕ} [NeZero n] {a b : ZMod n} (h : n ≤ a.val + b.val)
Goal: (a + b).val = a.val + b.val - n
-- ZMod.val_add_le
theorem val_add_le {n : ℕ} (a b : ZMod n) : (a + b).val ≤ a.val + b.val 
Arguments: {n : ℕ} (a b : ZMod n)
Goal: (a + b).val ≤ a.val + b.val
-- ZMod.val_mul
theorem val_mul {n : ℕ} (a b : ZMod n) : (a * b).val = a.val * b.val % n 
Arguments: {n : ℕ} (a b : ZMod n)
Goal: (a * b).val = a.val * b.val % n
-- ZMod.val_mul_le
theorem val_mul_le {n : ℕ} (a b : ZMod n) : (a * b).val ≤ a.val * b.val 
Arguments: {n : ℕ} (a b : ZMod n)
Goal: (a * b).val ≤ a.val * b.val
-- ZMod.val_mul_of_lt
theorem val_mul_of_lt {n : ℕ} {a b : ZMod n} (h : a.val * b.val < n) :
    (a * b).val = a.val * b.val 
Arguments: {n : ℕ} {a b : ZMod n} (h : a.val * b.val < n)
Goal: (a * b).val = a.val * b.val
-- ZMod.inv_zero
@[nolint unusedHavesSuffices]
theorem inv_zero : ∀ n : ℕ, (0 : ZMod n)⁻¹ = 0
  
Arguments: (n : ℕ)
Goal: 0⁻¹ = 0
-- ZMod.mul_inv_eq_gcd
theorem mul_inv_eq_gcd {n : ℕ} (a : ZMod n) : a * a⁻¹ = Nat.gcd a.val n 
Arguments: {n : ℕ} (a : ZMod n)
Goal: a * a⁻¹ = ↑(a.val.gcd n)
-- ZMod.inv_one
@[simp] protected lemma inv_one (n : ℕ) : (1⁻¹ : ZMod n) = 1 
Arguments: (n : ℕ)
Goal: 1⁻¹ = 1
-- ZMod.natCast_mod
@[simp]
theorem natCast_mod (a : ℕ) (n : ℕ) : ((a % n : ℕ) : ZMod n) = a 
Arguments: (a n : ℕ)
Goal: ↑(a % n) = ↑a
-- ZMod.eq_iff_modEq_nat
theorem eq_iff_modEq_nat (n : ℕ) {a b : ℕ} : (a : ZMod n) = b ↔ a ≡ b [MOD n] 
Arguments: (n : ℕ) {a b : ℕ}
Goal: ↑a = ↑b ↔ a ≡ b [MOD n]
-- ZMod.coe_mul_inv_eq_one
theorem coe_mul_inv_eq_one {n : ℕ} (x : ℕ) (h : Nat.Coprime x n) :
    ((x : ZMod n) * (x : ZMod n)⁻¹) = 1 
Arguments: {n : ℕ} (x : ℕ) (h : x.Coprime n)
Goal: ↑x * (↑x)⁻¹ = 1
-- ZMod.mul_val_inv
lemma mul_val_inv (hmn : m.Coprime n) : (m * (m⁻¹ : ZMod n).val : ZMod n) = 1 
Arguments: {m n : ℕ} (hmn : m.Coprime n)
Goal: ↑m * ↑(↑m)⁻¹.val = 1
-- ZMod.val_inv_mul
lemma val_inv_mul (hmn : m.Coprime n) : ((m⁻¹ : ZMod n).val * m : ZMod n) = 1 
Arguments: {m n : ℕ} (hmn : m.Coprime n)
Goal: ↑(↑m)⁻¹.val * ↑m = 1
-- ZMod.coe_unitOfCoprime
@[simp]
theorem coe_unitOfCoprime {n : ℕ} (x : ℕ) (h : Nat.Coprime x n) :
    (unitOfCoprime x h : ZMod n) = x 
Arguments: {n : ℕ} (x : ℕ) (h : x.Coprime n)
Goal: ↑(ZMod.unitOfCoprime x h) = ↑x
-- ZMod.val_coe_unit_coprime
theorem val_coe_unit_coprime {n : ℕ} (u : (ZMod n)ˣ) : Nat.Coprime (u : ZMod n).val n 
Arguments: {n : ℕ} (u : (ZMod n)ˣ)
Goal: (↑u).val.Coprime n
-- ZMod.isUnit_iff_coprime
lemma isUnit_iff_coprime (m n : ℕ) : IsUnit (m : ZMod n) ↔ m.Coprime n 
Arguments: (m n : ℕ)
Goal: IsUnit ↑m ↔ m.Coprime n
-- ZMod.isUnit_prime_iff_not_dvd
lemma isUnit_prime_iff_not_dvd {n p : ℕ} (hp : p.Prime) : IsUnit (p : ZMod n) ↔ ¬p ∣ n 
Arguments: {n p : ℕ} (hp : Nat.Prime p)
Goal: IsUnit ↑p ↔ ¬p ∣ n
-- ZMod.isUnit_prime_of_not_dvd
lemma isUnit_prime_of_not_dvd {n p : ℕ} (hp : p.Prime) (h : ¬ p ∣ n) : IsUnit (p : ZMod n) 
Arguments: {n p : ℕ} (hp : Nat.Prime p) (h : ¬p ∣ n)
Goal: IsUnit ↑p
-- ZMod.inv_coe_unit
@[simp]
theorem inv_coe_unit {n : ℕ} (u : (ZMod n)ˣ) : (u : ZMod n)⁻¹ = (u⁻¹ : (ZMod n)ˣ) 
Arguments: {n : ℕ} (u : (ZMod n)ˣ)
Goal: (↑u)⁻¹ = ↑u⁻¹
-- ZMod.mul_inv_of_unit
theorem mul_inv_of_unit {n : ℕ} (a : ZMod n) (h : IsUnit a) : a * a⁻¹ = 1 
Arguments: {n : ℕ} (a : ZMod n) (h : IsUnit a)
Goal: a * a⁻¹ = 1
-- ZMod.inv_mul_of_unit
theorem inv_mul_of_unit {n : ℕ} (a : ZMod n) (h : IsUnit a) : a⁻¹ * a = 1 
Arguments: {n : ℕ} (a : ZMod n) (h : IsUnit a)
Goal: a⁻¹ * a = 1
-- ZMod.inv_eq_of_mul_eq_one
protected theorem inv_eq_of_mul_eq_one (n : ℕ) (a b : ZMod n) (h : a * b = 1) : a⁻¹ = b 
Arguments: (n : ℕ) (a b : ZMod n) (h : a * b = 1)
Goal: a⁻¹ = b
-- ZMod.subsingleton_iff
lemma subsingleton_iff {n : ℕ} : Subsingleton (ZMod n) ↔ n = 1 
Arguments: {n : ℕ}
Goal: Subsingleton (ZMod n) ↔ n = 1
-- ZMod.nontrivial_iff
lemma nontrivial_iff {n : ℕ} : Nontrivial (ZMod n) ↔ n ≠ 1 
Arguments: {n : ℕ}
Goal: Nontrivial (ZMod n) ↔ n ≠ 1
-- ZMod.add_self_eq_zero_iff_eq_zero
@[simp]
theorem add_self_eq_zero_iff_eq_zero {n : ℕ} (hn : Odd n) {a : ZMod n} :
    a + a = 0 ↔ a = 0 
Arguments: {n : ℕ} (hn : Odd n) {a : ZMod n}
Goal: a + a = 0 ↔ a = 0
-- ZMod.ne_neg_self
theorem ne_neg_self {n : ℕ} (hn : Odd n) {a : ZMod n} (ha : a ≠ 0) : a ≠ -a 
Arguments: {n : ℕ} (hn : Odd n) {a : ZMod n} (ha : a ≠ 0)
Goal: a ≠ -a
-- ZMod.neg_one_ne_one
theorem neg_one_ne_one {n : ℕ} [Fact (2 < n)] : (-1 : ZMod n) ≠ 1 
Arguments: {n : ℕ} [Fact (2 < n)]
Goal: -1 ≠ 1
-- ZMod.neg_eq_self_mod_two
theorem neg_eq_self_mod_two (a : ZMod 2) : -a = a 
Arguments: (a : ZMod 2)
Goal: -a = a
-- ZMod.natAbs_mod_two
@[simp]
theorem natAbs_mod_two (a : ℤ) : (a.natAbs : ZMod 2) = a 
Arguments: (a : ℤ)
Goal: ↑a.natAbs = ↑a
-- ZMod.val_eq_zero
@[simp]
theorem val_eq_zero : ∀ {n : ℕ} (a : ZMod n), a.val = 0 ↔ a = 0
  
Arguments: {n : ℕ} (a : ZMod n)
Goal: a.val = 0 ↔ a = 0
-- ZMod.val_ne_zero
theorem val_ne_zero {n : ℕ} (a : ZMod n) : a.val ≠ 0 ↔ a ≠ 0 
Arguments: {n : ℕ} (a : ZMod n)
Goal: a.val ≠ 0 ↔ a ≠ 0
-- ZMod.neg_eq_self_iff
theorem neg_eq_self_iff {n : ℕ} (a : ZMod n) : -a = a ↔ a = 0 ∨ 2 * a.val = n 
Arguments: {n : ℕ} (a : ZMod n)
Goal: -a = a ↔ a = 0 ∨ 2 * a.val = n
-- ZMod.val_cast_of_lt
theorem val_cast_of_lt {n : ℕ} {a : ℕ} (h : a < n) : (a : ZMod n).val = a 
Arguments: {n a : ℕ} (h : a < n)
Goal: (↑a).val = a
-- ZMod.neg_val'
theorem neg_val' {n : ℕ} [NeZero n] (a : ZMod n) : (-a).val = (n - a.val) % n 
Arguments: {n : ℕ} [NeZero n] (a : ZMod n)
Goal: (-a).val = (n - a.val) % n
-- ZMod.neg_val
theorem neg_val {n : ℕ} [NeZero n] (a : ZMod n) : (-a).val = if a = 0 then 0 else n - a.val 
Arguments: {n : ℕ} [NeZero n] (a : ZMod n)
Goal: (-a).val = if a = 0 then 0 else n - a.val
-- ZMod.val_neg_of_ne_zero
theorem val_neg_of_ne_zero {n : ℕ} [nz : NeZero n] (a : ZMod n) [na : NeZero a] :
    (- a).val = n - a.val 
Arguments: {n : ℕ} [nz : NeZero n] (a : ZMod n) [na : NeZero a]
Goal: (-a).val = n - a.val
-- ZMod.val_sub
theorem val_sub {n : ℕ} [NeZero n] {a b : ZMod n} (h : b.val ≤ a.val) :
    (a - b).val = a.val - b.val 
Arguments: {n : ℕ} [NeZero n] {a b : ZMod n} (h : b.val ≤ a.val)
Goal: (a - b).val = a.val - b.val
-- ZMod.val_cast_eq_val_of_lt
theorem val_cast_eq_val_of_lt {m n : ℕ} [nzm : NeZero m] {a : ZMod m}
    (h : a.val < n) : (a.cast : ZMod n).val = a.val 
Arguments: {m n : ℕ} [nzm : NeZero m] {a : ZMod m} (h : a.val < n)
Goal: a.cast.val = a.val
-- ZMod.cast_cast_zmod_of_le
theorem cast_cast_zmod_of_le {m n : ℕ} [hm : NeZero m] (h : m ≤ n) (a : ZMod m) :
    (cast (cast a : ZMod n) : ZMod m) = a 
Arguments: {m n : ℕ} [hm : NeZero m] (h : m ≤ n) (a : ZMod m)
Goal: a.cast.cast = a
-- ZMod.valMinAbs_def_zero
@[simp]
theorem valMinAbs_def_zero (x : ZMod 0) : valMinAbs x = x 
Arguments: (x : ZMod 0)
Goal: x.valMinAbs = x
-- ZMod.valMinAbs_def_pos
theorem valMinAbs_def_pos {n : ℕ} [NeZero n] (x : ZMod n) :
    valMinAbs x = if x.val ≤ n / 2 then (x.val : ℤ) else x.val - n 
Arguments: {n : ℕ} [NeZero n] (x : ZMod n)
Goal: x.valMinAbs = if x.val ≤ n / 2 then ↑x.val else ↑x.val - ↑n
-- ZMod.coe_valMinAbs
@[simp, norm_cast]
theorem coe_valMinAbs : ∀ {n : ℕ} (x : ZMod n), (x.valMinAbs : ZMod n) = x
  
Arguments: {n : ℕ} (x : ZMod n)
Goal: ↑x.valMinAbs = x
-- ZMod.injective_valMinAbs
theorem injective_valMinAbs {n : ℕ} : (valMinAbs : ZMod n → ℤ).Injective 
Arguments: {n : ℕ}
Goal: Function.Injective ZMod.valMinAbs
-- Nat.le_div_two_iff_mul_two_le
theorem _root_.Nat.le_div_two_iff_mul_two_le {n m : ℕ} : m ≤ n / 2 ↔ (m : ℤ) * 2 ≤ n 
Arguments: {n m : ℕ}
Goal: m ≤ n / 2 ↔ ↑m * 2 ≤ ↑n
-- ZMod.valMinAbs_nonneg_iff
theorem valMinAbs_nonneg_iff {n : ℕ} [NeZero n] (x : ZMod n) : 0 ≤ x.valMinAbs ↔ x.val ≤ n / 2 
Arguments: {n : ℕ} [NeZero n] (x : ZMod n)
Goal: 0 ≤ x.valMinAbs ↔ x.val ≤ n / 2
-- ZMod.valMinAbs_mul_two_eq_iff
theorem valMinAbs_mul_two_eq_iff {n : ℕ} (a : ZMod n) : a.valMinAbs * 2 = n ↔ 2 * a.val = n 
Arguments: {n : ℕ} (a : ZMod n)
Goal: a.valMinAbs * 2 = ↑n ↔ 2 * a.val = n
-- ZMod.valMinAbs_mem_Ioc
theorem valMinAbs_mem_Ioc {n : ℕ} [NeZero n] (x : ZMod n) :
    x.valMinAbs * 2 ∈ Set.Ioc (-n : ℤ) n 
Arguments: {n : ℕ} [NeZero n] (x : ZMod n)
Goal: x.valMinAbs * 2 ∈ Set.Ioc (-↑n) ↑n
-- ZMod.valMinAbs_spec
theorem valMinAbs_spec {n : ℕ} [NeZero n] (x : ZMod n) (y : ℤ) :
    x.valMinAbs = y ↔ x = y ∧ y * 2 ∈ Set.Ioc (-n : ℤ) n 
Arguments: {n : ℕ} [NeZero n] (x : ZMod n) (y : ℤ)
Goal: x.valMinAbs = y ↔ x = ↑y ∧ y * 2 ∈ Set.Ioc (-↑n) ↑n
-- ZMod.natAbs_valMinAbs_le
theorem natAbs_valMinAbs_le {n : ℕ} [NeZero n] (x : ZMod n) : x.valMinAbs.natAbs ≤ n / 2 
Arguments: {n : ℕ} [NeZero n] (x : ZMod n)
Goal: x.valMinAbs.natAbs ≤ n / 2
-- ZMod.valMinAbs_zero
@[simp]
theorem valMinAbs_zero : ∀ n, (0 : ZMod n).valMinAbs = 0
  
Arguments: (n : ℕ)
Goal: ZMod.valMinAbs 0 = 0
-- ZMod.valMinAbs_eq_zero
@[simp]
theorem valMinAbs_eq_zero {n : ℕ} (x : ZMod n) : x.valMinAbs = 0 ↔ x = 0 
Arguments: {n : ℕ} (x : ZMod n)
Goal: x.valMinAbs = 0 ↔ x = 0
-- ZMod.natCast_natAbs_valMinAbs
theorem natCast_natAbs_valMinAbs {n : ℕ} [NeZero n] (a : ZMod n) :
    (a.valMinAbs.natAbs : ZMod n) = if a.val ≤ (n : ℕ) / 2 then a else -a 
Arguments: {n : ℕ} [NeZero n] (a : ZMod n)
Goal: ↑a.valMinAbs.natAbs = if a.val ≤ n / 2 then a else -a
-- ZMod.valMinAbs_neg_of_ne_half
theorem valMinAbs_neg_of_ne_half {n : ℕ} {a : ZMod n} (ha : 2 * a.val ≠ n) :
    (-a).valMinAbs = -a.valMinAbs 
Arguments: {n : ℕ} {a : ZMod n} (ha : 2 * a.val ≠ n)
Goal: (-a).valMinAbs = -a.valMinAbs
-- ZMod.natAbs_valMinAbs_neg
@[simp]
theorem natAbs_valMinAbs_neg {n : ℕ} (a : ZMod n) : (-a).valMinAbs.natAbs = a.valMinAbs.natAbs 
Arguments: {n : ℕ} (a : ZMod n)
Goal: (-a).valMinAbs.natAbs = a.valMinAbs.natAbs
-- ZMod.val_eq_ite_valMinAbs
theorem val_eq_ite_valMinAbs {n : ℕ} [NeZero n] (a : ZMod n) :
    (a.val : ℤ) = a.valMinAbs + if a.val ≤ n / 2 then 0 else n 
Arguments: {n : ℕ} [NeZero n] (a : ZMod n)
Goal: ↑a.val = a.valMinAbs + ↑(if a.val ≤ n / 2 then 0 else n)
-- ZMod.prime_ne_zero
theorem prime_ne_zero (p q : ℕ) [hp : Fact p.Prime] [hq : Fact q.Prime] (hpq : p ≠ q) :
    (q : ZMod p) ≠ 0 
Arguments: (p q : ℕ) [hp : Fact (Nat.Prime p)] [hq : Fact (Nat.Prime q)] (hpq : p ≠ q)
Goal: ↑q ≠ 0
-- ZMod.valMinAbs_natAbs_eq_min
theorem valMinAbs_natAbs_eq_min {n : ℕ} [hpos : NeZero n] (a : ZMod n) :
    a.valMinAbs.natAbs = min a.val (n - a.val) 
Arguments: {n : ℕ} [hpos : NeZero n] (a : ZMod n)
Goal: a.valMinAbs.natAbs = min a.val (n - a.val)
-- ZMod.valMinAbs_natCast_of_le_half
theorem valMinAbs_natCast_of_le_half (ha : a ≤ n / 2) : (a : ZMod n).valMinAbs = a 
Arguments: {n a : ℕ} (ha : a ≤ n / 2)
Goal: (↑a).valMinAbs = ↑a
-- ZMod.valMinAbs_natCast_of_half_lt
theorem valMinAbs_natCast_of_half_lt (ha : n / 2 < a) (ha' : a < n) :
    (a : ZMod n).valMinAbs = a - n 
Arguments: {n a : ℕ} (ha : n / 2 < a) (ha' : a < n)
Goal: (↑a).valMinAbs = ↑a - ↑n
-- ZMod.valMinAbs_natCast_eq_self
@[simp]
theorem valMinAbs_natCast_eq_self [NeZero n] : (a : ZMod n).valMinAbs = a ↔ a ≤ n / 2 
Arguments: {n a : ℕ} [NeZero n]
Goal: (↑a).valMinAbs = ↑a ↔ a ≤ n / 2