ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/Data/Multiset/Sort.lean

full_name: Multiset.sort
code: /-- `sort s` constructs a sorted list from the multiset `s`.
  (Uses merge sort algorithm.) -/
def sort (s : Multiset α) : List α 
goal: List α

full_name: Multiset.coe_sort
code: @[simp]
theorem coe_sort (l : List α) : sort r l = mergeSort r l 
goal: Multiset.sort r ↑l = List.mergeSort r l

full_name: Multiset.sort_sorted
code: @[simp]
theorem sort_sorted (s : Multiset α) : Sorted r (sort r s) 
goal: List.Sorted r (Multiset.sort r s)

full_name: Multiset.sort_eq
code: @[simp]
theorem sort_eq (s : Multiset α) : ↑(sort r s) = s 
goal: ↑(Multiset.sort r s) = s

full_name: Multiset.mem_sort
code: @[simp]
theorem mem_sort {s : Multiset α} {a : α} : a ∈ sort r s ↔ a ∈ s 
goal: a ∈ Multiset.sort r s ↔ a ∈ s

full_name: Multiset.length_sort
code: @[simp]
theorem length_sort {s : Multiset α} : (sort r s).length = card s 
goal: (Multiset.sort r s).length = Multiset.card s

full_name: Multiset.sort_zero
code: @[simp]
theorem sort_zero : sort r 0 = [] 
goal: Multiset.sort r 0 = []

full_name: Multiset.sort_singleton
code: @[simp]
theorem sort_singleton (a : α) : sort r {a} = [a] 
goal: Multiset.sort r {a} = [a]

full_name: Multiset.instRepr
code: unsafe instance [Repr α] : Repr (Multiset α) 
goal: Repr (Multiset α)
File: Mathlib/Data/Multiset/Functor.lean

full_name: Multiset.functor
code: instance functor : Functor Multiset 
goal: Functor Multiset

full_name: Multiset.fmap_def
code: @[simp]
theorem fmap_def {α' β'} {s : Multiset α'} (f : α' → β') : f <$> s = s.map f 
goal: f <$> s = Multiset.map f s

full_name: Multiset.instLawfulFunctor
code: instance : LawfulFunctor Multiset 
goal: LawfulFunctor Multiset

full_name: Multiset.traverse
code: /-- Map each element of a `Multiset` to an action, evaluate these actions in order,
    and collect the results.
-/
def traverse : Multiset α' → F (Multiset β') 
goal: Multiset α' → F (Multiset β')

full_name: Multiset.instMonad
code: instance : Monad Multiset 
goal: Monad Multiset

full_name: Multiset.pure_def
code: @[simp]
theorem pure_def {α} : (pure : α → Multiset α) = singleton 
goal: pure = singleton

full_name: Multiset.bind_def
code: @[simp]
theorem bind_def {α β} : (· >>= ·) = @bind α β 
goal: (fun x x_1 => x >>= x_1) = Multiset.bind

full_name: Multiset.instLawfulMonad
code: instance : LawfulMonad Multiset 
goal: LawfulMonad Multiset

full_name: Multiset.map_comp_coe
code: @[simp]
theorem map_comp_coe {α β} (h : α → β) :
    Functor.map h ∘ Coe.coe = (Coe.coe ∘ Functor.map h : List α → Multiset β) 
goal: Functor.map h ∘ Coe.coe = Coe.coe ∘ Functor.map h

full_name: Multiset.id_traverse
code: theorem id_traverse {α : Type*} (x : Multiset α) : traverse (pure : α → Id α) x = x 
goal: Multiset.traverse pure x = x

full_name: Multiset.comp_traverse
code: theorem comp_traverse {G H : Type _ → Type _} [Applicative G] [Applicative H] [CommApplicative G]
    [CommApplicative H] {α β γ : Type _} (g : α → G β) (h : β → H γ) (x : Multiset α) :
    traverse (Comp.mk ∘ Functor.map h ∘ g) x =
    Comp.mk (Functor.map (traverse h) (traverse g x)) 
goal: Multiset.traverse (Functor.Comp.mk ∘ Functor.map h ∘ g) x =
  Functor.Comp.mk (Multiset.traverse h <$> Multiset.traverse g x)

