ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Shift/SingleFunctors.lean
/-- The morphisms in the category `SingleFunctors C D A` -/
@[ext]
structure Hom where
  /-- a family of natural transformations `F.functor a ⟶ G.functor a` -/
  hom (a : A) : F.functor a ⟶ G.functor a
  comm (n a a' : A) (ha' : n + a = a') : (F.shiftIso n a a' ha').hom ≫ hom a =
    whiskerRight (hom a') (shiftFunctor D n) ≫ (G.shiftIso n a a' ha').hom := by aesop_cat
-- Mathlib/Algebra/Order/Floor.lean
theorem gc_ceil_coe : GaloisConnection ceil ((↑) : ℤ → α)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem sub_ne_zero_of_lt : {a b : Nat} → a < b → b - a ≠ 0
-- Mathlib/Data/Multiset/Lattice.lean
theorem inf_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₂.inf ≤ s₁.inf
-- Mathlib/Probability/Kernel/Disintegration/Density.lean
lemma measurable_density_right (κ : Kernel α (γ × β)) (ν : Kernel α γ)
    {s : Set β} (hs : MeasurableSet s) (a : α) :
    Measurable (fun x ↦ density κ ν a x s)
-- Mathlib/Data/Countable/Defs.lean
theorem uncountable_iff_forall_not_surjective [Nonempty α] :
    Uncountable α ↔ ∀ f : ℕ → α, ¬Surjective f
-- Mathlib/Data/Nat/PrimeFin.lean
lemma Coprime.primeFactors_mul {a b : ℕ} (hab : Coprime a b) :
    (a * b).primeFactors = a.primeFactors ∪ b.primeFactors
-- Mathlib/Algebra/Group/Units.lean
@[to_additive]
protected lemma div_eq_div_iff (hb : IsUnit b) (hd : IsUnit d) :
    a / b = c / d ↔ a * d = c * b
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Perm.erase (a : α) {l₁ l₂ : List α} (p : l₁ ~ l₂) : l₁.erase a ~ l₂.erase a
-- Mathlib/Data/Fintype/Card.lean
theorem card_le_of_injective (f : α → β) (hf : Function.Injective f) : card α ≤ card β
-- Mathlib/Order/Filter/Basic.lean
theorem mem_inf_iff {f g : Filter α} {s : Set α} : s ∈ f ⊓ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, s = t₁ ∩ t₂
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem lie_sub : ⁅x, m - n⁆ = ⁅x, m⁆ - ⁅x, n⁆
-- Mathlib/Algebra/Module/Submodule/Map.lean
theorem map_strictMono_of_injective : StrictMono (map f)
-- Mathlib/Data/Real/EReal.lean
protected lemma neg_mul (x y : EReal) : -x * y = -(x * y)
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Icc_ofDual (a b : αᵒᵈ) : Icc (ofDual a) (ofDual b) = (Icc b a).map ofDual.toEmbedding
-- Mathlib/Topology/AlexandrovDiscrete.lean
lemma isOpen_sInter : (∀ s ∈ S, IsOpen s) → IsOpen (⋂₀ S)
-- Mathlib/Algebra/Polynomial/Mirror.lean
theorem mirror_X : X.mirror = (X : R[X])
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
theorem mk_eq_divInt (num den nz c) : ⟨num, den, nz, c⟩ = num /. (den : Nat)
-- Mathlib/Algebra/GroupWithZero/Basic.lean
theorem eq_of_zero_eq_one (h : (0 : M₀) = 1) (a b : M₀) : a = b
-- Mathlib/Analysis/ODE/Gronwall.lean
theorem gronwallBound_x0 (δ K ε : ℝ) : gronwallBound δ K ε 0 = δ
-- Mathlib/Topology/Algebra/GroupWithZero.lean
nonrec theorem ContinuousWithinAt.inv₀ (hf : ContinuousWithinAt f s a) (ha : f a ≠ 0) :
    ContinuousWithinAt (fun x => (f x)⁻¹) s a
-- Mathlib/Topology/MetricSpace/GromovHausdorffRealized.lean
private theorem candidates_dist_inr (fA : f ∈ candidates X Y) (x y : Y) :
    f (inr x, inr y) = dist x y
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
/-- The product of the composition of functions `f` and `g`, is the product over `b ∈ s.image g` of
`f b` to the power of the cardinality of the fibre of `b`. See also `Finset.prod_image`. -/
@[to_additive "The sum of the composition of functions `f` and `g`, is the sum over `b ∈ s.image g`
of `f b` times of the cardinality of the fibre of `b`. See also `Finset.sum_image`."]
theorem prod_comp [DecidableEq γ] (f : γ → β) (g : α → γ) :
    ∏ a ∈ s, f (g a) = ∏ b ∈ s.image g, f b ^ (s.filter fun a => g a = b).card
-- Mathlib/Data/Fin/Basic.lean
@[simp] lemma _root_.finCongr_apply_mk (h : m = n) (k : ℕ) (hk : k < m) :
    finCongr h ⟨k, hk⟩ = ⟨k, h ▸ hk⟩
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem subperm_append_right {l₁ l₂ : List α} (l) : l₁ ++ l <+~ l₂ ++ l ↔ l₁ <+~ l₂
-- Mathlib/Algebra/Lie/IdealOperations.lean
theorem comap_bracket_eq (hf₁ : f.ker = ⊥) (hf₂ : N₂ ≤ f.range) :
    comap f ⁅I, N₂⁆ = ⁅I, comap f N₂⁆
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive]
theorem toMonoidHom_injective : Injective (toMonoidHom : M ≃* N → M →* N)
-- .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
@[simp] theorem inr_getRight : ∀ (x : α ⊕ β) (h : x.isRight), inr (x.getRight h) = x
-- Mathlib/Logic/Equiv/Fin.lean
@[simp] theorem finRotate_succ_apply (i : Fin (n + 1)) : finRotate (n + 1) i = i + 1
-- Mathlib/Topology/DiscreteQuotient.lean
theorem map_comp (h1 : LEComap g B C) (h2 : LEComap f A B) :
    map (g.comp f) (h1.comp h2) = map g h1 ∘ map f h2
-- Mathlib/Topology/LocallyConstant/Basic.lean
protected theorem congr_fun {f g : LocallyConstant X Y} (h : f = g) (x : X) : f x = g x
-- Mathlib/Data/Set/Basic.lean
theorem nonempty_of_ssubset (ht : s ⊂ t) : (t \ s).Nonempty
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem ae_eq_trim_of_stronglyMeasurable [TopologicalSpace γ] [MetrizableSpace γ] (hm : m ≤ m0)
    {f g : β → γ} (hf : StronglyMeasurable[m] f) (hg : StronglyMeasurable[m] g)
    (hfg : f =ᵐ[μ] g) : f =ᵐ[μ.trim hm] g
-- Mathlib/Order/Iterate.lean
theorem antitone_iterate_of_le_id (h : f ≤ id) : Antitone fun m => f^[m]
-- Mathlib/Topology/Order/DenselyOrdered.lean
theorem comap_coe_nhdsWithin_Iio_of_Ioo_subset (hb : s ⊆ Iio b)
    (hs : s.Nonempty → ∃ a < b, Ioo a b ⊆ s) : comap ((↑) : s → α) (𝓝[<] b) = atTop
-- Mathlib/Data/Fin/Tuple/Basic.lean
@[simp]
theorem insertNth_apply_succAbove (i : Fin (n + 1)) (x : α i) (p : ∀ j, α (i.succAbove j))
    (j : Fin n) : insertNth i x p (i.succAbove j) = p j
-- Mathlib/Order/Heyting/Basic.lean
/-- `p → q → r ↔ p ∧ q → r` -/
@[simp]
theorem le_himp_iff : a ≤ b ⇨ c ↔ a ⊓ b ≤ c
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem X_pow_add_C_ne_zero {n : ℕ} (hn : 0 < n) (a : R) : (X : R[X]) ^ n + C a ≠ 0
-- Mathlib/Order/Filter/Lift.lean
@[simp]
theorem lift_principal2 {f : Filter α} : f.lift 𝓟 = f
-- Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean
@[nontriviality]
theorem isConformalMap_of_subsingleton [Subsingleton M] (f' : M →L[R] N) : IsConformalMap f'
-- .lake/packages/lean4/src/lean/Init/Data/Option/Lemmas.lean
theorem join_join {x : Option (Option (Option α))} : x.join.join = (x.map join).join
-- Mathlib/NumberTheory/PythagoreanTriples.lean
theorem sq_ne_two_fin_zmod_four (z : ZMod 4) : z * z ≠ 2
-- Mathlib/Data/NNReal/Basic.lean
theorem le_toNNReal_iff_coe_le' {r : ℝ≥0} {p : ℝ} (hr : 0 < r) : r ≤ Real.toNNReal p ↔ ↑r ≤ p
-- Mathlib/Analysis/InnerProductSpace/LinearPMap.lean
theorem adjointAux_inner (y : T.adjointDomain) (x : T.domain) :
    ⟪adjointAux hT y, x⟫ = ⟪(y : F), T x⟫
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
lemma IsCycle.three_le_length {v : V} {p : G.Walk v v} (hp : p.IsCycle) : 3 ≤ p.length
-- Mathlib/Tactic/Abel.lean
theorem term_eq {α : Type*} [AddCommMonoid α] (n : ℕ) (x a : α) : term n x a = n • x + a
-- Mathlib/CategoryTheory/Bicategory/Free.lean
@[simp]
theorem liftHom_id (a : FreeBicategory B) : liftHom F (𝟙 a) = 𝟙 (F.obj a)
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
theorem tprod_eq_finprod (hf : (mulSupport f).Finite) :
    ∏' b, f b = ∏ᶠ b, f b
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma coe_zero : (↑(0 : Cocycle F G n) : Cochain F G n) = 0
-- Mathlib/Data/Finset/Basic.lean
/-- If all elements of a `Finset` satisfy the predicate `p`, `s.filter p` is `s`. -/
theorem filter_true_of_mem (h : ∀ x ∈ s, p x) : s.filter p = s
-- Mathlib/Topology/MetricSpace/GromovHausdorffRealized.lean
private theorem maxVar_bound : dist x y ≤ maxVar X Y
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
@[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_list_prod (l : List s) : (l.prod : M) = (l.map (↑)).prod
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem toIsometryEquiv_symm : e.toIsometryEquiv.symm = e.symm.toIsometryEquiv
-- Mathlib/Topology/MetricSpace/MetricSeparated.lean
@[simp]
theorem union_right_iff {t'} :
    IsMetricSeparated s (t ∪ t') ↔ IsMetricSeparated s t ∧ IsMetricSeparated s t'
-- Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
theorem lineMap_lt_left_iff_lt (h : 0 < r) : lineMap a b r < a ↔ b < a
-- Mathlib/Topology/Sheaves/SheafCondition/UniqueGluing.lean
/-- In this version of the lemma, the inclusion homs `iUV` can be specified directly by the user,
which can be more convenient in practice.
-/
theorem eq_of_locally_eq' (V : Opens X) (iUV : ∀ i : ι, U i ⟶ V) (hcover : V ≤ iSup U)
    (s t : F.1.obj (op V)) (h : ∀ i, F.1.map (iUV i).op s = F.1.map (iUV i).op t) : s = t
-- Mathlib/FieldTheory/IsSepClosed.lean
theorem isSepClosure_iff [Algebra k K] :
    IsSepClosure k K ↔ IsSepClosed K ∧ Algebra.IsSeparable k K
-- Mathlib/CategoryTheory/MorphismProperty/Composition.lean
/-- A morphism property satisfies `IsStableUnderComposition` if the composition of
two such morphisms still falls in the class. -/
class IsStableUnderComposition (P : MorphismProperty C) : Prop :=
  comp_mem {X Y Z} (f : X ⟶ Y) (g : Y ⟶ Z) : P f → P g → P (f ≫ g)
-- Mathlib/Data/Num/Bitwise.lean
@[simp] lemma land_eq_and (p q : PosNum) : p.land q = p &&& q
-- Mathlib/MeasureTheory/Measure/EverywherePos.lean
/-- The everywhere positive subset of a set is obtained by removing an open set. -/
lemma exists_isOpen_everywherePosSubset_eq_diff (μ : Measure α) (s : Set α) :
    ∃ u, IsOpen u ∧ μ.everywherePosSubset s = s \ u
-- Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
/-- If `Irreducible (cyclotomic p K)` (in particular for `K = ℚ`) and `p` is an odd prime,
then the norm of `zeta p K L - 1` is `p`. -/
theorem norm_zeta_sub_one_of_prime_ne_two [Fact (p : ℕ).Prime]
    [IsCyclotomicExtension {p} K L] (hirr : Irreducible (cyclotomic p K)) (h : p ≠ 2) :
    norm K (zeta p K L - 1) = p
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
@[to_additive (attr := simp)]
lemma nndist_op (x y : α) : nndist (op x) (op y) = nndist x y
-- Mathlib/Data/Real/EReal.lean
/-- For any two extended real numbers `a` and `b`, if both `a` and `b` are greater than `0`,
then their sum is also greater than `0`. -/
theorem add_pos {a b : EReal} (ha : 0 < a) (hb : 0 < b) : 0 < a + b
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem norm_le_norm_of_ae_le {f : Lp E p μ} {g : Lp F p μ} (h : ∀ᵐ x ∂μ, ‖f x‖ ≤ ‖g x‖) :
    ‖f‖ ≤ ‖g‖
-- Mathlib/Analysis/Convex/Cone/Basic.lean
@[aesop safe apply (rule_sets := [SetLike])]
theorem smul_mem {c : 𝕜} {x : E} (hc : 0 < c) (hx : x ∈ S) : c • x ∈ S
-- Mathlib/Data/Set/Pointwise/Finite.lean
@[to_additive]
theorem card_pow_eq_card_pow_card_univ [∀ k : ℕ, DecidablePred (· ∈ S ^ k)] :
    ∀ k, Fintype.card G ≤ k → Fintype.card (↥(S ^ k)) = Fintype.card (↥(S ^ Fintype.card G))
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive (attr := simp)]
theorem Step.cons_not {x b} : Red.Step ((x, b) :: (x, !b) :: L) L
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem inv_smul_integral_comp_div_sub (c d) :
    (c⁻¹ • ∫ x in a..b, f (x / c - d)) = ∫ x in a / c - d..b / c - d, f x
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive one_add_zsmul]
lemma zpow_one_add (a : G) (n : ℤ) : a ^ (1 + n) = a * a ^ n
-- Mathlib/Topology/LocallyClosed.lean
lemma Embedding.isLocallyClosed_iff {s : Set X}
    {f : X → Y} (hf : Embedding f) :
    IsLocallyClosed s ↔ ∃ s' : Set Y, IsLocallyClosed s' ∧ s' ∩ range f = f '' s
-- Mathlib/ModelTheory/Basic.lean
theorem coe_injective : @Function.Injective (M ↪[L] N) (M → N) (↑)
-- Mathlib/MeasureTheory/Integral/Periodic.lean
/-- If `f` is an integrable periodic function with period `T`, then its integral over `[t, s + T]`
is the sum of its integrals over the intervals `[t, s]` and `[t, t + T]`. -/
theorem intervalIntegral_add_eq_add (hf : Periodic f T) (t s : ℝ)
    (h_int : ∀ t₁ t₂, IntervalIntegrable f MeasureSpace.volume t₁ t₂) :
    ∫ x in t..s + T, f x = (∫ x in t..s, f x) + ∫ x in t..t + T, f x
-- Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean
theorem evenToNeg_comp_evenToNeg (Q' : QuadraticForm R M) (h : Q' = -Q) (h' : Q = -Q') :
    (evenToNeg Q' Q h').comp (evenToNeg Q Q' h) = AlgHom.id R _
-- Mathlib/FieldTheory/SeparableClosure.lean
@[simp]
theorem finInsepDegree_bot' :
    finInsepDegree F (⊥ : IntermediateField E K) = finInsepDegree F E
-- Mathlib/Data/Complex/Exponential.lean
@[simp, norm_cast]
theorem ofReal_cot (x : ℝ) : (Real.cot x : ℂ) = cot x
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem coe_copy (f : TopHom α β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
theorem ContinuousLinearMap.contMDiff (L : E →L[𝕜] F) : ContMDiff 𝓘(𝕜, E) 𝓘(𝕜, F) n L
-- Mathlib/Algebra/Pointwise/Stabilizer.lean
@[to_additive (attr := simp)]
lemma stabilizer_finset_empty : stabilizer G (∅ : Finset α) = ⊤
-- Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean
theorem fg_adjoin_of_finite {s : Set A} (hfs : s.Finite) (his : ∀ x ∈ s, IsIntegral R x) :
    (Algebra.adjoin R s).toSubmodule.FG
-- Mathlib/Algebra/Lie/Abelian.lean
@[simp]
theorem ideal_oper_maxTrivSubmodule_eq_bot (I : LieIdeal R L) :
    ⁅I, maxTrivSubmodule R L M⁆ = ⊥
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
@[mono]
theorem generateFrom_mono {s t : Set (Set α)} (h : s ⊆ t) : generateFrom s ≤ generateFrom t
-- Mathlib/NumberTheory/MulChar/Basic.lean
/-- Composition with a ring homomorphism preserves the property of being a quadratic character. -/
theorem IsQuadratic.comp {χ : MulChar R R'} (hχ : χ.IsQuadratic) (f : R' →+* R'') :
    (χ.ringHomComp f).IsQuadratic
-- Mathlib/Logic/Basic.lean
theorem eq_or_ne {α : Sort*} (x y : α) : x = y ∨ x ≠ y
-- Mathlib/Topology/UniformSpace/AbstractCompletion.lean
theorem continuous_extend : Continuous (pkg.extend f)
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
lemma eventually_one_sub_smoothingFn_r_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < 1 - ε (r i n)
-- Mathlib/Order/Partition/Finpartition.lean
/-- A `Finpartition` constructor from a bigger existing finpartition. -/
@[simps]
def ofSubset {a b : α} (P : Finpartition a) {parts : Finset α} (subset : parts ⊆ P.parts)
    (sup_parts : parts.sup id = b) : Finpartition b
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
/-- Shiftleft on successor with multiple moved to outside. -/
theorem shiftLeft_succ : ∀(m n), m <<< (n + 1) = 2 * (m <<< n)
-- Mathlib/Topology/Order/Lattice.lean
lemma ContinuousWithinAt.finset_inf_apply
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) :
    ContinuousWithinAt (fun a ↦ s.inf (f · a)) t x
-- Mathlib/Data/Int/Cast/Lemmas.lean
lemma intCast_mul_self : Commute ((n : α) * a) a
-- Mathlib/Data/Set/Image.lean
theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
    ((↑) : s → α) ⁻¹' t = ((↑) : s → α) ⁻¹' u ↔ s ∩ t = s ∩ u
-- Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean
lemma eval_polynomialY (P : Fin 3 → R) :
    eval P W.polynomialY = 2 * P y * P z + W.a₁ * P x * P z + W.a₃ * P z ^ 2
-- Mathlib/Topology/Order/Hom/Basic.lean
@[simp]
theorem id_apply (a : α) : ContinuousOrderHom.id α a = a
-- Mathlib/Data/Matrix/Kronecker.lean
@[simp]
theorem kroneckerMap_zero_left [Zero α] [Zero γ] (f : α → β → γ) (hf : ∀ b, f 0 b = 0)
    (B : Matrix n p β) : kroneckerMap f (0 : Matrix l m α) B = 0
-- Mathlib/Data/PNat/Xgcd.lean
theorem finish_isSpecial (hs : u.IsSpecial) : u.finish.IsSpecial
-- Mathlib/Algebra/Order/Archimedean.lean
theorem le_iff_forall_rat_lt_imp_le : x ≤ y ↔ ∀ q : ℚ, (q : α) < x → (q : α) ≤ y
-- Mathlib/Analysis/Convex/Strong.lean
lemma UniformConvexOn.strictConvexOn (hf : UniformConvexOn s φ f) (hφ : ∀ r, r ≠ 0 → 0 < φ r) :
    StrictConvexOn ℝ s f
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive (attr := simp)]
theorem comap_id (S : Subsemigroup P) : S.comap (MulHom.id _) = S
-- Mathlib/Order/Ideal.lean
theorem mem_compl_of_ge {x y : P} : x ≤ y → x ∈ (I : Set P)ᶜ → y ∈ (I : Set P)ᶜ
-- Mathlib/CategoryTheory/Adjunction/Basic.lean
/-- Construct a left adjoint functor to `G`, given the functor's value on objects `F_obj` and
a bijection `e` between `F_obj X ⟶ Y` and `X ⟶ G.obj Y` satisfying a naturality law
`he : ∀ X Y Y' g h, e X Y' (h ≫ g) = e X Y h ≫ G.map g`.
Dual to `rightAdjointOfEquiv`. -/
@[simps!]
def leftAdjointOfEquiv (he : ∀ X Y Y' g h, e X Y' (h ≫ g) = e X Y h ≫ G.map g) : C ⥤ D
-- Mathlib/LinearAlgebra/Matrix/Trace.lean
theorem trace_fin_two (A : Matrix (Fin 2) (Fin 2) R) : trace A = A 0 0 + A 1 1
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem rescale_one : rescale 1 = RingHom.id R⟦X⟧
-- Mathlib/GroupTheory/Exponent.lean
@[to_additive]
theorem Subgroup.pow_exponent_eq_one {H : Subgroup G} {g : G} (g_in_H : g ∈ H) :
    g ^ Monoid.exponent H = 1
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
@[simp]
theorem cof_univ : cof univ.{u, v} = Cardinal.univ.{u, v}
-- Mathlib/Init/Logic.lean
theorem iff_true_iff : (a ↔ True) ↔ a
-- Mathlib/Algebra/Module/Basic.lean
lemma support_smul [Zero R] [Zero M] [SMulWithZero R M] [NoZeroSMulDivisors R M] (f : α → R)
    (g : α → M) : support (f • g) = support f ∩ support g
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
lemma polyCharpoly_coeff_isHomogeneous (i j : ℕ) (hij : i + j = finrank R M) [Nontrivial R] :
    ((polyCharpoly φ b).coeff i).IsHomogeneous j
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
theorem LinearIndependent.sum_elim_of_quotient
    {M' : Submodule R M} {ι₁ ι₂} {f : ι₁ → M'} (hf : LinearIndependent R f) (g : ι₂ → M)
    (hg : LinearIndependent R (Submodule.Quotient.mk (p := M') ∘ g)) :
      LinearIndependent R (Sum.elim (f · : ι₁ → M) g)
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem exists_eq_pow_of_mul_eq_pow [GCDMonoid α] [Unique αˣ] {a b c : α} (hab : IsUnit (gcd a b))
    {k : ℕ} (h : a * b = c ^ k) : ∃ d : α, a = d ^ k
-- Mathlib/LinearAlgebra/Projection.lean
@[simp]
theorem prodEquivOfIsCompl_symm_apply_fst_eq_zero (h : IsCompl p q) {x : E} :
    ((prodEquivOfIsCompl p q h).symm x).1 = 0 ↔ x ∈ q
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
@[to_additive (attr := simp, norm_cast)]
theorem inv_coe_set [InvolutiveInv G] [SetLike S G] [InvMemClass S G] {H : S} : (H : Set G)⁻¹ = H
-- Mathlib/Data/Set/Subsingleton.lean
theorem Subsingleton.anti (ht : t.Subsingleton) (hst : s ⊆ t) : s.Subsingleton
-- Mathlib/Combinatorics/Schnirelmann.lean
lemma le_schnirelmannDensity_iff {x : ℝ} :
    x ≤ schnirelmannDensity A ↔ ∀ n : ℕ, 0 < n → x ≤ ((Ioc 0 n).filter (· ∈ A)).card / n
-- Mathlib/Topology/Instances/ENNReal.lean
/-- A series of non-negative real numbers converges to `r` in the sense of `HasSum` if and only if
the sequence of partial sum converges to `r`. -/
theorem hasSum_iff_tendsto_nat_of_nonneg {f : ℕ → ℝ} (hf : ∀ i, 0 ≤ f i) (r : ℝ) :
    HasSum f r ↔ Tendsto (fun n : ℕ => ∑ i ∈ Finset.range n, f i) atTop (𝓝 r)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem getElem!_of_getElem? [Inhabited α] : ∀ {l : List α} {n : Nat}, l[n]? = some a → l[n]! = a
-- Mathlib/Order/GaloisConnection.lean
theorem isGLB_l {a : α} : IsGLB { b | a ≤ u b } (l a)
-- Mathlib/Algebra/FreeAlgebra.lean
@[simp]
theorem liftAux_eq (f : X → A) : liftAux R f = lift R f
-- Mathlib/CategoryTheory/Limits/Cones.lean
/-- Whisker a cocone by precomposition of a functor. See `whiskering` for a functorial
version.
-/
@[simps]
def whisker (E : K ⥤ J) (c : Cocone F) : Cocone (E ⋙ F)
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive (attr := simp)]
theorem coe_pureMulHom : (pureMulHom : α → Filter α) = pure
-- Mathlib/Topology/Spectral/Hom.lean
@[simp]
theorem coe_comp_continuousMap' (f : SpectralMap β γ) (g : SpectralMap α β) :
    (f.comp g : ContinuousMap α γ) = (f : ContinuousMap β γ).comp g
-- Mathlib/Algebra/Divisibility/Units.lean
theorem isRelPrime_mul_unit_right : IsRelPrime (y * x) (z * x) ↔ IsRelPrime y z
-- Mathlib/Algebra/Group/Submonoid/Units.lean
@[to_additive]
lemma ofUnits_right_inverse :
    Function.RightInverse (ofUnits (M := M)) (Submonoid.units (M := M))
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem one_dotProduct_one : (1 : n → α) ⬝ᵥ 1 = Fintype.card n
-- Mathlib/Data/Finsupp/Basic.lean
/-- A version of `Finsupp.sum_smul_index'` for bundled additive maps. -/
theorem sum_smul_index_addMonoidHom [AddMonoid M] [AddCommMonoid N] [DistribSMul R M] {g : α →₀ M}
    {b : R} {h : α → M →+ N} : ((b • g).sum fun a => h a) = g.sum fun i c => h i (b • c)
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
/-- Being Lipschitz on a set is monotone w.r.t. that set. -/
theorem LipschitzOnWith.mono (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s
-- Mathlib/LinearAlgebra/Basis.lean
theorem repr_support_subset_of_mem_span (s : Set ι) {m : M}
    (hm : m ∈ span R (b '' s)) : ↑(b.repr m).support ⊆ s
-- Mathlib/Data/Fintype/Basic.lean
theorem univ_map_equiv_to_embedding {α β : Type*} [Fintype α] [Fintype β] (e : α ≃ β) :
    univ.map e.toEmbedding = univ
-- Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
theorem embedding_pullback_to_prod {X Y Z : TopCat.{u}} (f : X ⟶ Z) (g : Y ⟶ Z) :
    Embedding <| ⇑(prod.lift (pullback.fst f g) (pullback.snd f g))
-- Mathlib/Algebra/Order/Monoid/Unbundled/MinMax.lean
@[to_additive]
theorem le_or_lt_of_mul_le_mul [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (Function.swap (· * ·)) (· < ·)] {a₁ a₂ b₁ b₂ : α} :
    a₁ * b₁ ≤ a₂ * b₂ → a₁ ≤ a₂ ∨ b₁ < b₂
-- Mathlib/MeasureTheory/Measure/GiryMonad.lean
theorem join_map_join (μ : Measure (Measure (Measure α))) : join (map join μ) = join (join μ)
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem iInter_iInter_eq_right {b : β} {s : ∀ x : β, b = x → Set α} :
    ⋂ (x) (h : b = x), s x h = s b rfl
-- Mathlib/RingTheory/Ideal/Basic.lean
@[simp]
theorem span_singleton_eq_top {x} : span ({x} : Set α) = ⊤ ↔ IsUnit x
-- Mathlib/Algebra/Module/Submodule/Basic.lean
protected theorem add_mem (h₁ : x ∈ p) (h₂ : y ∈ p) : x + y ∈ p
-- Mathlib/Algebra/Group/Defs.lean
/-- An `AddRightCancelSemigroup` is an additive semigroup such that
`a + b = c + b` implies `a = c`. -/
@[ext]
class AddRightCancelSemigroup (G : Type u) extends AddSemigroup G where
  protected add_right_cancel : ∀ a b c : G, a + b = c + b → a = c
-- Mathlib/Order/Bounds/Basic.lean
theorem isLUB_lt_iff (ha : IsLUB s a) : a < b ↔ ∃ c ∈ upperBounds s, c < b
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
@[fun_prop, aesop safe 50 (rule_sets := [Measurable])]
protected theorem Measurable.comp' {_ : MeasurableSpace α} {_ : MeasurableSpace β}
    {_ : MeasurableSpace γ} {g : β → γ} {f : α → β} (hg : Measurable g) (hf : Measurable f) :
    Measurable (fun x => g (f x))
-- Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
theorem exists_frobenius_solution_fractionRing_aux (m n : ℕ) (r' q' : 𝕎 k) (hr' : r'.coeff 0 ≠ 0)
    (hq' : q'.coeff 0 ≠ 0) (hq : (p : 𝕎 k) ^ n * q' ∈ nonZeroDivisors (𝕎 k)) :
    let b : 𝕎 k := frobeniusRotation p hr' hq'
    IsFractionRing.fieldEquivOfRingEquiv (frobeniusEquiv p k)
          (algebraMap (𝕎 k) (FractionRing (𝕎 k)) b) *
        Localization.mk ((p : 𝕎 k) ^ m * r') ⟨(p : 𝕎 k) ^ n * q', hq⟩ =
      (p : Localization (nonZeroDivisors (𝕎 k))) ^ (m - n : ℤ) *
        algebraMap (𝕎 k) (FractionRing (𝕎 k)) b
-- Mathlib/Data/List/Basic.lean
theorem surjective_tail : Surjective (@tail α)
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
theorem fderivWithin_smul (hxs : UniqueDiffWithinAt 𝕜 s x) (hc : DifferentiableWithinAt 𝕜 c s x)
    (hf : DifferentiableWithinAt 𝕜 f s x) :
    fderivWithin 𝕜 (fun y => c y • f y) s x =
      c x • fderivWithin 𝕜 f s x + (fderivWithin 𝕜 c s x).smulRight (f x)
-- Mathlib/Topology/UniformSpace/Pi.lean
lemma Pi.uniformSpace_eq :
    Pi.uniformSpace α = ⨅ i, UniformSpace.comap (eval i) (U i)
-- Mathlib/Data/Set/Basic.lean
theorem Nonempty.eq_zero [Subsingleton α] [Zero α] {s : Set α} (h : s.Nonempty) :
    s = {0}
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem _root_.Dense.exists_dist_lt {s : Set α} (hs : Dense s) (x : α) {ε : ℝ} (hε : 0 < ε) :
    ∃ y ∈ s, dist x y < ε
-- Mathlib/Data/Finset/NatDivisors.lean
/-- The divisors of a product of natural numbers are the pointwise product of the divisors of the
factors. -/
lemma Nat.divisors_mul (m n : ℕ) : divisors (m * n) = divisors m * divisors n
-- Mathlib/GroupTheory/GroupAction/Group.lean
theorem IsUnit.smul_sub_iff_sub_inv_smul [AddGroup β] [DistribMulAction α β] [IsScalarTower α β β]
    [SMulCommClass α β β] (r : α) (a : β) : IsUnit (r • (1 : β) - a) ↔ IsUnit (1 - r⁻¹ • a)