ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Localization/Resolution.lean
/-- The canonical map `Φ.RightResolution X₂ → Φ.op.LeftResolution (Opposite.op X₂)`. -/
@[simps]
def RightResolution.op {X₂ : C₂} (L : Φ.RightResolution X₂) :
    Φ.op.LeftResolution (Opposite.op X₂)
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
/-- The addition of two nonsingular affine points in `W` on a sloped line is nonsingular. -/
lemma nonsingular_add {x₁ x₂ y₁ y₂ : F} (h₁ : W.Nonsingular x₁ y₁) (h₂ : W.Nonsingular x₂ y₂)
    (hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂) :
    W.Nonsingular (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂) (W.addY x₁ x₂ y₁ <| W.slope x₁ x₂ y₁ y₂)
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
theorem nnnorm_eq_sup_normAtPlace (x : E K) :
    ‖x‖₊ = univ.sup fun w ↦ ⟨normAtPlace w x, normAtPlace_nonneg w x⟩
-- Mathlib/CategoryTheory/Monad/Algebra.lean
/-- Isomorphic monads give equivalent categories of algebras. Furthermore, they are equivalent as
categories over `C`, that is, we have `algebraEquivOfIsoMonads h ⋙ forget = forget`.
-/
@[simps]
def algebraEquivOfIsoMonads {T₁ T₂ : Monad C} (h : T₁ ≅ T₂) : Algebra T₁ ≌ Algebra T₂
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
theorem eq_of_eqOn_sdense {s : Set R} (hs : closure s = ⊤) {f g : F}
    (h : s.EqOn (f : R → S) (g : R → S)) : f = g
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
/-- Continuity from above: the measure of the intersection of a sequence of
measurable sets is the infimum of the measures of the partial intersections. -/
theorem measure_iInter_eq_iInf' {α ι : Type*} [MeasurableSpace α] {μ : Measure α}
    [Countable ι] [Preorder ι] [IsDirected ι (· ≤ ·)]
    {f : ι → Set α} (h : ∀ i, MeasurableSet (f i)) (hfin : ∃ i, μ (f i) ≠ ∞) :
    μ (⋂ i, f i) = ⨅ i, μ (⋂ j ≤ i, f j)
-- Mathlib/Topology/Compactness/Lindelof.lean
/-- A set `s` is Lindelöf if for every family of closed sets whose intersection avoids `s`,
there exists a countable subfamily whose intersection avoids `s`. -/
theorem isLindelof_of_countable_subfamily_closed
    (h :
      ∀ {ι : Type u} (t : ι → Set X), (∀ i, IsClosed (t i)) → (s ∩ ⋂ i, t i) = ∅ →
        ∃ u : Set ι, u.Countable ∧ (s ∩ ⋂ i ∈ u, t i) = ∅) :
    IsLindelof s
-- Mathlib/FieldTheory/RatFunc/Basic.lean
/-- A version of `num_div_dvd` with the LHS in simp normal form -/
@[simp]
theorem num_div_dvd' (p : K[X]) {q : K[X]} (hq : q ≠ 0) :
    C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q) ∣ p
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ
-- Mathlib/Combinatorics/Enumerative/Composition.lean
@[simp]
theorem CompositionAsSet.toComposition_length (c : CompositionAsSet n) :
    c.toComposition.length = c.length
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem map_involutive_iff {f : α → α} :
    Involutive (map f) ↔ Involutive f
-- Mathlib/Probability/Kernel/Disintegration/CdfToKernel.lean
lemma stieltjesOfMeasurableRat_ae_eq (hf : IsRatCondKernelCDF f κ ν) (a : α) (q : ℚ) :
    (fun b ↦ stieltjesOfMeasurableRat f hf.measurable (a, b) q) =ᵐ[ν a] fun b ↦ f (a, b) q
-- .lake/packages/lean4/src/lean/Init/Data/Option/Lemmas.lean
theorem bind_eq_some : x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b
-- Mathlib/CategoryTheory/Sums/Associator.lean
@[simp]
theorem associator_map_inl_inr {X Y : D} (f : inl (inr X) ⟶ inl (inr Y)) :
    (associator C D E).map f = f
-- Mathlib/CategoryTheory/Idempotents/FunctorExtension.lean
/-- The natural isomorphism expressing that functors `Karoubi C ⥤ Karoubi D` obtained
using `functorExtension₂` actually extends the original functors `C ⥤ D`. -/
@[simps!]
def functorExtension₂CompWhiskeringLeftToKaroubiIso :
    functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ≅
      (whiskeringRight C D (Karoubi D)).obj (toKaroubi D)