full_name: Multiset.map_traverse
code: theorem map_traverse {G : Type* → Type _} [Applicative G] [CommApplicative G] {α β γ : Type _}
    (g : α → G β) (h : β → γ) (x : Multiset α) :
    Functor.map (Functor.map h) (traverse g x) = traverse (Functor.map h ∘ g) x 
goal: Functor.map h <$> Multiset.traverse g x = Multiset.traverse (Functor.map h ∘ g) x

full_name: Multiset.traverse_map
code: theorem traverse_map {G : Type* → Type _} [Applicative G] [CommApplicative G] {α β γ : Type _}
    (g : α → β) (h : β → G γ) (x : Multiset α) : traverse h (map g x) = traverse (h ∘ g) x 
goal: Multiset.traverse h (Multiset.map g x) = Multiset.traverse (h ∘ g) x

full_name: Multiset.naturality
code: theorem naturality {G H : Type _ → Type _} [Applicative G] [Applicative H] [CommApplicative G]
    [CommApplicative H] (eta : ApplicativeTransformation G H) {α β : Type _} (f : α → G β)
    (x : Multiset α) : eta (traverse f x) = traverse (@eta _ ∘ f) x 
goal: (fun {α} => eta.app α) (Multiset.traverse f x) = Multiset.traverse ((fun {α} => eta.app α) ∘ f) x
File: Mathlib/Data/Multiset/Sym.lean

full_name: Multiset.sym2
code: /-- `m.sym2` is the multiset of all unordered pairs of elements from `m`, with multiplicity.
If `m` has no duplicates then neither does `m.sym2`. -/
protected def sym2 (m : Multiset α) : Multiset (Sym2 α) 
goal: Multiset (Sym2 α)

full_name: Multiset.sym2_coe
code: @[simp] theorem sym2_coe (xs : List α) : (xs : Multiset α).sym2 = xs.sym2 
goal: (↑xs).sym2 = ↑xs.sym2

full_name: Multiset.sym2_eq_zero_iff
code: @[simp]
theorem sym2_eq_zero_iff {m : Multiset α} : m.sym2 = 0 ↔ m = 0 
goal: m.sym2 = 0 ↔ m = 0

full_name: Multiset.sym2_zero
code: @[simp]
theorem sym2_zero : (0 : Multiset α).sym2 = 0 
goal: Multiset.sym2 0 = 0

full_name: Multiset.sym2_cons
code: theorem sym2_cons (a : α) (m : Multiset α) :
    (m.cons a).sym2 = ((m.cons a).map <| fun b => s(a, b)) + m.sym2 
goal: (a ::ₘ m).sym2 = Multiset.map (fun b => s(a, b)) (a ::ₘ m) + m.sym2

full_name: Multiset.sym2_map
code: theorem sym2_map (f : α → β) (m : Multiset α) :
    (m.map f).sym2 = m.sym2.map (Sym2.map f) 
goal: (Multiset.map f m).sym2 = Multiset.map (Sym2.map f) m.sym2

full_name: Multiset.mk_mem_sym2_iff
code: theorem mk_mem_sym2_iff {m : Multiset α} {a b : α} :
    s(a, b) ∈ m.sym2 ↔ a ∈ m ∧ b ∈ m 
goal: s(a, b) ∈ m.sym2 ↔ a ∈ m ∧ b ∈ m

full_name: Multiset.mem_sym2_iff
code: theorem mem_sym2_iff {m : Multiset α} {z : Sym2 α} :
    z ∈ m.sym2 ↔ ∀ y ∈ z, y ∈ m 
goal: z ∈ m.sym2 ↔ ∀ y ∈ z, y ∈ m

full_name: Multiset.Nodup.sym2
code: protected theorem Nodup.sym2 {m : Multiset α} (h : m.Nodup) : m.sym2.Nodup 
goal: m.sym2.Nodup

full_name: Multiset.sym2_mono
code: @[simp, mono]
theorem sym2_mono {m m' : Multiset α} (h : m ≤ m') : m.sym2 ≤ m'.sym2 
goal: m.sym2 ≤ m'.sym2

full_name: Multiset.monotone_sym2
code: theorem monotone_sym2 : Monotone (Multiset.sym2 : Multiset α → _) 
goal: Monotone Multiset.sym2

full_name: Multiset.card_sym2
code: theorem card_sym2 {m : Multiset α} :
    Multiset.card m.sym2 = Nat.choose (Multiset.card m + 1) 2 
