ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem dropLast_cons_of_ne_nil {α : Type u} {x : α}
    {l : List α} (h : l ≠ []) : (x :: l).dropLast = x :: l.dropLast
-- Mathlib/Order/Interval/Set/UnorderedInterval.lean
@[simp]
lemma uIcc_of_ge (h : b ≤ a) : [[a, b]] = Icc b a
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
protected theorem StronglyMeasurableAtFilter.eventually (h : StronglyMeasurableAtFilter f l μ) :
    ∀ᶠ s in l.smallSets, AEStronglyMeasurable f (μ.restrict s)
-- Mathlib/Algebra/Module/LinearMap/End.lean
/-- The canonical (semi)ring isomorphism from `R` to `Module.End Rᵐᵒᵖ R` induced by the left
multiplication. -/
@[simps]
def moduleEndSelfOp : R ≃+* Module.End Rᵐᵒᵖ R
-- Mathlib/GroupTheory/Perm/Support.lean
theorem two_le_card_support_of_ne_one {f : Perm α} (h : f ≠ 1) : 2 ≤ f.support.card
-- Mathlib/Topology/PartialHomeomorph.lean
protected theorem surjOn : SurjOn e e.source e.target
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
theorem isComplete_image_iff [SemilinearIsometryClass 𝓕 σ₁₂ E E₂] (f : 𝓕) {s : Set E} :
    IsComplete (f '' s) ↔ IsComplete s
-- Mathlib/Data/ENNReal/Basic.lean
theorem forall_ne_top {p : ℝ≥0∞ → Prop} : (∀ a, a ≠ ∞ → p a) ↔ ∀ r : ℝ≥0, p r
-- Mathlib/SetTheory/Game/Ordinal.lean
theorem toPGame_nonneg (a : Ordinal) : 0 ≤ a.toPGame
-- Mathlib/Algebra/GroupWithZero/Basic.lean
theorem mul_right_surjective₀ {a : G₀} (h : a ≠ 0) : Surjective fun g => g * a
-- Mathlib/Analysis/Complex/LocallyUniformLimit.lean
theorem _root_.TendstoUniformlyOn.cderiv (hF : TendstoUniformlyOn F f φ (cthickening δ K))
    (hδ : 0 < δ) (hFn : ∀ᶠ n in φ, ContinuousOn (F n) (cthickening δ K)) :
    TendstoUniformlyOn (cderiv δ ∘ F) (cderiv δ f) φ K