-- Mathlib/NumberTheory/Multiplicity.lean
theorem geom_sum₂_eq_one : multiplicity (↑p) (∑ i ∈ range p, x ^ i * y ^ (p - 1 - i)) = 1
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp]
theorem coe_toSubsemiring (s : Subring R) : (s.toSubsemiring : Set R) = s
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
/-- The power series expansion of `Real.cos`. -/
theorem Real.hasSum_cos (r : ℝ) :
    HasSum (fun n : ℕ => (-1) ^ n * r ^ (2 * n) / ↑(2 * n)!) (Real.cos r)
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
theorem nndist_lineMap_lineMap (p₁ p₂ : P) (c₁ c₂ : 𝕜) :
    nndist (lineMap p₁ p₂ c₁) (lineMap p₁ p₂ c₂) = nndist c₁ c₂ * nndist p₁ p₂
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
theorem flip_iff : IsPullback fst snd f g ↔ IsPullback snd fst g f
-- Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean
/-- Given any distinguished triangle `T`, then we know `T.rotate` is also distinguished.
-/
theorem rot_of_distTriang (T : Triangle C) (H : T ∈ distTriang C) : T.rotate ∈ distTriang C
-- Mathlib/Algebra/Star/Pointwise.lean
@[simp]
theorem star_preimage [Star α] : Star.star ⁻¹' s = s⋆
-- Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean
theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ ball (0 : E) (1 + D)) :
    y D x = 0
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem edges_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
    (p.concat h).edges = p.edges.concat s(v, w)
-- Mathlib/Algebra/Pointwise/Stabilizer.lean
@[to_additive (attr := simp)]
lemma stabilizer_singleton (b : α) : stabilizer G ({b} : Set α) = stabilizer G b
-- Mathlib/RingTheory/HahnSeries/Basic.lean
@[simp]
theorem orderTop_zero : orderTop (0 : HahnSeries Γ R) = ⊤
-- Mathlib/CategoryTheory/GradedObject/Trifunctor.lean
/-- Given a map `r : I₁ × I₂ × I₃ → J`, a `BifunctorComp₂₃IndexData r` consists of the data
of a type `I₂₃`, maps `p : I₂ × I₃ → I₂₃` and `q : I₁ × I₂₃ → J`, such that `r` is obtained
by composition of `p` and `q`. -/
structure BifunctorComp₂₃IndexData :=
  /-- an auxiliary type -/
  I₂₃ : Type*
  /-- a map `I₂ × I₃ → I₂₃` -/
  p : I₂ × I₃ → I₂₃
  /-- a map `I₁ × I₂₃ → J` -/
  q : I₁ × I₂₃ → J
  hpq (i : I₁ × I₂ × I₃) : q ⟨i.1, p i.2⟩ = r i
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem coe_to_linearEquiv (e : M ≃ₗ⁅R,L⁆ N) : ((e : M ≃ₗ[R] N) : M → N) = e
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
protected theorem neg_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x : A} (hx : x ∈ S) : -x ∈ S
-- Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
/-- If `f` is a partial homeomorphism defined on a neighbourhood of `f.symm a`, and `f` has an
invertible derivative `f'` at `f.symm a`, then `f.symm` has the derivative `f'⁻¹` at `a`.

