ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Logic/Equiv/Set.lean
@[simp] lemma rangeInl_apply_inl {α : Type*} (β : Type*) (x : α) :
    (rangeInl α β) ⟨.inl x, mem_range_self _⟩ = x
-- Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean
@[simp]
theorem terminal.comp_from [HasTerminal C] {P Q : C} (f : P ⟶ Q) :
    f ≫ terminal.from Q = terminal.from P
-- Mathlib/NumberTheory/ClassNumber/Finite.lean
/-- If the `R`-integral element `a : S` has coordinates `≤ y` with respect to some basis `b`,
its norm is less than `normBound abv b * y ^ dim S`. -/
theorem norm_le (a : S) {y : ℤ} (hy : ∀ k, abv (bS.repr a k) ≤ y) :
    abv (Algebra.norm R a) ≤ normBound abv bS * y ^ Fintype.card ι
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem norm_eq_one_iff {x : ℤ√d} : x.norm.natAbs = 1 ↔ IsUnit x
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp]
theorem mem_range {f : R →+* S} {y : S} : y ∈ f.range ↔ ∃ x, f x = y
-- Mathlib/Algebra/Order/Group/Lattice.lean
@[to_additive]
lemma inf_div (a b c : α) : (a ⊓ b) / c = a / c ⊓ b / c
-- Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
/-- If `x` is a root of unity (spelled as `IsOfFinOrder x`) in an `n`-th cyclotomic extension of
`ℚ`, where `n` is odd, and `ζ` is a primitive `n`-th root of unity, then there exists `r < n`
such that `x = ζ^r` or `x = -ζ^r`. -/
theorem exists_pow_or_neg_mul_pow_of_isOfFinOrder [NumberField K] [IsCyclotomicExtension {n} ℚ K]
    (hno : Odd (n : ℕ)) {ζ x : K} (hζ : IsPrimitiveRoot ζ n) (hx : IsOfFinOrder x) :
    ∃ r : ℕ, r < n ∧ (x = ζ ^ r ∨ x = -ζ ^ r)
-- Mathlib/Algebra/Group/Support.lean
@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
    f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x
-- Mathlib/GroupTheory/CoprodI.lean
theorem equivPair_eq_of_fstIdx_ne {i} {w : Word M} (h : fstIdx w ≠ some i) :
    equivPair i w = ⟨1, w, h⟩
-- Mathlib/Data/Real/Irrational.lean
theorem of_rat_div (h : Irrational (q / x)) : Irrational x
-- Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
theorem totalDegree_eq_zero_iff (p : MvPolynomial σ R) :
    p.totalDegree = 0 ↔ ∀ (m : σ →₀ ℕ) (_ : m ∈ p.support) (x : σ), m x = 0
-- Mathlib/CategoryTheory/Galois/Basic.lean
@[simp]
lemma fiberPullbackEquiv_symm_snd_apply {X A B : C} {f : A ⟶ X} {g : B ⟶ X}
    (a : F.obj A) (b : F.obj B) (h : F.map f a = F.map g b) :
    F.map (pullback.snd f g) ((fiberPullbackEquiv F f g).symm ⟨(a, b), h⟩) = b
-- Mathlib/Order/RelSeries.lean
lemma toList_ne_nil (x : RelSeries r) : x.toList ≠ []
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem Filter.EventuallyEq.lineDeriv_eq (h : f₁ =ᶠ[𝓝 x] f) :
    lineDeriv 𝕜 f₁ x v = lineDeriv 𝕜 f x v
-- Mathlib/Data/Nat/Squarefree.lean
theorem squarefree_mul_iff {m n : ℕ} :
    Squarefree (m * n) ↔ m.Coprime n ∧ Squarefree m ∧ Squarefree n
-- Mathlib/Data/Rat/Init.lean
@[simp] lemma cast_eq_id : NNRat.cast = id
-- Mathlib/Geometry/RingedSpace/PresheafedSpace.lean
theorem comp_c {X Y Z : PresheafedSpace C} (α : Hom X Y) (β : Hom Y Z) :
    (comp α β).c = β.c ≫ (Presheaf.pushforward _ β.base).map α.c
