ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Adjunction/Basic.lean
/-- `F ⊣ G` represents the data of an adjunction between two functors
`F : C ⥤ D` and `G : D ⥤ C`. `F` is the left adjoint and `G` is the right adjoint.

To construct an `adjunction` between two functors, it's often easier to instead use the
constructors `mkOfHomEquiv` or `mkOfUnitCounit`. To construct a left adjoint,
there are also constructors `leftAdjointOfEquiv` and `adjunctionOfEquivLeft` (as
well as their duals) which can be simpler in practice.

Uniqueness of adjoints is shown in `CategoryTheory.Adjunction.Opposites`.

See <https://stacks.math.columbia.edu/tag/0037>.
-/
structure Adjunction (F : C ⥤ D) (G : D ⥤ C) where
  /-- The equivalence between `Hom (F X) Y` and `Hom X (G Y)` coming from an adjunction -/
  homEquiv : ∀ X Y, (F.obj X ⟶ Y) ≃ (X ⟶ G.obj Y)
  /-- The unit of an adjunction -/
  unit : 𝟭 C ⟶ F.comp G
  /-- The counit of an adjunction -/
  counit : G.comp F ⟶ 𝟭 D
  -- Porting note: It's strange that this `Prop` is being flagged by the `docBlame` linter
  /-- Naturality of the unit of an adjunction -/
  homEquiv_unit : ∀ {X Y f}, (homEquiv X Y) f = (unit : _ ⟶ _).app X ≫ G.map f := by aesop_cat
  -- Porting note: It's strange that this `Prop` is being flagged by the `docBlame` linter
  /-- Naturality of the counit of an adjunction -/
  homEquiv_counit : ∀ {X Y g}, (homEquiv X Y).symm g = F.map g ≫ counit.app Y := by aesop_cat
-- Mathlib/LinearAlgebra/Lagrange.lean
/-- This is the second barycentric form of the Lagrange interpolant. -/
theorem eval_interpolate_not_at_node' (hvs : Set.InjOn v s) (hs : s.Nonempty)
    (hx : ∀ i ∈ s, x ≠ v i) :
    eval x (interpolate s v r) =
      (∑ i ∈ s, nodalWeight s v i * (x - v i)⁻¹ * r i) /
        ∑ i ∈ s, nodalWeight s v i * (x - v i)⁻¹
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
theorem arg_eq_pi_div_two_iff {z : ℂ} : arg z = π / 2 ↔ z.re = 0 ∧ 0 < z.im
-- Mathlib/Analysis/Complex/Polynomial/Basic.lean
/-- An irreducible polynomial of prime degree with two non-real roots has full Galois group. -/
theorem galActionHom_bijective_of_prime_degree {p : ℚ[X]} (p_irr : Irreducible p)
    (p_deg : p.natDegree.Prime)
    (p_roots : Fintype.card (p.rootSet ℂ) = Fintype.card (p.rootSet ℝ) + 2) :
    Function.Bijective (galActionHom p ℂ)
-- Mathlib/Topology/ContinuousFunction/Ordered.lean
theorem le_def [PartialOrder β] {f g : C(α, β)} : f ≤ g ↔ ∀ a, f a ≤ g a
-- Mathlib/Data/Finset/Preimage.lean
theorem image_subset_iff_subset_preimage [DecidableEq β] {f : α → β} {s : Finset α} {t : Finset β}
    (hf : Set.InjOn f (f ⁻¹' ↑t)) : s.image f ⊆ t ↔ s ⊆ t.preimage f hf
-- Mathlib/Data/Fin/VecNotation.lean
@[simp]
theorem empty_val' {n' : Type*} (j : n') : (fun i => (![] : Fin 0 → n' → α) i j) = ![]
-- Mathlib/MeasureTheory/Measure/AEMeasurable.lean
@[measurability]
theorem sum_measure [Countable ι] {μ : ι → Measure α} (h : ∀ i, AEMeasurable f (μ i)) :
    AEMeasurable f (sum μ)
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem mem_Lp_of_nnnorm_ae_le_mul {c : ℝ≥0} {f : α →ₘ[μ] E} {g : Lp F p μ}
    (h : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊) : f ∈ Lp E p μ
