ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean
/-- The duality equivalence `WalkingSpanᵒᵖ ≌ WalkingCospan` -/
@[simps!]
def walkingSpanOpEquiv : WalkingSpanᵒᵖ ≌ WalkingCospan
-- Mathlib/MeasureTheory/Measure/Lebesgue/Complex.lean
@[simp]
theorem measurableEquivPi_apply (a : ℂ) :
    measurableEquivPi a = ![a.re, a.im]
-- Mathlib/Order/Closure.lean
theorem closure_union_closure_subset (x y : α) : (l x : Set β) ∪ l y ⊆ l (x ∪ y)
-- Mathlib/Topology/Order/IsLUB.lean
theorem IsGLB.frequently_mem {a : α} {s : Set α} (ha : IsGLB s a) (hs : s.Nonempty) :
    ∃ᶠ x in 𝓝[≥] a, x ∈ s
-- Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean
theorem hasEigenvalue_iff_isRoot : f.HasEigenvalue μ ↔ (minpoly K f).IsRoot μ
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
/-- The kernel morphism of a monomorphism is a zero morphism -/
theorem kernel.ι_of_mono [HasKernel f] [Mono f] : kernel.ι f = 0
-- Mathlib/Algebra/Lie/Derivation/Killing.lean
lemma killingForm_restrict_range_ad : (killingForm R 𝔻).restrict 𝕀 = killingForm R 𝕀
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem map_comp_lTensor (f : M →ₗ[R] P) (g : N →ₗ[R] Q) (g' : S →ₗ[R] N) :
    (map f g).comp (g'.lTensor _) = map f (g.comp g')
-- Mathlib/Algebra/Homology/Embedding/Extend.lean
lemma extend_d_eq {i' j' : ι'} {i j : ι} (hi : e.f i = i') (hj : e.f j = j') :
    (K.extend e).d i' j' = (K.extendXIso e hi).hom ≫ K.d i j ≫
      (K.extendXIso e hj).inv
-- Mathlib/Data/Complex/Exponential.lean
theorem tan_sq_div_one_add_tan_sq {x : ℂ} (hx : cos x ≠ 0) :
    tan x ^ 2 / (1 + tan x ^ 2) = sin x ^ 2
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
protected theorem map₂ [Zero δ] (hf : f.FinMeasSupp μ) {g : α →ₛ γ} (hg : g.FinMeasSupp μ)
    {op : β → γ → δ} (H : op 0 0 = 0) : ((pair f g).map (Function.uncurry op)).FinMeasSupp μ
-- Mathlib/LinearAlgebra/Dual.lean
@[simp]
theorem dualRestrict_comp_dualLift (W : Subspace K V) : W.dualRestrict.comp W.dualLift = 1
-- Mathlib/Algebra/Star/Unitary.lean
theorem star_eq_inv' : (star : unitary R → unitary R) = Inv.inv
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
theorem comap_comap (s : AffineSubspace k P₃) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
    (s.comap g).comap f = s.comap (g.comp f)
-- Mathlib/Algebra/Polynomial/AlgebraMap.lean
@[simp]
theorem mapAlgHom_coe_ringHom (f : A →ₐ[R] B) :
    ↑(mapAlgHom f : _ →ₐ[R] Polynomial B) = (mapRingHom ↑f : Polynomial A →+* Polynomial B)
-- Mathlib/RingTheory/Valuation/RankOne.lean
lemma nontrivial : ∃ r : R, v r ≠ 0 ∧ v r ≠ 1
-- Mathlib/Topology/Sets/Opens.lean
@[simp]
theorem mem_sSup {Us : Set (Opens α)} {x : α} : x ∈ sSup Us ↔ ∃ u ∈ Us, x ∈ u
-- Mathlib/Topology/Connected/Clopen.lean
/-- A closed set `s` is preconnected if and only if for every cover by two closed sets that are
disjoint, it is contained in one of the two covering sets. -/
theorem isPreconnected_iff_subset_of_fully_disjoint_closed {s : Set α} (hs : IsClosed s) :
    IsPreconnected s ↔
      ∀ u v, IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v
-- Mathlib/Data/Vector/Basic.lean
@[simp]
theorem mmap_cons {m} [Monad m] {α β} (f : α → m β) (a) :
    ∀ {n} (v : Vector α n),
      mmap f (a ::ᵥ v) = do
        let h' ← f a
        let t' ← mmap f v
        pure (h' ::ᵥ t')
-- Mathlib/Algebra/Module/Submodule/LinearMap.lean
@[simp]
theorem subtype_comp_codRestrict (p : Submodule R₂ M₂) (h : ∀ b, f b ∈ p) :
    p.subtype.comp (codRestrict p f h) = f
-- Mathlib/Probability/ProbabilityMassFunction/Monad.lean
/-- The measure of a set under `pure a` is `1` for sets containing `a` and `0` otherwise. -/
@[simp]
theorem toMeasure_pure_apply (hs : MeasurableSet s) :
    (pure a).toMeasure s = if a ∈ s then 1 else 0
-- Mathlib/Data/Int/ModEq.lean
@[gcongr] protected theorem add_left (c : ℤ) (h : a ≡ b [ZMOD n]) : c + a ≡ c + b [ZMOD n]
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem disjoint_cons_right {a : α} {s t : Multiset α} :
    Disjoint s (a ::ₘ t) ↔ a ∉ s ∧ Disjoint s t
-- Mathlib/Probability/ProbabilityMassFunction/Monad.lean
@[simp]
theorem bind_const (p : PMF α) (q : PMF β) : (p.bind fun _ => q) = q
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem getElem_cons_length (x : α) (xs : List α) (n : Nat) (h : n = xs.length) :
    (x :: xs)[n]'(by simp [h]) = (x :: xs).getLast (cons_ne_nil x xs)
-- Mathlib/Algebra/Polynomial/CancelLeads.lean
theorem dvd_cancelLeads_of_dvd_of_dvd {r : R[X]} (pq : p ∣ q) (pr : p ∣ r) : p ∣ q.cancelLeads r
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem comp_apply (f : SupHom β γ) (g : SupHom α β) (a : α) : (f.comp g) a = f (g a)
-- Mathlib/CategoryTheory/Shift/ShiftedHom.lean
@[simp]
lemma comp_mk₀_id {a : M} (f : ShiftedHom X Y a) (m₀ : M) (hm₀ : m₀ = 0) :
    f.comp (mk₀ m₀ hm₀ (𝟙 Y)) (by rw [hm₀, zero_add]) = f
-- Mathlib/Data/Finset/Union.lean
lemma disjiUnion_filter_eq_of_maps_to (h : ∀ x ∈ s, f x ∈ t) :
    t.disjiUnion (fun a ↦ s.filter (f · = a)) pairwiseDisjoint_fibers = s
-- Mathlib/Algebra/Order/Sub/Defs.lean
protected theorem lt_add_of_tsub_lt_left (hb : AddLECancellable b) (h : a - b < c) : a < b + c
-- Mathlib/AlgebraicGeometry/Spec.lean
/-- Spec, as a contravariant functor from commutative rings to locally ringed spaces.
-/
@[simps]
def Spec.toLocallyRingedSpace : CommRingCat.{u}ᵒᵖ ⥤ LocallyRingedSpace
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
/-- The homotopy between morphisms in `ShortComplex Cᵒᵖ` that is induced by a homotopy
between morphisms in `ShortComplex C`. -/
@[simps]
def op (h : Homotopy φ₁ φ₂) : Homotopy (opMap φ₁) (opMap φ₂)
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
@[simp] theorem nil_perm {l₁ : List α} : [] ~ l₁ ↔ l₁ = []
-- Mathlib/MeasureTheory/Measure/WithDensityFinite.lean
lemma toFinite_withDensity_restrict_sigmaFiniteSet (μ : Measure α) [SFinite μ] :
    (μ.toFinite.withDensity
        (fun x ↦ if μ.densityToFinite x ≠ ∞ then μ.densityToFinite x else 1)).restrict
        μ.sigmaFiniteSet
      = μ.restrict μ.sigmaFiniteSet
-- Mathlib/Analysis/Convex/Cone/Pointed.lean
@[ext]
theorem ext {S T : PointedCone 𝕜 E} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T
-- Mathlib/Data/List/Perm.lean
lemma count_eq_count_filter_add [DecidableEq α] (P : α → Prop) [DecidablePred P]
    (l : List α) (a : α) :
    count a l = count a (l.filter P) + count a (l.filter (¬ P ·))
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
/-- `VectorMeasure.restrict` as an additive monoid homomorphism. -/
@[simps]
def restrictₗ (i : Set α) : VectorMeasure α M →ₗ[R] VectorMeasure α M
-- Mathlib/Data/List/Chain.lean
theorem Chain'.imp_head {x y} (h : ∀ {z}, R x z → R y z) {l} (hl : Chain' R (x :: l)) :
    Chain' R (y :: l)
-- Mathlib/Algebra/Order/Floor.lean
theorem floor_le_of_le (h : a ≤ n) : ⌊a⌋₊ ≤ n
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem sigmaUnique_symm_apply {β : α → Type*} [∀ a, Unique (β a)] (x : α) :
    (sigmaUnique α β).symm x = ⟨x, default⟩
-- Mathlib/SetTheory/Cardinal/ENat.lean
lemma ofENat_mono : Monotone ofENat
-- Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
@[to_additive sum_fiberwise_le_sum_of_sum_fiber_nonneg]
theorem prod_fiberwise_le_prod_of_one_le_prod_fiber' {t : Finset ι'} {g : ι → ι'} {f : ι → N}
    (h : ∀ y ∉ t, (1 : N) ≤ ∏ x ∈ s.filter fun x ↦ g x = y, f x) :
    (∏ y ∈ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x) ≤ ∏ x ∈ s, f x
-- Mathlib/MeasureTheory/Measure/AEDisjoint.lean
protected theorem _root_.Set.PairwiseDisjoint.aedisjoint {f : ι → Set α} {s : Set ι}
    (hf : s.PairwiseDisjoint f) : s.Pairwise (AEDisjoint μ on f)
-- Mathlib/Probability/Distributions/Exponential.lean
lemma hasDerivAt_neg_exp_mul_exp {r x : ℝ} :
    HasDerivAt (fun a ↦ -exp (-(r * a))) (r * exp (-(r * x))) x
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
theorem dimH_ball_pi_fin {n : ℕ} (x : Fin n → ℝ) {r : ℝ} (hr : 0 < r) :
    dimH (Metric.ball x r) = n
-- Mathlib/LinearAlgebra/LinearDisjoint.lean
/-- The `Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat`
for commutative rings. -/
theorem rank_inf_le_one_of_flat (hf : Module.Flat R M ∨ Module.Flat R N) :
    Module.rank R ↥(M ⊓ N) ≤ 1
-- Mathlib/Analysis/Calculus/Deriv/Inv.lean
theorem HasDerivAt.inv (hc : HasDerivAt c c' x) (hx : c x ≠ 0) :
    HasDerivAt (fun y => (c y)⁻¹) (-c' / c x ^ 2) x
-- Mathlib/Algebra/Group/Indicator.lean
@[to_additive]
theorem mulIndicator_apply_ne_one {a : α} : s.mulIndicator f a ≠ 1 ↔ a ∈ s ∩ mulSupport f
-- Mathlib/Algebra/Group/Aut.lean
@[simp]
theorem one_apply (m : M) : (1 : MulAut M) m = m
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem IsPath.reverse {u v : V} {p : G.Walk u v} (h : p.IsPath) : p.reverse.IsPath
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem and_any_distrib_right (l : List α) (p : α → Bool) (q : Bool) :
    (l.any p && q) = l.any fun a => p a && q
-- Mathlib/Combinatorics/Additive/ETransform.lean
@[to_additive]
theorem mulDysonETransform.card :
    (mulDysonETransform e x).1.card + (mulDysonETransform e x).2.card = x.1.card + x.2.card
-- Mathlib/Analysis/Normed/Field/Basic.lean
@[simp]
theorem norm_zpow : ∀ (a : α) (n : ℤ), ‖a ^ n‖ = ‖a‖ ^ n
-- Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean
lemma tangentCoordChange_def {x y z : M} : tangentCoordChange I x y z =
    fderivWithin 𝕜 (extChartAt I y ∘ (extChartAt I x).symm) (range I) (extChartAt I x z)
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
theorem Anisotropic.eq_zero_iff {Q : QuadraticMap R M N} (h : Anisotropic Q) {x : M} :
    Q x = 0 ↔ x = 0
-- Mathlib/FieldTheory/NormalClosure.lean
lemma normal_iff_forall_fieldRange_le : Normal F K ↔ ∀ σ : K →ₐ[F] L, σ.fieldRange ≤ K
-- Mathlib/Algebra/Polynomial/UnitTrinomial.lean
theorem irreducible_aux1 {k m n : ℕ} (hkm : k < m) (hmn : m < n) (u v w : Units ℤ)
    (hp : p = trinomial k m n (u : ℤ) v w) :
    C (v : ℤ) * (C (u : ℤ) * X ^ (m + n) + C (w : ℤ) * X ^ (n - m + k + n)) =
      ⟨Finsupp.filter (· ∈ Set.Ioo (k + n) (n + n)) (p * p.mirror).toFinsupp⟩
-- Mathlib/Data/List/NodupEquivFin.lean
/-- If `l` has no duplicates, then `List.get` defines an equivalence between `Fin (length l)` and
the set of elements of `l`. -/
@[simps]
def getEquiv (l : List α) (H : Nodup l) : Fin (length l) ≃ { x // x ∈ l }
-- Mathlib/Topology/MetricSpace/Gluing.lean
theorem Sum.one_le_dist_inr_inl {x : X} {y : Y} : 1 ≤ Sum.dist (.inr y) (.inl x)
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
theorem Nonempty.of_smul_right : (s • t).Nonempty → t.Nonempty
-- Mathlib/CategoryTheory/Sites/Sieves.lean
@[simp]
theorem functorPushforward_top (F : C ⥤ D) (X : C) : (⊤ : Sieve X).functorPushforward F = ⊤
-- Mathlib/Data/Fintype/Card.lean
theorem card_lt_of_injective_not_surjective (f : α → β) (h : Function.Injective f)
    (h' : ¬Function.Surjective f) : card α < card β
-- Mathlib/Algebra/Group/Nat.lean
@[simp] protected lemma isUnit_iff {n : ℕ} : IsUnit n ↔ n = 1
-- Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean
@[reassoc] theorem associator_inv_fst_fst (X Y Z : C) :
    (α_ X Y Z).inv ≫ prod.fst ≫ prod.fst = prod.fst
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
@[norm_cast]
theorem WithBot.coe_iSup [Nonempty ι] [SupSet α] {f : ι → α} (hf : BddAbove (range f)) :
    ↑(⨆ i, f i) = (⨆ i, f i : WithBot α)
-- Mathlib/Algebra/Order/Monoid/Unbundled/ExistsOfLE.lean
@[to_additive]
theorem le_of_forall_one_lt_lt_mul' (h : ∀ ε : α, 1 < ε → a < b * ε) : a ≤ b
-- Mathlib/RingTheory/Nilpotent/Lemmas.lean
theorem isRadical_iff_span_singleton [CommSemiring R] :
    IsRadical y ↔ (Ideal.span ({y} : Set R)).IsRadical
-- Mathlib/CategoryTheory/Limits/Shapes/FunctorToTypes.lean
/-- Given natural transformations `F ⟶ F₁` and `F ⟶ F₂`, construct
a natural transformation `F ⟶ prod F₁ F₂`. -/
@[simps]
def prod.lift {F₁ F₂ : C ⥤ Type w} (τ₁ : F ⟶ F₁) (τ₂ : F ⟶ F₂) :
    F ⟶ prod F₁ F₂
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem symm_symm : e.symm.symm = e
-- Mathlib/Data/Set/Image.lean
theorem preimage_coe_self_inter (s t : Set α) :
    ((↑) : s → α) ⁻¹' (s ∩ t) = ((↑) : s → α) ⁻¹' t
-- Mathlib/Dynamics/PeriodicPts.lean
theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
    (hmn : f^[m] x = f^[n] x) : m ≤ n
-- Mathlib/Control/Traversable/Instances.lean
protected theorem id_traverse {α} (xs : List α) : List.traverse (pure : α → Id α) xs = xs
-- Mathlib/Algebra/Order/Sub/Defs.lean
theorem le_tsub_add_add : a + b ≤ a - c + (b + c)
-- .lake/packages/lean4/src/lean/Init/Data/List/TakeDrop.lean
theorem length_take_of_le (h : n ≤ length l) : length (take n l) = n
-- Mathlib/Order/Basic.lean
theorem le_trans' : b ≤ c → a ≤ b → a ≤ c
-- Mathlib/Algebra/Polynomial/EraseLead.lean
theorem eraseLead_support (f : R[X]) : f.eraseLead.support = f.support.erase f.natDegree
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem nonneg_iff_zero_le {a : ℤ√d} : Nonneg a ↔ 0 ≤ a
-- Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
lemma StarAlgebra.adjoin_nonUnitalStarSubalgebra (s : Set A) :
    adjoin R (NonUnitalStarAlgebra.adjoin R s : Set A) = adjoin R s
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
lemma eventually_r_lt_n : ∀ᶠ (n : ℕ) in atTop, ∀ i, r i n < n
-- Mathlib/Data/Finset/Sigma.lean
theorem mk_mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (i : ι) (a : α i) (b : β i)
    (x : γ i) : (⟨i, x⟩ : Sigma γ) ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔ x ∈ f a b
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
theorem inf {I J : Ideal A} (HI : I.IsHomogeneous 𝒜) (HJ : J.IsHomogeneous 𝒜) :
    (I ⊓ J).IsHomogeneous 𝒜
-- Mathlib/Data/NNRat/Defs.lean
@[simp] lemma divNat_zero (n : ℕ) : divNat n 0 = 0
-- Mathlib/MeasureTheory/Measure/WithDensityFinite.lean
lemma toFinite_absolutelyContinuous (μ : Measure α) [SFinite μ] : μ.toFinite ≪ μ
-- Mathlib/Analysis/Convex/Join.lean
@[simp]
theorem convexJoin_singleton_right (s : Set E) (y : E) :
    convexJoin 𝕜 s {y} = ⋃ x ∈ s, segment 𝕜 x y
-- Mathlib/Topology/MetricSpace/Contracting.lean
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝ≥0∞) < 1 - K
-- Mathlib/Order/Filter/Ultrafilter.lean
theorem finite_sUnion_mem_iff {s : Set (Set α)} (hs : s.Finite) : ⋃₀ s ∈ f ↔ ∃ t ∈ s, t ∈ f
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem cancel_right {g₁ g₂ : InfHom β γ} {f : InfHom α β} (hf : Surjective f) :
    g₁.comp f = g₂.comp f ↔ g₁ = g₂
-- Mathlib/Probability/Kernel/RadonNikodym.lean
/-- Lebesgue decomposition of a finite kernel `κ` with respect to another one `η`.
`κ` is the sum of an abolutely continuous part `withDensity η (rnDeriv κ η)` and a singular part
`singularPart κ η`. -/
lemma rnDeriv_add_singularPart (κ η : Kernel α γ) [IsFiniteKernel κ] [IsFiniteKernel η] :
    withDensity η (rnDeriv κ η) + singularPart κ η = κ
-- Mathlib/LinearAlgebra/Pi.lean
@[simp]
theorem coe_single [DecidableEq ι] (i : ι) : ⇑(single i : φ i →ₗ[R] (i : ι) → φ i) = Pi.single i
-- Mathlib/Order/Filter/AtTopBot.lean
theorem HasAntitoneBasis.eventually_subset [Preorder ι] {l : Filter α} {s : ι → Set α}
    (hl : l.HasAntitoneBasis s) {t : Set α} (ht : t ∈ l) : ∀ᶠ i in atTop, s i ⊆ t
-- Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean
theorem _root_.fourierIntegral_gaussian_innerProductSpace (hb : 0 < b.re) (w : V) :
    𝓕 (fun v ↦ cexp (- b * ‖v‖^2)) w =
      (π / b) ^ (FiniteDimensional.finrank ℝ V / 2 : ℂ) * cexp (-π ^ 2 * ‖w‖^2 / b)
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem self_le_toNat (a : Int) : a ≤ toNat a
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Icc_subset_Iio_iff (h₁ : a₁ ≤ b₁) : Icc a₁ b₁ ⊆ Iio b₂ ↔ b₁ < b₂
-- Mathlib/NumberTheory/EulerProduct/Basic.lean
/-- The following statement says that summing over `N`-smooth numbers
for large enough `N` gets us arbitrarily close to the sum over all natural numbers
(assuming `f` is norm-summable and `f 0 = 0`; the latter since `0` is not smooth). -/
lemma norm_tsum_smoothNumbers_sub_tsum_lt (hsum : Summable f) (hf₀ : f 0 = 0)
    {ε : ℝ} (εpos : 0 < ε) :
    ∃ N₀ : ℕ, ∀ N ≥ N₀, ‖(∑' m : ℕ, f m) - ∑' m : N.smoothNumbers, f m‖ < ε
-- Mathlib/Algebra/AddConstMap/Basic.lean
@[simp, push_cast] theorem coe_pow (f : G →+c[a, a] G) (n : ℕ) : ⇑(f ^ n) = f^[n]
-- Mathlib/Data/Int/Cast/Lemmas.lean
@[simp] lemma cast_eq_one : (n : α) = 1 ↔ n = 1
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
@[simp] theorem toNat_sub_toNat_neg : ∀ n : Int, ↑n.toNat - ↑(-n).toNat = n
-- Mathlib/Algebra/Homology/TotalComplex.lean
lemma ιTotalOrZero_eq_zero (i₁ : I₁) (i₂ : I₂) (i₁₂ : I₁₂)
    (h : ComplexShape.π c₁ c₂ c₁₂ (i₁, i₂) ≠ i₁₂) :
    K.ιTotalOrZero c₁₂ i₁ i₂ i₁₂ = 0
-- Mathlib/Data/List/Rotate.lean
theorem rotate_mod (l : List α) (n : ℕ) : l.rotate (n % l.length) = l.rotate n
-- Mathlib/Data/Finset/Powerset.lean
@[simp]
theorem mem_ssubsets {s t : Finset α} : t ∈ s.ssubsets ↔ t ⊂ s
-- Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
theorem pow_apply_mem_toList_iff_mem_support {n : ℕ} : (p ^ n) x ∈ p.toList x ↔ x ∈ p.support
-- Mathlib/Analysis/Convex/Jensen.lean
/-- Convex **Jensen's inequality** where an element plays a distinguished role. -/
lemma ConvexOn.map_add_sum_le (hf : ConvexOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i)
    (h₁ : v + ∑ i ∈ t, w i = 1) (hmem : ∀ i ∈ t, p i ∈ s) (hv : 0 ≤ v) (hq : q ∈ s) :
    f (v • q + ∑ i ∈ t, w i • p i) ≤ v • f q + ∑ i ∈ t, w i • f (p i)
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[simp]
theorem map_id (S : NonUnitalStarSubalgebra R A) : map (NonUnitalStarAlgHom.id R A) S = S
-- Mathlib/Algebra/Polynomial/AlgebraMap.lean
/-- The evaluation map is not generally multiplicative when the coefficient ring is noncommutative,
but nevertheless any polynomial of the form `p * (X - monomial 0 r)` is sent to zero
when evaluated at `r`.

This is the key step in our proof of the Cayley-Hamilton theorem.
-/
theorem eval_mul_X_sub_C {p : R[X]} (r : R) : (p * (X - C r)).eval r = 0
-- Mathlib/Algebra/Algebra/Hom.lean
@[simp]
theorem smul_units_def (f : A →ₐ[R] A) (x : Aˣ) :
    f • x = Units.map (f : A →* A) x
-- Mathlib/Probability/Kernel/WithDensity.lean
theorem lintegral_withDensity (κ : Kernel α β) [IsSFiniteKernel κ]
    (hf : Measurable (Function.uncurry f)) (a : α) {g : β → ℝ≥0∞} (hg : Measurable g) :
    ∫⁻ b, g b ∂withDensity κ f a = ∫⁻ b, f a b * g b ∂κ a
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[simp]
theorem map_symm_map (e : α ≃ᵐ β) : (μ.map e).map e.symm = μ
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
theorem aecover_Ioc_of_Ioc (ha : Tendsto a l (𝓝 A)) (hb : Tendsto b l (𝓝 B)) :
    AECover (μ.restrict <| Ioc A B) l fun i => Ioc (a i) (b i)
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem characteristic_iff_map_eq : H.Characteristic ↔ ∀ ϕ : G ≃* G, H.map ϕ.toMonoidHom = H
-- Mathlib/Order/CompleteLattice.lean
theorem sInf_image {s : Set β} {f : β → α} : sInf (f '' s) = ⨅ a ∈ s, f a
-- Mathlib/CategoryTheory/Limits/Cones.lean
/-- Change a cone on `F.leftOp : Jᵒᵖ ⥤ C` to a cocone on `F : J ⥤ Cᵒᵖ`. -/
@[simps pt]
def coconeOfConeLeftOp (c : Cone F.leftOp) : Cocone F
-- Mathlib/Algebra/Lie/Nilpotent.lean
theorem isNilpotent_iff_exists_self_le_ucs :
    LieModule.IsNilpotent R L N ↔ ∃ k, N ≤ (⊥ : LieSubmodule R L M).ucs k
-- Mathlib/Data/List/Cycle.lean
theorem pmap_prev_eq_rotate_length_sub_one (h : Nodup l) :
    (l.pmap l.prev fun _ h => h) = l.rotate (l.length - 1)
-- Mathlib/Analysis/BoxIntegral/Basic.lean
/-- A function that is bounded on a box `I` and a.e. continuous is integrable on `I`.

This is a version of `integrable_of_bounded_and_ae_continuousWithinAt` with a stronger continuity
assumption so that the user does not need to specialize the continuity assumption to each box on
which the theorem is to be applied. -/
theorem integrable_of_bounded_and_ae_continuous [CompleteSpace E] {I : Box ι} {f : ℝⁿ → E}
    (hb : ∃ C : ℝ, ∀ x ∈ Box.Icc I, ‖f x‖ ≤ C) (μ : Measure ℝⁿ) [IsLocallyFiniteMeasure μ]
    (hc : ∀ᵐ x ∂μ, ContinuousAt f x) : Integrable I l f μ.toBoxAdditive.toSMul
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Ioc_toDual : Ioc (toDual a) (toDual b) = (Ico b a).map toDual.toEmbedding
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem eq_nat_or_neg (a : Int) : ∃ n : Nat, a = n ∨ a = -↑n
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
@[simp] theorem gcd_mul_left_left (m n : Nat) : gcd (m * n) n = n
-- Mathlib/CategoryTheory/Simple.lean
theorem kernel_zero_of_nonzero_from_simple {X Y : C} [Simple X] {f : X ⟶ Y} [HasKernel f]
    (w : f ≠ 0) : kernel.ι f = 0
-- Mathlib/FieldTheory/SeparableDegree.lean
/-- The `Field.finSepDegree F E` is equal to the cardinality of `E →ₐ[F] K` as a natural number,
when `E / F` is algebraic and `K / F` is algebraically closed. -/
theorem finSepDegree_eq_of_isAlgClosed [Algebra.IsAlgebraic F E] [IsAlgClosed K] :
    finSepDegree F E = Nat.card (E →ₐ[F] K)
-- .lake/packages/lean4/src/lean/Init/Prelude.lean
/-- The `Char` Type represents an unicode scalar value.
    See http://www.unicode.org/glossary/#unicode_scalar_value). -/
structure Char where
  /-- The underlying unicode scalar value as a `UInt32`. -/
  val   : UInt32
  /-- The value must be a legal codepoint. -/
  valid : val.isValidChar
-- Mathlib/Algebra/Star/StarAlgHom.lean
/-- `algebraMap R A` as a `StarAlgHom` when `A` is a star algebra over `R`. -/
@[simps]
def ofId (R A : Type*) [CommSemiring R] [StarRing R] [Semiring A] [StarMul A]
    [Algebra R A] [StarModule R A] : R →⋆ₐ[R] A
-- Mathlib/Order/Monotone/Basic.lean
theorem strictMono_dual_iff : StrictMono (toDual ∘ f ∘ ofDual : αᵒᵈ → βᵒᵈ) ↔ StrictMono f
-- Mathlib/Combinatorics/Colex.lean
@[simp] lemma initSeg_nonempty : (initSeg s).Nonempty
-- Mathlib/CategoryTheory/Adjunction/Over.lean
/-- In a category with pullbacks, a morphism `f : X ⟶ Y` induces a functor `Over Y ⥤ Over X`,
by pulling back a morphism along `f`. -/
@[simps! (config := { simpRhs := true}) obj_left obj_hom map_left]
def pullback {X Y : C} (f : X ⟶ Y) : Over Y ⥤ Over X
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem _root_.Fintype.prod_eq_mul_prod_compl [DecidableEq α] [Fintype α] (a : α) (f : α → β) :
    ∏ i, f i = f a * ∏ i ∈ {a}ᶜ, f i
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Simproc.lean
theorem bneTrueOfEqFalse {a b : Nat} (p : (a = b) = False) : (a != b) = true
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive]
theorem div_lt_iff_lt_mul' : a / b < c ↔ a < b * c
-- Mathlib/Algebra/Lie/Submodule.lean
theorem map_le_iff_le_comap : map f N ≤ N' ↔ N ≤ comap f N'
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Bitblast.lean
@[simp] theorem atLeastTwo_false_left  : atLeastTwo false b c = (b && c)
-- Mathlib/Analysis/Complex/PhragmenLindelof.lean
/-- **Phragmen-Lindelöf principle** in a strip `U = {z : ℂ | a < im z < b}`.
Let `f : ℂ → E` be a function such that

* `f` is differentiable on `U` and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * exp(c * |re z|))` on `U` for some `c < π / (b - a)`;
* `‖f z‖` is bounded from above by a constant `C` on the boundary of `U`.

Then `‖f z‖` is bounded by the same constant on the closed strip
`{z : ℂ | a ≤ im z ≤ b}`. Moreover, it suffices to verify the second assumption
only for sufficiently large values of `|re z|`.
-/
theorem horizontal_strip (hfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b))
    (hB : ∃ c < π / (b - a), ∃ B, f =O[comap (_root_.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)]
      fun z ↦ expR (B * expR (c * |z.re|)))
    (hle_a : ∀ z : ℂ, im z = a → ‖f z‖ ≤ C) (hle_b : ∀ z, im z = b → ‖f z‖ ≤ C) (hza : a ≤ im z)
    (hzb : im z ≤ b) : ‖f z‖ ≤ C
-- Mathlib/Data/Complex/Basic.lean
@[simp, norm_cast] lemma im_nnratCast (q : ℚ≥0) : (q : ℂ).im = 0
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
/-- The determinant of a 2×2 block matrix with the lower-left block equal to zero is the product of
the determinants of the diagonal blocks. For the generalization to any number of blocks, see
`Matrix.det_of_upper_triangular`. -/
@[simp]
theorem det_fromBlocks_zero₂₁ (A : Matrix m m R) (B : Matrix m n R) (D : Matrix n n R) :
    (Matrix.fromBlocks A B 0 D).det = A.det * D.det
-- Mathlib/GroupTheory/Perm/Support.lean
@[simp]
theorem mem_support {x : α} : x ∈ f.support ↔ f x ≠ x
-- Mathlib/GroupTheory/Perm/Basic.lean
theorem subtypeEquivSubtypePerm_apply_of_mem (f : Perm (Subtype p)) (h : p a) :
    -- Porting note: was `Perm.subtypeEquivSubtypePerm p f a`
    ((Perm.subtypeEquivSubtypePerm p).toFun f).1 a = f ⟨a, h⟩