-- Mathlib/Order/LiminfLimsup.lean
theorem liminf_eq : liminf u f = sSup { a | ∀ᶠ n in f, a ≤ u n }
-- Mathlib/Algebra/Homology/DerivedCategory/Ext.lean
@[simp]
lemma comp_add (α : Ext X Y n) {m : ℕ} (β₁ β₂ : Ext Y Z m) {p : ℕ} (h : n + m = p) :
    α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h
-- Mathlib/Algebra/Ring/Basic.lean
@[simp]
theorem coe_mulLeft [NonUnitalNonAssocSemiring R] (r : R) :
    (mulLeft r : R → R) = HMul.hMul r
-- Mathlib/RingTheory/Trace/Basic.lean
theorem embeddingsMatrixReindex_eq_vandermonde (pb : PowerBasis A B)
    (e : Fin pb.dim ≃ (B →ₐ[A] C)) :
    embeddingsMatrixReindex A C pb.basis e = (vandermonde fun i => e i pb.gen)ᵀ
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem rangeS_le : (algebraMap R A).rangeS ≤ S.toSubalgebra.toSubsemiring
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Dvd.lean
protected theorem dvd_mul_right (a b : Nat) : a ∣ a * b
-- Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
theorem isCaratheodory_iUnion_lt {s : ℕ → Set α} :
    ∀ {n : ℕ}, (∀ i < n, IsCaratheodory m (s i)) → IsCaratheodory m (⋃ i < n, s i)
-- Mathlib/Algebra/Category/Grp/Limits.lean
@[simp]
theorem kernelIsoKer_hom_comp_subtype {G H : AddCommGrp.{u}} (f : G ⟶ H) :
    (kernelIsoKer f).hom ≫ AddSubgroup.subtype f.ker = kernel.ι f
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
@[simp]
theorem IsTrail.nil {u : V} : (nil : G.Walk u u).IsTrail
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
@[simp]
theorem val_mk0 {a : G₀} (h : a ≠ 0) : (mk0 a h : G₀) = a
-- Mathlib/RingTheory/DedekindDomain/Different.lean
lemma dual_inv :
    dual A K I⁻¹ = dual A K 1 * I