-- Mathlib/Topology/Bornology/Absorbs.lean
protected lemma zero [Zero E] [SMulZeroClass M E] {s : Set E} (hs : 0 ∈ s) : Absorbs M s 0
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem rel_zero_left {b : Multiset β} : Rel r 0 b ↔ b = 0
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
@[simp] lemma set_smul_bot : s • (⊥ : Submodule R M) = ⊥
-- Mathlib/Algebra/Module/Equiv/Defs.lean
@[simp]
theorem coe_toEquiv_symm : e.toEquiv.symm = e.symm
-- Mathlib/Data/Multiset/Sum.lean
theorem disjSum_lt_disjSum_of_lt_of_le (hs : s₁ < s₂) (ht : t₁ ≤ t₂) :
    s₁.disjSum t₁ < s₂.disjSum t₂
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
@[norm_cast] -- @[simp] -- Porting note: not in simpNF
theorem intCast_eq (z1 z2 : ℤ) : (z1 : ℤ_[p]) = z2 ↔ z1 = z2
-- Mathlib/Computability/Partrec.lean
protected theorem decode : Computable (decode (α := α))
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem toIocMod_add_right_eq_add (a b c : α) :
    toIocMod hp a (b + c) = toIocMod hp (a - c) b + c
-- Mathlib/Algebra/Ring/Centralizer.lean
@[simp]
theorem neg_mem_centralizer [Mul M] [HasDistribNeg M] (ha : a ∈ centralizer S) :
    -a ∈ centralizer S
-- Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
theorem map_eq_iff {x₁ x₂ : Fin n.succ → ℕ} (hx₁ : ∀ i, x₁ i < d) (hx₂ : ∀ i, x₂ i < d) :
    map d x₁ = map d x₂ ↔ x₁ 0 = x₂ 0 ∧ map d (x₁ ∘ Fin.succ) = map d (x₂ ∘ Fin.succ)
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[measurability]
protected theorem norm {_ : MeasurableSpace α} {β : Type*} [SeminormedAddCommGroup β] {f : α → β}
    (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ‖f x‖
-- Mathlib/Data/List/Basic.lean
theorem tail_sublist : ∀ l : List α, tail l <+ l
-- Mathlib/Algebra/Module/LocalizedModule.lean
theorem mk'_eq_mk'_iff (m₁ m₂ : M) (s₁ s₂ : S) :
    mk' f m₁ s₁ = mk' f m₂ s₂ ↔ ∃ s : S, s • s₁ • m₂ = s • s₂ • m₁
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem contDiffWithinAt_zero (hx : x ∈ s) :
    ContDiffWithinAt 𝕜 0 f s x ↔ ∃ u ∈ 𝓝[s] x, ContinuousOn f (s ∩ u)
-- Mathlib/Data/Multiset/Basic.lean
theorem erase_le (a : α) (s : Multiset α) : s.erase a ≤ s
-- Mathlib/Topology/ContinuousFunction/Polynomial.lean
/--
Every polynomial with coefficients in a topological semiring gives a (bundled) continuous function.
-/
@[simps]
def toContinuousMap (p : R[X]) : C(R, R)
-- Mathlib/Data/Setoid/Partition.lean
/-- The indices of `Quotient.out'` and `IndexedPartition.out` are equal. -/
theorem index_out' (x : hs.Quotient) : hs.index x.out' = hs.index (hs.out x)
-- Mathlib/Order/CompleteLattice.lean
theorem iSup_range' (g : β → α) (f : ι → β) : ⨆ b : range f, g b = ⨆ i, g (f i)
-- Mathlib/Data/Rat/Defs.lean
lemma pow_def (q : ℚ) (n : ℕ) :
    q ^ n = ⟨q.num ^ n, q.den ^ n,
      by simp [Nat.pow_eq_zero],
      by rw [Int.natAbs_pow]; exact q.reduced.pow _ _⟩
-- Mathlib/Data/Set/Finite.lean
/-- If `P` is some relation between terms of `γ` and sets in `γ`, such that every finite set
`t : Set γ` has some `c : γ` related to it, then there is a recursively defined sequence `u` in `γ`
so `u n` is related to the image of `{0, 1, ..., n-1}` under `u`.

(We use this later to show sequentially compact sets are totally bounded.)
-/
theorem seq_of_forall_finite_exists {γ : Type*} {P : γ → Set γ → Prop}
    (h : ∀ t : Set γ, t.Finite → ∃ c, P c t) : ∃ u : ℕ → γ, ∀ n, P (u n) (u '' Iio n)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
@[simp] protected theorem div_one (n : Nat) : n / 1 = n
-- Mathlib/Algebra/MvPolynomial/Division.lean
theorem modMonomial_add_divMonomial (x : MvPolynomial σ R) (s : σ →₀ ℕ) :
    x %ᵐᵒⁿᵒᵐⁱᵃˡ s + monomial s 1 * (x /ᵐᵒⁿᵒᵐⁱᵃˡ s) = x
-- Mathlib/Order/Interval/Basic.lean
@[simp]
theorem map₂_pure (f : α → β → γ) (h₀ h₁) (a : α) (b : β) :
    map₂ f h₀ h₁ (pure a) (pure b) = pure (f a b)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
@[simp] theorem gcd_zero_right (n : Nat) : gcd n 0 = n
-- Mathlib/Topology/Semicontinuous.lean
theorem IsOpen.lowerSemicontinuousWithinAt_indicator (hs : IsOpen s) (hy : 0 ≤ y) :
    LowerSemicontinuousWithinAt (indicator s fun _x => y) t x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
theorem tan_eq {z : ℂ}
    (h :
      ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧
          ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨
        (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧
          ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) :
    tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I)
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem differentiableAt_of_deriv_ne_zero (h : deriv f x ≠ 0) : DifferentiableAt 𝕜 f x
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma addU_smul {P Q : Fin 3 → F} (hPz : P z ≠ 0) (hQz : Q z ≠ 0) {u v : F} (hu : u ≠ 0)
    (hv : v ≠ 0) : addU (u • P) (v • Q) = (u * v) ^ 2 * addU P Q
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
theorem arg_inv (x : ℂ) : arg x⁻¹ = if arg x = π then π else -arg x
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
theorem Coprime.dvd_of_dvd_mul_left (H1 : Coprime k m) (H2 : k ∣ m * n) : k ∣ n
-- Mathlib/Combinatorics/SimpleGraph/Finsubgraph.lean
@[simp, norm_cast] lemma coe_bot : (⊥ : G.Finsubgraph) = (⊥ : G.Subgraph)
-- Mathlib/Topology/Algebra/Order/Field.lean
/-- In a linearly ordered field with the order topology, if `f` tends to `Filter.atBot` and `g`
tends to a positive constant `C` then `f * g` tends to `Filter.atBot`. -/
theorem Filter.Tendsto.atBot_mul {C : 𝕜} (hC : 0 < C) (hf : Tendsto f l atBot)
    (hg : Tendsto g l (𝓝 C)) : Tendsto (fun x => f x * g x) l atBot
-- Mathlib/Topology/MetricSpace/Isometry.lean
theorem _root_.isometry_dcomp {ι} [Fintype ι] {α β : ι → Type*} [∀ i, PseudoEMetricSpace (α i)]
    [∀ i, PseudoEMetricSpace (β i)] (f : ∀ i, α i → β i) (hf : ∀ i, Isometry (f i)) :
    Isometry (fun g : (i : ι) → α i => fun i => f i (g i))
-- Mathlib/MeasureTheory/Integral/Average.lean
/-- **First moment method**. An integrable function is greater than its integral on a set of
positive measure. -/
theorem measure_integral_le_pos (hf : Integrable f μ) : 0 < μ {x | ∫ a, f a ∂μ ≤ f x}
-- Mathlib/Topology/List.lean
@[simp]
theorem nhds_nil : 𝓝 ([] : List α) = pure []
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem cbiInf_eq_of_forall {p : ι → Prop} {f : Subtype p → α} (hp : ∀ i, p i) :
    ⨅ (i) (h : p i), f ⟨i, h⟩ = iInf f
-- Mathlib/LinearAlgebra/Matrix/IsDiag.lean
/-- Every matrix indexed by a subsingleton is diagonal. -/
theorem isDiag_of_subsingleton [Zero α] [Subsingleton n] (A : Matrix n n α) : A.IsDiag
-- Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean
@[reassoc (attr := simp)]
theorem pullbackDiagonalMapIdIso_inv_fst :
    (pullbackDiagonalMapIdIso f g i).inv ≫ pullback.fst _ _ = pullback.fst _ _ ≫ f
-- Mathlib/Topology/MetricSpace/ThickenedIndicator.lean
theorem thickenedIndicator_zero {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) {x : α}
    (x_out : x ∉ thickening δ E) : thickenedIndicator δ_pos E x = 0
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem self_trans_symm (e : M ≃ₗ⁅R,L⁆ N) : e.trans e.symm = refl
-- Mathlib/Data/Set/Pointwise/SMul.lean
theorem zero_mem_smul_set_iff (ha : a ≠ 0) : (0 : β) ∈ a • t ↔ (0 : β) ∈ t
-- Mathlib/Algebra/MvPolynomial/Division.lean
@[simp]
theorem X_dvd_X [Nontrivial R] {i j : σ} :
    (X i : MvPolynomial σ R) ∣ (X j : MvPolynomial σ R) ↔ i = j
-- Mathlib/Algebra/Ring/Subring/MulOpposite.lean
@[simp, norm_cast]
theorem op_coe (S : Subring R) : S.op = MulOpposite.unop ⁻¹' (S : Set R)
-- Mathlib/Data/Set/Sigma.lean
protected theorem Nonempty.sigma :
    s.Nonempty → (∀ i, (t i).Nonempty) → (s.sigma t).Nonempty
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
/-- The angle between two vectors is at most π. -/
theorem angle_le_pi (x y : V) : angle x y ≤ π
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem not_or_intro {a b : Prop} (ha : ¬a) (hb : ¬b) : ¬(a ∨ b)
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- Pythagorean theorem, subtracting vectors, vector inner product
form. -/
theorem norm_sub_sq_eq_norm_sq_add_norm_sq_real {x y : F} (h : ⟪x, y⟫_ℝ = 0) :
    ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖
-- Mathlib/Analysis/Convex/Independent.lean
/-- The range of an injective indexed family of points is convex independent iff that family is. -/
theorem Function.Injective.convexIndependent_iff_set {p : ι → E} (hi : Function.Injective p) :
    ConvexIndependent 𝕜 ((↑) : Set.range p → E) ↔ ConvexIndependent 𝕜 p
-- Mathlib/Logic/Relation.lean
@[trans]
theorem trans (hab : TransGen r a b) (hbc : TransGen r b c) : TransGen r a c
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
theorem _root_.Matrix.Nondegenerate.toBilin {M : Matrix ι ι R₃} (h : M.Nondegenerate)
    (b : Basis ι R₃ M₃) : (Matrix.toBilin b M).Nondegenerate
-- Mathlib/Algebra/Order/Ring/Abs.lean
lemma Even.pow_abs (hn : Even n) (a : α) : |a| ^ n = a ^ n
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
@[simp]
theorem MultilinearMap.uncurry_curryRight (f : MultilinearMap R M M₂) :
    f.curryRight.uncurryRight = f
-- Mathlib/Dynamics/Ergodic/Ergodic.lean
/-- An ergodic map is quasi ergodic. -/
theorem quasiErgodic (hf : Ergodic f μ) : QuasiErgodic f μ
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isLittleO_const_iff_isLittleO_one {c : F''} (hc : c ≠ 0) :
    (f =o[l] fun _x => c) ↔ f =o[l] fun _x => (1 : F)
-- Mathlib/Algebra/Ring/CentroidHom.lean
@[simp]
theorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[simp]
theorem ofMul_prod (s : Finset ι) (f : ι → α) : ofMul (∏ i ∈ s, f i) = ∑ i ∈ s, ofMul (f i)
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
theorem condexp_mono {E} [NormedLatticeAddCommGroup E] [CompleteSpace E] [NormedSpace ℝ E]
    [OrderedSMul ℝ E] {f g : α → E} (hf : Integrable f μ) (hg : Integrable g μ) (hfg : f ≤ᵐ[μ] g) :
    μ[f|m] ≤ᵐ[μ] μ[g|m]
-- Mathlib/Topology/Order/Lattice.lean
lemma ContinuousWithinAt.finset_inf
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) : ContinuousWithinAt (s.inf f) t x
-- Mathlib/Probability/Process/Stopping.lean
theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable [Countable ι]
    [SigmaFiniteFiltration μ ℱ] (hτ : IsStoppingTime ℱ τ)
    [SigmaFinite (μ.trim hτ.measurableSpace_le_of_countable)] (i : ι) :
    μ[f|hτ.measurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|ℱ i]
