ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/TensorProduct.lean

full_name: PrimeSpectrum.tensorProductTo
code: /-- The canonical map from `Spec(S ⊗[R] T)` to the cartesian product `Spec S × Spec T`. -/
noncomputable
def PrimeSpectrum.tensorProductTo (x : PrimeSpectrum (S ⊗[R] T)) :
    PrimeSpectrum S × PrimeSpectrum T 
goal: PrimeSpectrum S × PrimeSpectrum T

full_name: PrimeSpectrum.continuous_tensorProductTo
code: lemma PrimeSpectrum.continuous_tensorProductTo : Continuous (tensorProductTo R S T) 
goal: Continuous (PrimeSpectrum.tensorProductTo R S T)

full_name: PrimeSpectrum.embedding_tensorProductTo_of_surjectiveOnStalks_aux
code: lemma PrimeSpectrum.embedding_tensorProductTo_of_surjectiveOnStalks_aux
    (p₁ p₂ : PrimeSpectrum (S ⊗[R] T))
    (h : tensorProductTo R S T p₁ = tensorProductTo R S T p₂) :
    p₁ ≤ p₂ 
goal: p₁ ≤ p₂

full_name: PrimeSpectrum.embedding_tensorProductTo_of_surjectiveOnStalks
code: lemma PrimeSpectrum.embedding_tensorProductTo_of_surjectiveOnStalks :
    Embedding (tensorProductTo R S T) 
goal: Embedding (PrimeSpectrum.tensorProductTo R S T)
File: Mathlib/Data/Sym/Sym2/Init.lean

full_name: initFn._@.Mathlib.Data.Sym.Sym2.Init._hyg.5
code: declare_aesop_rule_sets [Sym2]
goal: IO Unit
File: Mathlib/Data/Sym/Sym2/Order.lean

full_name: Sym2.sup
code: /-- The supremum of the two elements. -/
def sup [SemilatticeSup α] (x : Sym2 α) : α 
goal: α

full_name: Sym2.sup_mk
code: @[simp] theorem sup_mk [SemilatticeSup α] (a b : α) : s(a, b).sup = a ⊔ b 
goal: s(a, b).sup = a ⊔ b

full_name: Sym2.inf
code: /-- The infimum of the two elements. -/
def inf [SemilatticeInf α] (x : Sym2 α) : α 
goal: α

full_name: Sym2.inf_mk
code: @[simp] theorem inf_mk [SemilatticeInf α] (a b : α) : s(a, b).inf = a ⊓ b 
goal: s(a, b).inf = a ⊓ b

full_name: Sym2.inf_le_sup
code: protected theorem inf_le_sup [Lattice α] (s : Sym2 α) : s.inf ≤ s.sup 
goal: s.inf ≤ s.sup

