ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
@[simp]
theorem pow_factors [Nontrivial α] {a : Associates α} {k : ℕ} :
    (a ^ k).factors = k • a.factors
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
/-- If two cyclic permutations agree on all terms in their intersection,
and that intersection is not empty, then the two cyclic permutations must be equal. -/
theorem IsCycle.eq_on_support_inter_nonempty_congr (hf : IsCycle f) (hg : IsCycle g)
    (h : ∀ x ∈ f.support ∩ g.support, f x = g x)
    (hx : f x = g x) (hx' : x ∈ f.support) : f = g
-- Mathlib/Order/Filter/AtTopBot.lean
/-- Given an antitone basis `s : ℕ → Set α` of a filter, extract an antitone subbasis `s ∘ φ`,
`φ : ℕ → ℕ`, such that `m < n` implies `r (φ m) (φ n)`. This lemma can be used to extract an
antitone basis with basis sets decreasing "sufficiently fast". -/
theorem HasAntitoneBasis.subbasis_with_rel {f : Filter α} {s : ℕ → Set α}
    (hs : f.HasAntitoneBasis s) {r : ℕ → ℕ → Prop} (hr : ∀ m, ∀ᶠ n in atTop, r m n) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ (∀ ⦃m n⦄, m < n → r (φ m) (φ n)) ∧ f.HasAntitoneBasis (s ∘ φ)
-- Mathlib/Logic/Equiv/Basic.lean
lemma subtypeEquivRight_symm_apply {p q : α → Prop} (e : ∀ x, p x ↔ q x)
    (z : { x // q x }) : (subtypeEquivRight e).symm z = ⟨z, (e z.1).mpr z.2⟩
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_pos {p : ℝ} {x : ℝ≥0∞} (hx_pos : 0 < x) (hx_ne_top : x ≠ ⊤) : 0 < x ^ p
-- Mathlib/Order/Closure.lean
theorem subset_closure (s : Set β) : s ⊆ l s
-- Mathlib/Analysis/Complex/AbsMax.lean
theorem eventually_eq_or_eq_zero_of_isLocalMin_norm {f : E → ℂ} {c : E}
    (hf : ∀ᶠ z in 𝓝 c, DifferentiableAt ℂ f z) (hc : IsLocalMin (norm ∘ f) c) :
    (∀ᶠ z in 𝓝 c, f z = f c) ∨ f c = 0
-- Mathlib/RingTheory/Localization/InvSubmonoid.lean
@[simp]
theorem mul_toInvSubmonoid (m : M) : algebraMap R S m * (toInvSubmonoid M S m : S) = 1
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
@[reassoc (attr := simp)]
lemma liftHomology_ι (k : A ⟶ S.opcycles) (hk : k ≫ S.fromOpcycles = 0) :
    S.liftHomology k hk ≫ S.homologyι = k
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem norm_eq_one_iff' {d : ℤ} (hd : d ≤ 0) (z : ℤ√d) : z.norm = 1 ↔ IsUnit z
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem omega_le {o : Ordinal} : ω ≤ o ↔ ∀ n : ℕ, ↑n ≤ o
-- Mathlib/LinearAlgebra/CrossProduct.lean
/-- The cross product of two vectors is perpendicular to the first vector. -/
@[simp 1100] -- Porting note: increase priority so that the LHS doesn't simplify
theorem dot_self_cross (v w : Fin 3 → R) : v ⬝ᵥ v ×₃ w = 0
-- Mathlib/Logic/Equiv/List.lean
theorem raise_lower : ∀ {l n}, List.Sorted (· ≤ ·) (n :: l) → raise (lower l n) n = l
-- Mathlib/Data/Fin/Tuple/Curry.lean
@[simp]
theorem curry_apply_cons {n : ℕ} {α} {p : Fin n → Type u} {τ : Type u}
    (f : ((i : Fin (n + 1)) → (vecCons α p) i) → τ) (a : α) :
    curry f a = @curry _ p _ (f ∘' Fin.cons a)
-- Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean
/-- The canonical isomorphism `K.X j ≅ K.opCycles j` when the differential to `j` is zero. -/
@[simps! hom]
noncomputable def pOpcyclesIso : K.X j ≅ K.opcycles j
-- Mathlib/GroupTheory/Perm/Sign.lean
@[simp]
theorem sign_trans (f g : Perm α) : sign (f.trans g) = sign g * sign f
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem piCongrRight_trans {ι : Type*} {R S T : ι → Type*}
    [∀ i, NonUnitalNonAssocSemiring (R i)] [∀ i, NonUnitalNonAssocSemiring (S i)]
    [∀ i, NonUnitalNonAssocSemiring (T i)] (e : ∀ i, R i ≃+* S i) (f : ∀ i, S i ≃+* T i) :
    (piCongrRight e).trans (piCongrRight f) = piCongrRight fun i => (e i).trans (f i)
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
theorem ContMDiffWithinAt.clm_postcomp {f : M → F₂ →L[𝕜] F₃} {s : Set M} {x : M}
    (hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n f s x) :
    ContMDiffWithinAt I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) n
      (fun y ↦ (f y).postcomp F₁ : M → (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) s x
-- Mathlib/Data/Finset/NoncommProd.lean
theorem noncommFoldr_cons (s : Multiset α) (a : α) (h h') (b : β) :
    noncommFoldr f (a ::ₘ s) h b = f a (noncommFoldr f s h' b)
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
theorem isTotallyDisconnected_iff :
    S.IsTotallyDisconnected ↔ ∀ c d, (S.arrows c d).Nonempty → c = d
-- Mathlib/Order/OrdContinuous.lean
theorem map_inf (hf : RightOrdContinuous f) (x y : α) : f (x ⊓ y) = f x ⊓ f y
-- Mathlib/Order/Filter/AtTopBot.lean
/-- If `r` is a positive constant, `fun x ↦ r * f x` tends to negative infinity along a filter
if and only if `f` tends to negative infinity along the same filter. -/
theorem tendsto_const_mul_atBot_of_pos (hr : 0 < r) :
    Tendsto (fun x => r * f x) l atBot ↔ Tendsto f l atBot
-- Mathlib/MeasureTheory/Function/L2Space.lean
/-- The inner product in `L2` of the indicator of a set `indicatorConstLp 2 hs hμs (1 : 𝕜)` and
a real or complex function `f` is equal to the integral of `f` over `s`. -/
theorem inner_indicatorConstLp_one (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (f : Lp 𝕜 2 μ) :
    ⟪indicatorConstLp 2 hs hμs (1 : 𝕜), f⟫ = ∫ x in s, f x ∂μ
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem bsup_succ_le_blsub {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    succ (bsup.{_, v} o f) ≤ blsub.{_, v} o f ↔ ∃ i hi, f i hi = bsup.{_, v} o f
-- Mathlib/Analysis/Convex/Side.lean
theorem wOppSide_comm {s : AffineSubspace R P} {x y : P} : s.WOppSide x y ↔ s.WOppSide y x
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
theorem toLp_eq_mk (f : α →ₛ E) (hf : Memℒp f p μ) :
    (toLp f hf : α →ₘ[μ] E) = AEEqFun.mk f f.aestronglyMeasurable
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
theorem associated_isSymm (Q : QuadraticMap R M R) : (associatedHom S Q).IsSymm
-- Mathlib/LinearAlgebra/Lagrange.lean
/-- The vanishing polynomial on a multiplicative subgroup is of the form X ^ n - 1. -/
@[simp] theorem nodal_subgroup_eq_X_pow_card_sub_one [IsDomain R]
  (G : Subgroup Rˣ) [Fintype G] :
  nodal (G : Set Rˣ).toFinset ((↑) : Rˣ → R) = X ^ (Fintype.card G) - 1
-- .lake/packages/lean4/src/lean/Init/Core.lean
/--
`Commutative op` says that `op` is a commutative operation,
i.e. `a ∘ b = b ∘ a`.
-/
class Commutative (op : α → α → α) : Prop where
  /-- A commutative operation satisfies `a ∘ b = b ∘ a`. -/
  comm : (a b : α) → op a b = op b a
-- Mathlib/Algebra/QuaternionBasis.lean
theorem lift_smul (r : R) (x : ℍ[R,c₁,c₂]) : q.lift (r • x) = r • q.lift x
-- Mathlib/CategoryTheory/Filtered/Basic.lean
/-- For every universe `w`, `C` is filtered if and only if every finite diagram in `C` with shape
    in `w` admits a cocone. -/
theorem iff_cone_nonempty : IsCofiltered C ↔
    ∀ {J : Type w} [SmallCategory J] [FinCategory J] (F : J ⥤ C), Nonempty (Cone F)
-- Mathlib/Topology/Spectral/Hom.lean
@[simp]
theorem coe_id : ⇑(SpectralMap.id α) = id
-- Mathlib/LinearAlgebra/Dimension/Basic.lean
theorem rank_range_of_surjective (f : M →ₗ[R] M') (h : Surjective f) :
    Module.rank R (LinearMap.range f) = Module.rank R M'
-- Mathlib/Algebra/Homology/ExactSequence.lean
lemma exact₂_iff (S : ComposableArrows C 2) (hS : S.IsComplex) :
    S.Exact ↔ (S.sc' hS 0 1 2).Exact
-- Mathlib/SetTheory/Surreal/Multiplication.lean
lemma numeric_option_mul (ih : ∀ a, ArgsRel a (Args.P1 x y) → P124 a) (h : IsOption x' x) :
    (x' * y).Numeric
-- Mathlib/Algebra/Polynomial/Eval.lean
protected theorem map_multiset_prod (m : Multiset R[X]) : m.prod.map f = (m.map <| map f).prod
-- Mathlib/Algebra/CharP/Defs.lean
lemma congr {q : ℕ} (h : p = q) : CharP R q
-- Mathlib/RingTheory/WittVector/IsPoly.lean
theorem IsPoly.map [Fact p.Prime] {f} (hf : IsPoly p f) (g : R →+* S) (x : 𝕎 R) :
    map g (f x) = f (map g x)
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem NF.below_of_lt {e n a b} (H : repr e < b) :
    NF (ONote.oadd e n a) → NFBelow (ONote.oadd e n a) b
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
@[simp] theorem sign_mul : ∀ a b, sign (a * b) = sign a * sign b
-- Mathlib/Probability/Density.lean
theorem eq_of_map_eq_withDensity [IsFiniteMeasure ℙ] {X : Ω → E} [HasPDF X ℙ μ] (f : E → ℝ≥0∞)
    (hmf : AEMeasurable f μ) : map X ℙ = μ.withDensity f ↔ pdf X ℙ μ =ᵐ[μ] f
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem mul_rotate' (a b c : G) : a * (b * c) = b * (c * a)
-- Mathlib/Data/Nat/Totient.lean
@[simp] theorem totient_pos {n : ℕ} : 0 < φ n ↔ 0 < n
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
/-- In a space with second countable topology, measurable implies strongly measurable. -/
@[aesop 90% apply (rule_sets := [Measurable])]
theorem _root_.Measurable.stronglyMeasurable [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopology β] [OpensMeasurableSpace β] (hf : Measurable f) :
    StronglyMeasurable f
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- Given a closed set `s`, a point belongs to `s` iff its infimum distance to this set vanishes -/
theorem _root_.IsClosed.mem_iff_infDist_zero (h : IsClosed s) (hs : s.Nonempty) :
    x ∈ s ↔ infDist x s = 0
-- .lake/packages/lean4/src/lean/Init/Prelude.lean
theorem Fin.eq_of_val_eq {n} : ∀ {i j : Fin n}, Eq i.val j.val → Eq i j
-- Mathlib/Order/Filter/Curry.lean
theorem eventually_curry_prod_iff {α β : Type*} {l : Filter α} {m : Filter β}
    [NeBot l] [NeBot m] (s : Set α) (t : Set β) :
    (∀ᶠ x in l.curry m, x ∈ s ×ˢ t) ↔ s ∈ l ∧ t ∈ m
-- Mathlib/Data/Nat/Choose/Basic.lean
@[simp]
theorem choose_succ_self_right : ∀ n : ℕ, (n + 1).choose n = n + 1
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem uniqueDiffWithinAt_univ : UniqueDiffWithinAt 𝕜 univ x
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
theorem exists_simpleFunc_nonneg_ae_eq {f : Lp.simpleFunc G p μ} (hf : 0 ≤ f) :
    ∃ f' : α →ₛ G, 0 ≤ f' ∧ f =ᵐ[μ] f'
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- The Pythagorean theorem, for an orthogonal projection. -/
theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [HasOrthogonalProjection S] :
    ‖x‖ ^ 2 = ‖orthogonalProjection S x‖ ^ 2 + ‖orthogonalProjection Sᗮ x‖ ^ 2
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem comap_map (μ : Measure α) : (map f μ).comap f = μ
-- Mathlib/MeasureTheory/Decomposition/Jordan.lean
theorem real_smul_neg (r : ℝ) (hr : r < 0) : r • j = -((-r).toNNReal • j)
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
@[reassoc (attr := simp)]
theorem biproduct.matrix_π (m : ∀ j k, f j ⟶ g k) (k : K) :
    biproduct.matrix m ≫ biproduct.π g k = biproduct.desc fun j => m j k
-- Mathlib/GroupTheory/Perm/List.lean
theorem formPerm_apply_get (xs : List α) (h : Nodup xs) (i : Fin xs.length) :
    formPerm xs (xs.get i) =
      xs.get ⟨((i.val + 1) % xs.length), (Nat.mod_lt _ (i.val.zero_le.trans_lt i.isLt))⟩
-- Mathlib/Data/PNat/Basic.lean
@[simp]
theorem one_add_natPred (n : ℕ+) : 1 + n.natPred = n
-- Mathlib/GroupTheory/Coprod/Basic.lean
@[to_additive (attr := simp)]
theorem mrange_swap : MonoidHom.mrange (swap M N) = ⊤
-- Mathlib/CategoryTheory/Galois/GaloisObjects.lean
lemma isGalois_iff_aux (X : C) [IsConnected X] :
    IsGalois X ↔ Nonempty (IsTerminal <| colimit <| SingleObj.functor <| Aut.toEnd X)
-- Mathlib/Algebra/Associated/Basic.lean
theorem prime_dvd_prime_iff_eq {M : Type*} [CancelCommMonoidWithZero M] [Unique Mˣ] {p q : M}
    (pp : Prime p) (qp : Prime q) : p ∣ q ↔ p = q
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
@[simp] lemma spanFinset_coe {ι : Type*} (s : Finset ι) (f : ι → K) :
    (spanFinset R₁ s f : Submodule R₁ K) = Submodule.span R₁ (f '' s)
-- Mathlib/RingTheory/Binomial.lean
theorem descPochhammer_succ_succ_smeval {R} [NonAssocRing R] [Pow R ℕ] [NatPowAssoc R]
    (r : R) (k : ℕ) : smeval (descPochhammer ℤ (k + 1)) (r + 1) =
    (k + 1) • smeval (descPochhammer ℤ k) r + smeval (descPochhammer ℤ (k + 1)) r
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ici_subset_Ioi : Ici a ⊆ Ioi b ↔ b < a
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
/-- If `m` and `n` are `Fintype`, the rank of `m × n` matrices is `(#m).lift * (#n).lift`. -/
@[simp]
theorem rank_matrix (m : Type v) (n : Type w) [Finite m] [Finite n] :
    Module.rank R (Matrix m n R) =
      Cardinal.lift.{max v w u, v} #m * Cardinal.lift.{max v w u, w} #n
-- Mathlib/Data/Set/Finite.lean
theorem Finite.of_finite_image {s : Set α} {f : α → β} (h : (f '' s).Finite) (hi : Set.InjOn f s) :
    s.Finite
-- Mathlib/Data/Matrix/Kronecker.lean
theorem kroneckerTMul_smul (r : R) (A : Matrix l m α) (B : Matrix n p α) :
    A ⊗ₖₜ[R] (r • B) = r • A ⊗ₖₜ B
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
theorem mem_incidence_iff_neighbor {v w : V} :
    s(v, w) ∈ G.incidenceSet v ↔ w ∈ G.neighborSet v
-- Mathlib/Analysis/Calculus/DiffContOnCl.lean
theorem const_add (hf : DiffContOnCl 𝕜 f s) (c : F) : DiffContOnCl 𝕜 (fun x => c + f x) s
-- Mathlib/Geometry/Euclidean/MongePoint.lean
/-- The direction of a Monge plane. -/
theorem direction_mongePlane {n : ℕ} (s : Simplex ℝ P (n + 2)) {i₁ i₂ : Fin (n + 3)} :
    (s.mongePlane i₁ i₂).direction =
      (ℝ ∙ s.points i₁ -ᵥ s.points i₂)ᗮ ⊓ vectorSpan ℝ (Set.range s.points)
-- Mathlib/CategoryTheory/Triangulated/Opposite.lean
/-- The counit isomorphism of the
equivalence `triangleOpEquivalence C : (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ` . -/
@[simps!]
noncomputable def counitIso : inverse C ⋙ functor C ≅ 𝟭 _
-- Mathlib/Topology/UniformSpace/Cauchy.lean
theorem cauchySeq_of_controlled [SemilatticeSup β] [Nonempty β] (U : β → Set (α × α))
    (hU : ∀ s ∈ 𝓤 α, ∃ n, U n ⊆ s) {f : β → α}
    (hf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N) : CauchySeq f
-- Mathlib/Order/Interval/Set/Monotone.lean
theorem StrictMonoOn.Ici_le_id [PredOrder α] [IsPredArchimedean α] [OrderTop α] {n : α} {φ : α → α}
    (hφ : StrictMonoOn φ (Set.Ici n)) : ∀ m, n ≤ m → φ m ≤ m
-- Mathlib/Data/ENNReal/Basic.lean
theorem coe_strictMono : StrictMono ofNNReal
-- Mathlib/Data/Set/Countable.lean
theorem Countable.mono {s₁ s₂ : Set α} (h : s₁ ⊆ s₂) (hs : s₂.Countable) : s₁.Countable
-- Mathlib/Data/Int/Cast/Basic.lean
@[simp, norm_cast]
theorem cast_sub {m n} (h : m ≤ n) : ((n - m : ℕ) : R) = n - m
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
@[simp]
theorem sub_seq (f g : FreeAbelianGroup (α → β)) (x : FreeAbelianGroup α) :
    f - g <*> x = (f <*> x) - (g <*> x)
-- Mathlib/LinearAlgebra/Dimension/Free.lean
theorem Module.finite_iff_of_rank_eq_nsmul {W} [AddCommGroup W]
    [Module R W] [Module.Free R W] {n : ℕ} (hn : n ≠ 0)
    (hVW : Module.rank R M = n • Module.rank R W) :
    Module.Finite R M ↔ Module.Finite R W
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean
private lemma expCoeff_rec (m : ℕ) :
    (expCoeff (2 * (m + 3)) =
      expCoeff (m + 2) ^ 2 * expCoeff (m + 3) * expCoeff (m + 5) -
        expCoeff (m + 1) * expCoeff (m + 3) * expCoeff (m + 4) ^ 2) ∧
    (expCoeff (2 * (m + 2) + 1) =
      expCoeff (m + 4) * expCoeff (m + 2) ^ 3 * (if Even m then 4 ^ 2 else 1) -
        expCoeff (m + 1) * expCoeff (m + 3) ^ 3 * (if Even m then 1 else 4 ^ 2))
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem filter_zero : filter p 0 = 0
-- Mathlib/Data/Fin/Tuple/Basic.lean
theorem find_min' {p : Fin n → Prop} [DecidablePred p] {i : Fin n} (h : i ∈ Fin.find p) {j : Fin n}
    (hj : p j) : i ≤ j
-- Mathlib/Analysis/BoxIntegral/Partition/Filter.lean
theorem hasBasis_toFilter (l : IntegrationParams) (I : Box ι) :
    (l.toFilter I).HasBasis (fun r : ℝ≥0 → (ι → ℝ) → Ioi (0 : ℝ) => ∀ c, l.RCond (r c))
      fun r => { π | ∃ c, l.MemBaseSet I c (r c) π }
-- Mathlib/Topology/ContinuousFunction/Algebra.lean
@[to_additive (attr := simp)]
theorem inv_apply [Inv β] [ContinuousInv β] (f : C(α, β)) (x : α) : f⁻¹ x = (f x)⁻¹
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
@[reassoc (attr := simp)]
theorem isoRestrict_inv_ofRestrict : (isoRestrict f).inv ≫ f = Y.ofRestrict _
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
theorem top_prod (s : NonUnitalSubsemiring S) :
    (⊤ : NonUnitalSubsemiring R).prod s = s.comap (NonUnitalRingHom.snd R S)
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
theorem coe_center : (center R A : Set A) = Set.center A
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/-- If a sequence `g` converges to some `b`, then the sequence of constant functions
`fun n ↦ fun a ↦ g n` converges to the constant function `fun a ↦ b` on any set `s` -/
theorem Filter.Tendsto.tendstoUniformlyOnFilter_const {g : ι → β} {b : β} (hg : Tendsto g p (𝓝 b))
    (p' : Filter α) :
    TendstoUniformlyOnFilter (fun n : ι => fun _ : α => g n) (fun _ : α => b) p p'
-- Mathlib/Data/ZMod/Basic.lean
theorem castHom_bijective [Fintype R] (h : Fintype.card R = n) :
    Function.Bijective (ZMod.castHom (dvd_refl n) R)
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
/-- Composing a multilinear map twice with a linear map in each argument is
the same as composing with their composition. -/
theorem compLinearMap_assoc (g : MultilinearMap R M₁'' M₂) (f₁ : ∀ i, M₁' i →ₗ[R] M₁'' i)
    (f₂ : ∀ i, M₁ i →ₗ[R] M₁' i) :
    (g.compLinearMap f₁).compLinearMap f₂ = g.compLinearMap fun i => f₁ i ∘ₗ f₂ i
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem cons_coe (a : α) (l : List α) : (a ::ₘ l : Multiset α) = (a :: l : List α)
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
@[simp]
theorem log_neg_eq_log (x : ℝ) : log (-x) = log x
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem val_eq_singleton_iff {a : α} {s : Finset α} : s.val = {a} ↔ s = {a}
-- Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean
theorem DifferentiableOn.rpow (hf : DifferentiableOn ℝ f s) (hg : DifferentiableOn ℝ g s)
    (h : ∀ x ∈ s, f x ≠ 0) : DifferentiableOn ℝ (fun x => f x ^ g x) s
-- Mathlib/Topology/Order/OrderClosed.lean
theorem Filter.Tendsto.min_left {l : Filter β} {a : α} (h : Tendsto f l (𝓝 a)) :
    Tendsto (fun i => min (f i) a) l (𝓝 a)
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
@[simp]
theorem cyclotomic_two (R : Type*) [Ring R] : cyclotomic 2 R = X + 1
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
theorem ofRat_zero : (ofRat 0 : Cauchy abv) = 0
-- Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) :
    (1 : ℝ) + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)
-- Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
@[simp]
theorem left_sub_midpoint (v₁ v₂ : V) : v₁ - midpoint R v₁ v₂ = (⅟ 2 : R) • (v₁ - v₂)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
private theorem div_two_le_of_lt_two {m n : Nat} (p : m < 2 ^ succ n) : m / 2 < 2^n
-- Mathlib/Algebra/Order/Ring/Cast.lean
@[simp] lemma cast_nonpos : (n : R) ≤ 0 ↔ n ≤ 0
-- Mathlib/Algebra/Homology/HomotopyCofiber.lean
@[reassoc (attr := simp)]
lemma inrX_desc_f (i : ι) :
    inrX φ i ≫ (desc φ α hα).f i = α.f i
-- Mathlib/GroupTheory/Coxeter/Inversion.lean
theorem inv : t⁻¹ = t
-- Mathlib/Topology/MetricSpace/Isometry.lean
@[simp]
theorem range_eq_univ (h : α ≃ᵢ β) : range h = univ
-- Mathlib/Algebra/Lie/Weights/Chain.lean
lemma coe_chainTop' : (chainTop α β : L → R) = chainTopCoeff α β • α + β
-- Mathlib/Data/Matroid/Sum.lean
@[simp] lemma disjointSum_basis_iff {h I X} :
    (M.disjointSum N h).Basis I X ↔ M.Basis (I ∩ M.E) (X ∩ M.E) ∧
      N.Basis (I ∩ N.E) (X ∩ N.E) ∧ I ⊆ X ∧ X ⊆ M.E ∪ N.E
-- Mathlib/Algebra/Free.lean
@[to_additive (attr := simp)]
theorem traverse_mul' :
    Function.comp (traverse F) ∘ (HMul.hMul : FreeMagma α → FreeMagma α → FreeMagma α) = fun x y ↦
      (· * ·) <$> traverse F x <*> traverse F y
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
nonrec theorem HasGradientAtFilter.tendsto_nhds (hL : L ≤ 𝓝 x) (h : HasGradientAtFilter f f' x L) :
    Tendsto f L (𝓝 (f x))
-- .lake/packages/batteries/Batteries/Data/Thunk.lean
@[ext] protected theorem ext : {a b : Thunk α} → a.get = b.get → a = b
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
/-- Morphism of additive smooth monoids. -/
structure SmoothAddMonoidMorphism (I : ModelWithCorners 𝕜 E H) (I' : ModelWithCorners 𝕜 E' H')
    (G : Type*) [TopologicalSpace G] [ChartedSpace H G] [AddMonoid G] [SmoothAdd I G]
    (G' : Type*) [TopologicalSpace G'] [ChartedSpace H' G'] [AddMonoid G']
    [SmoothAdd I' G'] extends G →+ G' where
  smooth_toFun : Smooth I I' toFun
-- Mathlib/CategoryTheory/MorphismProperty/Basic.lean
lemma monotone_isoClosure : Monotone (isoClosure (C := C))
-- Mathlib/FieldTheory/IsPerfectClosure.lean
theorem equiv_comp_equiv_apply_eq_self (x : L) :
    equiv j i p (equiv i j p x) = x
-- Mathlib/RingTheory/Ideal/Prod.lean
theorem ideal_prod_prime_aux {I : Ideal R} {J : Ideal S} :
    (Ideal.prod I J).IsPrime → I = ⊤ ∨ J = ⊤
-- Mathlib/Order/Filter/AtTopBot.lean
/-- If `r` is a negative constant, `fun x ↦ f x / r` tends to infinity along a filter `l`
if and only if `f` tends to negative infinity along `l`. -/
lemma tendsto_div_const_atTop_of_neg (hr : r < 0) :
    Tendsto (fun x ↦ f x / r) l atTop ↔ Tendsto f l atBot
-- Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
theorem dValue_pos (hN₃ : 8 ≤ N) : 0 < dValue N
-- Mathlib/Algebra/Module/Basic.lean
lemma indicator_smul (s : Set α) (r : α → R) (f : α → M) :
    indicator s (fun a ↦ r a • f a) = fun a ↦ r a • indicator s f a
-- Mathlib/Data/List/TFAE.lean
theorem tfae_cons_of_mem {a b} {l : List Prop} (h : b ∈ l) : TFAE (a :: l) ↔ (a ↔ b) ∧ TFAE l
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- Composition by continuous linear equivs on the right respects higher differentiability. -/
theorem ContinuousLinearEquiv.contDiff_comp_iff (e : G ≃L[𝕜] E) :
    ContDiff 𝕜 n (f ∘ e) ↔ ContDiff 𝕜 n f
-- Mathlib/Analysis/Normed/Ring/SeminormFromConst.lean
/-- The function `seminormFromConst' hf1 hc hpm` is nonarchimedean. -/
theorem seminormFromConst_isNonarchimedean (hna : IsNonarchimedean f) :
    IsNonarchimedean (seminormFromConst' hf1 hc hpm)
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[simp]
theorem basicOpen_res (i : op U ⟶ op V) : X.basicOpen (X.presheaf.map i f) = V ⊓ X.basicOpen f
-- Mathlib/GroupTheory/NoncommCoprod.lean
@[to_additive]
theorem comp_noncommCoprod {Q : Type*} [Semigroup Q] (h : P →ₙ* Q)
    (comm : ∀ m n, Commute (f m) (g n)) :
    h.comp (f.noncommCoprod g comm) =
      (h.comp f).noncommCoprod (h.comp g) (fun m n ↦ (comm m n).map h)
-- Mathlib/Order/Atoms.lean
lemma IsCoatomic.exists_coatom [OrderTop α] [Nontrivial α] [IsCoatomic α] : ∃ a : α, IsCoatom a
-- Mathlib/RingTheory/IsAdjoinRoot.lean
/-- Extensionality of the `IsAdjoinRoot` structure itself. See `IsAdjoinRootMonic.ext_elem`
for extensionality of the ring elements. -/
theorem ext_map (h h' : IsAdjoinRoot S f) (eq : ∀ x, h.map x = h'.map x) : h = h'
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
@[simp]
theorem exp_nat_mul_two_pi_mul_I (n : ℕ) : exp (n * (2 * π * I)) = 1
-- Mathlib/Algebra/Ring/Ext.lean
@[ext] theorem ext ⦃inst₁ inst₂ : NonUnitalRing R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂
-- Mathlib/Data/Finset/Sups.lean
@[simp] lemma compls_inter (s t : Finset α) : (s ∩ t)ᶜˢ = sᶜˢ ∩ tᶜˢ
-- Mathlib/Data/Seq/WSeq.lean
theorem destruct_dropn : ∀ (s : WSeq α) (n), destruct (drop s n) = destruct s >>= drop.aux n
-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
theorem integrable_iff_integrableAtFilter_atBot [LinearOrder X] [OrderTop X] [CompactIccSpace X] :
    Integrable f μ ↔ IntegrableAtFilter f atBot μ ∧ LocallyIntegrable f μ
-- Mathlib/Topology/MetricSpace/Dilation.lean
/-- A dilation scales the diameter by `ratio f` in pseudometric spaces. -/
theorem diam_image (s : Set α) : Metric.diam ((f : α → β) '' s) = ratio f * Metric.diam s
-- Mathlib/Algebra/Group/Aut.lean
theorem inv_def (e₁ : AddAut A) : e₁⁻¹ = e₁.symm
-- Mathlib/RingTheory/FinitePresentation.lean
theorem of_finiteType [IsNoetherianRing A] {f : A →+* B} : f.FiniteType ↔ f.FinitePresentation
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem disjoint_of_disjoint_cons_left {l₁ l₂} : Disjoint (a :: l₁) l₂ → Disjoint l₁ l₂
-- Mathlib/Order/Filter/Bases.lean
theorem Tendsto.basis_right (H : Tendsto f la lb) (hlb : lb.HasBasis pb sb) :
    ∀ i, pb i → ∀ᶠ x in la, f x ∈ sb i
-- Mathlib/Order/Filter/Basic.lean
theorem tendsto_inf_left {f : α → β} {x₁ x₂ : Filter α} {y : Filter β} (h : Tendsto f x₁ y) :
    Tendsto f (x₁ ⊓ x₂) y
-- Mathlib/RingTheory/HahnSeries/Basic.lean
@[simp]
theorem support_single_of_ne (h : r ≠ 0) : support (single a r) = {a}