-- Mathlib/FieldTheory/Separable.lean
theorem separable_gcd_left {F : Type*} [Field F] {f : F[X]} (hf : f.Separable) (g : F[X]) :
    (EuclideanDomain.gcd f g).Separable
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem fract_add_nat (a : α) (m : ℕ) : fract (a + m) = fract a
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem mk_self (a : S) : mk (a : M) a = 1
-- Mathlib/Analysis/Complex/Isometry.lean
theorem LinearIsometry.re_apply_eq_re {f : ℂ →ₗᵢ[ℝ] ℂ} (h : f 1 = 1) (z : ℂ) : (f z).re = z.re
-- Mathlib/Topology/ContinuousOn.lean
theorem tendsto_nhds_of_tendsto_nhdsWithin {f : β → α} {a : α} {s : Set α} {l : Filter β}
    (h : Tendsto f l (𝓝[s] a)) : Tendsto f l (𝓝 a)
-- Mathlib/Algebra/Group/Units.lean
@[to_additive (attr := simp)]
protected theorem mul_inv_cancel : IsUnit a → a * a⁻¹ = 1
-- Mathlib/Data/Set/Lattice.lean
theorem iInter_sigma {γ : α → Type*} (s : Sigma γ → Set β) : ⋂ ia, s ia = ⋂ i, ⋂ a, s ⟨i, a⟩
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem lift_le_aleph0 {c : Cardinal.{u}} : lift.{v} c ≤ ℵ₀ ↔ c ≤ ℵ₀
-- Mathlib/Analysis/Complex/CauchyIntegral.lean
/-- **Cauchy integral formula** for the value at the center of a disc. If `f` is continuous on a
punctured closed disc of radius `R`, is differentiable at all but countably many points of the
interior of this disc, and has a limit `y` at the center of the disc, then the integral
$\oint_{‖z-c‖=R} \frac{f(z)}{z-c}\,dz$ is equal to `2πiy`. -/
theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto {c : ℂ}
    {R : ℝ} (h0 : 0 < R) {f : ℂ → E} {y : E} {s : Set ℂ} (hs : s.Countable)
    (hc : ContinuousOn f (closedBall c R \ {c}))
    (hd : ∀ z ∈ (ball c R \ {c}) \ s, DifferentiableAt ℂ f z) (hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)) :
    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * I : ℂ) • y