This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem PartialHomeomorph.hasFDerivAt_symm (f : PartialHomeomorph E F) {f' : E ≃L[𝕜] F} {a : F}
    (ha : a ∈ f.target) (htff' : HasFDerivAt f (f' : E →L[𝕜] F) (f.symm a)) :
    HasFDerivAt f.symm (f'.symm : F →L[𝕜] E) a
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem preimage_iterate_ae_eq {s : Set α} {f : α → α} (hf : QuasiMeasurePreserving f μ μ) (k : ℕ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : f^[k] ⁻¹' s =ᵐ[μ] s
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem diam_pos_iff : 0 < diam s ↔ s.Nontrivial
-- Mathlib/Order/CompleteLattice.lean
theorem iSup_true {s : True → α} : iSup s = s trivial
-- Mathlib/Data/Matroid/Basic.lean
theorem Base.eq_of_subset_base (hB₁ : M.Base B₁) (hB₂ : M.Base B₂) (hB₁B₂ : B₁ ⊆ B₂) :
    B₁ = B₂
-- Mathlib/Geometry/Euclidean/Sphere/Basic.lean
/-- Given a point on a sphere and a point not outside it, the inner product between the
difference of those points and the radius vector is positive unless the points are equal. -/
theorem inner_pos_or_eq_of_dist_le_radius {s : Sphere P} {p₁ p₂ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : dist p₂ s.center ≤ s.radius) : 0 < ⟪p₁ -ᵥ p₂, p₁ -ᵥ s.center⟫ ∨ p₁ = p₂
-- Mathlib/MeasureTheory/Measure/Hausdorff.lean
theorem mkMetric_smul (m : ℝ≥0∞ → ℝ≥0∞) {c : ℝ≥0∞} (hc : c ≠ ∞) (hc' : c ≠ 0) :
    (mkMetric (c • m) : OuterMeasure X) = c • mkMetric m
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem restrict_congr_meas (hs : MeasurableSet s) :
    μ.restrict s = ν.restrict s ↔ ∀ t ⊆ s, MeasurableSet t → μ t = ν t
-- Mathlib/Algebra/Lie/OfAssociative.lean
theorem toEnd_comp_subtype_mem (m : M) (hm : m ∈ (N : Submodule R M)) :
    (toEnd R L M x).comp (N : Submodule R M).subtype ⟨m, hm⟩ ∈ (N : Submodule R M)
-- Mathlib/GroupTheory/Submonoid/Center.lean
@[to_additive]
theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g
-- Mathlib/Order/Filter/Lift.lean
theorem mem_lift {s : Set β} {t : Set α} (ht : t ∈ f) (hs : s ∈ g t) : s ∈ f.lift g
-- Mathlib/Topology/MetricSpace/Antilipschitz.lean
theorem closedEmbedding {α : Type*} {β : Type*} [EMetricSpace α] [EMetricSpace β] {K : ℝ≥0}
    {f : α → β} [CompleteSpace α] (hf : AntilipschitzWith K f) (hfc : UniformContinuous f) :
    ClosedEmbedding f
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
@[simp]
theorem prodComm_symm : (prodComm I J M N n).symm = prodComm J I N M n
-- Mathlib/GroupTheory/QuotientGroup.lean
@[to_additive (attr := simp)]
theorem mk_one : ((1 : G) : Q) = 1
-- Mathlib/Topology/Order/LawsonTopology.lean
@[simp] lemma to_Lawson_symm_eq : (@toLawson α).symm = ofLawson
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
theorem familyOfBFamily'_enum {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o}
    (ho : type r = o) (f : ∀ a < o, α) (i hi) :
    familyOfBFamily' r ho f (enum r i (by rwa [ho])) = f i hi
-- Mathlib/Deprecated/Ring.lean
/-- Ring homomorphisms preserve additive inverses. -/
theorem map_neg (hf : IsRingHom f) : f (-x) = -f x
-- Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean
/-- A strong mono category is a category in which every monomorphism is strong. -/
class StrongMonoCategory : Prop where
  /-- A strong mono category is a category in which every monomorphism is strong. -/
  strongMono_of_mono : ∀ {X Y : C} (f : X ⟶ Y) [Mono f], StrongMono f
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem max_le {a b c : Nat} : max a b ≤ c ↔ a ≤ c ∧ b ≤ c
-- Mathlib/RingTheory/OreLocalization/Ring.lean
@[simp]
lemma nsmul_eq_nsmul (n : ℕ) (x : X[S⁻¹]) :
    letI inst := OreLocalization.instModuleOfIsScalarTower (R₀ := ℕ) (R := R) (X := X) (S := S)
    HSMul.hSMul (self := @instHSMul _ _ inst.toSMul) n x = n • x
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
/-- The cosine of the angle between three points is 0 if and only if the angle is π / 2. -/
nonrec theorem cos_eq_zero_iff_angle_eq_pi_div_two {p₁ p₂ p₃ : P} :
    Real.cos (∠ p₁ p₂ p₃) = 0 ↔ ∠ p₁ p₂ p₃ = π / 2
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma isUnit_cfc_iff (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (ha : p a := by cfc_tac) : IsUnit (cfc f a) ↔ ∀ x ∈ spectrum R a, f x ≠ 0
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp]
theorem total_single (c : R) (a : α) : Finsupp.total α M R v (single a c) = c • v a
-- Mathlib/LinearAlgebra/Dual.lean
@[simp]
theorem dualAnnihilator_bot : (⊥ : Submodule R M).dualAnnihilator = ⊤
-- Mathlib/FieldTheory/Adjoin.lean
@[simp]
theorem adjoin_zero : F⟮(0 : E)⟯ = ⊥
-- Mathlib/Analysis/Calculus/Deriv/Comp.lean
theorem HasDerivAt.comp_hasDerivWithinAt (hh₂ : HasDerivAt h₂ h₂' (h x))
    (hh : HasDerivWithinAt h h' s x) : HasDerivWithinAt (h₂ ∘ h) (h₂' * h') s x
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive]
protected theorem inv_le_inv (hf : f ≤ g) : f⁻¹ ≤ g⁻¹
-- Mathlib/Order/BoundedOrder.lean
theorem max_bot_left [OrderBot α] (a : α) : max ⊥ a = a
-- Mathlib/Algebra/GroupWithZero/Basic.lean
/-- To match `one_mul_eq_id`. -/
theorem zero_mul_eq_const : ((0 : M₀) * ·) = Function.const _ 0
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_emptyCollection_iff {α : Type u} {s : Set α} : #s = 0 ↔ s = ∅
-- Mathlib/Algebra/Group/Units/Equiv.lean
@[to_additive (attr := simp)]
theorem coe_mulRight (a : G) : ⇑(Equiv.mulRight a) = fun x => x * a
-- Mathlib/CategoryTheory/Groupoid/VertexGroup.lean
/-- A functor defines a morphism of vertex group. -/
@[simps]
def CategoryTheory.Functor.mapVertexGroup {D : Type v} [Groupoid D] (φ : C ⥤ D) (c : C) :
    (c ⟶ c) →* (φ.obj c ⟶ φ.obj c)
-- Mathlib/CategoryTheory/Bicategory/Strict.lean
@[simp]
theorem whiskerLeft_eqToHom {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g = h) :
    f ◁ eqToHom η = eqToHom (congr_arg₂ (· ≫ ·) rfl η)
-- Mathlib/Data/Finset/Sum.lean
@[simp]
theorem card_disjSum : (s.disjSum t).card = s.card + t.card
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
theorem bind_pure_comp : bind p (pure ∘ f) = map f p
-- Mathlib/LinearAlgebra/PiTensorProduct.lean
theorem map_mul (f₁ f₂ : Π i, s i →ₗ[R] s i) :
    map (fun i ↦ f₁ i * f₂ i) = map f₁ * map f₂
-- Mathlib/Topology/Order/OrderClosed.lean
theorem Ioo_mem_nhdsWithin_Iio' (H : a < b) : Ioo a b ∈ 𝓝[<] b
-- Mathlib/Order/Heyting/Basic.lean
theorem disjoint_compl_right : Disjoint a aᶜ
-- Mathlib/CategoryTheory/Preadditive/Biproducts.lean
/-- A preadditive category with finite coproducts has finite biproducts. -/
theorem HasFiniteBiproducts.of_hasFiniteCoproducts [HasFiniteCoproducts C] :
    HasFiniteBiproducts C
-- Mathlib/Analysis/Calculus/Conformal/NormedSpace.lean
theorem comp {f : X → Y} {g : Y → Z} (x : X) (hg : ConformalAt g (f x)) (hf : ConformalAt f x) :
    ConformalAt (g ∘ f) x
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem take_left' {l₁ l₂ : List α} {n} (h : length l₁ = n) : take n (l₁ ++ l₂) = l₁
-- Mathlib/Data/Matrix/RowCol.lean
@[simp] theorem col_zero [Zero α] : col ι (0 : m → α) = 0
-- Mathlib/GroupTheory/SemidirectProduct.lean
@[simp]
theorem rightHom_eq_right : (rightHom : N ⋊[φ] G → G) = right
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem setIntegral_eq_zero_of_ae_eq_zero (ht_eq : ∀ᵐ x ∂μ, x ∈ t → f x = 0) :
    ∫ x in t, f x ∂μ = 0
-- Mathlib/Algebra/Module/LinearMap/End.lean
/-- See also `Module.End.natCast_def`. -/
@[simp]
theorem _root_.Module.End.natCast_apply (n : ℕ) (m : M) : (↑n : Module.End R M) m = n • m
-- Mathlib/RingTheory/Algebraic.lean
@[simp]
theorem Polynomial.algebraMap_pi_self_eq_eval :
    (algebraMap R'[X] (R' → R') : R'[X] → R' → R') = fun p z => eval z p
-- Mathlib/Order/SuccPred/Limit.lean
@[simp]
theorem isSuccLimit_of_dense [DenselyOrdered α] (a : α) : IsSuccLimit a
-- Mathlib/RingTheory/Ideal/Pointwise.lean
@[simp]
theorem pointwise_smul_le_pointwise_smul_iff {a : M} {S T : Ideal R} : a • S ≤ a • T ↔ S ≤ T
-- Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean
theorem aemeasurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
    (hf : Continuous f) (μ : Measure E) :
    AEMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem ContDiffWithinAt.prod_map {s : Set E} {t : Set E'} {f : E → F} {g : E' → F'} {x : E}
    {y : E'} (hf : ContDiffWithinAt 𝕜 n f s x) (hg : ContDiffWithinAt 𝕜 n g t y) :
    ContDiffWithinAt 𝕜 n (Prod.map f g) (s ×ˢ t) (x, y)
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
@[simp]
theorem nonempty_closedBall : (closedBall x ε).Nonempty ↔ 0 ≤ ε
-- Mathlib/Tactic/Positivity/Basic.lean
private lemma ite_ne_zero_of_ne_zero_of_pos [Preorder α] (ha : a ≠ 0) (hb : 0 < b) :
    ite p a b ≠ 0
-- Mathlib/Order/GaloisConnection.lean
theorem isLUB_of_l_image [Preorder α] [Preorder β] (gi : GaloisCoinsertion l u) {s : Set α} {a : β}
    (hs : IsLUB (l '' s) a) : IsLUB s (u a)
-- Mathlib/Data/Set/Lattice.lean
theorem subset_sUnion_of_subset {s : Set α} (t : Set (Set α)) (u : Set α) (h₁ : s ⊆ u)
    (h₂ : u ∈ t) : s ⊆ ⋃₀t
-- Mathlib/Data/Nat/Factorial/Basic.lean
/-- `n.ascFactorial k = (n + k - 1)! / (n - 1)!` for `n > 0` but without ℕ-division. See
`Nat.ascFactorial_eq_div` for the version with ℕ-division. Consider using
`factorial_mul_ascFactorial` to avoid complications of ℕ-subtraction. -/
theorem factorial_mul_ascFactorial' (n k : ℕ) (h : 0 < n) :
    (n - 1) ! * n.ascFactorial k = (n + k - 1)!
-- Mathlib/Analysis/Calculus/MeanValue.lean
theorem _root_.eq_of_fderiv_eq
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {f g : E → G}
    (hf : Differentiable 𝕜 f) (hg : Differentiable 𝕜 g)
    (hf' : ∀ x, fderiv 𝕜 f x = fderiv 𝕜 g x) (x : E) (hfgx : f x = g x) : f = g
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem add_apply (v w : VectorMeasure α M) (i : Set α) : (v + w) i = v i + w i
-- Mathlib/Analysis/Normed/Ring/Units.lean
/-- The `nonunits` in a complete normed ring are contained in the complement of the ball of radius
`1` centered at `1 : R`. -/
theorem subset_compl_ball : nonunits R ⊆ (Metric.ball (1 : R) 1)ᶜ
-- Mathlib/Algebra/Order/Ring/Abs.lean
/-- If `n` is even and `a` is even, then `n % a` is even. -/
lemma Even.mod_even (hn : Even n) (ha : Even a) : Even (n % a)
-- Mathlib/Data/Complex/Abs.lean
theorem isCauSeq_re (f : CauSeq ℂ Complex.abs) : IsCauSeq abs' fun n => (f n).re
-- Mathlib/Topology/Order/LeftRightNhds.lean
/-- The following statements are equivalent:

0. `s` is a neighborhood of `a` within `(a, +∞)`;
1. `s` is a neighborhood of `a` within `(a, b]`;
2. `s` is a neighborhood of `a` within `(a, b)`;
3. `s` includes `(a, u)` for some `u ∈ (a, b]`;
4. `s` includes `(a, u)` for some `u > a`.
-/
theorem TFAE_mem_nhdsWithin_Ioi {a b : α} (hab : a < b) (s : Set α) :
    TFAE [s ∈ 𝓝[>] a,
      s ∈ 𝓝[Ioc a b] a,
      s ∈ 𝓝[Ioo a b] a,
      ∃ u ∈ Ioc a b, Ioo a u ⊆ s,
      ∃ u ∈ Ioi a, Ioo a u ⊆ s]
-- Mathlib/Algebra/Homology/Embedding/Boundary.lean
lemma not_boundaryGE_next [e.IsRelIff] {j k : ι} (hk : c.Rel j k) :
    ¬ e.BoundaryGE k
-- Mathlib/Data/List/Nodup.lean
theorem Nodup.erase_eq_filter [DecidableEq α] {l} (d : Nodup l) (a : α) :
    l.erase a = l.filter (· ≠ a)
-- Mathlib/Analysis/SpecialFunctions/Exp.lean
@[simp]
theorem comap_exp_nhds_zero : comap exp (𝓝 0) = comap re atBot
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem cons_sigma : (a ::ₘ s).sigma t = (t a).map (Sigma.mk a) + s.sigma t
-- Mathlib/Order/RelClasses.lean
theorem ssubset_of_subset_of_ssubset [IsTrans α (· ⊆ ·)] (h₁ : a ⊆ b) (h₂ : b ⊂ c) : a ⊂ c
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem ord_one : ord 1 = 1
-- Mathlib/Geometry/Manifold/ContMDiff/Atlas.lean
theorem contMDiff_model : ContMDiff I 𝓘(𝕜, E) n I
-- Mathlib/LinearAlgebra/Alternating/DomCoprod.lean
/-- Computing the `MultilinearMap.alternatization` of the `MultilinearMap.domCoprod` is the same
as computing the `AlternatingMap.domCoprod` of the `MultilinearMap.alternatization`s.
-/
theorem MultilinearMap.domCoprod_alternization [DecidableEq ιa] [DecidableEq ιb]
    (a : MultilinearMap R' (fun _ : ιa => Mᵢ) N₁) (b : MultilinearMap R' (fun _ : ιb => Mᵢ) N₂) :
    MultilinearMap.alternatization (MultilinearMap.domCoprod a b) =
      a.alternatization.domCoprod (MultilinearMap.alternatization b)
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
@[simp]
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0
-- Mathlib/Topology/UniformSpace/Completion.lean
theorem denseRange_coe₂ :
    DenseRange fun x : α × β => ((x.1 : Completion α), (x.2 : Completion β))
-- Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
theorem hasDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s)
    (hf' : TendstoLocallyUniformlyOn f' g' l s)
    (hf : ∀ᶠ n in l, ∀ x ∈ s, HasDerivAt (f n) (f' n x) x)
    (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasDerivAt g (g' x) x
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If `f : ℝ → ℝ` is convex on `S` and differentiable at `x ∈ S`, then the slope of any secant
line with left endpoint at `x` is bounded below by the derivative of `f` at `x`. -/
lemma le_slope_of_hasDerivAt (hfc : ConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (ha : HasDerivAt f f' x) :
    f' ≤ slope f x y
-- Mathlib/Order/Interval/Set/WithBotTop.lean
@[simp]
theorem preimage_coe_Ici : (some : α → WithTop α) ⁻¹' Ici a = Ici a
-- Mathlib/Computability/TuringMachine.lean
theorem proj_map_nth {ι : Type*} {Γ : ι → Type*} [∀ i, Inhabited (Γ i)] (i : ι) (L n) :
    (ListBlank.map (@proj ι Γ _ i) L).nth n = L.nth n i
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
-- Porting note: had to add an extra coercion arrow on the right hand side.
theorem coe_quotQuotEquivQuotSupₐ : ⇑(quotQuotEquivQuotSupₐ R I J) = ⇑(quotQuotEquivQuotSup I J)
-- Mathlib/Combinatorics/Additive/AP/Three/Defs.lean
/-- Arithmetic progressions can be pushed forward along bijective 2-Freiman homs. -/
@[to_additive "Arithmetic progressions can be pushed forward along bijective 2-Freiman homs."]
lemma IsMulFreimanHom.mulRothNumber_mono (hf : IsMulFreimanHom 2 A B f) (hf' : Set.BijOn f A B) :
    mulRothNumber B ≤ mulRothNumber A
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
@[simp]
theorem image.map_id [HasImageMap (𝟙 f)] : image.map (𝟙 f) = 𝟙 (image f.hom)
-- Mathlib/Data/Set/Finite.lean
theorem card_range_of_injective [Fintype α] {f : α → β} (hf : Injective f) [Fintype (range f)] :
    Fintype.card (range f) = Fintype.card α
-- Mathlib/Analysis/Convex/Function.lean
/-- Right translation preserves concavity. -/
theorem ConcaveOn.translate_right (hf : ConcaveOn 𝕜 s f) (c : E) :
    ConcaveOn 𝕜 ((fun z => c + z) ⁻¹' s) (f ∘ fun z => c + z)
-- Mathlib/SetTheory/Surreal/Multiplication.lean
lemma numeric_option_mul_option (ih : ∀ a, ArgsRel a (Args.P1 x y) → P124 a) (hx : IsOption x' x)
    (hy : IsOption y' y) : (x' * y').Numeric
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
@[norm_cast, simp]
theorem coe_add (f g : P →ᴬ[R] W) : ⇑(f + g) = f + g
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Icc_ssubset_Icc_right (hI : a₂ ≤ b₂) (ha : a₂ ≤ a₁) (hb : b₁ < b₂) :
    Icc a₁ b₁ ⊂ Icc a₂ b₂
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem sub_eq_zero_of_le {n m : Nat} (h : n ≤ m) : n - m = 0
-- Mathlib/Topology/Gluing.lean
theorem preimage_range (i j : D.J) : 𝖣.ι j ⁻¹' Set.range (𝖣.ι i) = Set.range (D.f j i)
-- Mathlib/Order/Interval/Set/Monotone.lean
protected theorem Monotone.Ioo (hf : Monotone f) (hg : Antitone g) :
    Antitone fun x => Ioo (f x) (g x)
-- Mathlib/Order/Heyting/Basic.lean
@[simp]
theorem codisjoint_hnot_hnot_right_iff : Codisjoint a (￢￢b) ↔ Codisjoint a b
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Linear.lean
theorem Certificate.of_combineHyps (ctx : Context) (c : PolyCnstr) (cs : Certificate) (h : (combineHyps c cs).denote ctx → False) : c.denote ctx → cs.denote ctx
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
/-- If a word reduces to another word, then they have a common maximal reduction. -/
@[to_additive "If a word reduces to another word, then they have a common maximal reduction."]
theorem reduce.eq_of_red (H : Red L₁ L₂) : reduce L₁ = reduce L₂
-- Mathlib/NumberTheory/FLT/Three.lean
private lemma exists_cube_associated :
    (∃ X, Associated (X ^ 3) S.x) ∧ (∃ Y, Associated (Y ^ 3) S.y) ∧
      ∃ Z, Associated (Z ^ 3) S.z
-- Mathlib/CategoryTheory/Monoidal/Types/Basic.lean
@[simp]
theorem associator_hom_apply {X Y Z : Type u} {x : X} {y : Y} {z : Z} :
    ((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) ((x, y), z) = (x, (y, z))
-- Mathlib/Data/Matroid/Restrict.lean
theorem restrict_restriction (M : Matroid α) (R : Set α) (hR : R ⊆ M.E := by aesop_mat) :
    M ↾ R ≤r M
-- Mathlib/Data/Set/Pointwise/SMul.lean
theorem vsub_iUnion₂ (s : Set β) (t : ∀ i, κ i → Set β) :
    (s -ᵥ ⋃ (i) (j), t i j) = ⋃ (i) (j), s -ᵥ t i j
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem toFinset_range [DecidableEq α] [Fintype β] (f : β → α) [Fintype (Set.range f)] :
    (Set.range f).toFinset = Finset.univ.image f
-- Mathlib/MeasureTheory/Constructions/Pi.lean
/-- A measure on a finite product space equals the product measure if they are equal on rectangles
  with as sides sets that generate the corresponding σ-algebras. -/
theorem pi_eq_generateFrom {C : ∀ i, Set (Set (α i))}
    (hC : ∀ i, generateFrom (C i) = by apply_assumption) (h2C : ∀ i, IsPiSystem (C i))
    (h3C : ∀ i, (μ i).FiniteSpanningSetsIn (C i)) {μν : Measure (∀ i, α i)}
    (h₁ : ∀ s : ∀ i, Set (α i), (∀ i, s i ∈ C i) → μν (pi univ s) = ∏ i, μ i (s i)) :
    Measure.pi μ = μν
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
theorem p_comm : p1 𝒰 f g ≫ f = p2 𝒰 f g ≫ g