ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Option/NAry.lean
theorem map₂_assoc {f : δ → γ → ε} {g : α → β → δ} {f' : α → ε' → ε} {g' : β → γ → ε'}
    (h_assoc : ∀ a b c, f (g a b) c = f' a (g' b c)) :
    map₂ f (map₂ g a b) c = map₂ f' a (map₂ g' b c)
-- Mathlib/Data/Matroid/Sum.lean
@[simp] lemma sigma_basis_iff {I X} :
    (Matroid.sigma M).Basis I X ↔ ∀ i, (M i).Basis (Sigma.mk i ⁻¹' I) (Sigma.mk i ⁻¹' X)
-- Mathlib/Analysis/SpecificLimits/FloorPow.lean
/-- The sum of `1/⌊c^i⌋₊^2` above a threshold `j` is comparable to `1/j^2`, up to a multiplicative
constant. -/
theorem sum_div_nat_floor_pow_sq_le_div_sq (N : ℕ) {j : ℝ} (hj : 0 < j) {c : ℝ} (hc : 1 < c) :
    (∑ i ∈ (range N).filter (j < ⌊c ^ ·⌋₊), (1 : ℝ) / (⌊c ^ i⌋₊ : ℝ) ^ 2) ≤
      c ^ 5 * (c - 1)⁻¹ ^ 3 / j ^ 2
-- Mathlib/Order/Hom/Basic.lean
/-- `Prod.snd` as an `OrderHom`. -/
@[simps]
def snd : α × β →o β
-- Mathlib/SetTheory/Cardinal/PartENat.lean
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c'
-- Mathlib/LinearAlgebra/Basis.lean
theorem prod_apply_inr_snd (i) : (b.prod b' (Sum.inr i)).2 = b' i
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[to_additive (attr := fun_prop, aesop safe 20 apply (rule_sets := [Measurable]))]
theorem AEMeasurable.smul [MeasurableSMul₂ M β] {μ : Measure α} (hf : AEMeasurable f μ)
    (hg : AEMeasurable g μ) : AEMeasurable (fun x => f x • g x) μ
-- Mathlib/Order/UpperLower/Basic.lean
theorem isLowerSet_Iic : IsLowerSet (Iic a)
-- Mathlib/Data/Vector/MapLemmas.lean
@[simp]
theorem mapAccumr_map (f₂ : α → β) :
    (mapAccumr f₁ (map f₂ xs) s) = (mapAccumr (fun x s => f₁ (f₂ x) s) xs s)
-- Mathlib/GroupTheory/Finiteness.lean
theorem Subgroup.fg_iff_add_fg (P : Subgroup G) : P.FG ↔ P.toAddSubgroup.FG
-- Mathlib/GroupTheory/Coset.lean
@[to_additive rightAddCoset_assoc]
theorem rightCoset_assoc (s : Set α) (a b : α) : op b • op a • s = op (a * b) • s
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp)]
theorem coprod_unique (f : M × N →* P) : (f.comp (inl M N)).coprod (f.comp (inr M N)) = f
-- Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
theorem NonUnitalSubsemiring.toSubsemiring_toNonUnitalSubsemiring (S : NonUnitalSubsemiring R)
    (h1 : (1 : R) ∈ S) : (NonUnitalSubsemiring.toSubsemiring S h1).toNonUnitalSubsemiring = S
-- Mathlib/Topology/Maps/Basic.lean
theorem preimage_frontier_eq_frontier_preimage (hf : IsOpenMap f) (hfc : Continuous f) (s : Set Y) :
    f ⁻¹' frontier s = frontier (f ⁻¹' s)