-- Mathlib/ModelTheory/Semantics.lean
theorem realize_liftAt {n n' m : ℕ} {φ : L.BoundedFormula α n} {v : α → M} {xs : Fin (n + n') → M}
    (hmn : m + n' ≤ n + 1) :
    (φ.liftAt n' m).Realize v xs ↔
      φ.Realize v (xs ∘ fun i => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n')
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
@[simp]
theorem toMatrix_lsmul (x : R) :
    LinearMap.toMatrix b b (Algebra.lsmul R R S x) = Matrix.diagonal fun _ ↦ x
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem coe_πs' {o₁ o₂ : Ordinal} (h : o₁ ≤ o₂) (f : LocallyConstant (π C (ord I · < o₁)) ℤ) :
    (πs' C h f).toFun = f.toFun ∘ (ProjRestricts C (fun _ hh ↦ lt_of_lt_of_le hh h))
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- A category with finite biproducts has binary biproducts.

This is not an instance as typically in concrete categories there will be
an alternative construction with nicer definitional properties.
-/
theorem hasBinaryBiproducts_of_finite_biproducts [HasFiniteBiproducts C] : HasBinaryBiproducts C
-- Mathlib/Tactic/PushNeg.lean
theorem not_or_eq : (¬ (p ∨ q)) = (¬ p ∧ ¬ q)
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem pos_of_mul_pos_left [MulPosReflectLT α] (h : 0 < a * b) (hb : 0 ≤ b) : 0 < a
-- Mathlib/Data/Real/Basic.lean
private irreducible_def inf : ℝ → ℝ → ℝ
-- .lake/packages/batteries/Batteries/Data/HashMap/Basic.lean
theorem WF.empty [BEq α] [Hashable α] : WF (empty n : Imp α β)
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Maximal.lean
theorem toPrimeSpectrum_continuous : Continuous <| @toPrimeSpectrum R _
-- Mathlib/Order/Filter/AtTopBot.lean
theorem map_neg_atBot : map (Neg.neg : β → β) atBot = atTop
-- Mathlib/Analysis/Normed/Module/Dual.lean
theorem inclusionInDoubleDual_norm_eq :
    ‖inclusionInDoubleDual 𝕜 E‖ = ‖ContinuousLinearMap.id 𝕜 (Dual 𝕜 E)‖
-- Mathlib/Algebra/Module/Submodule/Ker.lean
theorem ker_restrict [AddCommMonoid M₁] [Module R M₁] {p : Submodule R M} {q : Submodule R M₁}
    {f : M →ₗ[R] M₁} (hf : ∀ x : M, x ∈ p → f x ∈ q) :
    ker (f.restrict hf) = LinearMap.ker (f.domRestrict p)
-- Mathlib/Data/Set/Function.lean
lemma InjOn.image_of_comp (h : InjOn (g ∘ f) s) : InjOn g (f '' s)
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma toAffine_of_singular {P : Fin 3 → F} (hP : ¬W.Nonsingular P) : toAffine W P = 0
-- Mathlib/Order/Hom/CompleteLattice.lean
/-- The type of `⨆`-preserving functions from `α` to `β`. -/
structure sSupHom (α β : Type*) [SupSet α] [SupSet β] where
  /-- The underlying function of a sSupHom. -/
  toFun : α → β
  /-- The proposition that a `sSupHom` commutes with arbitrary suprema/joins. -/
  map_sSup' (s : Set α) : toFun (sSup s) = sSup (toFun '' s)
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
nonrec theorem ContMDiffAt.clm_precomp {f : M → F₁ →L[𝕜] F₂} {x : M}
    (hf : ContMDiffAt I 𝓘(𝕜, F₁ →L[𝕜] F₂) n f x) :
    ContMDiffAt I 𝓘(𝕜, (F₂ →L[𝕜] F₃) →L[𝕜] (F₁ →L[𝕜] F₃)) n
      (fun y ↦ (f y).precomp F₃ : M → (F₂ →L[𝕜] F₃) →L[𝕜] (F₁ →L[𝕜] F₃)) x
-- Mathlib/GroupTheory/Complement.lean
theorem equiv_one (hs1 : 1 ∈ S) (ht1 : 1 ∈ T) :
    hST.equiv 1 = (⟨1, hs1⟩, ⟨1, ht1⟩)
-- Mathlib/Analysis/NormedSpace/ENorm.lean
@[ext]
theorem ext {e₁ e₂ : ENorm 𝕜 V} (h : ∀ x, e₁ x = e₂ x) : e₁ = e₂
-- Mathlib/LinearAlgebra/Dual.lean
lemma equiv (e : M ≃ₗ[R] N) : IsReflexive R N
-- Mathlib/Data/Set/Function.lean
theorem BijOn.comp (hg : BijOn g t p) (hf : BijOn f s t) : BijOn (g ∘ f) s p
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Instances.lean
lemma IsSelfAdjoint.sq_spectrumRestricts {a : A} (ha : IsSelfAdjoint a) :
    SpectrumRestricts (a ^ 2) ContinuousMap.realToNNReal
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem dvd_iff_div_factorization_eq_tsub {d n : ℕ} (hd : d ≠ 0) (hdn : d ≤ n) :
    d ∣ n ↔ (n / d).factorization = n.factorization - d.factorization
-- Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
/-- A subspace is complement to its orthogonal complement with respect to some
reflexive bilinear form if that bilinear form restricted on to the subspace is nondegenerate. -/
theorem isCompl_orthogonal_of_restrict_nondegenerate
    (b₁ : B.IsRefl) (b₂ : (B.restrict W).Nondegenerate) : IsCompl W (B.orthogonal W)
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/NonUnital.lean
lemma cfcₙ_congr {f g : R → R} {a : A} (hfg : (σₙ R a).EqOn f g) :
    cfcₙ f a = cfcₙ g a
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive prod_map_comap_prod']
theorem prod_map_comap_prod' {M' : Type*} {N' : Type*} [Mul M'] [Mul N'] (f : M →ₙ* N)
    (g : M' →ₙ* N') (S : Subsemigroup N) (S' : Subsemigroup N') :
    (S.prod S').comap (prodMap f g) = (S.comap f).prod (S'.comap g)
-- Mathlib/Data/Int/Order/Units.lean
theorem isUnit_iff_abs_eq {x : ℤ} : IsUnit x ↔ abs x = 1
-- Mathlib/Data/Int/Cast/Lemmas.lean
theorem ext_int {R : Type*} [NonAssocSemiring R] (f g : ℤ →+* R) : f = g
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
theorem toMeasure_injective : Function.Injective ((↑) : FiniteMeasure Ω → Measure Ω)
-- Mathlib/Topology/Algebra/Order/Compact.lean
theorem atTop_le_cocompact [NoMaxOrder α] [ClosedIciTopology α] :
    atTop ≤ cocompact α
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
theorem submatrix {M : Matrix n n R} (hM : M.PosSemidef) (e : m → n) :
    (M.submatrix e e).PosSemidef
-- Mathlib/Order/CompleteBooleanAlgebra.lean
theorem biInf_sup_biInf {ι ι' : Type*} {f : ι → α} {g : ι' → α} {s : Set ι} {t : Set ι'} :
    ((⨅ i ∈ s, f i) ⊔ ⨅ j ∈ t, g j) = ⨅ p ∈ s ×ˢ t, f (p : ι × ι').1 ⊔ g p.2
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
theorem sin_arccos (x : ℝ) : sin (arccos x) = √(1 - x ^ 2)
-- Mathlib/Geometry/Manifold/Instances/Real.lean
theorem range_euclideanHalfSpace (n : ℕ) [Zero (Fin n)] :
    (range fun x : EuclideanHalfSpace n => x.val) = { y | 0 ≤ y 0 }
-- Mathlib/Probability/ProbabilityMassFunction/Basic.lean
theorem toMeasure_eq_iff_eq_toPMF (μ : Measure α) [IsProbabilityMeasure μ] :
    p.toMeasure = μ ↔ p = μ.toPMF
-- Mathlib/CategoryTheory/DifferentialObject.lean
@[simp]
theorem eqToHom_f {X Y : DifferentialObject S C} (h : X = Y) :
    Hom.f (eqToHom h) = eqToHom (congr_arg _ h)
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem uniformity_lift_le_swap {g : Set (α × α) → Filter β} {f : Filter β} (hg : Monotone g)
    (h : ((𝓤 α).lift fun s => g (preimage Prod.swap s)) ≤ f) : (𝓤 α).lift g ≤ f
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem integral_smul_const {𝕜 : Type*} [RCLike 𝕜] [NormedSpace 𝕜 E] [CompleteSpace E]
    (f : X → 𝕜) (c : E) :
    ∫ x, f x • c ∂μ = (∫ x, f x ∂μ) • c
-- Mathlib/Analysis/Complex/Basic.lean
@[simp]
theorem reCLM_apply (z : ℂ) : (reCLM : ℂ → ℝ) z = z.re
-- Mathlib/RingTheory/PowerSeries/Basic.lean
theorem algebraMap_apply {r : R} : algebraMap R A⟦X⟧ r = C A (algebraMap R A r)
-- Mathlib/FieldTheory/Separable.lean
theorem Separable.of_pow' {f : R[X]} :
    ∀ {n : ℕ} (_h : (f ^ n).Separable), IsUnit f ∨ f.Separable ∧ n = 1 ∨ n = 0
-- Mathlib/ModelTheory/Syntax.lean
@[simp]
theorem constantsVarsEquivLeft_symm_apply (t : L.Term ((γ ⊕ α) ⊕ β)) :
    constantsVarsEquivLeft.symm t = varsToConstants (t.relabel (Equiv.sumAssoc _ _ _))
-- Mathlib/Topology/MetricSpace/IsometricSMul.lean
@[to_additive (attr := simp)]
theorem preimage_mul_right_closedBall [IsometricSMul Gᵐᵒᵖ G] (a b : G) (r : ℝ) :
    (fun x => x * a) ⁻¹' closedBall b r = closedBall (b / a) r
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem SameCycle.of_pow {n : ℕ} : SameCycle (f ^ n) x y → SameCycle f x y
-- Mathlib/Analysis/BoxIntegral/Basic.lean
theorem Integrable.of_smul {c : ℝ} (hf : Integrable I l (c • f) vol) (hc : c ≠ 0) :
    Integrable I l f vol
-- Mathlib/Data/Fin/Tuple/Basic.lean
/-- Updating the first element of a tuple does not change the tail. -/
@[simp]
theorem tail_update_zero : tail (update q 0 z) = tail q
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem toIcoDiv_add_right' (a b : α) : toIcoDiv hp (a + p) b = toIcoDiv hp a b - 1
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem restrict_restrict₀' (ht : NullMeasurableSet t μ) :
    (μ.restrict t).restrict s = μ.restrict (s ∩ t)
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem And.imp_right (h : a → b) : c ∧ a → c ∧ b
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
/-- Permuting rows and columns with the same equivalence has no effect. -/
@[simp]
theorem det_submatrix_equiv_self (e : n ≃ m) (A : Matrix m m R) :
    det (A.submatrix e e) = det A
-- Mathlib/FieldTheory/Minpoly/Basic.lean
/-- A minimal polynomial is not `1`. -/
theorem ne_one [Nontrivial B] : minpoly A x ≠ 1
-- Mathlib/Data/Seq/WSeq.lean
theorem destruct_some_of_destruct_tail_some {s : WSeq α} {a} (h : some a ∈ destruct (tail s)) :
    ∃ a', some a' ∈ destruct s
-- Mathlib/GroupTheory/DoubleCoset.lean
theorem mem_doset {s t : Set α} {a b : α} : b ∈ doset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y
-- Mathlib/MeasureTheory/Constructions/Projective.lean
lemma isProbabilityMeasure [∀ i, IsProbabilityMeasure (P i)] (hμ : IsProjectiveLimit μ P) :
    IsProbabilityMeasure μ
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
@[simp]
theorem integrableOn_finset_iUnion {s : Finset β} {t : β → Set α} :
    IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ
-- Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean
/-- The limit of the constant `⊤_ C` functor is `⊤_ C`. -/
@[simps hom]
def limitConstTerminal {J : Type*} [Category J] {C : Type*} [Category C] [HasTerminal C] :
    limit ((CategoryTheory.Functor.const J).obj (⊤_ C)) ≅ ⊤_ C
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem pi_ne_zero : (π : Angle) ≠ 0
-- Mathlib/Analysis/Fourier/FourierTransform.lean
theorem fourierIntegral_add (he : Continuous e) (hL : Continuous fun p : V × W ↦ L p.1 p.2)
    {f g : V → E} (hf : Integrable f μ) (hg : Integrable g μ) :
    fourierIntegral e μ L f + fourierIntegral e μ L g = fourierIntegral e μ L (f + g)
-- Mathlib/Topology/Sheaves/Stalks.lean
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkPushforward (f : X ⟶ Y) (F : X.Presheaf C) {x y : X} (h : x ⤳ y) :
    (f _* F).stalkSpecializes (f.map_specializes h) ≫ F.stalkPushforward _ f x =
      F.stalkPushforward _ f y ≫ F.stalkSpecializes h
-- Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean
@[simp]
theorem IsInitial.to_comp {X : C} (t : IsInitial X) {Y Z : C} (f : Y ⟶ Z) : t.to Y ≫ f = t.to Z
-- Mathlib/CategoryTheory/Category/ULift.lean
/-- One half of the quivalence between `C` and `ULiftHom C`. -/
@[simps]
def ULiftHom.up : C ⥤ ULiftHom C
-- Mathlib/Algebra/Category/FGModuleCat/Basic.lean
/-- Converts a `LinearEquiv` to an isomorphism in the category `FGModuleCat R`. -/
@[simps]
def _root_.LinearEquiv.toFGModuleCatIso
    {V W : Type u} [AddCommGroup V] [Module R V] [Module.Finite R V]
    [AddCommGroup W] [Module R W] [Module.Finite R W] (e : V ≃ₗ[R] W) :
    FGModuleCat.of R V ≅ FGModuleCat.of R W
-- Mathlib/Logic/Function/Basic.lean
theorem eq_mp_bijective {α β : Sort _} (h : α = β) : Function.Bijective (Eq.mp h)
-- Mathlib/Algebra/Field/Subfield.lean
@[simp]
theorem coe_top : ((⊤ : Subfield K) : Set K) = Set.univ
-- Mathlib/Data/Real/Irrational.lean
theorem of_int_add (m : ℤ) (h : Irrational (m + x)) : Irrational x
-- Mathlib/Data/Subtype.lean
/-- An alternative version of `Subtype.forall`. This one is useful if Lean cannot figure out `q`
  when using `Subtype.forall` from right to left. -/
protected theorem forall' {q : ∀ x, p x → Prop} : (∀ x h, q x h) ↔ ∀ x : { a // p a }, q x x.2
-- Mathlib/CategoryTheory/DifferentialObject.lean
/-- An isomorphism of differential objects can be constructed
from an isomorphism of the underlying objects that commutes with the differentials. -/
@[simps]
def mkIso {X Y : DifferentialObject S C} (f : X.obj ≅ Y.obj) (hf : X.d ≫ f.hom⟦1⟧' = f.hom ≫ Y.d) :
    X ≅ Y
-- Mathlib/Order/SupClosed.lean
lemma infClosed_pi {ι : Type*} {α : ι → Type*} [∀ i, SemilatticeInf (α i)] {s : Set ι}
    {t : ∀ i, Set (α i)} (ht : ∀ i ∈ s, InfClosed (t i)) : InfClosed (s.pi t)
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
@[simp]
theorem smul_mem_iff' {G} [Group G] [SMul G R] [MulAction G M] [IsScalarTower G R M] (g : G)
    {x : M} : g • x ∈ p ↔ x ∈ p
-- Mathlib/Order/Partition/Finpartition.lean
theorem mem_atomise :
    t ∈ (atomise s F).parts ↔
      t.Nonempty ∧ ∃ Q ⊆ F, (s.filter fun i ↦ ∀ u ∈ F, u ∈ Q ↔ i ∈ u) = t
-- Mathlib/Order/Ideal.lean
theorem IsProper.ne_top (_ : IsProper I) : I ≠ ⊤
-- Mathlib/Data/ENNReal/Basic.lean
@[simp]
theorem iInter_Ioi_coe_nat : ⋂ n : ℕ, Ioi (n : ℝ≥0∞) = {∞}
-- Mathlib/Algebra/Ring/Int.lean
@[parity_simps] lemma odd_sub : Odd (m - n) ↔ (Odd m ↔ Even n)
-- Mathlib/Topology/UniformSpace/UniformEmbedding.lean
protected theorem UniformEmbedding.embedding {f : α → β} (h : UniformEmbedding f) : Embedding f
-- Mathlib/Logic/Equiv/TransferInstance.lean
@[to_additive]
theorem mul_def [Mul β] (x y : α) :
    letI := Equiv.mul e
    x * y = e.symm (e x * e y)
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
theorem left_nonuniformWitnesses_card (h : ¬G.IsUniform ε s t) :
    (s.card : 𝕜) * ε ≤ (G.nonuniformWitnesses ε s t).1.card
-- Mathlib/Data/Set/Lattice.lean
theorem biUnion_pair (a b : α) (s : α → Set β) : ⋃ x ∈ ({a, b} : Set α), s x = s a ∪ s b
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
theorem hasGradientAt_iff_isLittleO_nhds_zero : HasGradientAt f f' x ↔
    (fun h => f (x + h) - f x - ⟪f', h⟫) =o[𝓝 0] fun h => h
-- Mathlib/Topology/Compactness/Compact.lean
theorem IsCompact.ne_univ [NoncompactSpace X] (hs : IsCompact s) : s ≠ univ
-- .lake/packages/lean4/src/lean/Init/Data/Nat/MinMax.lean
protected theorem min_eq_right {a b : Nat} (h : b ≤ a) : min a b = b
-- Mathlib/ModelTheory/Basic.lean
@[simp]
theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
    (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom
-- Mathlib/RingTheory/PowerSeries/Inverse.lean
@[simp]
theorem mul_invOfUnit (φ : R⟦X⟧) (u : Rˣ) (h : constantCoeff R φ = u) :
    φ * invOfUnit φ u = 1
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Metric.lean
@[measurability, fun_prop]
theorem Measurable.nnnorm {f : β → α} (hf : Measurable f) : Measurable fun a => ‖f a‖₊
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zero_zpow : ∀ z : ℤ, z ≠ 0 → (0 : M) ^ z = 0
-- Mathlib/CategoryTheory/MorphismProperty/Composition.lean
lemma id_mem (W : MorphismProperty C) [W.ContainsIdentities] (X : C) :
    W (𝟙 X)
-- Mathlib/Algebra/Order/Monovary.lean
/-- Two functions antivary iff the rearrangement inequality holds. -/
lemma antivary_iff_smul_rearrangement :
    Antivary f g ↔ ∀ i j, f i • g i + f j • g j ≤ f i • g j + f j • g i
-- Mathlib/Algebra/Order/Hom/Ring.lean
@[norm_cast]
theorem coe_ringHom_apply (f : α →+*o β) (a : α) : (f : α →+* β) a = f a
-- Mathlib/Data/Fin/Basic.lean
/-- `castPred` commutes with `succAbove`. -/
lemma castPred_succAbove_castPred {a : Fin (n + 2)} {b : Fin (n + 1)} (ha : a ≠ last (n + 1))
    (hb : b ≠ last n) (hk := succAbove_ne_last ha hb) :
    (a.castPred ha).succAbove (b.castPred hb) = (a.succAbove b).castPred hk
-- Mathlib/Algebra/Star/StarAlgHom.lean
theorem leftInverse_symm (e : A ≃⋆ₐ[R] B) : Function.LeftInverse e.symm e
-- Mathlib/Data/Seq/Computation.lean
@[simp]
theorem corec_eq (f : β → α ⊕ β) (b : β) : destruct (corec f b) = rmap (corec f) (f b)
-- Mathlib/Topology/Algebra/Module/LinearPMap.lean
/-- Assuming that `f` is invertible and closable, then the closure is invertible if and only
if the inverse of `f` is closable. -/
theorem inverse_isClosable_iff (hf : LinearMap.ker f.toFun = ⊥) (hf' : f.IsClosable) :
    f.inverse.IsClosable ↔ LinearMap.ker f.closure.toFun = ⊥
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem filter_single_neg {p : ι → Prop} [DecidablePred p] (i : ι) (x : β i) (h : ¬p i) :
    (single i x).filter p = 0
-- Mathlib/Analysis/Normed/Order/Lattice.lean
lemma lipschitzWith_posPart : LipschitzWith 1 (posPart : α → α)
-- Mathlib/Algebra/Group/Submonoid/Units.lean
@[to_additive]
lemma coe_val_mul_coe_inv_val (S : Submonoid M) {x : Sˣ} :
    ((x : Sˣ) : M) * ((x⁻¹ : Sˣ) : M) = 1
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive (attr := simp)]
theorem inv_surjective : Function.Surjective (Inv.inv : G → G)
-- Mathlib/Probability/Kernel/Basic.lean
@[simp, norm_cast] lemma coe_add (κ η : Kernel α β) : ⇑(κ + η) = κ + η
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
protected theorem ediv_lt_of_lt_mul {a b c : Int} (H : 0 < c) (H' : a < b * c) : a / c < b
-- Mathlib/Data/List/Rotate.lean
theorem rotate_rotate (l : List α) (n m : ℕ) : (l.rotate n).rotate m = l.rotate (n + m)
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem submatrix_apply (A : Matrix m n α) (r_reindex : l → m) (c_reindex : o → n) (i j) :
    A.submatrix r_reindex c_reindex i j = A (r_reindex i) (c_reindex j)
-- Mathlib/Data/PFun.lean
@[simp]
theorem comp_id (f : α →. β) : f.comp (PFun.id α) = f
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
lemma Cofan.IsColimit.hom_ext {I : Type*} {F : I → C} {c : Cofan F} (hc : IsColimit c) {A : C}
    (f g : c.pt ⟶ A) (h : ∀ i, c.inj i ≫ f = c.inj i ≫ g) : f = g
-- Mathlib/GroupTheory/Coprod/Basic.lean
@[to_additive (attr := simp)] theorem fst_comp_inr : (fst : M ∗ N →* M).comp inr = 1
-- Mathlib/RingTheory/Generators.lean
@[simp] lemma of_add : of (w + z) = of w + of z
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
@[simp]
theorem coe_eq_univ_iff (Q : AffineSubspace k P) : (Q : Set P) = univ ↔ Q = ⊤
-- Mathlib/Algebra/CharP/CharAndCard.lean
lemma charP_of_card_eq_prime {R : Type*} [NonAssocRing R] [Fintype R] (p : ℕ) [hp : Fact p.Prime]
    (hR : Fintype.card R = p) : CharP R p
-- Mathlib/Order/UpperLower/Basic.lean
@[simp] lemma lt_erase : s < s.erase a ↔ a ∈ s
-- Mathlib/NumberTheory/Cyclotomic/Rat.lean
/-- The norm, relative to `ℤ`, of `ζ - 1` in a `p ^ (k + 1)`-th cyclotomic extension of `ℚ` is
`p` if `p ≠ 2`. -/
lemma norm_toInteger_sub_one_of_prime_ne_two [IsCyclotomicExtension {p ^ (k + 1)} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))) (hodd : p ≠ 2) :
    Algebra.norm ℤ (hζ.toInteger - 1) = p
-- Mathlib/Analysis/Convex/Cone/Basic.lean
@[simp]
theorem mem_positive {x : E} : x ∈ positive 𝕜 E ↔ 0 ≤ x
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
/-- The fourth simplicial identity -/
@[reassoc]
theorem δ_comp_σ_of_gt {n} {i : Fin (n + 2)} {j : Fin (n + 1)} (H : Fin.castSucc j < i) :
    δ i.succ ≫ σ (Fin.castSucc j) = σ j ≫ δ i
-- Mathlib/Order/Atoms.lean
@[simp]
theorem isCoatomistic_dual_iff_isAtomistic : IsCoatomistic αᵒᵈ ↔ IsAtomistic α
-- Mathlib/Topology/Algebra/WithZeroTopology.lean
theorem Iio_mem_nhds_zero (hγ : γ ≠ 0) : Iio γ ∈ 𝓝 (0 : Γ₀)
-- Mathlib/Data/Int/Order/Units.lean
@[simp]
theorem units_inv_eq_self (u : ℤˣ) : u⁻¹ = u
-- Mathlib/Algebra/GroupWithZero/Hom.lean
@[simp] lemma toZeroHom_coe (f : α →*₀ β) : (f.toZeroHom : α → β) = f
-- Mathlib/LinearAlgebra/AffineSpace/Basis.lean
/-- An affine basis is a family of affine-independent points whose span is the top subspace. -/
structure AffineBasis (ι : Type u₁) (k : Type u₂) {V : Type u₃} (P : Type u₄) [AddCommGroup V]
  [AffineSpace V P] [Ring k] [Module k V] where
  protected toFun : ι → P
  protected ind' : AffineIndependent k toFun
  protected tot' : affineSpan k (range toFun) = ⊤
-- Mathlib/LinearAlgebra/UnitaryGroup.lean
theorem star_mul_self (A : unitaryGroup n α) : star A.1 * A.1 = 1
-- Mathlib/Probability/Independence/Kernel.lean
@[symm]
theorem IndepSets.symm {_mΩ : MeasurableSpace Ω} {κ : Kernel α Ω} {μ : Measure α}
    {s₁ s₂ : Set (Set Ω)} (h : IndepSets s₁ s₂ κ μ) :
    IndepSets s₂ s₁ κ μ
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem pow_le_self {n : ℕ} (hn : n ≠ 0) : I ^ n ≤ I
-- Mathlib/Algebra/Algebra/Subalgebra/Rank.lean
theorem rank_sup_eq_rank_left_mul_rank_of_free :
    Module.rank R ↥(A ⊔ B) = Module.rank R A * Module.rank A (Algebra.adjoin A (B : Set S))
-- Mathlib/Order/Filter/Basic.lean
theorem le_map {f : Filter α} {m : α → β} {g : Filter β} (h : ∀ s ∈ f, m '' s ∈ g) : g ≤ f.map m
-- Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
@[simp]
nonrec theorem volume_pi_closedBall (a : ι → ℝ) {r : ℝ} (hr : 0 ≤ r) :
    volume (Metric.closedBall a r) = ENNReal.ofReal ((2 * r) ^ Fintype.card ι)
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive]
lemma prod_map_ite_eq {A : Type*} [DecidableEq A] (l : List A) (f g : A → G) (a : A) :
    (l.map fun x => if x = a then f x else g x).prod
      = (f a / g a) ^ (l.count a) * (l.map g).prod
-- Mathlib/Data/Fintype/Card.lean
theorem one_lt_card_iff_nontrivial : 1 < card α ↔ Nontrivial α
-- Mathlib/Data/PFun.lean
@[simp]
theorem Part.bind_comp (f : β →. γ) (g : α →. β) (a : Part α) :
    a.bind (f.comp g) = (a.bind g).bind f
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem zipRight'_cons_cons :
    zipRight' (a :: as) (b :: bs) =
      let r := zipRight' as bs
      ((some a, b) :: r.fst, r.snd)
-- Mathlib/Data/Matroid/Closure.lean
@[simp] lemma closure_insert_closure_eq_closure_insert (M : Matroid α) (e : α) (X : Set α) :
    M.closure (insert e (M.closure X)) = M.closure (insert e X)
-- Mathlib/Data/Finset/Basic.lean
@[simp, norm_cast]
theorem coe_toList (s : Finset α) : (s.toList : Multiset α) = s.val
-- Mathlib/Data/Set/Image.lean
theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr)
-- Mathlib/Analysis/Calculus/FDeriv/Star.lean
@[fun_prop]
theorem Differentiable.star (h : Differentiable 𝕜 f) : Differentiable 𝕜 fun y => star (f y)
-- Mathlib/Logic/Equiv/PartialEquiv.lean
@[simp, mfld_simps]
theorem right_inv {x : β} (h : x ∈ e.target) : e (e.symm x) = x
-- Mathlib/Algebra/Lie/Derivation/Basic.lean
@[simp]
theorem coe_neg_linearMap (D : LieDerivation R L M) : ↑(-D) = (-D : L →ₗ[R] M)
-- Mathlib/Analysis/SpecialFunctions/Stirling.lean
/-- The sequence `stirlingSeq ∘ succ` is monotone decreasing -/
theorem stirlingSeq'_antitone : Antitone (stirlingSeq ∘ succ)
-- Mathlib/Algebra/Lie/Derivation/Basic.lean
@[simp] lemma lie_lieDerivation_apply (x y : L) (D : LieDerivation R L M) :
    ⁅x, D⁆ y = ⁅y, D x⁆
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem mul_add_left_right_iff {x y z : R} : IsCoprime x (x * z + y) ↔ IsCoprime x y
-- Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean
/-- The special-value formula `Γ(1/2) = √π`, which is equivalent to the Gaussian integral. -/
theorem Complex.Gamma_one_half_eq : Complex.Gamma (1 / 2) = (π : ℂ) ^ (1 / 2 : ℂ)