ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
@[simp] theorem nil_append (as : Array α) : #[] ++ as = as
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
@[norm_cast]
theorem WithTop.coe_iInf [Nonempty ι] [InfSet α] {f : ι → α} (hf : BddBelow (range f)) :
    ↑(⨅ i, f i) = (⨅ i, f i : WithTop α)
-- Mathlib/Combinatorics/SimpleGraph/LapMatrix.lean
lemma top_le_span_range_lapMatrix_ker_basis_aux :
    ⊤ ≤ Submodule.span ℝ (Set.range (lapMatrix_ker_basis_aux G))
-- Mathlib/Analysis/SpecialFunctions/Arsinh.lean
@[simp]
theorem arsinh_pos_iff : 0 < arsinh x ↔ 0 < x
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive]
protected theorem Prod.orderOf (x : α × β) : orderOf x = (orderOf x.1).lcm (orderOf x.2)
-- Mathlib/GroupTheory/CoprodI.lean
@[elab_as_elim]
theorem induction_on {C : CoprodI M → Prop} (m : CoprodI M) (h_one : C 1)
    (h_of : ∀ (i) (m : M i), C (of m)) (h_mul : ∀ x y, C x → C y → C (x * y)) : C m
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
/-- Prove equality of bitvectors in terms of nat operations. -/
theorem toInt_eq_toNat_cond (i : BitVec n) :
    i.toInt =
      if 2*i.toNat < 2^n then
        (i.toNat : Int)
      else
        (i.toNat : Int) - (2^n : Nat)
-- Mathlib/ModelTheory/DirectLimit.lean
theorem funMap_unify_equiv {n : ℕ} (F : L.Functions n) (x : Fin n → Σˣ f) (i j : ι)
    (hi : i ∈ upperBounds (range (Sigma.fst ∘ x))) (hj : j ∈ upperBounds (range (Sigma.fst ∘ x))) :
    Structure.Sigma.mk f i (funMap F (unify f x i hi)) ≈ .mk f j (funMap F (unify f x j hj))
-- Mathlib/Algebra/CharP/Algebra.lean
theorem Algebra.charP_iff (p : ℕ) : CharP K p ↔ CharP L p
-- Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean
theorem mem_balancedHull_iff : x ∈ balancedHull 𝕜 s ↔ ∃ r : 𝕜, ‖r‖ ≤ 1 ∧ x ∈ r • s
-- Mathlib/LinearAlgebra/DirectSum/Finsupp.lean
@[simp]
lemma finsuppScalarLeft_symm_apply_single (i : ι) (n : N) :
    (finsuppScalarLeft R N ι).symm (Finsupp.single i n) =
      (Finsupp.single i 1) ⊗ₜ[R] n
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem integral_indicatorConstLp [CompleteSpace E]
    {p : ℝ≥0∞} (ht : MeasurableSet t) (hμt : μ t ≠ ∞) (e : E) :
    ∫ x, indicatorConstLp p ht hμt e x ∂μ = (μ t).toReal • e