-- Mathlib/Data/Option/Defs.lean
@[simp]
theorem mem_toList {a : α} {o : Option α} : a ∈ toList o ↔ a ∈ o
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem getElem?_eq_some {l : List α} : l[n]? = some a ↔ ∃ h : n < l.length, l[n] = a
-- Mathlib/Analysis/Convex/Star.lean
/-- If `x < y`, then `(Set.Iic x)ᶜ` is star convex at `y`. -/
lemma starConvex_compl_Iic (h : x < y) : StarConvex 𝕜 y (Iic x)ᶜ
-- Mathlib/Probability/Kernel/MeasurableIntegral.lean
/-- Auxiliary lemma for `Measurable.lintegral_kernel_prod_right`. -/
theorem Kernel.measurable_lintegral_indicator_const {t : Set (α × β)} (ht : MeasurableSet t)
    (c : ℝ≥0∞) : Measurable fun a => ∫⁻ b, t.indicator (Function.const (α × β) c) (a, b) ∂κ a
-- Mathlib/CategoryTheory/Adjunction/FullyFaithful.lean
/-- If each component of the unit is a split epimorphism, then the left adjoint is full. -/
lemma full_L_of_isSplitEpi_unit_app [∀ X, IsSplitEpi (h.unit.app X)] : L.Full
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem cast_le [LinearOrderedSemiring α] {m n : Num} : (m : α) ≤ n ↔ m ≤ n
-- Mathlib/Analysis/NormedSpace/Extend.lean
@[simp]
theorem ContinuousLinearMap.norm_extendTo𝕜 (fr : RestrictScalars ℝ 𝕜 F →L[ℝ] ℝ) :
    ‖fr.extendTo𝕜‖ = ‖fr‖
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem coeFn_toL1 {f : α → β} (hf : Integrable f μ) : hf.toL1 f =ᵐ[μ] f
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
theorem Matrix.toBilin'Aux_stdBasis [Fintype n] [DecidableEq n] (M : Matrix n n R₂) (i j : n) :
    M.toBilin'Aux (LinearMap.stdBasis R₂ (fun _ => R₂) i 1)
      (LinearMap.stdBasis R₂ (fun _ => R₂) j 1) = M i j
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
protected theorem zero_smul (x : M ⊗[R] N) : (0 : R'') • x = 0
-- Mathlib/Analysis/Normed/Lp/lpSpace.lean
/-- The coercion from `lp E p` to `∀ i, E i` is uniformly continuous. -/
theorem uniformContinuous_coe [_i : Fact (1 ≤ p)] :
    UniformContinuous (α := lp E p) ((↑) : lp E p → ∀ i, E i)
-- Mathlib/Algebra/Homology/ShortComplex/ConcreteCategory.lean
@[simp]
lemma ShortComplex.zero_apply
    [Limits.HasZeroMorphisms C] [(forget₂ C Ab).PreservesZeroMorphisms]
    (S : ShortComplex C) (x : (forget₂ C Ab).obj S.X₁) :
    ((forget₂ C Ab).map S.g) (((forget₂ C Ab).map S.f) x) = 0
