ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Set/Function.lean
theorem StrictMonoOn.comp_strictAntiOn [Preorder α] [Preorder β] [Preorder γ] {g : β → γ}
    {f : α → β} {s : Set α} {t : Set β} (hg : StrictMonoOn g t) (hf : StrictAntiOn f s)
    (hs : Set.MapsTo f s t) : StrictAntiOn (g ∘ f) s
-- Mathlib/RingTheory/Polynomial/ScaleRoots.lean
lemma add_scaleRoots_of_natDegree_eq (p q : R[X]) (r : R) (h : natDegree p = natDegree q) :
    r ^ (natDegree p - natDegree (p + q)) • (p + q).scaleRoots r =
      p.scaleRoots r + q.scaleRoots r
-- Mathlib/Algebra/Lie/IdealOperations.lean
theorem le_comap_map : N ≤ comap f (map f N)
-- Mathlib/GroupTheory/GroupAction/Hom.lean
protected theorem map_one (f : R →ₑ+*[φ] S) : f 1 = 1
-- Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean
theorem SuperpolynomialDecay.mul_param (hf : SuperpolynomialDecay l k f) :
    SuperpolynomialDecay l k (f * k)
-- Mathlib/NumberTheory/LSeries/Linearity.lean
lemma LSeries.term_neg_apply (f : ℕ → ℂ) (s : ℂ) (n : ℕ) : term (-f) s n = -term f s n
-- Mathlib/Data/PNat/Xgcd.lean
theorem reduce_b {u : XgcdType} (h : u.r ≠ 0) : u.reduce = u.step.reduce.flip
-- Mathlib/Data/Finset/Basic.lean
theorem disjUnion_singleton (s : Finset α) (a : α) (h : Disjoint s {a}) :
    disjUnion s {a} h = cons a s (disjoint_singleton_right.mp h)
-- Mathlib/Analysis/Normed/Group/Basic.lean
/-- A seminormed group is a group endowed with a norm for which `dist x y = ‖x / y‖`
defines a pseudometric space structure. -/
@[to_additive]
class SeminormedCommGroup (E : Type*) extends Norm E, CommGroup E, PseudoMetricSpace E where
  dist := fun x y => ‖x / y‖
  /-- The distance function is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = ‖x / y‖ := by aesop
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem lcm_assoc' [GCDMonoid α] (m n k : α) : Associated (lcm (lcm m n) k) (lcm m (lcm n k))
-- .lake/packages/batteries/Batteries/Data/LazyList.lean
theorem forall_mem_cons {α} {p : α → Prop} {a : α} {l : Thunk (LazyList α)} :
    (∀ x ∈ @LazyList.cons _ a l, p x) ↔ p a ∧ ∀ x ∈ l.get, p x
-- Mathlib/Data/Set/Equitable.lean
theorem Subsingleton.equitableOn {s : Set α} (hs : s.Subsingleton) (f : α → β) : s.EquitableOn f
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive]
theorem dist_inv (x y : E) : dist x⁻¹ y = dist x y⁻¹
-- Mathlib/Topology/ContinuousFunction/Ideals.lean
@[simp]
theorem idealOfSet_ofIdeal_eq_closure (I : Ideal C(X, 𝕜)) :
    idealOfSet 𝕜 (setOfIdeal I) = I.closure
-- Mathlib/LinearAlgebra/BilinearForm/Basic.lean
@[simp]
theorem zero_apply (x y : M) : (0 : BilinForm R M) x y = 0
-- Mathlib/Analysis/Normed/Module/Span.lean
@[simp]
theorem coord_toSpanNonzeroSingleton {x : E} (h : x ≠ 0) (c : 𝕜) :
    coord 𝕜 x h (toSpanNonzeroSingleton 𝕜 x h c) = c
-- Mathlib/CategoryTheory/Monoidal/Category.lean
@[reassoc (attr := simp)]
theorem whiskerLeft_hom_inv (X : C) {Y Z : C} (f : Y ≅ Z) :
    X ◁ f.hom ≫ X ◁ f.inv = 𝟙 (X ⊗ Y)