goal: Multiset.card m.sym2 = (Multiset.card m + 1).choose 2

full_name: Multiset.dedup_sym2
code: theorem dedup_sym2 [DecidableEq α] (m : Multiset α) : m.sym2.dedup = m.dedup.sym2 
goal: m.sym2.dedup = m.dedup.sym2
File: Mathlib/Data/Multiset/Interval.lean

full_name: Multiset.instLocallyFiniteOrder
code: instance instLocallyFiniteOrder : LocallyFiniteOrder (Multiset α) 
goal: LocallyFiniteOrder (Multiset α)

full_name: Multiset.Icc_eq
code: theorem Icc_eq :
    Finset.Icc s t = (Finset.Icc (toDFinsupp s) (toDFinsupp t)).map
      Multiset.equivDFinsupp.toEquiv.symm.toEmbedding 
goal: Finset.Icc s t =
  Finset.map Multiset.equivDFinsupp.symm.toEmbedding (Finset.Icc (Multiset.toDFinsupp s) (Multiset.toDFinsupp t))

full_name: Multiset.uIcc_eq
code: theorem uIcc_eq :
    uIcc s t =
      (uIcc (toDFinsupp s) (toDFinsupp t)).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding 
goal: Finset.uIcc s t =
  Finset.map Multiset.equivDFinsupp.symm.toEmbedding (Finset.uIcc (Multiset.toDFinsupp s) (Multiset.toDFinsupp t))

full_name: Multiset.card_Icc
code: theorem card_Icc :
    (Finset.Icc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) 