-- Mathlib/Algebra/BigOperators/Group/List.lean
/-- A list with product greater than one must have positive length. -/
@[to_additive length_pos_of_sum_pos "A list with positive sum must have positive length."]
theorem length_pos_of_one_lt_prod [Preorder M] (L : List M) (h : 1 < L.prod) : 0 < L.length
-- Mathlib/Data/Set/Function.lean
lemma InjOn.iterate {f : α → α} {s : Set α} (h : InjOn f s) (hf : MapsTo f s s) :
    ∀ n, InjOn f^[n] s
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem rank_eq :
    hwf.rank a = Ordinal.sup.{u, u} fun b : { b // r b a } => Order.succ <| hwf.rank b
-- Mathlib/Topology/Algebra/InfiniteSum/Group.lean
@[to_additive]
theorem Set.Finite.multipliable_compl_iff {s : Set β} (hs : s.Finite) :
    Multipliable (f ∘ (↑) : ↑sᶜ → α) ↔ Multipliable f
-- Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean
theorem Algebra.isIntegral_of_surjective (h : Function.Surjective (algebraMap R A)) :
    Algebra.IsIntegral R A
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem left_mem_Ico : a ∈ Ico a b ↔ a < b
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
lemma homMk'_id (f : StructuredArrow S T) : homMk' f (𝟙 f.right) = eqToHom (by aesop_cat)
-- Mathlib/Algebra/Group/Action/Sigma.lean
@[to_additive]
theorem smul_def : a • x = x.map id fun _ => (a • ·)
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
/-- `f = O(g)` if and only if `∀ᶠ x in l, ‖f x‖ ≤ c * ‖g x‖` for all sufficiently large `c`. -/
theorem isBigO_iff_eventually : f =O[l] g' ↔ ∀ᶠ c in atTop, ∀ᶠ x in l, ‖f x‖ ≤ c * ‖g' x‖
-- Mathlib/AlgebraicTopology/CechNerve.lean
/-- The morphism between augmented Čech conerves associated to a morphism of arrows. -/
@[simps]
def mapAugmentedCechConerve {f g : Arrow C}
    [∀ n : ℕ, HasWidePushout f.left (fun _ : Fin (n + 1) => f.right) fun _ => f.hom]
    [∀ n : ℕ, HasWidePushout g.left (fun _ : Fin (n + 1) => g.right) fun _ => g.hom] (F : f ⟶ g) :
    f.augmentedCechConerve ⟶ g.augmentedCechConerve
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
theorem log_nonpos (hx : 0 ≤ x) (h'x : x ≤ 1) : log x ≤ 0
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Linear.lean
theorem Poly.denote_insertSorted (ctx : Context) (k : Nat) (v : Var) (p : Poly) : (p.insertSorted k v).denote ctx = p.denote ctx + k * v.denote ctx
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem eq_zero_of_not_pos (h : ¬0 < n) : n = 0
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[simp]
theorem center_toNonUnitalSubalgebra :
    (center R A).toNonUnitalSubalgebra = NonUnitalSubalgebra.center R A
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
theorem spanningCoe_inj : G₁.spanningCoe = G₂.spanningCoe ↔ G₁.Adj = G₂.Adj
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem comap_le_comap_of_le_range {f : G →* N} {K L : Subgroup N} (hf : K ≤ f.range) :
    K.comap f ≤ L.comap f ↔ K ≤ L
-- Mathlib/Data/Set/Basic.lean
theorem eq_univ_of_forall {s : Set α} : (∀ x, x ∈ s) → s = univ
-- Mathlib/Dynamics/FixedPoints/Basic.lean
/-- If `g` semiconjugates `fa` to `fb`, then it sends fixed points of `fa` to fixed points
of `fb`. -/
theorem Semiconj.mapsTo_fixedPoints {g : α → β} (h : Semiconj g fa fb) :
    Set.MapsTo g (fixedPoints fa) (fixedPoints fb)
-- Mathlib/Analysis/Convolution.lean
theorem AEStronglyMeasurable.convolution_integrand_snd'
    (hf : AEStronglyMeasurable f μ) {x : G}
    (hg : AEStronglyMeasurable g <| map (fun t => x - t) μ) :
    AEStronglyMeasurable (fun t => L (f t) (g (x - t))) μ
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
protected theorem injective : Injective e
-- Mathlib/FieldTheory/Finite/Basic.lean
@[simp]
theorem frobenius_zmod (p : ℕ) [Fact p.Prime] : frobenius (ZMod p) p = RingHom.id _
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
@[simp]
theorem sin_two_pi : sin (2 * π) = 0
-- Mathlib/Logic/Equiv/Defs.lean
theorem sigmaCongrRight_trans {α} {β₁ β₂ β₃ : α → Type*}
    (F : ∀ a, β₁ a ≃ β₂ a) (G : ∀ a, β₂ a ≃ β₃ a) :
    (sigmaCongrRight F).trans (sigmaCongrRight G) =
      sigmaCongrRight fun a => (F a).trans (G a)
-- Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean
/-- **Gram-Schmidt Orthonormalization**:
`gramSchmidtNormed` produces an orthornormal system of vectors after removing the vectors which
become zero in the process. -/
theorem gramSchmidt_orthonormal' (f : ι → E) :
    Orthonormal 𝕜 fun i : { i | gramSchmidtNormed 𝕜 f i ≠ 0 } => gramSchmidtNormed 𝕜 f i
-- Mathlib/LinearAlgebra/PerfectPairing.lean
@[simp]
theorem apply_toDualLeft_symm_apply (f : Dual R N) (x : N) : p (p.toDualLeft.symm f) x = f x
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- The cosine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
adjacent side. -/
theorem cos_oangle_add_left_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.cos (o.oangle (x + y) y) * ‖x + y‖ = ‖y‖
-- Mathlib/CategoryTheory/GradedObject/Bifunctor.lean
/-- Given a bifunctor `F : C₁ ⥤ C₂ ⥤ C₃` and types `I` and `J`, this is the obvious
functor `GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject (I × J) C₃`. -/
@[simps]
def mapBifunctor (I J : Type*) :
    GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject (I × J) C₃
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
/-- Specialization of `Finset.prod_bij` that automatically fills in most arguments.

See `Fintype.prod_bijective` for the version where `s` and `t` are `univ`. -/
@[to_additive "`Specialization of `Finset.sum_bij` that automatically fills in most arguments.

See `Fintype.sum_bijective` for the version where `s` and `t` are `univ`."]
lemma prod_bijective (e : ι → κ) (he : e.Bijective) (hst : ∀ i, i ∈ s ↔ e i ∈ t)
    (hfg : ∀ i ∈ s, f i = g (e i)) :
    ∏ i ∈ s, f i = ∏ i ∈ t, g i
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp, bv_toNat] theorem toNat_truncate (x : BitVec n) : (truncate i x).toNat = x.toNat % 2^i
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
@[simp, mfld_simps]
theorem modelWithCornersSelf_coe : (𝓘(𝕜, E) : E → E) = id
-- Mathlib/FieldTheory/Extension.lean
theorem nonempty_algHom_of_adjoin_splits : Nonempty (E →ₐ[F] K)
-- Mathlib/Data/PNat/Basic.lean
@[simp]
theorem natPred_inj {m n : ℕ+} : m.natPred = n.natPred ↔ m = n
-- Mathlib/Analysis/Normed/Operator/Banach.lean
/-- The **closed graph theorem** : a linear map between two Banach spaces whose graph is closed
is continuous. -/
theorem LinearMap.continuous_of_isClosed_graph (hg : IsClosed (g.graph : Set <| E × F)) :
    Continuous g
-- Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
lemma measurableSet_succ_countablePartition (n : ℕ) {s : Set α} (hs : s ∈ countablePartition α n) :
    MeasurableSet[generateFrom (countablePartition α (n + 1))] s
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
@[simp]
lemma equicontinuousOn_empty [IsEmpty ι] (F : ι → X → α) (S : Set X) :
    EquicontinuousOn F S
-- Mathlib/GroupTheory/Torsion.lean
/-- The `p`-primary component is the subgroup of elements with order prime-power of `p`. -/
@[to_additive (attr := simps!)
      "The `p`-primary component is the subgroup of elements with additive order
      prime-power of `p`."]
def primaryComponent : Subgroup G
-- Mathlib/CategoryTheory/HomCongr.lean
/-- If `X` is isomorphic to `X₁` and `Y` is isomorphic to `Y₁`, then
there is a natural bijection between `X ⟶ Y` and `X₁ ⟶ Y₁`. See also `Equiv.arrowCongr`. -/
@[simps]
def homCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) : (X ⟶ Y) ≃ (X₁ ⟶ Y₁)
-- Mathlib/Algebra/Ring/CentroidHom.lean
lemma centerToCentroidCenter_apply (z : NonUnitalSubsemiring.center α) (a : α) :
    (centerToCentroidCenter z) a = z * a
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive] lemma eq_iff_eq_of_mul_eq_mul (h : a * b = c * d) : a = c ↔ b = d
-- Mathlib/GroupTheory/GroupAction/Basic.lean
@[to_additive]
theorem orbit_eq_iff {a b : α} : orbit G a = orbit G b ↔ a ∈ orbit G b
-- Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean
theorem trivializationAt_eq_localTriv (x : M) :
    trivializationAt E (TangentSpace I) x =
      (tangentBundleCore I M).toFiberBundleCore.localTriv (achart H x)
-- Mathlib/LinearAlgebra/Projectivization/Basic.lean
theorem finrank_submodule (v : ℙ K V) : finrank K v.submodule = 1
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Basic.lean
@[simp] theorem zero_eta : (⟨0, Nat.zero_lt_succ _⟩ : Fin (n + 1)) = 0
-- Mathlib/Data/List/Indexes.lean
theorem findIdx_lt_length {p : α → Bool} {xs : List α} :
    xs.findIdx p < xs.length ↔ ∃ x ∈ xs, p x
-- Mathlib/Data/Fintype/Fin.lean
theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio n
-- Mathlib/Algebra/Pointwise/Stabilizer.lean
@[to_additive]
lemma mem_stabilizer_finset_iff_smul_finset_subset {s : Finset α} :
    a ∈ stabilizer G s ↔ a • s ⊆ s
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
theorem mkRat_mul_right {a : Nat} (a0 : a ≠ 0) : mkRat (n * a) (d * a) = mkRat n d
-- Mathlib/Algebra/Group/Int.lean
@[simp] lemma emod_two_ne_one : ¬n % 2 = 1 ↔ n % 2 = 0
-- Mathlib/Order/Filter/Basic.lean
protected theorem ext' {f₁ f₂ : Filter α}
    (h : ∀ p : α → Prop, (∀ᶠ x in f₁, p x) ↔ ∀ᶠ x in f₂, p x) : f₁ = f₂
-- Mathlib/LinearAlgebra/LinearDisjoint.lean
/-- If for any finitely generated submodules `M'` and `N'` of `M` and `N`, respectively,
`M'` and `N'` are linearly disjoint, then `M` and `N` themselves are linearly disjoint. -/
theorem of_linearDisjoint_fg
    (H : ∀ (M' N' : Submodule R S), M' ≤ M → N' ≤ N → M'.FG → N'.FG → M'.LinearDisjoint N') :
    M.LinearDisjoint N
-- Mathlib/Data/Nat/Choose/Sum.lean
/-- The sum along the antidiagonal of `(n+1).choose i * f i j` can be split into two sums along the
antidiagonal at rank `n`, respectively of `n.choose i * f i (j+1)` and `n.choose j * f (i+1) j`. -/
theorem sum_antidiagonal_choose_succ_mul (f : ℕ → ℕ → R) (n : ℕ) :
    (∑ ij ∈ antidiagonal (n + 1), ((n + 1).choose ij.1 : R) * f ij.1 ij.2) =
      (∑ ij ∈ antidiagonal n, (n.choose ij.1 : R) * f ij.1 (ij.2 + 1)) +
        ∑ ij ∈ antidiagonal n, (n.choose ij.2 : R) * f (ij.1 + 1) ij.2
-- Mathlib/GroupTheory/Perm/Fin.lean
theorem finRotate_succ_eq_decomposeFin {n : ℕ} :
    finRotate n.succ = decomposeFin.symm (1, finRotate n)
-- Mathlib/Data/Real/ConjExponents.lean
theorem mul_eq_add : p * q = p + q
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem integral_eq_integral (f : α →₁ₛ[μ] E) : integral f = (toSimpleFunc f).integral μ
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
@[reassoc (attr := simp)]
theorem biproduct.fromSubtype_toSubtype :
    biproduct.fromSubtype f p ≫ biproduct.toSubtype f p = 𝟙 (⨁ Subtype.restrict p f)
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem coe_addEquiv_trans (e₁ : R ≃+* S) (e₂ : S ≃+* S') :
    (e₁.trans e₂ : R ≃+ S') = (e₁ : R ≃+ S).trans ↑e₂
-- Mathlib/Data/Nat/Cast/Order/Basic.lean
@[simp, norm_cast]
theorem cast_le_one : (n : α) ≤ 1 ↔ n ≤ 1
-- Mathlib/Data/Nat/ModEq.lean
/-- Cancel left multiplication in the modulus.

For cancelling left multiplication on both sides of the `≡`, see `nat.modeq.mul_left_cancel'`. -/
lemma of_mul_left (m : ℕ) (h : a ≡ b [MOD m * n]) : a ≡ b [MOD n]
-- Mathlib/MeasureTheory/Group/Prod.lean
/-- Any two nonzero left-invariant measures are absolutely continuous w.r.t. each other. -/
@[to_additive
" Any two nonzero left-invariant measures are absolutely continuous w.r.t. each other. "]
theorem absolutelyContinuous_of_isMulLeftInvariant [IsMulLeftInvariant ν] (hν : ν ≠ 0) : μ ≪ ν
-- .lake/packages/lean4/src/lean/Init/Data/UInt/Lemmas.lean
declare_uint_theorems UInt8
-- Mathlib/RepresentationTheory/Action/Basic.lean
/-- (implementation) The forgetful functor from bundled actions to the underlying objects.

Use the `CategoryTheory.forget` API provided by the `ConcreteCategory` instance below,
rather than using this directly.
-/
@[simps]
def forget : Action V G ⥤ V
-- Mathlib/Analysis/Convex/Star.lean
/-- The preimage of a star-convex set under an affine map is star-convex. -/
theorem StarConvex.affine_preimage (f : E →ᵃ[𝕜] F) {s : Set F} (hs : StarConvex 𝕜 (f x) s) :
    StarConvex 𝕜 x (f ⁻¹' s)
-- Mathlib/Geometry/Manifold/IntegralCurve.lean
lemma isIntegralCurve_comp_mul_ne_zero {a : ℝ} (ha : a ≠ 0) :
    IsIntegralCurve γ v ↔ IsIntegralCurve (γ ∘ (· * a)) (a • v)
-- Mathlib/CategoryTheory/Preadditive/ProjectiveResolution.lean
lemma exact_succ (n : ℕ) :
    (ShortComplex.mk _ _ (P.complex.d_comp_d (n + 2) (n + 1) n)).Exact
-- Mathlib/Data/Finset/Basic.lean
theorem ssubset_cons (h : a ∉ s) : s ⊂ s.cons a h
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem ofNat_le_card {o} {n : ℕ} [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : Cardinal)) ≤ card o ↔ (OfNat.ofNat n : Ordinal) ≤ o
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem MulPosReflectLT.toMulPosMono [MulPosReflectLT α] : MulPosMono α
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem mem_of_find?_eq_some : ∀ {l}, find? p l = some a → a ∈ l
-- Mathlib/CategoryTheory/FintypeCat.lean
@[simp]
theorem incl_mk_nat_card (n : ℕ) : Fintype.card (incl.obj (mk n)) = n
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive (attr := ext)]
theorem OneHom.ext [One M] [One N] ⦃f g : OneHom M N⦄ (h : ∀ x, f x = g x) : f = g
-- Mathlib/Data/Fin/Basic.lean
@[simp] lemma castLE_rfl (n : ℕ) : Fin.castLE (le_refl n) = id
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma equation_of_equiv {P Q : Fin 3 → R} (h : P ≈ Q) : W'.Equation P ↔ W'.Equation Q
-- Mathlib/Algebra/Order/Field/Unbundled/Basic.lean
lemma div_nonpos_of_nonneg_of_nonpos [PosMulMono α] (ha : 0 ≤ a) (hb : b ≤ 0) : a / b ≤ 0
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
@[reassoc (attr := simp)]
theorem app_invApp (U : Opens Y) :
    f.c.app (op U) ≫ H.invApp ((Opens.map f.base).obj U) =
      Y.presheaf.map
        ((homOfLE (Set.image_preimage_subset f.base U.1)).op :
          op U ⟶ op (opensFunctor f |>.obj ((Opens.map f.base).obj U)))
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
theorem generated_le_generatedNormal : generated X ≤ generatedNormal X
-- Mathlib/CategoryTheory/Square.lean
/-- The composition of morphisms of squares. -/
@[simps]
def comp {sq₁ sq₂ sq₃ : Square C} (f : Hom sq₁ sq₂) (g : Hom sq₂ sq₃) : Hom sq₁ sq₃
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem monic_map_iff [Semiring S] [Nontrivial S] {f : R →+* S} {p : R[X]} :
    (p.map f).Monic ↔ p.Monic
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- An inner product with a sum on the left, `Finsupp` version. -/
theorem Finsupp.sum_inner {ι : Type*} (l : ι →₀ 𝕜) (v : ι → E) (x : E) :
    ⟪l.sum fun (i : ι) (a : 𝕜) => a • v i, x⟫ = l.sum fun (i : ι) (a : 𝕜) => conj a • ⟪v i, x⟫
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem HasFiniteIntegral.min_zero {f : α → ℝ} (hf : HasFiniteIntegral f μ) :
    HasFiniteIntegral (fun a => min (f a) 0) μ
-- Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean
lemma integrable_llr_tilted_left [IsFiniteMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hf : Integrable f μ) (h_int : Integrable (llr μ ν) μ)
    (hfμ : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :
    Integrable (llr (μ.tilted f) ν) μ
-- Mathlib/Data/List/Range.lean
@[simp]
theorem nthLe_range' {n m step} (i) (H : i < (range' n m step).length) :
    nthLe (range' n m step) i H = n + step * i
-- Mathlib/Data/Finset/NoncommProd.lean
@[to_additive (attr := simp)]
theorem noncommProd_empty (f : α → β) (h) : noncommProd (∅ : Finset α) f h = 1
-- Mathlib/Topology/Algebra/Polynomial.lean
/-- The coefficients of the monic polynomials of bounded degree with bounded roots are
uniformly bounded. -/
theorem coeff_bdd_of_roots_le {B : ℝ} {d : ℕ} (f : F →+* K) {p : F[X]} (h1 : p.Monic)
    (h2 : Splits f p) (h3 : p.natDegree ≤ d) (h4 : ∀ z ∈ (map f p).roots, ‖z‖ ≤ B) (i : ℕ) :
    ‖(map f p).coeff i‖ ≤ max B 1 ^ d * d.choose (d / 2)
-- Mathlib/Logic/Equiv/Option.lean
@[simp] lemma optionSubtypeNe_some (a : α) (b) : optionSubtypeNe a (some b) = b
-- Mathlib/Order/UpperLower/Basic.lean
lemma erase_inf_Ici (ha : a ∈ s) (has : ∀ b ∈ s, b ≤ a → b = a) : s.erase a ⊓ Ici a = s
-- Mathlib/Topology/Order/DenselyOrdered.lean
/-- Let `s` be a dense set in a nontrivial dense linear order `α`. If `s` is a
separable space (e.g., if `α` has a second countable topology), then there exists a countable
dense subset `t ⊆ s` such that `t` does not contain bottom/top elements of `α`. -/
theorem Dense.exists_countable_dense_subset_no_bot_top [Nontrivial α] {s : Set α} [SeparableSpace s]
    (hs : Dense s) :
    ∃ t, t ⊆ s ∧ t.Countable ∧ Dense t ∧ (∀ x, IsBot x → x ∉ t) ∧ ∀ x, IsTop x → x ∉ t
-- Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
@[to_additive]
theorem zero_mul {f : ℕ → M} (h : HasProd (fun n ↦ f (n + 1)) m) :
    HasProd f (f 0 * m)
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
/-- Product of a list of elements in a submonoid is in the submonoid. -/
@[to_additive "Sum of a list of elements in an `AddSubmonoid` is in the `AddSubmonoid`."]
theorem list_prod_mem {l : List M} (hl : ∀ x ∈ l, x ∈ s) : l.prod ∈ s
-- Mathlib/Order/Disjoint.lean
@[simp, norm_cast]
theorem coe_bot : ((⊥ : Complementeds α) : α) = ⊥
-- Mathlib/Order/Monotone/Basic.lean
protected theorem strictMono [Subsingleton α] (f : α → β) : StrictMono f
-- Mathlib/FieldTheory/RatFunc/Basic.lean
/-- Multiplication of rational functions. -/
protected irreducible_def mul : RatFunc K → RatFunc K → RatFunc K
-- Mathlib/Order/GameAdd.lean
/-- The `Sym2.GameAdd` relation on well-founded inputs is well-founded. -/
theorem WellFounded.sym2_gameAdd (h : WellFounded rα) : WellFounded (Sym2.GameAdd rα)
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem setOf_subset_setOf {p q : α → Prop} : { a | p a } ⊆ { a | q a } ↔ ∀ a, p a → q a
-- Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
/-- The values of an additive character on a ring of positive characteristic are roots of unity. -/
lemma val_mem_rootsOfUnity (φ : AddChar R R') (a : R) (h : 0 < ringChar R) :
    (φ.val_isUnit a).unit ∈ rootsOfUnity (ringChar R).toPNat' R'
-- Mathlib/CategoryTheory/Comma/Basic.lean
/-- A morphism between two objects in the comma category is a commutative square connecting the
    morphisms coming from the two objects using morphisms in the image of the functors `L` and `R`.
-/
@[ext]
structure CommaMorphism (X Y : Comma L R) where
  left : X.left ⟶ Y.left
  right : X.right ⟶ Y.right
  w : L.map left ≫ Y.hom = X.hom ≫ R.map right := by aesop_cat
-- Mathlib/Topology/Algebra/ContinuousMonoidHom.lean
@[to_additive]
theorem continuous_of_continuous_uncurry {A : Type*} [TopologicalSpace A]
    (f : A → ContinuousMonoidHom B C) (h : Continuous (Function.uncurry fun x y => f x y)) :
    Continuous f
-- Mathlib/Algebra/Homology/HomologicalBicomplex.lean
@[simp]
lemma flip_flip (K : HomologicalComplex₂ C c₁ c₂) : K.flip.flip = K
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem Ici_sup [SemilatticeSup α] (a b : α) : Ici (a ⊔ b) = Ici a ⊔ Ici b
-- Mathlib/Order/Filter/Bases.lean
theorem mem_filter_of_mem (B : FilterBasis α) {U : Set α} : U ∈ B → U ∈ B.filter
-- Mathlib/Order/Bounds/Basic.lean
theorem mem_upperBounds : a ∈ upperBounds s ↔ ∀ x ∈ s, x ≤ a
-- Mathlib/RingTheory/TensorProduct/Basic.lean
@[simp]
theorem productMap_right : (productMap f g).comp includeRight = g
-- Mathlib/Order/Cover.lean
/-- In a dense order, nothing covers anything. -/
theorem not_covBy [DenselyOrdered α] : ¬a ⋖ b
-- Mathlib/Order/Antichain.lean
theorem mono_on (hs : IsAntichain r₁ s) (h : s.Pairwise fun ⦃a b⦄ => r₂ a b → r₁ a b) :
    IsAntichain r₂ s