full_name: Sym2.sortEquiv_symm_apply
code: /-- In a linear order, symmetric squares are canonically identified with ordered pairs. -/
@[simps!]
def sortEquiv [LinearOrder α] : Sym2 α ≃ { p : α × α // p.1 ≤ p.2 } 
goal: Sym2.sortEquiv.symm p = Sym2.mk ↑p

full_name: Sym2.sortEquiv_apply_coe
code: /-- In a linear order, symmetric squares are canonically identified with ordered pairs. -/
@[simps!]
def sortEquiv [LinearOrder α] : Sym2 α ≃ { p : α × α // p.1 ≤ p.2 } 
goal: ↑(Sym2.sortEquiv s) = (s.inf, s.sup)

full_name: Sym2.sortEquiv
code: /-- In a linear order, symmetric squares are canonically identified with ordered pairs. -/
@[simps!]
def sortEquiv [LinearOrder α] : Sym2 α ≃ { p : α × α // p.1 ≤ p.2 } 
goal: Sym2 α ≃ { p // p.1 ≤ p.2 }
File: Mathlib/Data/Sym/Card.lean

full_name: Sym.e1
code: /-- Over `Fin (n + 1)`, the multisets of size `k + 1` containing `0` are equivalent to those of size
`k`, as demonstrated by respectively erasing or appending `0`. -/
protected def e1 {n k : ℕ} : { s : Sym (Fin (n + 1)) (k + 1) // ↑0 ∈ s } ≃ Sym (Fin n.succ) k 
goal: { s // 0 ∈ s } ≃ Sym (Fin n.succ) k

full_name: Sym.e2
code: /-- The multisets of size `k` over `Fin n+2` not containing `0`
are equivalent to those of size `k` over `Fin n+1`,
as demonstrated by respectively decrementing or incrementing every element of the multiset.
-/
protected def e2 {n k : ℕ} : { s : Sym (Fin n.succ.succ) k // ↑0 ∉ s } ≃ Sym (Fin n.succ) k 
goal: { s // 0 ∉ s } ≃ Sym (Fin n.succ) k

full_name: Sym.card_sym_fin_eq_multichoose
code: theorem card_sym_fin_eq_multichoose : ∀ n k : ℕ, card (Sym (Fin n) k) = multichoose n k
  
goal: Fintype.card (Sym (Fin n) k) = n.multichoose k

full_name: Sym.card_sym_eq_multichoose
code: /-- For any fintype `α` of cardinality `n`, `card (Sym α k) = multichoose (card α) k`. -/
theorem card_sym_eq_multichoose (α : Type*) (k : ℕ) [Fintype α] [Fintype (Sym α k)] :
    card (Sym α k) = multichoose (card α) k 
goal: Fintype.card (Sym α k) = (Fintype.card α).multichoose k

full_name: Sym.card_sym_eq_choose
code: /-- The *stars and bars* lemma: the cardinality of `Sym α k` is equal to
`Nat.choose (card α + k - 1) k`. -/
theorem card_sym_eq_choose {α : Type*} [Fintype α] (k : ℕ) [Fintype (Sym α k)] :
    card (Sym α k) = (card α + k - 1).choose k 
goal: Fintype.card (Sym α k) = (Fintype.card α + k - 1).choose k

full_name: Sym2.card_image_diag
code: /-- The `diag` of `s : Finset α` is sent on a finset of `Sym2 α` of card `s.card`. -/
theorem card_image_diag (s : Finset α) : (s.diag.image Sym2.mk).card = s.card 
goal: (Finset.image Sym2.mk s.diag).card = s.card

full_name: Sym2.two_mul_card_image_offDiag
code: theorem two_mul_card_image_offDiag (s : Finset α) :
    2 * (s.offDiag.image Sym2.mk).card = s.offDiag.card 
goal: 2 * (Finset.image Sym2.mk s.offDiag).card = s.offDiag.card

full_name: Sym2.card_image_offDiag
code: /-- The `offDiag` of `s : Finset α` is sent on a finset of `Sym2 α` of card `s.offDiag.card / 2`.
This is because every element `s(x, y)` of `Sym2 α` not on the diagonal comes from exactly two
pairs: `(x, y)` and `(y, x)`. -/
theorem card_image_offDiag (s : Finset α) :
    (s.offDiag.image Sym2.mk).card = s.card.choose 2 
goal: (Finset.image Sym2.mk s.offDiag).card = s.card.choose 2

full_name: Sym2.card_subtype_diag
code: theorem card_subtype_diag [Fintype α] : card { a : Sym2 α // a.IsDiag } = card α 
goal: Fintype.card { a // a.IsDiag } = Fintype.card α

full_name: Sym2.card_subtype_not_diag
code: theorem card_subtype_not_diag [Fintype α] :
    card { a : Sym2 α // ¬a.IsDiag } = (card α).choose 2 
goal: Fintype.card { a // ¬a.IsDiag } = (Fintype.card α).choose 2

full_name: Sym2.card
code: /-- Type **stars and bars** for the case `n = 2`. -/
protected theorem card [Fintype α] : card (Sym2 α) = Nat.choose (card α + 1) 2 
goal: Fintype.card (Sym2 α) = (Fintype.card α + 1).choose 2
File: Mathlib/Data/MLList/IO.lean

full_name: MLList.linesFromHandle
code: /-- Read lines of text from a handle, as a lazy list in `IO`. -/
def linesFromHandle (h : Handle) : MLList IO String 
goal: MLList IO String

full_name: MLList.lines
code: /-- Read lines of text from a file, as a lazy list in `IO`. -/
def lines (f : FilePath) : MLList IO String 
goal: MLList IO String

full_name: MLList.runCmd.put
code: /--
Run a command with given input on `stdio`,
returning `stdout` as a lazy list in `IO`.
-/
def runCmd (cmd : String) (args : Array String) (input : String := "") : MLList IO String 
goal: IO
  (IO.Process.Child
    { stdin := IO.Process.Stdio.null, stdout := IO.Process.Stdio.piped, stderr := IO.Process.Stdio.piped })

full_name: MLList.runCmd
code: /--
Run a command with given input on `stdio`,
returning `stdout` as a lazy list in `IO`.
-/
def runCmd (cmd : String) (args : Array String) (input : String := "") : MLList IO String 
goal: MLList IO String
File: Mathlib/Data/MLList/DepthFirst.lean

full_name: depthFirst'
code: /-- A generalisation of `depthFirst`, which allows the generation function to know the current
depth, and to count the depth starting from a specified value. -/
partial def depthFirst' (f : Nat → α → m α) (n : Nat) (a : α) : m α 
goal: m α

full_name: depthFirst
code: /--
Depth first search of a graph generated by a function
`f : α → m α`.

Here `m` must be an `Alternative` `Monad`,
and perhaps the only sensible values are `List` and `MLList MetaM`.

The option `maxDepth` limits the search depth.

Note that if the graph is not a tree then elements will be visited multiple times.
(See `depthFirstRemovingDuplicates`)
-/
def depthFirst (f : α → m α) (a : α) (maxDepth : Option Nat := none) : m α 
goal: m α

full_name: depthFirstRemovingDuplicates
code: /--
Variant of `depthFirst`,
using an internal `HashSet` to record and avoid already visited nodes.

This version describes the graph using `α → MLList m α`,
and returns the monadic lazy list of nodes visited in order.

This is potentially very expensive.
If you want to do efficient enumerations from a generation function,
avoiding duplication up to equality or isomorphism,
use Brendan McKay's method of "generation by canonical construction path".
-/
-- TODO can you make this work in `List` and `MLList m` simultaneously, by being tricky with monads?
def depthFirstRemovingDuplicates {α : Type u} [BEq α] [Hashable α]
    (f : α → MLList m α) (a : α) (maxDepth : Option Nat := none) : MLList m α 
goal: MLList m α

full_name: depthFirstRemovingDuplicates'
code: /--
Variant of `depthFirst`,
using an internal `HashSet` to record and avoid already visited nodes.

This version describes the graph using `α → List α`, and returns the list of nodes visited in order.
-/
def depthFirstRemovingDuplicates' [BEq α] [Hashable α]
    (f : α → List α) (a : α) (maxDepth : Option Nat := none) : List α 
goal: List α
File: Mathlib/Data/MLList/Dedup.lean

full_name: MLList.dedupBy
code: /-- Lazily deduplicate a lazy list, using a stored `HashMap`. -/
-- We choose `HashMap` here instead of `RBSet` as the initial application is `Expr`.
def dedupBy (L : MLList m α) (f : α → m β) : MLList m α 
goal: MLList m α

full_name: MLList.dedup
code: /-- Lazily deduplicate a lazy list, using a stored `HashMap`. -/
def dedup (L : MLList m β) : MLList m β 
goal: MLList m β
File: Mathlib/Data/SetLike/Fintype.lean

full_name: SetLike.instFintype
code: /-- TODO: It should be possible to obtain a computable version of this for most
SetLike objects. If we add those instances, we should remove this one. -/
noncomputable instance (priority := 100) {A B : Type*} [SetLike A B] [Fintype B] : Fintype A 
goal: Fintype A

full_name: SetLike.instFinite
code: instance (priority := 100) {A B : Type*} [SetLike A B] [Finite B] : Finite A 
goal: Finite A
File: Mathlib/Data/FunLike/Embedding.lean

full_name: EmbeddingLike
code: /-- The class `EmbeddingLike F α β` expresses that terms of type `F` have an
injective coercion to injective functions `α ↪ β`.
-/
class EmbeddingLike (F : Sort*) (α β : outParam (Sort*)) [FunLike F α β] : Prop where
  /-- The coercion to functions must produce injective functions. -/
  injective' : ∀ f : F, Function.Injective (DFunLike.coe f)
goal: Prop

full_name: EmbeddingLike.injective'
code: /-- The class `EmbeddingLike F α β` expresses that terms of type `F` have an
injective coercion to injective functions `α ↪ β`.
-/
class EmbeddingLike (F : Sort*) (α β : outParam (Sort*)) [FunLike F α β] : Prop where
  /-- The coercion to functions must produce injective functions. -/
  injective' : ∀ f : F, Function.Injective (DFunLike.coe f)
goal: Function.Injective ⇑f

full_name: EmbeddingLike.injective
code: protected theorem injective (f : F) : Function.Injective f 
goal: Function.Injective ⇑f

full_name: EmbeddingLike.apply_eq_iff_eq
code: @[simp]
theorem apply_eq_iff_eq (f : F) {x y : α} : f x = f y ↔ x = y 
goal: f x = f y ↔ x = y

full_name: EmbeddingLike.comp_injective
code: @[simp]
theorem comp_injective {F : Sort*} [FunLike F β γ] [EmbeddingLike F β γ] (f : α → β) (e : F) :
    Function.Injective (e ∘ f) ↔ Function.Injective f 
goal: Function.Injective (⇑e ∘ f) ↔ Function.Injective f
File: Mathlib/Data/Sum/Lattice.lean

full_name: Sum.Lex.instSemilatticeSup
code: instance instSemilatticeSup : SemilatticeSup (α ⊕ₗ β) 
goal: SemilatticeSup (Lex (α ⊕ β))

full_name: Sum.Lex.inl_sup
code: @[simp] lemma inl_sup (a₁ a₂ : α) : (inlₗ (a₁ ⊔ a₂) : α ⊕ β) = inlₗ a₁ ⊔ inlₗ a₂ 
goal: Sum.inlₗ (a₁ ⊔ a₂) = Sum.inlₗ a₁ ⊔ Sum.inlₗ a₂

full_name: Sum.Lex.inr_sup
code: @[simp] lemma inr_sup (b₁ b₂ : β) : (inrₗ (b₁ ⊔ b₂) : α ⊕ β) = inrₗ b₁ ⊔ inrₗ b₂ 
goal: Sum.inrₗ (b₁ ⊔ b₂) = Sum.inrₗ b₁ ⊔ Sum.inrₗ b₂

full_name: Sum.Lex.instSemilatticeInf
code: instance instSemilatticeInf : SemilatticeInf (α ⊕ₗ β) 
goal: SemilatticeInf (Lex (α ⊕ β))

full_name: Sum.Lex.inl_inf
code: @[simp] lemma inl_inf (a₁ a₂ : α) : (inlₗ (a₁ ⊓ a₂) : α ⊕ β) = inlₗ a₁ ⊓ inlₗ a₂ 
goal: Sum.inlₗ (a₁ ⊓ a₂) = Sum.inlₗ a₁ ⊓ Sum.inlₗ a₂

full_name: Sum.Lex.inr_inf
code: @[simp] lemma inr_inf (b₁ b₂ : β) : (inrₗ (b₁ ⊓ b₂) : α ⊕ β) = inrₗ b₁ ⊓ inrₗ b₂ 
goal: Sum.inrₗ (b₁ ⊓ b₂) = Sum.inrₗ b₁ ⊓ Sum.inrₗ b₂

full_name: Sum.Lex.instLattice
code: instance instLattice : Lattice (α ⊕ₗ β) 
goal: Lattice (Lex (α ⊕ β))

full_name: Sum.Lex.inlLatticeHom
code: /-- `Sum.Lex.inlₗ` as a lattice homomorphism. -/
def inlLatticeHom : LatticeHom α (α ⊕ₗ β) 
goal: LatticeHom α (Lex (α ⊕ β))

full_name: Sum.Lex.inrLatticeHom
code: /-- `Sum.Lex.inrₗ` as a lattice homomorphism. -/
def inrLatticeHom : LatticeHom β (α ⊕ₗ β) 
goal: LatticeHom β (Lex (α ⊕ β))

full_name: Sum.Lex.instDistribLattice
code: instance instDistribLattice [DistribLattice α] [DistribLattice β] : DistribLattice (α ⊕ₗ β) 
goal: DistribLattice (Lex (α ⊕ β))
File: Mathlib/Data/FunLike/Fintype.lean

full_name: DFunLike.fintype
code: /-- All `DFunLike`s are finite if their domain and codomain are.

This is not an instance because specific `DFunLike` types might have a better-suited definition.

See also `DFunLike.finite`.
-/
noncomputable def DFunLike.fintype [DecidableEq α] [Fintype α] [∀ i, Fintype (β i)] : Fintype F 
goal: Fintype F

full_name: FunLike.fintype
code: /-- All `FunLike`s are finite if their domain and codomain are.

Non-dependent version of `DFunLike.fintype` that might be easier to infer.
This is not an instance because specific `FunLike` types might have a better-suited definition.
-/
noncomputable def FunLike.fintype [DecidableEq α] [Fintype α] [Fintype γ] : Fintype G 
goal: Fintype G

full_name: DFunLike.finite
code: /-- All `DFunLike`s are finite if their domain and codomain are.

Can't be an instance because it can cause infinite loops.
-/
theorem DFunLike.finite [Finite α] [∀ i, Finite (β i)] : Finite F 
goal: Finite F

full_name: FunLike.finite
code: /-- All `FunLike`s are finite if their domain and codomain are.

Non-dependent version of `DFunLike.finite` that might be easier to infer.
Can't be an instance because it can cause infinite loops.
-/
theorem FunLike.finite [Finite α] [Finite γ] : Finite G 
goal: Finite G

full_name: FunLike.toDecidableEq
code: instance (priority := 100) FunLike.toDecidableEq {F α β : Type*}
    [DecidableEq β] [Fintype α] [FunLike F α β] : DecidableEq F 
goal: DecidableEq F
File: Mathlib/Data/Int/Range.lean

full_name: Int.range
code: /-- List enumerating `[m, n)`. This is the ℤ variant of `List.Ico`. -/
def range (m n : ℤ) : List ℤ 
goal: List ℤ

full_name: Int.mem_range_iff
code: theorem mem_range_iff {m n r : ℤ} : r ∈ range m n ↔ m ≤ r ∧ r < n 
goal: r ∈ m.range n ↔ m ≤ r ∧ r < n

full_name: Int.decidableLELT
code: instance decidableLELT (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r < n → P r) 
goal: Decidable (∀ (r : ℤ), m ≤ r → r < n → P r)

full_name: Int.decidableLELE
code: instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) 
goal: Decidable (∀ (r : ℤ), m ≤ r → r ≤ n → P r)

full_name: Int.decidableLTLT
code: instance decidableLTLT (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m < r → r < n → P r) 
goal: Decidable (∀ (r : ℤ), m < r → r < n → P r)

full_name: Int.decidableLTLE
code: instance decidableLTLE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m < r → r ≤ n → P r) 
goal: Decidable (∀ (r : ℤ), m < r → r ≤ n → P r)
File: Mathlib/Data/Int/Lemmas.lean

full_name: Int.le_natCast_sub
code: theorem le_natCast_sub (m n : ℕ) : (m - n : ℤ) ≤ ↑(m - n : ℕ) 
goal: ↑m - ↑n ≤ ↑(m - n)

full_name: Int.succ_natCast_pos
code: theorem succ_natCast_pos (n : ℕ) : 0 < (n : ℤ) + 1 
goal: 0 < ↑n + 1

full_name: Int.natAbs_eq_iff_sq_eq
code: theorem natAbs_eq_iff_sq_eq {a b : ℤ} : a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2 
goal: a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2

full_name: Int.natAbs_lt_iff_sq_lt
code: theorem natAbs_lt_iff_sq_lt {a b : ℤ} : a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2 
goal: a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2

full_name: Int.natAbs_le_iff_sq_le
code: theorem natAbs_le_iff_sq_le {a b : ℤ} : a.natAbs ≤ b.natAbs ↔ a ^ 2 ≤ b ^ 2 
goal: a.natAbs ≤ b.natAbs ↔ a ^ 2 ≤ b ^ 2

full_name: Int.natAbs_inj_of_nonneg_of_nonneg
code: theorem natAbs_inj_of_nonneg_of_nonneg {a b : ℤ} (ha : 0 ≤ a) (hb : 0 ≤ b) :
    natAbs a = natAbs b ↔ a = b 
goal: a.natAbs = b.natAbs ↔ a = b

full_name: Int.natAbs_inj_of_nonpos_of_nonpos
code: theorem natAbs_inj_of_nonpos_of_nonpos {a b : ℤ} (ha : a ≤ 0) (hb : b ≤ 0) :
    natAbs a = natAbs b ↔ a = b 
goal: a.natAbs = b.natAbs ↔ a = b

full_name: Int.natAbs_inj_of_nonneg_of_nonpos
code: theorem natAbs_inj_of_nonneg_of_nonpos {a b : ℤ} (ha : 0 ≤ a) (hb : b ≤ 0) :
    natAbs a = natAbs b ↔ a = -b 
goal: a.natAbs = b.natAbs ↔ a = -b

full_name: Int.natAbs_inj_of_nonpos_of_nonneg
code: theorem natAbs_inj_of_nonpos_of_nonneg {a b : ℤ} (ha : a ≤ 0) (hb : 0 ≤ b) :
    natAbs a = natAbs b ↔ -a = b 
goal: a.natAbs = b.natAbs ↔ -a = b

full_name: Int.natAbs_coe_sub_coe_le_of_le
code: /-- A specialization of `abs_sub_le_of_nonneg_of_le` for working with the signed subtraction
  of natural numbers. -/
theorem natAbs_coe_sub_coe_le_of_le {a b n : ℕ} (a_le_n : a ≤ n) (b_le_n : b ≤ n) :
    natAbs (a - b : ℤ) ≤ n 
goal: (↑a - ↑b).natAbs ≤ n

full_name: Int.natAbs_coe_sub_coe_lt_of_lt
code: /-- A specialization of `abs_sub_lt_of_nonneg_of_lt` for working with the signed subtraction
  of natural numbers. -/
theorem natAbs_coe_sub_coe_lt_of_lt {a b n : ℕ} (a_lt_n : a < n) (b_lt_n : b < n) :
    natAbs (a - b : ℤ) < n 
goal: (↑a - ↑b).natAbs < n

full_name: Int.strictMonoOn_natAbs
code: theorem strictMonoOn_natAbs : StrictMonoOn natAbs (Ici 0) 
goal: StrictMonoOn Int.natAbs (Set.Ici 0)

full_name: Int.strictAntiOn_natAbs
code: theorem strictAntiOn_natAbs : StrictAntiOn natAbs (Iic 0) 
goal: StrictAntiOn Int.natAbs (Set.Iic 0)

full_name: Int.injOn_natAbs_Ici
code: theorem injOn_natAbs_Ici : InjOn natAbs (Ici 0) 
goal: Set.InjOn Int.natAbs (Set.Ici 0)

full_name: Int.injOn_natAbs_Iic
code: theorem injOn_natAbs_Iic : InjOn natAbs (Iic 0) 
goal: Set.InjOn Int.natAbs (Set.Iic 0)

full_name: Int.toNat_of_nonpos
code: theorem toNat_of_nonpos : ∀ {z : ℤ}, z ≤ 0 → z.toNat = 0
  
goal: z ≤ 0 → z.toNat = 0

full_name: Int.div2_bit
code: @[simp]
theorem div2_bit (b n) : div2 (bit b n) = n 
goal: (Int.bit b n).div2 = n
File: Mathlib/Data/Int/Cast/Basic.lean

full_name: Nat.cast_sub
code: @[simp, norm_cast]
theorem cast_sub {m n} (h : m ≤ n) : ((n - m : ℕ) : R) = n - m 
goal: ↑(n - m) = ↑n - ↑m

full_name: Nat.cast_pred
code: @[simp, norm_cast]
theorem cast_pred : ∀ {n}, 0 < n → ((n - 1 : ℕ) : R) = n - 1
  
goal: 0 < n → ↑(n - 1) = ↑n - 1

full_name: Int.cast_negSucc
code: @[simp, norm_cast squash]
theorem cast_negSucc (n : ℕ) : (-[n+1] : R) = -(n + 1 : ℕ) 
goal: ↑(Int.negSucc n) = -↑(n + 1)

full_name: Int.cast_zero
code: @[simp, norm_cast]
theorem cast_zero : ((0 : ℤ) : R) = 0 
goal: ↑0 = 0

full_name: Int.cast_natCast
code: @[simp high, nolint simpNF, norm_cast]
theorem cast_natCast (n : ℕ) : ((n : ℤ) : R) = n 
goal: ↑↑n = ↑n

full_name: Int.cast_ofNat
code: @[simp, norm_cast]
theorem cast_ofNat (n : ℕ) [n.AtLeastTwo] :
    ((no_index (OfNat.ofNat n) : ℤ) : R) = OfNat.ofNat n 
goal: ↑(OfNat.ofNat n) = OfNat.ofNat n

full_name: Int.cast_one
code: @[simp, norm_cast]
theorem cast_one : ((1 : ℤ) : R) = 1 
goal: ↑1 = 1

full_name: Int.cast_neg
code: @[simp, norm_cast]
theorem cast_neg : ∀ n, ((-n : ℤ) : R) = -n
  
goal: ↑(-n) = -↑n

full_name: Int.cast_subNatNat
code: @[simp, norm_cast]
theorem cast_subNatNat (m n) : ((Int.subNatNat m n : ℤ) : R) = m - n 
goal: ↑(Int.subNatNat m n) = ↑m - ↑n

full_name: Int.cast_negOfNat
code: @[simp]
theorem cast_negOfNat (n : ℕ) : ((negOfNat n : ℤ) : R) = -n 
goal: ↑(Int.negOfNat n) = -↑n

full_name: Int.cast_add
code: @[simp, norm_cast]
theorem cast_add : ∀ m n, ((m + n : ℤ) : R) = m + n
  
goal: ↑(m + n) = ↑m + ↑n

full_name: Int.cast_sub
code: @[simp, norm_cast]
theorem cast_sub (m n) : ((m - n : ℤ) : R) = m - n 
goal: ↑(m - n) = ↑m - ↑n

full_name: Int.cast_two
code: theorem cast_two : ((2 : ℤ) : R) = 2 
goal: ↑2 = 2

full_name: Int.cast_three
code: theorem cast_three : ((3 : ℤ) : R) = 3 
goal: ↑3 = 3

full_name: Int.cast_four
code: theorem cast_four : ((4 : ℤ) : R) = 4 
goal: ↑4 = 4
File: Mathlib/Data/Int/Cast/Defs.lean

full_name: Int.castDef
code: /-- Default value for `IntCast.intCast` in an `AddGroupWithOne`. -/
protected def Int.castDef {R : Type u} [NatCast R] [Neg R] : ℤ → R
  
goal: ℤ → R

full_name: AddGroupWithOne.intCast_negSucc
code: /-- An `AddGroupWithOne` is an `AddGroup` with a 1. It also contains data for the unique
homomorphisms `ℕ → R` and `ℤ → R`. -/
class AddGroupWithOne (R : Type u) extends IntCast R, AddMonoidWithOne R, AddGroup R where
  /-- The canonical homomorphism `ℤ → R`. -/
  intCast := Int.castDef
  /-- The canonical homomorphism `ℤ → R` agrees with the one from `ℕ → R` on `ℕ`. -/
  intCast_ofNat : ∀ n : ℕ, intCast (n : ℕ) = Nat.cast n := by intros; rfl
  /-- The canonical homomorphism `ℤ → R` for negative values is just the negation of the values
  of the canonical homomorphism `ℕ → R`. -/
  intCast_negSucc : ∀ n : ℕ, intCast (Int.negSucc n) = - Nat.cast (n + 1) := by intros; rfl
goal: IntCast.intCast (Int.negSucc n) = -↑(n + 1)

full_name: AddGroupWithOne
code: /-- An `AddGroupWithOne` is an `AddGroup` with a 1. It also contains data for the unique
homomorphisms `ℕ → R` and `ℤ → R`. -/
class AddGroupWithOne (R : Type u) extends IntCast R, AddMonoidWithOne R, AddGroup R where
  /-- The canonical homomorphism `ℤ → R`. -/
  intCast := Int.castDef
  /-- The canonical homomorphism `ℤ → R` agrees with the one from `ℕ → R` on `ℕ`. -/
  intCast_ofNat : ∀ n : ℕ, intCast (n : ℕ) = Nat.cast n := by intros; rfl
  /-- The canonical homomorphism `ℤ → R` for negative values is just the negation of the values
  of the canonical homomorphism `ℕ → R`. -/
  intCast_negSucc : ∀ n : ℕ, intCast (Int.negSucc n) = - Nat.cast (n + 1) := by intros; rfl
goal: Type u

full_name: AddGroupWithOne.intCast_ofNat
code: /-- An `AddGroupWithOne` is an `AddGroup` with a 1. It also contains data for the unique
homomorphisms `ℕ → R` and `ℤ → R`. -/
class AddGroupWithOne (R : Type u) extends IntCast R, AddMonoidWithOne R, AddGroup R where
  /-- The canonical homomorphism `ℤ → R`. -/
  intCast := Int.castDef
  /-- The canonical homomorphism `ℤ → R` agrees with the one from `ℕ → R` on `ℕ`. -/
  intCast_ofNat : ∀ n : ℕ, intCast (n : ℕ) = Nat.cast n := by intros; rfl
  /-- The canonical homomorphism `ℤ → R` for negative values is just the negation of the values
  of the canonical homomorphism `ℕ → R`. -/
  intCast_negSucc : ∀ n : ℕ, intCast (Int.negSucc n) = - Nat.cast (n + 1) := by intros; rfl
goal: IntCast.intCast ↑n = ↑n

full_name: AddCommGroupWithOne
code: /-- An `AddCommGroupWithOne` is an `AddGroupWithOne` satisfying `a + b = b + a`. -/
class AddCommGroupWithOne (R : Type u)
  extends AddCommGroup R, AddGroupWithOne R, AddCommMonoidWithOne R
goal: Type u
File: Mathlib/Data/Int/Cast/Field.lean

full_name: Int.cast_neg_natCast
code: /-- Auxiliary lemma for norm_cast to move the cast `-↑n` upwards to `↑-↑n`.

(The restriction to `DivisionRing` is necessary, otherwise this would also apply in the case where
`R = ℤ` and cause nontermination.)
-/
@[norm_cast]
theorem cast_neg_natCast {R} [DivisionRing R] (n : ℕ) : ((-n : ℤ) : R) = -n 
goal: ↑(-↑n) = -↑n

full_name: Int.cast_div
code: @[simp]
theorem cast_div [DivisionRing α] {m n : ℤ} (n_dvd : n ∣ m) (hn : (n : α) ≠ 0) :
    ((m / n : ℤ) : α) = m / n 
goal: ↑(m / n) = ↑m / ↑n
File: Mathlib/Data/Int/Cast/Prod.lean

full_name: Prod.instAddGroupWithOne
code: instance : AddGroupWithOne (α × β) 
goal: AddGroupWithOne (α × β)

full_name: Prod.fst_intCast
code: @[simp]
theorem fst_intCast (n : ℤ) : (n : α × β).fst = n 
goal: (↑n).1 = ↑n

full_name: Prod.snd_intCast
code: @[simp]
theorem snd_intCast (n : ℤ) : (n : α × β).snd = n 
goal: (↑n).2 = ↑n