-- Mathlib/Data/Ordmap/Ordset.lean
theorem all_balanceL {P l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l) (sr : Sized r)
    (H :
      (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨
        ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r') :
    All P (@balanceL α l x r) ↔ All P l ∧ P x ∧ All P r
-- Mathlib/CategoryTheory/Limits/Shapes/FunctorToTypes.lean
@[simp]
lemma coprod.desc_inl {F₁ F₂ : C ⥤ Type w} (τ₁ : F₁ ⟶ F) (τ₂ : F₂ ⟶ F) :
    coprod.inl ≫ coprod.desc τ₁ τ₂ = τ₁
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
theorem ContMDiff.smul {f : M → 𝕜} {g : M → V} (hf : ContMDiff I 𝓘(𝕜) n f)
    (hg : ContMDiff I 𝓘(𝕜, V) n g) : ContMDiff I 𝓘(𝕜, V) n fun p => f p • g p
-- Mathlib/LinearAlgebra/Basis.lean
@[simp]
theorem Basis.equivFun_self [Finite ι] [DecidableEq ι] (b : Basis ι R M) (i j : ι) :
    b.equivFun (b i) j = if i = j then 1 else 0
-- Mathlib/Data/Sym/Sym2.lean
theorem mk_isDiag_iff {x y : α} : IsDiag s(x, y) ↔ x = y
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem map_C (r : R) : map f (C _ r) = C _ (f r)
-- Mathlib/RingTheory/Polynomial/Content.lean
theorem IsPrimitive.mul {p q : R[X]} (hp : p.IsPrimitive) (hq : q.IsPrimitive) :
    (p * q).IsPrimitive
-- Mathlib/Data/Multiset/Sum.lean
protected theorem Nodup.disjSum (hs : s.Nodup) (ht : t.Nodup) : (s.disjSum t).Nodup
-- Mathlib/Data/Set/Finite.lean
theorem card_image_of_injective (s : Set α) [Fintype s] {f : α → β} [Fintype (f '' s)]
    (H : Function.Injective f) : Fintype.card (f '' s) = Fintype.card s
-- Mathlib/Algebra/Order/BigOperators/Ring/Finset.lean
lemma abs_prod [LinearOrderedCommRing R] (s : Finset ι) (f : ι → R) :
    |∏ x ∈ s, f x| = ∏ x ∈ s, |f x|
-- Mathlib/Topology/Order/Monotone.lean
/-- A monotone map has a limit to the right of any point `x`, equal to `sInf (f '' (Ioi x))`. -/
theorem Monotone.tendsto_nhdsWithin_Ioi {α β : Type*} [LinearOrder α] [TopologicalSpace α]
    [OrderTopology α] [ConditionallyCompleteLinearOrder β] [TopologicalSpace β] [OrderTopology β]
    {f : α → β} (Mf : Monotone f) (x : α) : Tendsto f (𝓝[>] x) (𝓝 (sInf (f '' Ioi x)))
-- Mathlib/Data/Fintype/BigOperators.lean
@[to_additive]
theorem Fintype.prod_sum_elim (f : α₁ → M) (g : α₂ → M) :
    ∏ x, Sum.elim f g x = (∏ a₁, f a₁) * ∏ a₂, g a₂
-- Mathlib/Logic/Function/Conjugate.lean
/-- Reinterpret `Function.Commute f g` as `Function.Semiconj f g g`. These two predicates are
definitionally equal but have different dot-notation lemmas. -/
theorem semiconj (h : Commute f g) : Semiconj f g g
-- Mathlib/Algebra/Opposites.lean
@[simp] lemma unop_eq_one_iff [One α] {a : αᵃᵒᵖ} : unop a = 1 ↔ a = 1
-- Mathlib/Topology/Instances/Rat.lean
nonrec theorem totallyBounded_Icc (a b : ℚ) : TotallyBounded (Icc a b)
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive]
theorem lt_mul_of_le_of_one_lt [CovariantClass α α (· * ·) (· < ·)] {a b c : α} (hbc : b ≤ c)
    (ha : 1 < a) :
    b < c * a
-- Mathlib/Algebra/Associated/Basic.lean
protected theorem Prime.irreducible (hp : Prime p) : Irreducible p
-- Mathlib/Data/List/Chain.lean
theorem Chain'.take (h : Chain' R l) (n : ℕ) : Chain' R (take n l)
-- Mathlib/Data/Set/Image.lean
theorem range_diff_image_subset (f : α → β) (s : Set α) : range f \ f '' s ⊆ f '' sᶜ
-- Mathlib/Topology/UniformSpace/Basic.lean
@[simp]
theorem swap_idRel : Prod.swap '' idRel = @idRel α
-- Mathlib/Logic/Function/Basic.lean
theorem Function.LeftInverse.eq_rec_on_eq {γ : β → Sort v} {f : α → β} {g : β → α}
    (h : Function.LeftInverse g f) (C : ∀ a : α, γ (f a)) (a : α) :
    -- TODO: mathlib3 uses `(congr_arg f (h a)).recOn (C (g (f a)))` for LHS
    @Eq.recOn β (f (g (f a))) (fun x _ ↦ γ x) (f a) (congr_arg f (h a)) (C (g (f a))) = C a
-- Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean
@[simp, nolint simpNF]
theorem ε_apply (r : R) : ε R r = Finsupp.single PUnit.unit r
-- Mathlib/Algebra/Order/Floor/Div.lean
@[simp] lemma floorDiv_of_nonpos (ha : a ≤ 0) (b : β) : b ⌊/⌋ a = 0
-- Mathlib/CategoryTheory/Localization/Predicate.lean
lemma Construction.wInv_eq_isoOfHom_inv {X Y : C} (f : X ⟶ Y) (hf : W f) :
    Construction.wInv f hf = (isoOfHom W.Q W f hf).inv
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
@[simp]
theorem valuation_zero : valuation (0 : ℤ_[p]) = 0
-- Mathlib/MeasureTheory/SetAlgebra.lean
/-- An algebra of sets is a family of sets containing the empty set and closed by complement and
union. Consequently it is also closed by difference (see `IsSetAlgebra.diff_mem`) and intersection
(see `IsSetAlgebra.inter_mem`). -/
structure IsSetAlgebra (𝒜 : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ 𝒜
  compl_mem : ∀ ⦃s⦄, s ∈ 𝒜 → sᶜ ∈ 𝒜
  union_mem : ∀ ⦃s t⦄, s ∈ 𝒜 → t ∈ 𝒜 → s ∪ t ∈ 𝒜
-- Mathlib/Analysis/Convex/Between.lean
theorem right_mem_affineSegment (x y : P) : y ∈ affineSegment R x y
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem sub_succ_lt_self (a i : Nat) (h : i < a) : a - (i + 1) < a - i
-- Mathlib/Topology/Order/UpperLowerSetTopology.lean
/--
The closure of a singleton `{a}` in the lower set topology is the right-closed left-infinite
interval (-∞,a].
-/
@[simp] lemma closure_singleton {a : α} : closure {a} = Ici a
-- Mathlib/AlgebraicGeometry/Cover/Open.lean
theorem OpenCover.iSup_opensRange {X : Scheme.{u}} (𝒰 : X.OpenCover) :
    ⨆ i, (𝒰.map i).opensRange = ⊤
-- Mathlib/Probability/ProbabilityMassFunction/Binomial.lean
@[simp]
theorem binomial_apply_zero (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) :
    binomial p h n 0 = (1-p)^n
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp] theorem lTensor_zpow (f : N ≃ₗ[R] N) (n : ℤ) : f.lTensor M ^ n = (f ^ n).lTensor M
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
/-- Express `dist` in terms of `edist`-/
theorem dist_edist (x y : α) : dist x y = (edist x y).toReal
-- Mathlib/LinearAlgebra/RootSystem/Defs.lean
lemma bijOn_coreflection_coroot : BijOn (P.coreflection i) (range P.coroot) (range P.coroot)
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- The Hausdorff edistance between sets or their closures is the same. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem hausdorffEdist_closure : hausdorffEdist (closure s) (closure t) = hausdorffEdist s t
-- Mathlib/Data/Vector/Basic.lean
theorem nodup_iff_injective_get {v : Vector α n} : v.toList.Nodup ↔ Function.Injective v.get
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem get_push (a : Array α) (x : α) (i : Nat) (h : i < (a.push x).size) :
    (a.push x)[i] = if h : i < a.size then a[i] else x
-- Mathlib/Order/Heyting/Basic.lean
theorem sdiff_sdiff_sdiff_le_sdiff : (a \ b) \ (a \ c) ≤ c \ b
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
theorem contMDiffWithinAt_congr_nhds (hst : 𝓝[s] x = 𝓝[t] x) :
    ContMDiffWithinAt I I' n f s x ↔ ContMDiffWithinAt I I' n f t x
-- Mathlib/Data/Finsupp/Basic.lean
theorem sumFinsuppAddEquivProdFinsupp_symm_inl {α β : Type*} (fg : (α →₀ M) × (β →₀ M)) (x : α) :
    (sumFinsuppAddEquivProdFinsupp.symm fg) (Sum.inl x) = fg.1 x
-- Mathlib/Analysis/LocallyConvex/Bounded.lean
theorem isVonNBounded_add_of_nonempty (hs : s.Nonempty) (ht : t.Nonempty) :
    IsVonNBounded 𝕜 (s + t) ↔ IsVonNBounded 𝕜 s ∧ IsVonNBounded 𝕜 t