-- Mathlib/Data/PFunctor/Univariate/M.lean
theorem agree_iff_agree' {n : ℕ} (x y : M F) :
    Agree (x.approx n) (y.approx <| n + 1) ↔ Agree' n x y
-- Mathlib/Data/Set/Finite.lean
theorem infinite_of_not_bddAbove : ¬BddAbove s → s.Infinite
-- Mathlib/Analysis/BoxIntegral/Partition/Split.lean
@[simp]
theorem iUnion_compl (π : Prepartition I) : π.compl.iUnion = ↑I \ π.iUnion
-- Mathlib/Data/Matrix/Block.lean
@[simp]
theorem blockDiag'_diagonal [DecidableEq o] [∀ i, DecidableEq (m' i)] (d : (Σi, m' i) → α) (k : o) :
    blockDiag' (diagonal d) k = diagonal fun i => d ⟨k, i⟩
-- Mathlib/Topology/MetricSpace/Cauchy.lean
lemma Metric.exists_subseq_bounded_of_cauchySeq (u : ℕ → α) (hu : CauchySeq u) (b : ℕ → ℝ)
    (hb : ∀ n, 0 < b n) :
    ∃ f : ℕ → ℕ, StrictMono f ∧ ∀ n, ∀ m ≥ f n, dist (u m) (u (f n)) < b n
-- Mathlib/Data/Nat/Prime/Defs.lean
@[simp]
theorem minFac_zero : minFac 0 = 2
-- Mathlib/Combinatorics/Colex.lean
lemma geomSum_ofColex_strictMono (hn : 2 ≤ n) : StrictMono fun s ↦ ∑ k ∈ ofColex s, n ^ k
-- Mathlib/Algebra/Category/ModuleCat/Sheaf.lean
lemma unitHomEquiv_comp_apply {M N : SheafOfModules.{u} R}
    (f : unit R ⟶ M) (p : M ⟶ N) :
    N.unitHomEquiv (f ≫ p) = sectionsMap p (M.unitHomEquiv f)
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem modify_of_valid (cs cs' : List Char) :
    modify ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ f = ⟨cs ++ cs'.modifyHead f⟩
-- Mathlib/Topology/Instances/ENNReal.lean
theorem inv_map_iInf {ι : Sort*} {x : ι → ℝ≥0∞} : (iInf x)⁻¹ = ⨆ i, (x i)⁻¹
-- Mathlib/Topology/FiberBundle/Trivialization.lean
@[simp, mfld_simps]
theorem symm_apply_mk_proj {x : Z} (ex : x ∈ e.source) :
    e.toPartialEquiv.symm (proj x, (e x).2) = x
-- Mathlib/Algebra/Homology/HomotopyCategory/Pretriangulated.lean
/-- The morphism `triangleh φ₁ ⟶ triangleh φ₂` that is induced by a square that
is commutative up to homotopy. -/
@[simps]
noncomputable def trianglehMapOfHomotopy :
    triangleh φ₁ ⟶ triangleh φ₂
-- Mathlib/Topology/Homotopy/Basic.lean
theorem coeFn_injective : @Function.Injective (HomotopyWith f₀ f₁ P) (I × X → Y) (⇑)
-- Mathlib/GroupTheory/Perm/Support.lean
@[simp]
theorem disjoint_inv_right_iff : Disjoint f g⁻¹ ↔ Disjoint f g
-- Mathlib/CategoryTheory/ComposableArrows.lean
/-- Constructor for morphisms in `ComposableArrows C 0`. -/
@[simps!]
def homMk₀ {F G : ComposableArrows C 0} (f : F.obj' 0 ⟶ G.obj' 0) : F ⟶ G
-- Mathlib/GroupTheory/Index.lean
@[to_additive]
theorem inf_relindex_left : (H ⊓ K).relindex H = K.relindex H
-- Mathlib/Topology/Order.lean
theorem nhds_induced [T : TopologicalSpace α] (f : β → α) (a : β) :
    @nhds β (TopologicalSpace.induced f T) a = comap f (𝓝 (f a))
-- Mathlib/RepresentationTheory/Action/Basic.lean
/-- The "restriction" functor along a monoid homomorphism `f : G ⟶ H`,
taking actions of `H` to actions of `G`.

(This makes sense for any homomorphism, but the name is natural when `f` is a monomorphism.)
-/
@[simps]
def res {G H : MonCat} (f : G ⟶ H) : Action V H ⥤ Action V G
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
lemma LocallyLipschitzOn.mono (hf : LocallyLipschitzOn t f) (h : s ⊆ t) : LocallyLipschitzOn s f
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive (attr := simp)]
theorem div_lt_self_iff (a : α) {b : α} : a / b < a ↔ 1 < b
-- Mathlib/NumberTheory/LegendreSymbol/Basic.lean
/-- The Legendre symbol of `p` and `a` is zero iff `p ∣ a`. -/
theorem eq_zero_iff (a : ℤ) : legendreSym p a = 0 ↔ (a : ZMod p) = 0
-- Mathlib/Topology/UniformSpace/Equiv.lean
@[simp]
theorem coe_punitProd : ⇑(punitProd α) = Prod.snd
-- Mathlib/Algebra/Polynomial/Expand.lean
theorem expand_contract [CharP R p] [NoZeroDivisors R] {f : R[X]} (hf : Polynomial.derivative f = 0)
    (hp : p ≠ 0) : expand R p (contract p f) = f
-- Mathlib/Analysis/Normed/Field/UnitBall.lean
@[simp, norm_cast]
theorem coe_one_unitSphere [NormedDivisionRing 𝕜] : ((1 : sphere (0 : 𝕜) 1) : 𝕜) = 1
-- Mathlib/MeasureTheory/Measure/Count.lean
@[simp]
theorem count_eq_zero_iff' (s_mble : MeasurableSet s) : count s = 0 ↔ s = ∅
-- Mathlib/Data/List/Enum.lean
theorem snd_mem_of_mem_enumFrom {x : ℕ × α} {n : ℕ} {l : List α} (h : x ∈ enumFrom n l) : x.2 ∈ l
-- Mathlib/Data/Set/Image.lean
@[simp]
theorem preimage_compl {s : Set β} : f ⁻¹' sᶜ = (f ⁻¹' s)ᶜ
-- Mathlib/Data/Seq/Computation.lean
@[simp]
theorem orElse_pure (c₁ : Computation α) (a : α) : (think c₁ <|> pure a) = pure a
-- Mathlib/Order/Interval/Set/OrdConnectedComponent.lean
@[simp]
theorem ordConnectedComponent_univ : ordConnectedComponent univ x = univ
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem lsub_const {ι} [Nonempty ι] (o : Ordinal) : (lsub fun _ : ι => o) = succ o
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
@[simp]
theorem derivFamily_succ (f : ι → Ordinal → Ordinal) (o) :
    derivFamily.{u, v} f (succ o) = nfpFamily.{u, v} f (succ (derivFamily.{u, v} f o))
-- Mathlib/Topology/Sets/Compacts.lean
@[simp]
theorem map_id (K : CompactOpens α) : K.map id continuous_id IsOpenMap.id = K
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive] theorem Units.embedding_val [Group G] [TopologicalSpace G] [ContinuousInv G] :
    Embedding (val : Gˣ → G)