goal: (Finset.Icc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (Multiset.count i t + 1 - Multiset.count i s)

full_name: Multiset.card_Ico
code: theorem card_Ico :
    (Finset.Ico s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 
goal: (Finset.Ico s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (Multiset.count i t + 1 - Multiset.count i s) - 1

full_name: Multiset.card_Ioc
code: theorem card_Ioc :
    (Finset.Ioc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 
goal: (Finset.Ioc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (Multiset.count i t + 1 - Multiset.count i s) - 1

full_name: Multiset.card_Ioo
code: theorem card_Ioo :
    (Finset.Ioo s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 2 
goal: (Finset.Ioo s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (Multiset.count i t + 1 - Multiset.count i s) - 2

full_name: Multiset.card_uIcc
code: theorem card_uIcc :
    (uIcc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, ((t.count i - s.count i : ℤ).natAbs + 1) 
goal: (Finset.uIcc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, ((↑(Multiset.count i t) - ↑(Multiset.count i s)).natAbs + 1)

full_name: Multiset.card_Iic
code: theorem card_Iic : (Finset.Iic s).card = ∏ i ∈ s.toFinset, (s.count i + 1) 
goal: (Finset.Iic s).card = ∏ i ∈ s.toFinset, (Multiset.count i s + 1)
File: Mathlib/Data/ENat/Lattice.lean

full_name: instCompleteLinearOrderENat
code: noncomputable instance : CompleteLinearOrder ENat 
goal: CompleteLinearOrder ℕ∞

full_name: ENat.iSup_coe_eq_top
code: lemma iSup_coe_eq_top : ⨆ i, (f i : ℕ∞) = ⊤ ↔ ¬ BddAbove (range f) 
goal: ⨆ i, ↑(f i) = ⊤ ↔ ¬BddAbove (Set.range f)

full_name: ENat.iSup_coe_ne_top
code: lemma iSup_coe_ne_top : ⨆ i, (f i : ℕ∞) ≠ ⊤ ↔ BddAbove (range f) 
goal: ⨆ i, ↑(f i) ≠ ⊤ ↔ BddAbove (Set.range f)

full_name: ENat.iSup_coe_lt_top
code: lemma iSup_coe_lt_top : ⨆ i, (f i : ℕ∞) < ⊤ ↔ BddAbove (range f) 
goal: ⨆ i, ↑(f i) < ⊤ ↔ BddAbove (Set.range f)

full_name: ENat.iInf_coe_eq_top
code: lemma iInf_coe_eq_top : ⨅ i, (f i : ℕ∞) = ⊤ ↔ IsEmpty ι 
goal: ⨅ i, ↑(f i) = ⊤ ↔ IsEmpty ι

full_name: ENat.iInf_coe_ne_top
code: lemma iInf_coe_ne_top : ⨅ i, (f i : ℕ∞) ≠ ⊤ ↔ Nonempty ι 
goal: ⨅ i, ↑(f i) ≠ ⊤ ↔ Nonempty ι

full_name: ENat.iInf_coe_lt_top
code: lemma iInf_coe_lt_top : ⨅ i, (f i : ℕ∞) < ⊤ ↔ Nonempty ι 
goal: ⨅ i, ↑(f i) < ⊤ ↔ Nonempty ι

full_name: ENat.coe_sSup
code: lemma coe_sSup : BddAbove s → ↑(sSup s) = ⨆ a ∈ s, (a : ℕ∞) 
goal: BddAbove s → ↑(sSup s) = ⨆ a ∈ s, ↑a

full_name: ENat.coe_sInf
code: lemma coe_sInf (hs : s.Nonempty) : ↑(sInf s) = ⨅ a ∈ s, (a : ℕ∞) 
goal: ↑(sInf s) = ⨅ a ∈ s, ↑a

full_name: ENat.coe_iSup
code: lemma coe_iSup : BddAbove (range f) → ↑(⨆ i, f i) = ⨆ i, (f i : ℕ∞) 
goal: BddAbove (Set.range f) → ↑(⨆ i, f i) = ⨆ i, ↑(f i)

full_name: ENat.coe_iInf
code: @[norm_cast] lemma coe_iInf [Nonempty ι] : ↑(⨅ i, f i) = ⨅ i, (f i : ℕ∞) 
goal: ↑(⨅ i, f i) = ⨅ i, ↑(f i)

full_name: ENat.iInf_eq_top_of_isEmpty
code: @[simp]
lemma iInf_eq_top_of_isEmpty [IsEmpty ι] : ⨅ i, (f i : ℕ∞) = ⊤ 
goal: ⨅ i, ↑(f i) = ⊤

full_name: ENat.iInf_toNat
code: lemma iInf_toNat : (⨅ i, (f i : ℕ∞)).toNat = ⨅ i, f i 
goal: (⨅ i, ↑(f i)).toNat = ⨅ i, f i

full_name: ENat.iInf_eq_zero
code: lemma iInf_eq_zero : ⨅ i, (f i : ℕ∞) = 0 ↔ ∃ i, f i = 0 
goal: ⨅ i, ↑(f i) = 0 ↔ ∃ i, f i = 0

full_name: ENat.sSup_eq_zero
code: lemma sSup_eq_zero : sSup s = 0 ↔ ∀ a ∈ s, a = 0 
goal: sSup s = 0 ↔ ∀ a ∈ s, a = 0

full_name: ENat.sInf_eq_zero
code: lemma sInf_eq_zero : sInf s = 0 ↔ 0 ∈ s 
goal: sInf s = 0 ↔ 0 ∈ s

full_name: ENat.sSup_eq_zero'
code: lemma sSup_eq_zero' : sSup s = 0 ↔ s = ∅ ∨ s = {0} 
goal: sSup s = 0 ↔ s = ∅ ∨ s = {0}
File: Mathlib/Data/ZMod/Algebra.lean

full_name: ZMod.instSubsingletonAlgebra
code: instance (p : ℕ) : Subsingleton (Algebra (ZMod p) R) 
goal: Subsingleton (Algebra (ZMod p) R)

full_name: ZMod.algebra'
code: /-- The `ZMod n`-algebra structure on rings whose characteristic `m` divides `n`.
See note [reducible non-instances]. -/
abbrev algebra' (h : m ∣ n) : Algebra (ZMod n) R 
goal: Algebra (ZMod n) R

full_name: ZMod.algebra
code: /-- The `zmod p`-algebra structure on a ring of characteristic `p`. This is not an
instance since it creates a diamond with `algebra.id`.
See note [reducible non-instances]. -/
abbrev algebra (p : ℕ) [CharP R p] : Algebra (ZMod p) R 
goal: Algebra (ZMod p) R
File: Mathlib/Data/ZMod/Parity.lean

full_name: ZMod.eq_zero_iff_even
code: theorem eq_zero_iff_even {n : ℕ} : (n : ZMod 2) = 0 ↔ Even n 
goal: ↑n = 0 ↔ Even n

full_name: ZMod.eq_one_iff_odd
code: theorem eq_one_iff_odd {n : ℕ} : (n : ZMod 2) = 1 ↔ Odd n 
goal: ↑n = 1 ↔ Odd n

full_name: ZMod.ne_zero_iff_odd
code: theorem ne_zero_iff_odd {n : ℕ} : (n : ZMod 2) ≠ 0 ↔ Odd n 
goal: ↑n ≠ 0 ↔ Odd n
File: Mathlib/Data/ZMod/Factorial.lean

full_name: ZMod.cast_descFactorial
code: theorem cast_descFactorial {n p : ℕ} (h : n ≤ p) :
    (descFactorial (p - 1) n : ZMod p) = (-1) ^ n * n ! 
goal: ↑((p - 1).descFactorial n) = (-1) ^ n * ↑n !
File: Mathlib/Data/ZMod/Coprime.lean

full_name: ZMod.eq_zero_iff_gcd_ne_one
code: /-- If `p` is a prime and `a` is an integer, then `a : ZMod p` is zero if and only if
`gcd a p ≠ 1`. -/
theorem eq_zero_iff_gcd_ne_one {a : ℤ} {p : ℕ} [pp : Fact p.Prime] :
    (a : ZMod p) = 0 ↔ a.gcd p ≠ 1 
goal: ↑a = 0 ↔ a.gcd ↑p ≠ 1

full_name: ZMod.ne_zero_of_gcd_eq_one
code: /-- If an integer `a` and a prime `p` satisfy `gcd a p = 1`, then `a : ZMod p` is nonzero. -/
theorem ne_zero_of_gcd_eq_one {a : ℤ} {p : ℕ} (pp : p.Prime) (h : a.gcd p = 1) : (a : ZMod p) ≠ 0 
goal: ↑a ≠ 0

full_name: ZMod.eq_zero_of_gcd_ne_one
code: /-- If an integer `a` and a prime `p` satisfy `gcd a p ≠ 1`, then `a : ZMod p` is zero. -/
theorem eq_zero_of_gcd_ne_one {a : ℤ} {p : ℕ} (pp : p.Prime) (h : a.gcd p ≠ 1) : (a : ZMod p) = 0 
goal: ↑a = 0
File: Mathlib/Data/ZMod/IntUnitsPower.lean

full_name: instSMulZModOfNatNatAdditiveUnitsInt
code: instance : SMul (ZMod 2) (Additive ℤˣ) 
goal: SMul (ZMod 2) (Additive ℤˣ)

full_name: ZMod.smul_units_def
code: lemma ZMod.smul_units_def (z : ZMod 2) (au : Additive ℤˣ) :
    z • au = z.val • au 
goal: z • au = z.val • au

full_name: ZMod.natCast_smul_units
code: lemma ZMod.natCast_smul_units (n : ℕ) (au : Additive ℤˣ) : (n : ZMod 2) • au = n • au 
goal: ↑n • au = n • au

full_name: instModuleZModOfNatNatAdditiveUnitsInt
code: /-- This is an indirect way of saying that `ℤˣ` has a power operation by `ZMod 2`. -/
instance : Module (ZMod 2) (Additive ℤˣ) 
goal: Module (ZMod 2) (Additive ℤˣ)

full_name: Int.instUnitsPow
code: /-- There is a canonical power operation on `ℤˣ` by `R` if `Additive ℤˣ` is an `R`-module.

In lemma names, this operations is called `uzpow` to match `zpow`.

Notably this is satisfied by `R ∈ {ℕ, ℤ, ZMod 2}`. -/
instance Int.instUnitsPow : Pow ℤˣ R 
goal: Pow ℤˣ R

full_name: ofMul_uzpow
code: @[simp] lemma ofMul_uzpow (u : ℤˣ) (r : R) : Additive.ofMul (u ^ r) = r • Additive.ofMul u 
goal: Additive.ofMul (u ^ r) = r • Additive.ofMul u

full_name: toMul_uzpow
code: @[simp] lemma toMul_uzpow (u : Additive ℤˣ) (r : R) :
  Additive.toMul (r • u) = Additive.toMul u ^ r 
goal: Additive.toMul (r • u) = Additive.toMul u ^ r

full_name: uzpow_natCast
code: @[norm_cast] lemma uzpow_natCast (u : ℤˣ) (n : ℕ) : u ^ (n : R) = u ^ n 
goal: u ^ ↑n = u ^ n

full_name: uzpow_coe_nat
code: lemma uzpow_coe_nat (s : ℤˣ) (n : ℕ) [n.AtLeastTwo] :
    s ^ (no_index (OfNat.ofNat n : R)) = s ^ (no_index (OfNat.ofNat n : ℕ)) 
goal: s ^ OfNat.ofNat n = s ^ OfNat.ofNat n

full_name: one_uzpow
code: @[simp] lemma one_uzpow (x : R) : (1 : ℤˣ) ^ x = 1 
goal: 1 ^ x = 1

full_name: mul_uzpow
code: lemma mul_uzpow (s₁ s₂ : ℤˣ) (x : R) : (s₁ * s₂) ^ x = s₁ ^ x * s₂ ^ x 
goal: (s₁ * s₂) ^ x = s₁ ^ x * s₂ ^ x

full_name: uzpow_zero
code: @[simp] lemma uzpow_zero (s : ℤˣ) : (s ^ (0 : R) : ℤˣ) = (1 : ℤˣ) 
goal: s ^ 0 = 1

full_name: uzpow_one
code: @[simp] lemma uzpow_one (s : ℤˣ) : (s ^ (1 : R) : ℤˣ) = s 
goal: s ^ 1 = s

full_name: uzpow_mul
code: lemma uzpow_mul (s : ℤˣ) (x y : R) : s ^ (x * y) = (s ^ x) ^ y 
goal: s ^ (x * y) = (s ^ x) ^ y

full_name: uzpow_add
code: lemma uzpow_add (s : ℤˣ) (x y : R) : s ^ (x + y) = s ^ x * s ^ y 
goal: s ^ (x + y) = s ^ x * s ^ y

full_name: uzpow_sub
code: lemma uzpow_sub (s : ℤˣ) (x y : R) : s ^ (x - y) = s ^ x / s ^ y 
goal: s ^ (x - y) = s ^ x / s ^ y

full_name: uzpow_neg
code: lemma uzpow_neg (s : ℤˣ) (x : R) : s ^ (-x) = (s ^ x)⁻¹ 
goal: s ^ (-x) = (s ^ x)⁻¹

full_name: uzpow_intCast
code: @[norm_cast] lemma uzpow_intCast (u : ℤˣ) (z : ℤ) : u ^ (z : R) = u ^ z 
goal: u ^ ↑z = u ^ z
File: Mathlib/Data/ZMod/Module.lean

full_name: AddCommMonoid.zmodModule
code: /-- The `ZMod n`-module structure on commutative monoids whose elements have order dividing `n ≠ 0`.
Also implies a group structure via `Module.addCommMonoidToAddCommGroup`.
See note [reducible non-instances]. -/
abbrev AddCommMonoid.zmodModule [NeZero n] [AddCommMonoid M] (h : ∀ (x : M), n • x = 0) :
    Module (ZMod n) M 
goal: Module (ZMod n) M

full_name: AddCommGroup.zmodModule
code: /-- The `ZMod n`-module structure on Abelian groups whose elements have order dividing `n`.
See note [reducible non-instances]. -/
abbrev AddCommGroup.zmodModule {G : Type*} [AddCommGroup G] (h : ∀ (x : G), n • x = 0) :
    Module (ZMod n) G 
goal: Module (ZMod n) G

full_name: ZMod.map_smul
code: theorem map_smul (f : F) (c : ZMod n) (x : M) : f (c • x) = c • f x 
goal: f (c • x) = c • f x

full_name: ZMod.smul_mem
code: theorem smul_mem (hx : x ∈ K) (c : ZMod n) : c • x ∈ K 
goal: c • x ∈ K

full_name: AddMonoidHom.toZModLinearMap
code: /-- Reinterpret an additive homomorphism as a `ℤ/nℤ`-linear map.

See also:
`AddMonoidHom.toIntLinearMap`, `AddMonoidHom.toNatLinearMap`, `AddMonoidHom.toRatLinearMap` -/
def toZModLinearMap (f : M →+ M₁) : M →ₗ[ZMod n] M₁ 
goal: M →ₗ[ZMod n] M₁

full_name: AddMonoidHom.toZModLinearMap_injective
code: theorem toZModLinearMap_injective : Function.Injective <| toZModLinearMap n (M := M) (M₁ := M₁) 
goal: Function.Injective (AddMonoidHom.toZModLinearMap n)

full_name: AddMonoidHom.coe_toZModLinearMap
code: @[simp]
theorem coe_toZModLinearMap (f : M →+ M₁) : ⇑(f.toZModLinearMap n) = f 
goal: ⇑(AddMonoidHom.toZModLinearMap n f) = ⇑f

full_name: AddSubgroup.toZModSubmodule
code: /-- Reinterpret an additive subgroup of a `ℤ/nℤ`-module as a `ℤ/nℤ`-submodule.

See also: `AddSubgroup.toIntSubmodule`, `AddSubmonoid.toNatSubmodule`. -/
def toZModSubmodule : AddSubgroup M ≃o Submodule (ZMod n) M 
goal: AddSubgroup M ≃o Submodule (ZMod n) M

full_name: AddSubgroup.toZModSubmodule_symm
code: @[simp]
theorem toZModSubmodule_symm :
    ⇑((toZModSubmodule n).symm : _ ≃o AddSubgroup M) = Submodule.toAddSubgroup 
goal: ⇑(AddSubgroup.toZModSubmodule n).symm = Submodule.toAddSubgroup

full_name: AddSubgroup.coe_toZModSubmodule
code: @[simp]
theorem coe_toZModSubmodule (S : AddSubgroup M) : (toZModSubmodule n S : Set M) = S 
goal: ↑((AddSubgroup.toZModSubmodule n) S) = ↑S

full_name: AddSubgroup.toZModSubmodule_toAddSubgroup
code: @[simp]
theorem toZModSubmodule_toAddSubgroup (S : AddSubgroup M) :
    (toZModSubmodule n S).toAddSubgroup = S 
goal: ((AddSubgroup.toZModSubmodule n) S).toAddSubgroup = S

full_name: Submodule.toAddSubgroup_toZModSubmodule
code: @[simp]
theorem _root_.Submodule.toAddSubgroup_toZModSubmodule (S : Submodule (ZMod n) M) :
    toZModSubmodule n S.toAddSubgroup = S 
goal: (AddSubgroup.toZModSubmodule n) S.toAddSubgroup = S
File: Mathlib/Data/Finset/Fin.lean

full_name: Finset.attachFin
code: /-- Given a Finset `s` of `ℕ` contained in `{0,..., n-1}`, the corresponding Finset in `Fin n`
is `s.attachFin h` where `h` is a proof that all elements of `s` are less than `n`. -/
def attachFin (s : Finset ℕ) {n : ℕ} (h : ∀ m ∈ s, m < n) : Finset (Fin n) 
goal: Finset (Fin n)

full_name: Finset.mem_attachFin
code: @[simp]
theorem mem_attachFin {n : ℕ} {s : Finset ℕ} (h : ∀ m ∈ s, m < n) {a : Fin n} :
    a ∈ s.attachFin h ↔ (a : ℕ) ∈ s 
goal: a ∈ s.attachFin h ↔ ↑a ∈ s

full_name: Finset.card_attachFin
code: @[simp]
theorem card_attachFin {n : ℕ} (s : Finset ℕ) (h : ∀ m ∈ s, m < n) :
    (s.attachFin h).card = s.card 
goal: (s.attachFin h).card = s.card
File: Mathlib/Data/ZMod/Units.lean

full_name: ZMod.unitsMap
code: /-- `unitsMap` is a group homomorphism that maps units of `ZMod m` to units of `ZMod n` when `n`
divides `m`. -/
def unitsMap (hm : n ∣ m) : (ZMod m)ˣ →* (ZMod n)ˣ 
goal: (ZMod m)ˣ →* (ZMod n)ˣ

full_name: ZMod.unitsMap_def
code: lemma unitsMap_def (hm : n ∣ m) : unitsMap hm = Units.map (castHom hm (ZMod n)) 
goal: ZMod.unitsMap hm = Units.map ↑(ZMod.castHom hm (ZMod n))

full_name: ZMod.unitsMap_comp
code: lemma unitsMap_comp {d : ℕ} (hm : n ∣ m) (hd : m ∣ d) :
    (unitsMap hm).comp (unitsMap hd) = unitsMap (dvd_trans hm hd) 
goal: (ZMod.unitsMap hm).comp (ZMod.unitsMap hd) = ZMod.unitsMap ⋯

full_name: ZMod.unitsMap_self
code: @[simp]
lemma unitsMap_self (n : ℕ) : unitsMap (dvd_refl n) = MonoidHom.id _ 
goal: ZMod.unitsMap ⋯ = MonoidHom.id (ZMod n)ˣ

full_name: ZMod.IsUnit_cast_of_dvd
code: lemma IsUnit_cast_of_dvd (hm : n ∣ m) (a : Units (ZMod m)) : IsUnit (cast (a : ZMod m) : ZMod n) 
goal: IsUnit (↑a).cast

full_name: ZMod.unitsMap_surjective
code: theorem unitsMap_surjective [hm : NeZero m] (h : n ∣ m) :
    Function.Surjective (unitsMap h) 
goal: Function.Surjective ⇑(ZMod.unitsMap h)

full_name: ZMod.not_isUnit_of_mem_primeFactors
code: lemma not_isUnit_of_mem_primeFactors {n p : ℕ} (h : p ∈ n.primeFactors) :
    ¬ IsUnit (p : ZMod n) 
goal: ¬IsUnit ↑p

full_name: ZMod.eq_unit_mul_divisor
code: /-- Any element of `ZMod N` has the form `u * d` where `u` is a unit and `d` is a divisor of `N`. -/
lemma eq_unit_mul_divisor {N : ℕ} (a : ZMod N) :
    ∃ d : ℕ, d ∣ N ∧ ∃ (u : ZMod N), IsUnit u ∧ a = u * d 
goal: ∃ d, d ∣ N ∧ ∃ u, IsUnit u ∧ a = u * ↑d
File: Mathlib/Data/ZMod/Defs.lean

full_name: Fin.instCommSemigroup
code: /-- Multiplicative commutative semigroup structure on `Fin n`. -/
instance instCommSemigroup (n : ℕ) : CommSemigroup (Fin n) 
goal: CommSemigroup (Fin n)

full_name: _private.Mathlib.Data.ZMod.Defs.0.Fin.left_distrib_aux
code: private theorem left_distrib_aux (n : ℕ) : ∀ a b c : Fin n, a * (b + c) = a * b + a * c 
goal: a * (b + c) = a * b + a * c

full_name: Fin.instDistrib
code: /-- Commutative ring structure on `Fin n`. -/
instance instDistrib (n : ℕ) : Distrib (Fin n) 
goal: Distrib (Fin n)

full_name: Fin.instCommRing
code: /-- Commutative ring structure on `Fin n`. -/
instance instCommRing (n : ℕ) [NeZero n] : CommRing (Fin n) 
goal: CommRing (Fin n)

full_name: Fin.instHasDistribNeg
code: /-- Note this is more general than `Fin.instCommRing` as it applies (vacuously) to `Fin 0` too. -/
instance instHasDistribNeg (n : ℕ) : HasDistribNeg (Fin n) 
goal: HasDistribNeg (Fin n)

full_name: ZMod
code: /-- The integers modulo `n : ℕ`. -/
def ZMod : ℕ → Type
  
goal: ℕ → Type

full_name: ZMod.decidableEq
code: instance ZMod.decidableEq : ∀ n : ℕ, DecidableEq (ZMod n)
  
goal: DecidableEq (ZMod n)

full_name: ZMod.repr
code: instance ZMod.repr : ∀ n : ℕ, Repr (ZMod n)
  
goal: Repr (ZMod n)

full_name: ZMod.instUnique
code: instance instUnique : Unique (ZMod 1) 
goal: Unique (ZMod 1)

full_name: ZMod.fintype
code: instance fintype : ∀ (n : ℕ) [NeZero n], Fintype (ZMod n)
  
goal: Fintype (ZMod n)

full_name: ZMod.infinite
code: instance infinite : Infinite (ZMod 0) 
goal: Infinite (ZMod 0)

full_name: ZMod.card
code: @[simp]
theorem card (n : ℕ) [Fintype (ZMod n)] : Fintype.card (ZMod n) = n 
goal: Fintype.card (ZMod n) = n

full_name: ZMod.commRing
code: instance commRing (n : ℕ) : CommRing (ZMod n) 
goal: CommRing (ZMod n)

full_name: ZMod.inhabited
code: instance inhabited (n : ℕ) : Inhabited (ZMod n) 
goal: Inhabited (ZMod n)