-- Mathlib/Order/RelClasses.lean
/-- A version of `right_iff_left_not_left` with explicit `r` and `s`. -/
theorem right_iff_left_not_left_of (r s : α → α → Prop) [IsNonstrictStrictOrder α r s] {a b : α} :
    s a b ↔ r a b ∧ ¬r b a
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem toAddEquiv_eq_coe (f : R ≃+* S) : f.toAddEquiv = ↑f
-- Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean
theorem vertices_eq : K.vertices = ⋃ k ∈ K.faces, (k : Set E)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem aleph_le {o₁ o₂ : Ordinal} : aleph o₁ ≤ aleph o₂ ↔ o₁ ≤ o₂
-- Mathlib/Topology/Order/OrderClosed.lean
theorem disjoint_nhds_atBot (a : α) : Disjoint (𝓝 a) atBot
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
@[simp] theorem normalize_eq_zero (d0 : d ≠ 0) : normalize n d d0 = 0 ↔ n = 0
-- Mathlib/Data/Multiset/Sections.lean
theorem mem_sections {s : Multiset (Multiset α)} :
    ∀ {a}, a ∈ Sections s ↔ s.Rel (fun s a => a ∈ s) a
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
@[simp] lemma smul_apply (x) : (σ • w) x = w (σ.symm x)
-- Mathlib/Topology/Order.lean
theorem generateFrom_setOf_isOpen (t : TopologicalSpace α) :
    generateFrom { s | IsOpen[t] s } = t
-- Mathlib/Logic/Function/Iterate.lean
theorem iterate_commute (m n : ℕ) : Commute (fun f : α → α ↦ f^[m]) fun f ↦ f^[n]
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
theorem isComplex_iff {w : InfinitePlace K} :
    IsComplex w ↔ ¬ComplexEmbedding.IsReal (embedding w)
-- Mathlib/Tactic/Ring/Basic.lean
theorem sub_congr {R} [Ring R] {a a' b b' c : R} (_ : a = a') (_ : b = b')
    (_ : a' - b' = c) : (a - b : R) = c
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
@[simp]
lemma rightHomologyMap_nullHomotopic [S₁.HasRightHomology] [S₂.HasRightHomology]
    (h₀ : S₁.X₁ ⟶ S₂.X₁) (h₀_f : h₀ ≫ S₂.f = 0)
    (h₁ : S₁.X₂ ⟶ S₂.X₁) (h₂ : S₁.X₃ ⟶ S₂.X₂) (h₃ : S₁.X₃ ⟶ S₂.X₃) (g_h₃ : S₁.g ≫ h₃ = 0) :
    rightHomologyMap (nullHomotopic _ _ h₀ h₀_f h₁ h₂ h₃ g_h₃) = 0
-- Mathlib/Topology/Algebra/ConstMulAction.lean
@[to_additive]
theorem continuousOn_const_smul_iff (c : G) :
    ContinuousOn (fun x => c • f x) s ↔ ContinuousOn f s
-- Mathlib/Probability/Independence/Kernel.lean
theorem iIndepSet.indep_generateFrom_lt [Preorder ι] [IsMarkovKernel κ] {s : ι → Set Ω}
    (hsm : ∀ n, MeasurableSet (s n)) (hs : iIndepSet s κ μ) (i : ι) :
    Indep (generateFrom {s i}) (generateFrom { t | ∃ j < i, s j = t }) κ μ
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
theorem compLinearMap_inj (f : M₂ →ₗ[R] M) (hf : Function.Surjective f)
    (g₁ g₂ : M [⋀^ι]→ₗ[R] N) : g₁.compLinearMap f = g₂.compLinearMap f ↔ g₁ = g₂
-- Mathlib/Order/BooleanGenerators.lean
lemma isAtomistic_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
    IsAtomistic α
-- Mathlib/CategoryTheory/Abelian/Exact.lean
/-- A functor which preserves exactness preserves monomorphisms. -/
theorem preservesMonomorphisms_of_map_exact : L.PreservesMonomorphisms
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive sub_image_prod]
theorem image_div_prod : (fun x : α × α => x.fst / x.snd) '' s ×ˢ t = s / t
-- Mathlib/Order/Filter/Basic.lean
theorem EventuallyLE.antisymm [PartialOrder β] {l : Filter α} {f g : α → β} (h₁ : f ≤ᶠ[l] g)
    (h₂ : g ≤ᶠ[l] f) : f =ᶠ[l] g