-- Mathlib/Order/Interval/Finset/Defs.lean
@[simp, norm_cast]
theorem coe_Iio (a : α) : (Iio a : Set α) = Set.Iio a
-- Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean
theorem associator_inv (X Y Z : C) :
    (α_ X Y Z).inv =
      prod.lift (prod.lift prod.fst (prod.snd ≫ prod.fst)) (prod.snd ≫ prod.snd)
-- Mathlib/Algebra/Group/Nat.lean
lemma div_two_mul_two_of_even : Even n → n / 2 * 2 = n
-- Mathlib/Algebra/Free.lean
@[to_additive (attr := simp)]
theorem traverse_eq (x) : FreeMagma.traverse F x = traverse F x
-- Mathlib/Topology/Germ.lean
@[simp]
theorem sliceLeft_coe [TopologicalSpace Y] {y : Y} (f : X × Y → Z) :
    (↑f : Germ (𝓝 (x, y)) Z).sliceLeft = fun x' ↦ f (x', y)
-- Mathlib/Data/Finset/Image.lean
theorem image_toFinset [DecidableEq α] {s : Multiset α} :
    s.toFinset.image f = (s.map f).toFinset
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem empty_subset (s : Finset α) : ∅ ⊆ s
-- Mathlib/Data/Multiset/Interval.lean
theorem Icc_eq :
    Finset.Icc s t = (Finset.Icc (toDFinsupp s) (toDFinsupp t)).map
      Multiset.equivDFinsupp.toEquiv.symm.toEmbedding