-- Mathlib/Algebra/Order/Group/Unbundled/Abs.lean
@[to_additive Birkhoff_inequalities]
lemma m_Birkhoff_inequalities (a b c : α) :
    |(a ⊔ c) / (b ⊔ c)|ₘ ⊔ |(a ⊓ c) / (b ⊓ c)|ₘ ≤ |a / b|ₘ
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
theorem coe_add_eq_bot_iff : ↑x + b = ⊥ ↔ b = ⊥
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[simp]
theorem coe_mk' {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha : Set R) = s
-- Mathlib/Topology/PartialHomeomorph.lean
/-- A function is continuous on a set if and only if its composition with a partial homeomorphism
on the left is continuous on the corresponding set. -/
theorem continuousOn_iff_continuousOn_comp_left {f : Z → X} {s : Set Z} (h : s ⊆ f ⁻¹' e.source) :
    ContinuousOn f s ↔ ContinuousOn (e ∘ f) s
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem piCongrRight_refl {ι : Type*} {R : ι → Type*} [∀ i, NonUnitalNonAssocSemiring (R i)] :
    (piCongrRight fun i => RingEquiv.refl (R i)) = RingEquiv.refl _
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem le_ciSup_set {f : β → α} {s : Set β} (H : BddAbove (f '' s)) {c : β} (hc : c ∈ s) :
    f c ≤ ⨆ i : s, f i
-- Mathlib/Topology/Algebra/Monoid.lean
@[to_additive]
theorem ContinuousWithinAt.pow {f : X → M} {x : X} {s : Set X} (hf : ContinuousWithinAt f s x)
    (n : ℕ) : ContinuousWithinAt (fun x => f x ^ n) s x
-- Mathlib/Algebra/Group/Submonoid/MulOpposite.lean
@[to_additive]
theorem unop_iSup (S : ι → Submonoid Mᵐᵒᵖ) : (iSup S).unop = ⨆ i, (S i).unop
-- Mathlib/Analysis/Convex/Between.lean
@[simp]
theorem affineSegment_vadd_const_image (x y : V) (p : P) :
    (· +ᵥ p) '' affineSegment R x y = affineSegment R (x +ᵥ p) (y +ᵥ p)
-- Mathlib/Topology/Basic.lean
theorem IsClosed.sdiff (h₁ : IsClosed s) (h₂ : IsOpen t) : IsClosed (s \ t)
-- .lake/packages/lean4/src/lean/Init/Prelude.lean
private theorem isValidChar_UInt32 {n : Nat} (h : n.isValidChar) : LT.lt n UInt32.size
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem uIcc_of_not_ge (h : ¬b ≤ a) : [[a, b]] = Icc a b
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp)]
theorem coe_fst : ⇑(fst M N) = Prod.fst
-- Mathlib/RingTheory/OreLocalization/Basic.lean
/-- A fraction `r /ₒ s` is equal to its expansion by an arbitrary factor `t` if `t * s ∈ S`. -/
@[to_additive "A difference `r -ₒ s` is equal to its expansion by an
arbitrary translation `t` if `t + s ∈ S`."]
protected theorem expand (r : X) (s : S) (t : R) (hst : t * (s : R) ∈ S) :
    r /ₒ s = t • r /ₒ ⟨t * s, hst⟩
-- Mathlib/Logic/Basic.lean
theorem forall_prop_congr' {p p' : Prop} {q q' : p → Prop} (hq : ∀ h, q h ↔ q' h) (hp : p ↔ p') :
    (∀ h, q h) = ∀ h : p', q' (hp.2 h)
-- Mathlib/Topology/Order/DenselyOrdered.lean
theorem nhdsWithin_Iio_neBot [NoMinOrder α] {a b : α} (H : a ≤ b) : NeBot (𝓝[Iio b] a)
-- Mathlib/Data/Fin/Basic.lean
@[simp, nolint simpNF]
theorem mk_eq_mk {a h a' h'} : @mk n a h = @mk n a' h' ↔ a = a'
-- Mathlib/Algebra/Group/Action/Basic.lean
@[simp] lemma invOf_smul_smul : ⅟c • c • x = x
-- Mathlib/GroupTheory/Perm/Cycle/Factors.lean
theorem cycleOf_apply (f : Perm α) [DecidableRel f.SameCycle] (x y : α) :
    cycleOf f x y = if SameCycle f x y then f y else y
-- Mathlib/Algebra/Group/WithOne/Defs.lean
@[to_additive]
theorem ne_one_iff_exists {x : WithOne α} : x ≠ 1 ↔ ∃ a : α, ↑a = x
-- Mathlib/Data/ENNReal/Basic.lean
@[simp] theorem zero_toNNReal : (0 : ℝ≥0∞).toNNReal = 0
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem filter_filter (q) : ∀ l, filter p (filter q l) = filter (fun a => p a ∧ q a) l
-- Mathlib/Data/Real/EReal.lean
@[simp]
theorem bot_lt_coe_ennreal (x : ℝ≥0∞) : (⊥ : EReal) < x
-- Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
@[reassoc (attr := simp)]
lemma mapCyclesIso_hom_iCycles [S.HasLeftHomology] [F.PreservesLeftHomologyOf S] :
    (S.mapCyclesIso F).hom ≫ F.map S.iCycles = (S.map F).iCycles
-- Mathlib/Data/PNat/Prime.lean
theorem dvd_lcm_left (n m : ℕ+) : n ∣ lcm n m
-- Mathlib/CategoryTheory/Bicategory/Functor/Pseudofunctor.lean
lemma mapComp_id_left (f : a ⟶ b) : (F.mapComp (𝟙 a) f) = F.map₂Iso (λ_ f) ≪≫
    (λ_ (F.map f)).symm ≪≫ (whiskerRightIso (F.mapId a) (F.map f)).symm
-- Mathlib/NumberTheory/Modular.lean
/-- An auxiliary result en route to `ModularGroup.eq_smul_self_of_mem_fdo_mem_fdo`. -/
theorem c_eq_zero (hz : z ∈ 𝒟ᵒ) (hg : g • z ∈ 𝒟ᵒ) : (↑ₘg) 1 0 = 0
-- Mathlib/Topology/Order/Basic.lean
theorem tendsto_nhds_bot_mono [TopologicalSpace β] [Preorder β] [OrderBot β] [OrderTopology β]
    {l : Filter α} {f g : α → β} (hf : Tendsto f l (𝓝 ⊥)) (hg : g ≤ᶠ[l] f) : Tendsto g l (𝓝 ⊥)
-- Mathlib/Data/Set/Lattice.lean
theorem biUnion_subset_biUnion_left {s s' : Set α} {t : α → Set β} (h : s ⊆ s') :
    ⋃ x ∈ s, t x ⊆ ⋃ x ∈ s', t x
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- The cosine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
adjacent side, version subtracting vectors. -/
theorem cos_angle_sub_mul_norm_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) :
    Real.cos (angle x (x - y)) * ‖x - y‖ = ‖x‖
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem integrableOn_iff_integrable_of_support_subset (h1s : support f ⊆ s) :
    IntegrableOn f s μ ↔ Integrable f μ