-- Mathlib/Data/List/Rotate.lean
@[simp]
theorem head?_cyclicPermutations (l : List α) : (cyclicPermutations l).head? = l
-- Mathlib/Data/Semiquot.lean
@[congr]
theorem univ_unique (I J : Inhabited α) : @univ _ I = @univ _ J
-- Mathlib/Data/Sigma/Basic.lean
@[simp]
theorem eta : ∀ x : Σa, β a, Sigma.mk x.1 x.2 = x
-- Mathlib/Data/Finsupp/Basic.lean
@[simp]
theorem equivMapDomain_single (f : α ≃ β) (a : α) (b : M) :
    equivMapDomain f (single a b) = single (f a) b
-- Mathlib/Data/Fin/Tuple/Sort.lean
/-- If two permutations of a tuple `f` are both monotone, then they are equal. -/
theorem unique_monotone [PartialOrder α] {f : Fin n → α} {σ τ : Equiv.Perm (Fin n)}
    (hfσ : Monotone (f ∘ σ)) (hfτ : Monotone (f ∘ τ)) : f ∘ σ = f ∘ τ
-- Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean
/-- **Bernoulli's inequality** for real exponents, non-strict version: for `0 ≤ p ≤ 1` and `-1 ≤ s`
we have `(1 + s) ^ p ≤ 1 + p * s`. -/
theorem rpow_one_add_le_one_add_mul_self {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp1 : 0 ≤ p) (hp2 : p ≤ 1) :
    (1 + s) ^ p ≤ 1 + p * s