-- Mathlib/CategoryTheory/Sites/Sieves.lean
@[simp]
theorem singleton_eq_iff_domain (f g : Y ⟶ X) : singleton f g ↔ f = g
-- Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean
@[to_additive nsmul_lt_nsmul_iff_left]
theorem pow_lt_pow_iff_right' (ha : 1 < a) : a ^ m < a ^ n ↔ m < n
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem ae_le_eLpNormEssSup {f : α → F} : ∀ᵐ y ∂μ, ‖f y‖₊ ≤ eLpNormEssSup f μ
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
theorem Finite.toFinset_mul (hs : s.Finite) (ht : t.Finite) (hf := hs.mul ht) :
    hf.toFinset = hs.toFinset * ht.toFinset
-- Mathlib/Data/Bool/Basic.lean
theorem ofNat_le_ofNat {n m : Nat} (h : n ≤ m) : ofNat n ≤ ofNat m
-- Mathlib/LinearAlgebra/Lagrange.lean
theorem eval_nodal_at_node {i : ι} (hi : i ∈ s) : eval (v i) (nodal s v) = 0
-- Mathlib/CategoryTheory/Limits/VanKampen.lean
theorem BinaryCofan.mono_inr_of_isVanKampen [HasInitial C] {X Y : C} {c : BinaryCofan X Y}
    (h : IsVanKampenColimit c) : Mono c.inr
-- Mathlib/LinearAlgebra/Isomorphisms.lean
theorem quotientQuotientEquivQuotientAux_mk_mk (x : M) :
    quotientQuotientEquivQuotientAux S T h (Quotient.mk (Quotient.mk x)) = Quotient.mk x
-- Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
theorem liftPropAt_chart [HasGroupoid M G] (hG : G.LocalInvariantProp G Q) (hQ : ∀ y, Q id univ y) :
    LiftPropAt Q (chartAt (H := H) x) x
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
lemma ofRat_div (x y : β) : ofRat (x / y) = (ofRat x / ofRat y : Cauchy abv)
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive (attr := norm_cast, simp)]
theorem orderOf_submonoid {H : Submonoid G} (y : H) : orderOf (y : G) = orderOf y
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem aleph0_ne_zero : ℵ₀ ≠ 0
-- Mathlib/Algebra/Order/Ring/Basic.lean
@[simp]
theorem map_neg (x : R) : f (-x) = f x
-- Mathlib/FieldTheory/IsPerfectClosure.lean
@[simp]
theorem lift_comp : (lift i j p).comp i = j
-- Mathlib/Topology/DiscreteQuotient.lean
/-- A helper lemma to prove that `finsetClopens X` is injective, see `finsetClopens_inj`. -/
lemma comp_finsetClopens [CompactSpace X] :
    (Set.image (fun (t : Clopens X) ↦ t.carrier) ∘ Finset.toSet) ∘
      finsetClopens X = fun ⟨f, _⟩ ↦ f.classes
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
theorem pointwise_smul_le_iff₀ {a : α} (ha : a ≠ 0) {S T : Subgroup G} : a • S ≤ T ↔ S ≤ a⁻¹ • T
-- Mathlib/Topology/Filter.lean
@[simp]
theorem nhds_pure (x : α) : 𝓝 (pure x : Filter α) = 𝓟 {⊥, pure x}
-- Mathlib/LinearAlgebra/CliffordAlgebra/Grading.lean
theorem evenOdd_isCompl : IsCompl (evenOdd Q 0) (evenOdd Q 1)
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma PosSMulMono.lift [PosSMulMono α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulMono α β
-- Mathlib/LinearAlgebra/Matrix/Block.lean
theorem blockTriangular_blockDiagonal' [DecidableEq α] (d : ∀ i : α, Matrix (m' i) (m' i) R) :
    BlockTriangular (blockDiagonal' d) Sigma.fst
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem length_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
    (p.concat h).length = p.length + 1
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem lie_self : ⁅x, x⁆ = 0
-- Mathlib/Data/PNat/Xgcd.lean
theorem gcd_rel_left : (gcdZ a b * a : ℕ) = gcdX a b * b + gcd a b
-- Mathlib/GroupTheory/FreeGroup/IsFreeGroup.lean
/-- Any free group is isomorphic to "the" free group. -/
@[simps!]
def toFreeGroup : G ≃* FreeGroup (Generators G)
-- Mathlib/Topology/Support.lean
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem LocallyFinite.exists_finset_nhd_mulSupport_subset {U : ι → Set X} [One R] {f : ι → X → R}
    (hlf : LocallyFinite fun i => mulSupport (f i)) (hso : ∀ i, mulTSupport (f i) ⊆ U i)
    (ho : ∀ i, IsOpen (U i)) (x : X) :
    ∃ (is : Finset ι), ∃ n, n ∈ 𝓝 x ∧ (n ⊆ ⋂ i ∈ is, U i) ∧
      ∀ z ∈ n, (mulSupport fun i => f i z) ⊆ is
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem maximum?_cons [Max α] {xs : List α} : (x :: xs).maximum? = foldl max x xs
-- Mathlib/CategoryTheory/Comma/Basic.lean
/-- The functor `Comma L R₁ ⥤ Comma L R₃` induced by the composition of the natural transformations
    `r : R₁ ⟶ R₂` and `r' : R₂ ⟶ R₃` is naturally isomorphic to the composition of the functors
    induced by these natural transformations. -/
@[simps!]
def mapRightComp (r : R₁ ⟶ R₂) (r' : R₂ ⟶ R₃) :
    mapRight L (r ≫ r') ≅ mapRight L r ⋙ mapRight L r'
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem val_add_one {n : Nat} (i : Fin (n + 1)) :
    ((i + 1 : Fin (n + 1)) : Nat) = if i = last _ then (0 : Nat) else i + 1
-- Mathlib/Data/Finset/Sups.lean
theorem infs_subset : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ ⊼ t₁ ⊆ s₂ ⊼ t₂
-- Mathlib/Data/Finset/Basic.lean
theorem mem_range_sub_ne_zero {n x : ℕ} (hx : x ∈ range n) : n - x ≠ 0
-- Mathlib/Order/CompleteLattice.lean
@[simp]
theorem sSup_apply {α : Type*} {β : α → Type*} [∀ i, SupSet (β i)] {s : Set (∀ a, β a)} {a : α} :
    (sSup s) a = ⨆ f : s, (f : ∀ a, β a) a
-- Mathlib/Analysis/Convolution.lean
@[simp]
theorem zero_convolution : 0 ⋆[L, μ] g = 0
-- Mathlib/Combinatorics/SimpleGraph/Density.lean
theorem mul_edgeDensity_le_edgeDensity (hs : s₂ ⊆ s₁) (ht : t₂ ⊆ t₁) (hs₂ : s₂.Nonempty)
    (ht₂ : t₂.Nonempty) :
    (s₂.card : ℚ) / s₁.card * (t₂.card / t₁.card) * edgeDensity r s₂ t₂ ≤ edgeDensity r s₁ t₁
-- Mathlib/FieldTheory/Adjoin.lean
/-- `algEquivOfEq` sends `AdjoinRoot.root p` to `AdjoinRoot.root q`. -/
theorem algEquivOfEq_apply_root {p q : K[X]} (hp : p ≠ 0) (h_eq : p = q) :
    algEquivOfEq hp h_eq (root p) = root q
-- Mathlib/CategoryTheory/Comma/Arrow.lean
theorem iso_w {f g : Arrow T} (e : f ≅ g) : g.hom = e.inv.left ≫ f.hom ≫ e.hom.right
-- Mathlib/CategoryTheory/IsConnected.lean
theorem Zigzag.refl (X : J) : Zigzag X X
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Metric.lean
/-- If a measurable space on `α` is countably generated and separates points, there is some
second countable t4 topology on `α` (i.e. a separable metrizable one) for which every
open set is measurable. -/
theorem exists_opensMeasurableSpace_of_countablySeparated (α : Type*)
    [m : MeasurableSpace α] [CountablySeparated α] :
    ∃ τ : TopologicalSpace α, SecondCountableTopology α ∧ T4Space α ∧ OpensMeasurableSpace α
-- Mathlib/Order/RelIso/Basic.lean
/-- `Sum.map` as a relation embedding between `Sum.Lex` relations. -/
@[simps]
def sumLexMap (f : r ↪r s) (g : t ↪r u) : Sum.Lex r t ↪r Sum.Lex s u
-- Mathlib/Combinatorics/Hall/Finite.lean
/-- Second case of the inductive step: assuming that
`∃ (s : Finset ι), s ≠ univ → s.card = (s.biUnion t).card`
and that the statement of **Hall's Marriage Theorem** is true for all
`ι'` of cardinality ≤ `n`, then it is true for `ι` of cardinality `n + 1`.
-/
theorem hall_hard_inductive_step_B {n : ℕ} (hn : Fintype.card ι = n + 1)
    (ht : ∀ s : Finset ι, s.card ≤ (s.biUnion t).card)
    (ih :
      ∀ {ι' : Type u} [Fintype ι'] (t' : ι' → Finset α),
        Fintype.card ι' ≤ n →
          (∀ s' : Finset ι', s'.card ≤ (s'.biUnion t').card) →
            ∃ f : ι' → α, Function.Injective f ∧ ∀ x, f x ∈ t' x)
    (s : Finset ι) (hs : s.Nonempty) (hns : s ≠ univ) (hus : s.card = (s.biUnion t).card) :
    ∃ f : ι → α, Function.Injective f ∧ ∀ x, f x ∈ t x
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
/-- The `MulHom` from a subsemigroup to its image.
See `MulEquiv.subsemigroupMap` for a variant for `MulEquiv`s. -/
@[to_additive (attr := simps)
      "the `AddHom` from an additive subsemigroup to its image. See
      `AddEquiv.addSubsemigroupMap` for a variant for `AddEquiv`s."]
def subsemigroupMap (f : M →ₙ* N) (M' : Subsemigroup M) :
    M' →ₙ* M'.map f
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma addXYZ_smul (P Q : Fin 3 → R) (u v : R) :
    W'.addXYZ (u • P) (v • Q) = (u * v) ^ 2 • W'.addXYZ P Q
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- Negating both vectors passed to `oangle` does not change the angle. -/
@[simp]
theorem oangle_neg_neg (x y : V) : o.oangle (-x) (-y) = o.oangle x y
-- Mathlib/CategoryTheory/Sites/Discrete.lean
lemma isDiscrete_of_iso {F : Sheaf J A} {X : A}
    (i : F ≅ (constantSheaf J A).obj X) : IsDiscrete J ht F
-- Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean
@[simp]
theorem ι_eq_zero_iff (x : M) : ι R x = 0 ↔ x = 0
-- Mathlib/Algebra/Group/Commute/Defs.lean
@[to_additive]
theorem mul_inv_cancel_assoc (h : Commute a b) : a * (b * a⁻¹) = b
-- Mathlib/Algebra/BigOperators/Finprod.lean
@[to_additive]
theorem single_le_finprod {M : Type*} [OrderedCommMonoid M] (i : α) {f : α → M}
    (hf : (mulSupport f).Finite) (h : ∀ j, 1 ≤ f j) : f i ≤ ∏ᶠ j, f j
-- Mathlib/Data/Nat/Nth.lean
theorem isLeast_nth_of_lt_card {n : ℕ} (hf : (setOf p).Finite) (hn : n < hf.toFinset.card) :
    IsLeast {i | p i ∧ ∀ k < n, nth p k < i} (nth p n)
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
theorem const_congr {f₁ f₂ g₁ g₂ : R} {U hu} (hf : f₁ = f₂) (hg : g₁ = g₂) :
    const R f₁ g₁ U hu = const R f₂ g₂ U (hg ▸ hu)
-- Mathlib/Data/Nat/Digits.lean
lemma nat_repr_len_aux (n b e : Nat) (h_b_pos : 0 < b) :  n < b ^ e.succ → n / b < b ^ e
-- Mathlib/Probability/Independence/ZeroOne.lean
theorem Kernel.measure_eq_zero_or_one_of_indepSet_self [∀ a, IsFiniteMeasure (κ a)] {t : Set Ω}
    (h_indep : IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1
-- Mathlib/Algebra/Quaternion.lean
@[simp] theorem star_re : (star a).re = a.re
-- Mathlib/RingTheory/OreLocalization/Ring.lean
theorem right_distrib (x y z : R[S⁻¹]) : (x + y) * z = x * z + y * z
-- Mathlib/LinearAlgebra/Dual.lean
theorem flip_injective_iff₁ [FiniteDimensional K V₁] : Injective B.flip ↔ Surjective B
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
@[simp]
theorem coe_pointwise_smul (a : α) (S : Subgroup G) : ↑(a • S) = a • (S : Set G)
-- Mathlib/Data/Sym/Sym2.lean
theorem IsDiag.mem_range_diag {z : Sym2 α} : IsDiag z → z ∈ Set.range (@diag α)
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
@[simp]
theorem cokernelZeroIsoTarget_hom :
    cokernelZeroIsoTarget.hom = cokernel.desc (0 : X ⟶ Y) (𝟙 Y) (by simp)
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
theorem fderiv.fst (h : DifferentiableAt 𝕜 f₂ x) :
    fderiv 𝕜 (fun x => (f₂ x).1) x = (fst 𝕜 F G).comp (fderiv 𝕜 f₂ x)
-- Mathlib/Analysis/Calculus/Conformal/NormedSpace.lean
theorem congr {f g : X → Y} {x : X} {u : Set X} (hx : x ∈ u) (hu : IsOpen u) (hf : ConformalAt f x)
    (h : ∀ x : X, x ∈ u → g x = f x) : ConformalAt g x
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem Differentiable.const_mul (ha : Differentiable 𝕜 a) (b : 𝔸) :
    Differentiable 𝕜 fun y => b * a y
-- Mathlib/Logic/Basic.lean
theorem dite_eq_iff : dite P A B = c ↔ (∃ h, A h = c) ∨ ∃ h, B h = c
-- Mathlib/LinearAlgebra/FreeModule/PID.lean
/-- A set of linearly independent vectors in a module `M` over a semiring `S` is also linearly
independent over a subring `R` of `K`. -/
theorem LinearIndependent.restrict_scalars_algebras {R S M ι : Type*} [CommSemiring R] [Semiring S]
    [AddCommMonoid M] [Algebra R S] [Module R M] [Module S M] [IsScalarTower R S M]
    (hinj : Function.Injective (algebraMap R S)) {v : ι → M} (li : LinearIndependent S v) :
    LinearIndependent R v
-- Mathlib/FieldTheory/Adjoin.lean
theorem adjoinRootEquivAdjoin_apply_root (h : IsIntegral F α) :
    adjoinRootEquivAdjoin F h (AdjoinRoot.root (minpoly F α)) = AdjoinSimple.gen F α
-- Mathlib/GroupTheory/HNNExtension.lean
@[simp]
theorem smul_ofGroup (g₁ g₂ : G) :
    g₁ • (ofGroup g₂ : NormalWord d) = ofGroup (g₁ * g₂)
-- Mathlib/FieldTheory/IsAlgClosed/Spectrum.lean
/-- A specialization of `spectrum.subset_polynomial_aeval` to monic monomials for convenience. -/
theorem pow_image_subset (a : A) (n : ℕ) : (fun x => x ^ n) '' σ a ⊆ σ (a ^ n)
-- Mathlib/CategoryTheory/Monad/Equalizer.lean
@[simp]
theorem beckFork_ι : (beckFork X).ι = X.a
-- Mathlib/Algebra/Group/Defs.lean
/-- Any `CommMagma G` that satisfies `IsRightCancelMul G` also satisfies `IsLeftCancelMul G`. -/
@[to_additive AddCommMagma.IsRightCancelAdd.toIsLeftCancelAdd "Any `AddCommMagma G` that satisfies
`IsRightCancelAdd G` also satisfies `IsLeftCancelAdd G`."]
lemma CommMagma.IsRightCancelMul.toIsLeftCancelMul (G : Type u) [CommMagma G] [IsRightCancelMul G] :
    IsLeftCancelMul G
-- Mathlib/Algebra/Group/Units.lean
@[to_additive]
protected lemma eq_div_iff (h : IsUnit c) : a = b / c ↔ a * c = b
-- Mathlib/Data/Seq/Computation.lean
@[simp]
theorem results_think_iff {s : Computation α} {a n} : Results (think s) a (n + 1) ↔ Results s a n
-- Mathlib/Topology/Order/Basic.lean
/-- The topology induced by a strictly monotone function with order-connected range is the preorder
topology. -/
nonrec theorem StrictMono.induced_topology_eq_preorder {α β : Type*} [LinearOrder α]
    [LinearOrder β] [t : TopologicalSpace β] [OrderTopology β] {f : α → β}
    (hf : StrictMono f) (hc : OrdConnected (range f)) : t.induced f = Preorder.topology α
-- Mathlib/Data/Fin/VecNotation.lean
@[simp]
theorem vecCons_const (a : α) : (vecCons a fun _ : Fin n => a) = fun _ => a
-- Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
theorem lineMap_le_left_iff_le (h : 0 < r) : lineMap a b r ≤ a ↔ b ≤ a
-- Mathlib/NumberTheory/Divisors.lean
/-- The factors of `n` are the prime divisors -/
theorem primeFactors_eq_to_filter_divisors_prime (n : ℕ) :
    n.primeFactors = (divisors n).filter Prime
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_list_le_max (α : Type u) : #(List α) ≤ max ℵ₀ #α
-- Mathlib/Data/Matrix/PEquiv.lean
theorem matrix_mul_apply [Fintype m] [Semiring α] [DecidableEq n] (M : Matrix l m α) (f : m ≃. n)
    (i j) : (M * f.toMatrix :) i j = Option.casesOn (f.symm j) 0 fun fj => M i fj
-- Mathlib/CategoryTheory/WithTerminal.lean
/-- Map `WithInitial` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithInitial C ⥤ WithInitial D
-- Mathlib/MeasureTheory/Integral/Average.lean
theorem laverage_union (hd : AEDisjoint μ s t) (ht : NullMeasurableSet t μ) :
    ⨍⁻ x in s ∪ t, f x ∂μ =
      μ s / (μ s + μ t) * ⨍⁻ x in s, f x ∂μ + μ t / (μ s + μ t) * ⨍⁻ x in t, f x ∂μ
-- Mathlib/CategoryTheory/Monoidal/Subcategory.lean
@[simps]
instance : MonoidalCategoryStruct (FullSubcategory P)
-- .lake/packages/lean4/src/lean/Init/Omega/Int.lean
theorem snd_mk : (Prod.mk x y).snd = y
-- Mathlib/Algebra/GeomSum.lean
theorem Nat.pred_mul_geom_sum_le (a b n : ℕ) :
    ((b - 1) * ∑ i ∈ range n.succ, a / b ^ i) ≤ a * b - a / b ^ n
-- Mathlib/Algebra/Group/Defs.lean
/-- A commutative multiplicative magma is a type with a multiplication which commutes. -/
@[ext]
class CommMagma (G : Type u) extends Mul G where
  /-- Multiplication is commutative in a commutative multiplicative magma. -/
  protected mul_comm : ∀ a b : G, a * b = b * a