-- Mathlib/RingTheory/AdjoinRoot.lean
@[simp]
theorem Polynomial.quotQuotEquivComm_mk (p : R[X]) :
    (Polynomial.quotQuotEquivComm I f) (Ideal.Quotient.mk _ (p.map (Ideal.Quotient.mk I))) =
      Ideal.Quotient.mk (span ({(Ideal.Quotient.mk (I.map C)) f} : Set (R[X] ⧸ (I.map C))))
      (Ideal.Quotient.mk (I.map C) p)
-- Mathlib/Algebra/Ring/Regular.lean
theorem isRegular_of_ne_zero' [NonUnitalNonAssocRing α] [NoZeroDivisors α] {k : α} (hk : k ≠ 0) :
    IsRegular k
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[mono]
theorem prod_mono ⦃s₁ s₂ : Subring R⦄ (hs : s₁ ≤ s₂) ⦃t₁ t₂ : Subring S⦄ (ht : t₁ ≤ t₂) :
    s₁.prod t₁ ≤ s₂.prod t₂
-- Mathlib/Data/Seq/Seq.lean
@[simp]
theorem map_get? (f : α → β) : ∀ s n, get? (map f s) n = (get? s n).map f
-- Mathlib/Analysis/Convex/Side.lean
theorem not_sSameSide_bot (x y : P) : ¬(⊥ : AffineSubspace R P).SSameSide x y
-- Mathlib/SetTheory/Ordinal/Basic.lean
/-- `lift.{max v u, u}` equals `lift.{v, u}`. -/
-- @[simp] -- Porting note: simp lemma never applies, tested
theorem lift_umax' : lift.{max v u, u} = lift.{v, u}
-- Mathlib/Order/Bounds/Basic.lean
/-- A monotone map sends a greatest element of a set to a greatest element of its image. -/
theorem map_isGreatest (Ha : IsGreatest s a) : IsGreatest (f '' s) (f a)
-- Mathlib/LinearAlgebra/Prod.lean
theorem inl_map_mul (a₁ a₂ : A) :
    LinearMap.inl R A B (a₁ * a₂) = LinearMap.inl R A B a₁ * LinearMap.inl R A B a₂