-- Mathlib/Algebra/CharP/Defs.lean
/-- We have `2 ≠ 0` in a nontrivial ring whose characteristic is not `2`. -/
protected lemma Ring.two_ne_zero {R : Type*} [NonAssocSemiring R] [Nontrivial R]
    (hR : ringChar R ≠ 2) : (2 : R) ≠ 0
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem exists_of_mem_join : a ∈ join L → ∃ l, l ∈ L ∧ a ∈ l
-- Mathlib/LinearAlgebra/Contraction.lean
@[simp]
theorem dualTensorHomEquivOfBasis_apply (x : Module.Dual R M ⊗[R] N) :
    (dualTensorHomEquivOfBasis (N := N) b :
    Module.Dual R M ⊗[R] N → (M →ₗ[R] N)) x = (dualTensorHom R M N) x
-- Mathlib/Data/Finset/Prod.lean
@[simp]
theorem card_product (s : Finset α) (t : Finset β) : card (s ×ˢ t) = card s * card t
-- Mathlib/Topology/Bornology/Basic.lean
theorem cobounded_eq_bot_iff : cobounded α = ⊥ ↔ BoundedSpace α
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
lemma polyCharpoly_ne_zero [Nontrivial R] : (polyCharpoly φ b) ≠ 0
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem getElem_eq_iff {l : List α} {n : Nat} {h : n < l.length} : l[n] = x ↔ l[n]? = some x
-- Mathlib/CategoryTheory/Sites/Plus.lean
@[simp, reassoc]
theorem plusMap_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) :
    J.plusMap (η ≫ γ) = J.plusMap η ≫ J.plusMap γ
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
@[simp] lemma UniformOnFun.toFun_ofFun (f : α → β) : toFun 𝔖 (ofFun 𝔖 f) = f
-- Mathlib/CategoryTheory/Sites/IsSheafFor.lean
theorem Arrows.pullbackCompatible_iff (x : (i : I) → P.obj (op (X i))) :
    Compatible P π x ↔ PullbackCompatible P π x
-- Mathlib/Data/Finset/Prod.lean
@[simp]
theorem diag_card : (diag s).card = s.card
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
theorem derivWithin_mul_const (hxs : UniqueDiffWithinAt 𝕜 s x) (hc : DifferentiableWithinAt 𝕜 c s x)
    (d : 𝔸) : derivWithin (fun y => c y * d) s x = derivWithin c s x * d