-- Mathlib/Order/OmegaCompletePartialOrder.lean
theorem seq_continuous' {β γ : Type v} (f : α → Part (β → γ)) (g : α → Part β) (hf : Continuous' f)
    (hg : Continuous' g) : Continuous' fun x => f x <*> g x
-- Mathlib/Order/Interval/Basic.lean
@[simp]
theorem bot_ne_pure {a : α} : ⊥ ≠ pure a
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive (attr := simp)]
theorem prod_empty : ∏ x ∈ ∅, f x = 1
-- Mathlib/CategoryTheory/Sites/Grothendieck.lean
theorem covering_iff_covers_id (S : Sieve X) : S ∈ J X ↔ J.Covers S (𝟙 X)
-- Mathlib/Algebra/Module/Injective.lean
theorem ExtensionOf.le_max {c : Set (ExtensionOf i f)} (hchain : IsChain (· ≤ ·) c)
    (hnonempty : c.Nonempty) (a : ExtensionOf i f) (ha : a ∈ c) :
    a ≤ ExtensionOf.max hchain hnonempty
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem one_def : (1 : MonoidAlgebra k G) = single 1 1
-- Mathlib/GroupTheory/Perm/Sign.lean
theorem mclosure_isSwap [Finite α] : Submonoid.closure { σ : Perm α | IsSwap σ } = ⊤
-- Mathlib/Algebra/Group/Hom/Instances.lean
/-- Composition of monoid morphisms (`MonoidHom.comp`) as a monoid morphism.