-- Mathlib/Algebra/Lie/Weights/Killing.lean
@[simp] lemma coroot_eq_zero_iff {α : Weight K H L} :
    coroot α = 0 ↔ α.IsZero
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem length_le (h : Red L₁ L₂) : L₂.length ≤ L₁.length
-- Mathlib/Data/Finset/Sups.lean
@[simp] lemma empty_diffs : ∅ \\ t = ∅
-- Mathlib/Algebra/Category/Ring/Basic.lean
@[simp] lemma forget_map {X Y : CommSemiRingCat} (f : X ⟶ Y) :
  (forget CommSemiRingCat).map f = (f : X → Y)
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem sub_toIocDiv_zsmul_mem_Ioc (a b : α) : b - toIocDiv hp a b • p ∈ Set.Ioc a (a + p)
-- Mathlib/Analysis/Normed/Group/InfiniteSum.lean
/-- Variant of the direct comparison test for series:  if the norm of `f` is eventually bounded by a
real function `g` which is summable, then `f` is summable. -/
theorem Summable.of_norm_bounded_eventually_nat {f : ℕ → E} (g : ℕ → ℝ) (hg : Summable g)
    (h : ∀ᶠ i in atTop, ‖f i‖ ≤ g i) : Summable f
-- Mathlib/Algebra/DualQuaternion.lean
@[simp]
theorem fst_imK_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
    (dualNumberEquiv.symm d).imK.fst = d.fst.imK
-- Mathlib/RingTheory/Localization/LocalizationLocalization.lean
theorem localization_localization_map_units [IsLocalization N T]
    (y : localizationLocalizationSubmodule M N) : IsUnit (algebraMap R T y)
-- Mathlib/Analysis/PSeries.lean
theorem summable_abs_int_rpow {b : ℝ} (hb : 1 < b) :
    Summable fun n : ℤ => |(n : ℝ)| ^ (-b)
-- Mathlib/Analysis/Seminorm.lean
@[simp]
theorem mem_ball : y ∈ ball p x r ↔ p (y - x) < r
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
/-- Forgetting the differentials than picking out the `i`-th object is the same as
just picking out the `i`-th object. -/
@[simps!]
def forgetEval (i : ι) : forget V c ⋙ GradedObject.eval i ≅ eval V c i
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem iInter_eq_univ : ⋂ i, s i = univ ↔ ∀ i, s i = univ
-- Mathlib/LinearAlgebra/Dimension/Basic.lean
theorem LinearMap.lift_rank_le_of_surjective (f : M →ₗ[R] M') (h : Surjective f) :
    lift.{v} (Module.rank R M') ≤ lift.{v'} (Module.rank R M)
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem diag_add [Add α] (A B : Matrix n n α) : diag (A + B) = diag A + diag B
-- Mathlib/Probability/Kernel/Condexp.lean
theorem measurable_condexpKernel {s : Set Ω} (hs : MeasurableSet s) :
    Measurable[m] fun ω => condexpKernel μ m ω s
-- Mathlib/Data/Set/Basic.lean
protected theorem Nonempty.some_mem (h : s.Nonempty) : h.some ∈ s
-- Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean
private theorem esymm_mul_psum_summand_to_weight (k : ℕ) (a : ℕ × ℕ) (ha : a ∈ antidiagonal k) :
    ∑ A ∈ powersetCard a.fst univ, ∑ j, weight σ R k (A, j) =
    (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd
-- Mathlib/Data/Real/Sqrt.lean
@[simp] lemma mul_self_sqrt (x : ℝ≥0) : sqrt x * sqrt x = x
-- Mathlib/Algebra/Category/Grp/Preadditive.lean
@[simp]
lemma hom_add_apply {P Q : AddCommGrp} (f g : P ⟶ Q) (x : P) : (f + g) x = f x + g x
-- Mathlib/Data/Set/Basic.lean
theorem strictAntiOn_iff_strictAnti : StrictAntiOn f s ↔
    StrictAnti fun a : s => f a
-- Mathlib/Topology/MetricSpace/Thickening.lean
/-- The closed thickening of a set contains the closure of the set. -/
theorem closure_subset_cthickening (δ : ℝ) (E : Set α) : closure E ⊆ cthickening δ E
-- Mathlib/LinearAlgebra/Lagrange.lean
theorem basisDivisor_inj (hxy : basisDivisor x y = 0) : x = y
-- Mathlib/CategoryTheory/Sites/Subsheaf.lean
/-- The inclusion of a subpresheaf to a larger subpresheaf -/
@[simps]
def Subpresheaf.homOfLe {G G' : Subpresheaf F} (h : G ≤ G') : G.toPresheaf ⟶ G'.toPresheaf
-- Mathlib/Algebra/MvPolynomial/PDeriv.lean
theorem pderiv_def [DecidableEq σ] (i : σ) : pderiv i = mkDerivation R (Pi.single i 1)
-- Mathlib/Geometry/Manifold/IntegralCurve.lean
lemma isIntegralCurveOn_comp_mul_ne_zero {a : ℝ} (ha : a ≠ 0) :
    IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ (· * a)) (a • v) { t | t * a ∈ s }
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive lt_of_add_lt_add_left]
theorem lt_of_mul_lt_mul_left' [ContravariantClass α α (· * ·) (· < ·)] {a b c : α}
    (bc : a * b < a * c) :
    b < c
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
@[reassoc (attr := simp)]
theorem Hom.comm {A B : HomologicalComplex V c} (f : A.Hom B) (i j : ι) :
    f.f i ≫ B.d i j = A.d i j ≫ f.f j