-- Mathlib/Algebra/Polynomial/Module/AEval.lean
lemma AEval'_def : AEval' φ = AEval R M φ
-- Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
@[to_additive (attr := simp)]
theorem edist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : edist (c • f) (c • g) = edist f g
-- Mathlib/Algebra/Order/Antidiag/Pi.lean
lemma nsmul_piAntidiag_univ [Fintype ι] (m : ℕ) {n : ℕ} (hn : n ≠ 0) :
    @SMul.smul _ _ Finset.smulFinset n (piAntidiag univ m) =
      (piAntidiag univ (n * m)).filter fun f : ι → ℕ ↦ ∀ i, n ∣ f i
-- Mathlib/Data/Fintype/Pi.lean
lemma piFinset_update_singleton_eq_filter_piFinset_eq (s : ∀ i, Finset (δ i)) (i : α) {a : δ i}
    (ha : a ∈ s i) :
    piFinset (Function.update s i {a}) = (piFinset s).filter (fun f ↦ f i = a)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Linear.lean
theorem Poly.denote_combine (ctx : Context) (p₁ p₂ : Poly) : (p₁.combine p₂).denote ctx = p₁.denote ctx + p₂.denote ctx
-- Mathlib/CategoryTheory/ComposableArrows.lean
@[reassoc]
lemma naturality' (φ : F ⟶ G) (i j : ℕ) (hij : i ≤ j := by valid)
    (hj : j ≤ n := by valid) :
    F.map' i j ≫ app' φ j = app' φ i ≫ G.map' i j
-- Mathlib/FieldTheory/Adjoin.lean
theorem adjoin_subset_adjoin_iff {F' : Type*} [Field F'] [Algebra F' E] {S S' : Set E} :
    (adjoin F S : Set E) ⊆ adjoin F' S' ↔
      Set.range (algebraMap F E) ⊆ adjoin F' S' ∧ S ⊆ adjoin F' S'
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_apply_ite_of_false {p : α → Prop} {hp : DecidablePred p} (f g : α → γ) (k : γ → β)
    (h : ∀ x ∈ s, ¬p x) : (∏ x ∈ s, k (if p x then f x else g x)) = ∏ x ∈ s, k (g x)
-- Mathlib/Order/RelClasses.lean
/-- All values are accessible under the well-founded `>`. -/
theorem apply : ∀ a : α, Acc (· > ·) a
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
-- Porting note: `simp`-normal form of `coe_comp_inf_hom`
theorem coe_comp_inf_hom' (f : LatticeHom β γ) (g : LatticeHom α β) :
    ⟨f ∘ g, map_inf (f.comp g)⟩ = (f : InfHom β γ).comp g
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
@[norm_cast]
theorem toMeasure_add (μ ν : FiniteMeasure Ω) : ↑(μ + ν) = (↑μ + ↑ν : Measure Ω)
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- If one nonempty affine subspace is less than another, the same applies to their directions -/
theorem direction_lt_of_nonempty {s1 s2 : AffineSubspace k P} (h : s1 < s2)
    (hn : (s1 : Set P).Nonempty) : s1.direction < s2.direction
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Cospan.lean
@[simp]
theorem cospanCompIso_app_right : (cospanCompIso F f g).app WalkingCospan.right = Iso.refl _
-- Mathlib/Order/Filter/Basic.lean
theorem NeBot.comap_of_range_mem {f : Filter β} {m : α → β} (_ : NeBot f) (hm : range m ∈ f) :
    NeBot (comap m f)
-- Mathlib/Order/Filter/Bases.lean
/-- `IsAntitoneBasis s` means the image of `s` is a filter basis such that `s` is decreasing. -/
structure IsAntitoneBasis extends IsBasis (fun _ => True) s'' : Prop where
  /-- The sequence of sets is antitone. -/
  protected antitone : Antitone s''
-- Mathlib/Data/Finset/Basic.lean
@[gcongr]
theorem union_subset_union_left (h : s₁ ⊆ s₂) : s₁ ∪ t ⊆ s₂ ∪ t
-- Mathlib/Data/Finset/Sups.lean
lemma subset_infs_self : s ⊆ s ⊼ s
-- Mathlib/GroupTheory/Sylow.lean
/-- If the kernel of `f : H →* G` is a `p`-group,
  then `Finite (Sylow p G)` implies `Finite (Sylow p H)`. -/