Note that unlike `MonoidHom.comp_hom'` this requires commutativity of `N`. -/
@[to_additive (attr := simps)
      "Composition of additive monoid morphisms (`AddMonoidHom.comp`) as an additive
      monoid morphism.

      Note that unlike `AddMonoidHom.comp_hom'` this requires commutativity of `N`.

      This also exists in a `LinearMap` version, `LinearMap.llcomp`."]
def compHom [MulOneClass M] [CommMonoid N] [CommMonoid P] :
    (N →* P) →* (M →* N) →* M →* P
-- Mathlib/Data/Set/Sigma.lean
@[simp] theorem sigma_empty : s.sigma (fun i ↦ (∅ : Set (α i))) = ∅
-- Mathlib/Data/Finset/Lattice.lean
protected theorem codisjoint_inf_left :
    Codisjoint (s.inf f) a ↔ ∀ ⦃i⦄, i ∈ s → Codisjoint (f i) a
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
theorem log_pow_int_eq_self {x : ℤ} (h : 1 < x.natAbs) (m : ℕ) : log (pow x m) = m
-- Mathlib/Data/List/EditDistance/Defs.lean
theorem suffixLevenshtein_length (xs : List α) (ys : List β) :
    (suffixLevenshtein C xs ys).1.length = xs.length + 1
-- Mathlib/Analysis/LocallyConvex/Basic.lean
theorem Balanced.smul_mem_iff (hs : Balanced 𝕜 s) (h : ‖a‖ = ‖b‖) : a • x ∈ s ↔ b • x ∈ s
-- Mathlib/Algebra/GroupWithZero/Action/Defs.lean
theorem smul_sub (r : M) (x y : A) : r • (x - y) = r • x - r • y
-- Mathlib/CategoryTheory/Endofunctor/Algebra.lean
@[simp]
theorem comp_eq_comp : Algebra.Hom.comp f g = f ≫ g
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
@[simp]
theorem mem_skewAdjointSubmodule (f : Module.End R M) :
    f ∈ B.skewAdjointSubmodule ↔ B.IsSkewAdjoint f
-- Mathlib/MeasureTheory/Constructions/Pi.lean
theorem volume_preserving_piFinTwo (α : Fin 2 → Type u) [∀ i, MeasureSpace (α i)]
    [∀ i, SigmaFinite (volume : Measure (α i))] :
    MeasurePreserving (MeasurableEquiv.piFinTwo α) volume volume
-- Mathlib/Order/Hom/Lattice.lean
/-- `id` as an `InfTopHom`. -/
@[simps]
protected def id : InfTopHom α α
-- Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean
@[ext] theorem unit_ext {X : C} (f g : X ⟶ 𝟙_ C) : f = g
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smulPosMono_iff_smulPosStrictMono : SMulPosMono α β ↔ SMulPosStrictMono α β
-- Mathlib/CategoryTheory/Galois/Basic.lean
lemma mulAction_def {X : C} (σ : Aut F) (x : F.obj X) :
    σ • x = σ.hom.app X x
-- Mathlib/Algebra/Regular/Basic.lean
/-- In a non-trivial `MulZeroClass`, the `0` element is not left-regular. -/
theorem not_isLeftRegular_zero_iff : ¬IsLeftRegular (0 : R) ↔ Nontrivial R
-- Mathlib/Probability/Martingale/Upcrossing.lean
theorem crossing_eq_crossing_of_upperCrossingTime_lt {M : ℕ} (hNM : N ≤ M)
    (h : upperCrossingTime a b f N (n + 1) ω < N) :
    upperCrossingTime a b f M (n + 1) ω = upperCrossingTime a b f N (n + 1) ω ∧
      lowerCrossingTime a b f M n ω = lowerCrossingTime a b f N n ω
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
lemma mapₗ_ne_zero_iff (hf : Measurable f) : Measure.mapₗ f μ ≠ 0 ↔ μ ≠ 0
-- Mathlib/Topology/Maps/Basic.lean
theorem tendsto_nhds_iff {g : ι → X} {l : Filter ι} {x : X} (hf : ClosedEmbedding f) :
    Tendsto g l (𝓝 x) ↔ Tendsto (f ∘ g) l (𝓝 (f x))
-- Mathlib/Computability/Reduce.lean
@[trans]
theorem OneOneEquiv.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {p : α → Prop}
    {q : β → Prop} {r : γ → Prop} : OneOneEquiv p q → OneOneEquiv q r → OneOneEquiv p r
-- Mathlib/Combinatorics/SimpleGraph/Matching.lean
lemma IsMatching.map_ofLE (h : M.IsMatching) (hGG' : G ≤ G') :
    (M.map (Hom.ofLE hGG')).IsMatching
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
/-- **Fermat's Theorem**: the derivative of a function at a local minimum equals zero. -/
theorem IsLocalMin.deriv_eq_zero (h : IsLocalMin f a) : deriv f a = 0
-- .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean
theorem mem_eraseIdx_iff_getElem? {x : α} {l} {k} : x ∈ eraseIdx l k ↔ ∃ i ≠ k, l[i]? = some x
-- Mathlib/Data/ZMod/Basic.lean
theorem intCast_eq_iff (p : ℕ) (n : ℤ) (z : ZMod p) [NeZero p] :
    ↑n = z ↔ ∃ k, n = z.val + p * k
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem star_mono : Monotone (star : Subalgebra R A → Subalgebra R A)
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem filter_ge_eq_Iic [DecidablePred (· ≤ a)] : univ.filter (· ≤ a) = Iic a
-- Mathlib/Order/Fin/Tuple.lean
lemma liftFun_vecCons {n : ℕ} (r : α → α → Prop) [IsTrans α r] {f : Fin (n + 1) → α} {a : α} :
    ((· < ·) ⇒ r) (vecCons a f) (vecCons a f) ↔ r a (f 0) ∧ ((· < ·) ⇒ r) f f
-- Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean
theorem toLin'_to_linearMap (A : SpecialLinearGroup n R) :
    ↑(SpecialLinearGroup.toLin' A) = Matrix.toLin' ↑ₘA
-- Mathlib/Analysis/Calculus/TangentCone.lean
/-- The tangent cone of a product contains the tangent cone of its right factor. -/
theorem subset_tangentCone_prod_right {t : Set F} {y : F} (hs : x ∈ closure s) :
    LinearMap.inr 𝕜 E F '' tangentConeAt 𝕜 t y ⊆ tangentConeAt 𝕜 (s ×ˢ t) (x, y)
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
@[simp]
theorem res_apply (U V : Opens (PrimeSpectrum.Top R)) (i : V ⟶ U)
    (s : (structureSheaf R).1.obj (op U)) (x : V) :
    ((structureSheaf R).1.map i.op s).1 x = (s.1 (i x) : _)
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
theorem exists_finset_toSmoothPartitionOfUnity_eventuallyEq (i : ι) (x : M) :
    ∃ t : Finset ι,
      fs.toSmoothPartitionOfUnity i =ᶠ[𝓝 x]
        fs i * ∏ j ∈ t.filter fun j => WellOrderingRel j i, ((1 : M → ℝ) - fs j)
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma dblU_eq (P : Fin 3 → R) : W'.dblU P =
    W'.a₁ * P y * P z - (3 * P x ^ 2 + 2 * W'.a₂ * P x * P z ^ 2 + W'.a₄ * P z ^ 4)
-- Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean
/-- Assume that `f` is differentiable inside a convex set `s`, and that its derivative `f'` is
differentiable at a point `x`. Then, given two vectors `v` and `w` pointing inside `s`, one
has `f'' v w = f'' w v`. Superseded by `Convex.second_derivative_within_at_symmetric`, which
removes the assumption that `v` and `w` point inside `s`. -/
theorem Convex.second_derivative_within_at_symmetric_of_mem_interior {v w : E}
    (h4v : x + (4 : ℝ) • v ∈ interior s) (h4w : x + (4 : ℝ) • w ∈ interior s) :
    f'' w v = f'' v w
-- Mathlib/Topology/Order/Lattice.lean
lemma finset_sup_nhds [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) : Tendsto (s.sup f) l (𝓝 (s.sup g))
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
lemma differentiableAt_comp_neg_iff {a : 𝕜} :
    DifferentiableAt 𝕜 f (-a) ↔ DifferentiableAt 𝕜 (fun x ↦ f (-x)) a
-- Mathlib/Order/CompleteBooleanAlgebra.lean
/-- A `biSup` version of `iSup_symmDiff_iSup_le`. -/
theorem biSup_symmDiff_biSup_le {p : ι → Prop} {f g : (i : ι) → p i → α} :
    (⨆ i, ⨆ (h : p i), f i h) ∆ (⨆ i, ⨆ (h : p i), g i h) ≤
    ⨆ i, ⨆ (h : p i), ((f i h) ∆ (g i h))
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem lift_le {a b : Ordinal} : lift.{u,v} a ≤ lift.{u,v} b ↔ a ≤ b
-- Mathlib/Data/ZMod/Basic.lean
@[simp]
theorem cast_pow (h : m ∣ n) (a : ZMod n) (k : ℕ) : (cast (a ^ k : ZMod n) : R) = (cast a) ^ k
-- Mathlib/Order/Filter/Prod.lean
theorem prod_assoc (f : Filter α) (g : Filter β) (h : Filter γ) :
    map (Equiv.prodAssoc α β γ) ((f ×ˢ g) ×ˢ h) = f ×ˢ (g ×ˢ h)
-- Mathlib/Topology/ContinuousFunction/Ordered.lean
@[simp, norm_cast] lemma coe_inf (f g : C(α, β)) : ⇑(f ⊓ g) = ⇑f ⊓ g
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
/-- Being `C^n` is a local property. -/
theorem contMDiffOn_of_locally_contMDiffOn
    (h : ∀ x ∈ s, ∃ u, IsOpen u ∧ x ∈ u ∧ ContMDiffOn I I' n f (s ∩ u)) : ContMDiffOn I I' n f s
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem coeff_rescale (f : R⟦X⟧) (a : R) (n : ℕ) :
    coeff R n (rescale a f) = a ^ n * coeff R n f
-- Mathlib/Data/Rat/Defs.lean
@[simp, norm_cast] lemma num_natCast (n : ℕ) : num n = n
-- Mathlib/Data/List/Join.lean
@[deprecated drop_take_succ_join_eq_getElem' (since := "2024-06-11")]
theorem drop_take_succ_join_eq_get' (L : List (List α)) (i : Fin L.length) :
    (L.join.take (Nat.sum ((L.map length).take (i + 1)))).drop (Nat.sum ((L.map length).take i)) =
      get L i
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_nonpos (f : R → R) (a : A) (h : ∀ x ∈ spectrum R a, f x ≤ 0) :
    cfc f a ≤ 0