-- Mathlib/Analysis/Normed/Operator/Banach.lean
lemma _root_.ContinuousLinearMap.isUnit_iff_bijective {f : E →L[𝕜] E} :
    IsUnit f ↔ Bijective f
-- Mathlib/MeasureTheory/Function/SimpleFuncDense.lean
theorem tendsto_approxOn {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
    [SeparableSpace s] {x : β} (hx : f x ∈ closure s) :
    Tendsto (fun n => approxOn f hf s y₀ h₀ n x) atTop (𝓝 <| f x)
-- Mathlib/LinearAlgebra/Dimension/Free.lean
/-- Two vector spaces are isomorphic if they have the same dimension. -/
theorem nonempty_linearEquiv_of_lift_rank_eq
    (cnd : Cardinal.lift.{v'} (Module.rank R M) = Cardinal.lift.{v} (Module.rank R M')) :
    Nonempty (M ≃ₗ[R] M')
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1SCLM_smul_left (c : ℝ) (hT : DominatedFinMeasAdditive μ T C) (f : α →₁ₛ[μ] E) :
    setToL1SCLM α E μ (hT.smul c) f = c • setToL1SCLM α E μ hT f
-- Mathlib/Analysis/Normed/Group/Quotient.lean
/-- The norm of the image of `m : M` in the quotient by `S` is zero if and only if `m` belongs
to the closure of `S`. -/
theorem quotient_norm_eq_zero_iff (S : AddSubgroup M) (m : M) :
    ‖mk' S m‖ = 0 ↔ m ∈ closure (S : Set M)
-- Mathlib/Algebra/Order/Interval/Basic.lean
@[to_additive (attr := simp)]
theorem fst_inv : s⁻¹.fst = s.snd⁻¹
-- Mathlib/Data/DFinsupp/Basic.lean
@[to_additive]
theorem prod_eq_one [∀ i, Zero (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ]
    {f : Π₀ i, β i} {h : ∀ i, β i → γ} (hyp : ∀ i, h i (f i) = 1) : f.prod h = 1
-- Mathlib/Analysis/Complex/ReImTopology.lean
@[simp]
theorem interior_setOf_le_im (a : ℝ) : interior { z : ℂ | a ≤ z.im } = { z | a < z.im }
-- Mathlib/CategoryTheory/Localization/Predicate.lean
@[simps]
instance id : Lifting L W L (𝟭 D)
-- Mathlib/Data/Prod/Basic.lean
@[simp]
theorem map_involutive [Nonempty α] [Nonempty β] {f : α → α} {g : β → β} :
    Involutive (map f g) ↔ Involutive f ∧ Involutive g
-- Mathlib/Topology/Constructions.lean
theorem isClosedMap_ofMul : IsClosedMap (ofMul : X → Additive X)
-- Mathlib/FieldTheory/Adjoin.lean
@[mono]
theorem adjoin.mono (T : Set E) (h : S ⊆ T) : adjoin F S ≤ adjoin F T
-- Mathlib/Topology/Order/UpperLowerSetTopology.lean
lemma lowerSet_le_lower {t₁ t₂ : TopologicalSpace α} [@Topology.IsLowerSet α t₁ _]
    [@IsLower α t₂ _] : t₁ ≤ t₂
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive]
lemma eq_of_prod_take_eq [LeftCancelMonoid M] {L L' : List M} (h : L.length = L'.length)
    (h' : ∀ i ≤ L.length, (L.take i).prod = (L'.take i).prod) : L = L'
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem gcd_comm' [GCDMonoid α] (a b : α) : Associated (gcd a b) (gcd b a)
-- Mathlib/Data/Finsupp/Defs.lean
theorem ofSupportFinite_coe {f : α → M} {hf : (Function.support f).Finite} :
    (ofSupportFinite f hf : α → M) = f
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem withTopWithBot_id : (LatticeHom.id α).withTopWithBot = BoundedLatticeHom.id _
-- Mathlib/Order/Chain.lean
@[simp]
theorem mk_coe (s : Flag α) : mk (s : Set α) s.Chain' s.max_chain' = s
-- Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
/-- A set of orthogonal vectors `v` with respect to some bilinear form `B` is linearly independent
  if for all `i`, `B (v i) (v i) ≠ 0`. -/
theorem linearIndependent_of_iIsOrtho {n : Type w} {B : BilinForm K V} {v : n → V}
    (hv₁ : B.iIsOrtho v) (hv₂ : ∀ i, ¬B.IsOrtho (v i) (v i)) : LinearIndependent K v
-- Mathlib/Algebra/Group/Action/Prod.lean
@[to_additive existing (attr := simp) (reorder := 6 7) smul_mk]
lemma pow_mk (c : E) (a : α) (b : β) : Prod.mk a b ^ c = Prod.mk (a ^ c) (b ^ c)
-- Mathlib/Data/Finset/Card.lean
/-- If a Finset in a Pi type is nontrivial (has at least two elements), then
  its projection to some factor is nontrivial, and the fibers of the projection
  are proper subsets. -/
lemma exists_of_one_lt_card_pi {ι : Type*} {α : ι → Type*} [∀ i, DecidableEq (α i)]
    {s : Finset (∀ i, α i)} (h : 1 < s.card) :
    ∃ i, 1 < (s.image (· i)).card ∧ ∀ ai, s.filter (· i = ai) ⊂ s
-- Mathlib/RingTheory/Polynomial/Quotient.lean
theorem quotient_map_C_eq_zero {I : Ideal R} :
    ∀ a ∈ I, ((Quotient.mk (map (C : R →+* R[X]) I : Ideal R[X])).comp C) a = 0
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/NonUnital.lean
/-- A non-unital star `R`-algebra `A` has a *continuous functional calculus* for elements
satisfying the property `p : A → Prop` if

+ for every such element `a : A` there is a non-unital star algebra homomorphism
  `cfcₙHom : C(quasispectrum R a, R)₀ →⋆ₙₐ[R] A` sending the (restriction of) the identity map
  to `a`.
+ `cfcₙHom` is a closed embedding for which the quasispectrum of the image of function `f` is its
  range.
+ `cfcₙHom` preserves the property `p`.

The property `p` is marked as an `outParam` so that the user need not specify it. In practice,

+ for `R := ℂ`, we choose `p := IsStarNormal`,
+ for `R := ℝ`, we choose `p := IsSelfAdjoint`,
+ for `R := ℝ≥0`, we choose `p := (0 ≤ ·)`.

Instead of directly providing the data we opt instead for a `Prop` class. In all relevant cases,
the continuous functional calculus is uniquely determined, and utilizing this approach
prevents diamonds or problems arising from multiple instances. -/
class NonUnitalContinuousFunctionalCalculus (R : Type*) {A : Type*} (p : outParam (A → Prop))
    [CommSemiring R] [Nontrivial R] [StarRing R] [MetricSpace R] [TopologicalSemiring R]
    [ContinuousStar R] [NonUnitalRing A] [StarRing A] [TopologicalSpace A] [Module R A]
    [IsScalarTower R A A] [SMulCommClass R A A] : Prop where
  predicate_zero : p 0
  exists_cfc_of_predicate : ∀ a, p a → ∃ φ : C(σₙ R a, R)₀ →⋆ₙₐ[R] A,
    ClosedEmbedding φ ∧ φ ⟨(ContinuousMap.id R).restrict <| σₙ R a, rfl⟩ = a ∧
      (∀ f, σₙ R (φ f) = Set.range f) ∧ ∀ f, p (φ f)
-- Mathlib/Algebra/Order/Monovary.lean
@[to_additive (attr := simp)] lemma monovary_inv_right : Monovary f g⁻¹ ↔ Antivary f g
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
@[to_additive]
theorem mem_sup_left {S T : Submonoid M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T
-- Mathlib/Order/Lattice.lean
@[simp]
theorem sup_eq_right : a ⊔ b = b ↔ a ≤ b
-- Mathlib/Analysis/Convex/Normed.lean
theorem convex_closedBall (a : E) (r : ℝ) : Convex ℝ (Metric.closedBall a r)
-- Mathlib/CategoryTheory/Monoidal/End.lean
@[simp] theorem endofunctorMonoidalCategory_tensorUnit_map {X Y : C} (f : X ⟶ Y) :
    (𝟙_ (C ⥤ C)).map f = f
-- Mathlib/Algebra/MvPolynomial/Basic.lean
theorem eval₂Hom_monomial (f : R →+* S₁) (g : σ → S₁) (d : σ →₀ ℕ) (r : R) :
    eval₂Hom f g (monomial d r) = f r * d.prod fun i k => g i ^ k
-- Mathlib/Algebra/Lie/Subalgebra.lean
@[simp]
theorem lieSubalgebraMap_apply (x : L₁'') : ↑(e.lieSubalgebraMap _ x) = e x
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem le.intro_sub {a b : Int} (n : Nat) (h : b - a = n) : a ≤ b
-- Mathlib/MeasureTheory/Measure/Regular.lean
/-- In a metrizable space (or even a pseudo metrizable space), an open set can be approximated from
inside by closed sets. -/
theorem of_pseudoMetrizableSpace {X : Type*} [TopologicalSpace X] [PseudoMetrizableSpace X]
    [MeasurableSpace X] (μ : Measure X) : InnerRegularWRT μ IsClosed IsOpen
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem take_length_le {l : List α} (h : l.length ≤ i) : take i l = l
-- Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
theorem Matrix.toLinearMap₂'_apply' {T : Type*} [CommSemiring T] (M : Matrix n m T) (v : n → T)
    (w : m → T) : Matrix.toLinearMap₂' T M v w = Matrix.dotProduct v (M *ᵥ w)
-- Mathlib/Order/Hom/Basic.lean
@[simp]
theorem dual_id : OrderHom.dual (OrderHom.id : α →o α) = OrderHom.id
-- Mathlib/Algebra/Lie/Killing.lean
/-- Given an equivalence `e` of Lie algebras from `L` to `L'`, and elements `x y : L`, the
respective Killing forms of `L` and `L'` satisfy `κ'(e x, e y) = κ(x, y)`. -/
@[simp] lemma killingForm_of_equiv_apply (e : L ≃ₗ⁅R⁆ L') (x y : L) :
    killingForm R L' (e x) (e y) = killingForm R L x y
-- Mathlib/Data/Vector/Basic.lean
@[simp]
theorem toList_set (v : Vector α n) (i : Fin n) (a : α) :
    (v.set i a).toList = v.toList.set i a
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma neg_of_Z_eq_zero' {P : Fin 3 → R} (hPz : P z = 0) : W'.neg P = ![P x, -P y, 0]
-- Mathlib/Topology/Order.lean
theorem isOpen_induced_iff [t : TopologicalSpace β] {s : Set α} {f : α → β} :
    IsOpen[t.induced f] s ↔ ∃ t, IsOpen t ∧ f ⁻¹' t = s
-- Mathlib/Topology/PartitionOfUnity.lean
theorem sum_toPartitionOfUnity_eq (x : X) :
    ∑ᶠ i, f.toPartitionOfUnity i x = 1 - ∏ᶠ i, (1 - f i x)
-- Mathlib/Order/Bounds/Basic.lean
theorem bddAbove_iff_exists_ge [SemilatticeSup γ] {s : Set γ} (x₀ : γ) :
    BddAbove s ↔ ∃ x, x₀ ≤ x ∧ ∀ y ∈ s, y ≤ x
-- Mathlib/FieldTheory/Separable.lean
/-- Typeclass for separable field extension: `K` is a separable field extension of `F` iff
the minimal polynomial of every `x : K` is separable. This implies that `K/F` is an algebraic
extension, because the minimal polynomial of a non-integral element is `0`, which is not
separable.

We define this for general (commutative) rings and only assume `F` and `K` are fields if this
is needed for a proof.
-/
@[mk_iff isSeparable_def] protected class Algebra.IsSeparable : Prop where
  isSeparable' : ∀ x : K, IsSeparable F x
-- Mathlib/Order/Interval/Finset/Fin.lean
@[simp]
theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1
-- Mathlib/Algebra/Order/Monovary.lean
@[to_additive]
lemma Antivary.mul_left (h₁ : Antivary f₁ g) (h₂ : Antivary f₂ g) : Antivary (f₁ * f₂) g
-- Mathlib/Order/Interval/Set/UnorderedInterval.lean
lemma _root_.MonotoneOn.image_uIcc_subset (hf : MonotoneOn f (uIcc a b)) :
    f '' uIcc a b ⊆ uIcc (f a) (f b)
-- Mathlib/MeasureTheory/Integral/FundThmCalculus.lean
/-- Fundamental theorem of calculus-2: If `f : ℝ → E` is continuous on `[a, b]` (where `a ≤ b`) and
  has a derivative at `f' x` for all `x` in `(a, b)`, and `f'` is integrable on `[a, b]`, then
  `∫ y in a..b, f' y` equals `f b - f a`. -/
theorem integral_eq_sub_of_hasDerivAt_of_le (hab : a ≤ b) (hcont : ContinuousOn f (Icc a b))
    (hderiv : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hint : IntervalIntegrable f' volume a b) :
    ∫ y in a..b, f' y = f b - f a
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem reduce.Step.eq (H : Red.Step L₁ L₂) : reduce L₁ = reduce L₂
-- Mathlib/Data/Stream/Init.lean
theorem bisim_simple (s₁ s₂ : Stream' α) :
    head s₁ = head s₂ → s₁ = tail s₁ → s₂ = tail s₂ → s₁ = s₂
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem comp_assoc (f : SupBotHom γ δ) (g : SupBotHom β γ) (h : SupBotHom α β) :
    (f.comp g).comp h = f.comp (g.comp h)
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
@[simp]
theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ
-- Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean
theorem congr (hf : AEMeasurable f μ) (h : f =ᵐ[μ] g) : AEMeasurable g μ
-- Mathlib/GroupTheory/CoprodI.lean
theorem mem_smul_iff_of_ne {i j : ι} (hij : i ≠ j) {m₁ : M i} {m₂ : M j} {w : Word M} :
    ⟨_, m₁⟩ ∈ (of m₂ • w).toList ↔ ⟨i, m₁⟩ ∈ w.toList