theorem Sylow.finite_of_ker_is_pGroup {H : Type*} [Group H] {f : H →* G}
    (hf : IsPGroup p f.ker) [Finite (Sylow p G)] : Finite (Sylow p H)
-- Mathlib/Topology/Constructions.lean
/-- A version of `continuous_sInf_dom` for binary functions -/
theorem continuous_sInf_dom₂ {X Y Z} {f : X → Y → Z} {tas : Set (TopologicalSpace X)}
    {tbs : Set (TopologicalSpace Y)} {tX : TopologicalSpace X} {tY : TopologicalSpace Y}
    {tc : TopologicalSpace Z} (hX : tX ∈ tas) (hY : tY ∈ tbs)
    (hf : Continuous fun p : X × Y => f p.1 p.2) : by
    haveI := sInf tas; haveI := sInf tbs
    exact @Continuous _ _ _ tc fun p : X × Y => f p.1 p.2
-- Mathlib/Data/DFinsupp/Basic.lean
/-- The `DFinsupp` version of `Finsupp.liftAddHom_comp_single`,-/
theorem liftAddHom_comp_single [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] (f : ∀ i, β i →+ γ)
    (i : ι) : (liftAddHom (β := β) f).comp (singleAddHom β i) = f i
-- Mathlib/Analysis/Convex/Between.lean
theorem Wbtw.sameRay_vsub {x y z : P} (h : Wbtw R x y z) : SameRay R (y -ᵥ x) (z -ᵥ y)
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem UniformSpace.hasBasis_nhds (x : α) :
    HasBasis (𝓝 x) (fun s : Set (α × α) => s ∈ 𝓤 α ∧ SymmetricRel s) fun s => ball x s
-- Mathlib/Analysis/Calculus/SmoothSeries.lean
/-- Consider a series of functions `∑' n, f n x`. If the series converges at a
point, and all functions in the series are differentiable with a summable bound on the derivatives,
then the series is differentiable and its derivative is the sum of the derivatives. -/
theorem hasFDerivAt_tsum (hu : Summable u) (hf : ∀ n x, HasFDerivAt (f n) (f' n x) x)
    (hf' : ∀ n x, ‖f' n x‖ ≤ u n) (hf0 : Summable fun n => f n x₀) (x : E) :
    HasFDerivAt (fun y => ∑' n, f n y) (∑' n, f' n x) x
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem lineDerivWithin_congr' (hs : EqOn f₁ f s) (hx : x ∈ s) :
    lineDerivWithin 𝕜 f₁ s x v = lineDerivWithin 𝕜 f s x v
-- Mathlib/SetTheory/Game/PGame.lean
/-- The definition of `0 ≤ x` on pre-games, in terms of `0 ⧏`. -/
theorem zero_le_lf {x : PGame} : 0 ≤ x ↔ ∀ j, 0 ⧏ x.moveRight j
-- Mathlib/Data/Finsupp/BigOperators.lean
theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
    l.sum.support ⊆ l.foldr (Finsupp.support · ⊔ ·) ∅
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
theorem nmul_eq_mul (a b) : a ⨳ b = toOrdinal (toNatOrdinal a * toNatOrdinal b)
-- Mathlib/CategoryTheory/Preadditive/Yoneda/Basic.lean
/-- The Yoneda embedding for preadditive categories sends an object `X` to the copresheaf sending an
object `Y` to the `End X`-module of morphisms `X ⟶ Y`.
-/
@[simps]
def preadditiveCoyonedaObj (X : Cᵒᵖ) : C ⥤ ModuleCat.{v} (End X)
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem Integrable.smul_of_top_left {f : α → β} {φ : α → 𝕜} (hφ : Integrable φ μ)
    (hf : Memℒp f ∞ μ) : Integrable (φ • f) μ