ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Order/Directed.lean
/-- A set stable by supremum is `≤`-directed. -/
theorem directedOn_of_sup_mem [SemilatticeSup α] {S : Set α}
    (H : ∀ ⦃i j⦄, i ∈ S → j ∈ S → i ⊔ j ∈ S) : DirectedOn (· ≤ ·) S
-- Mathlib/Combinatorics/SimpleGraph/Metric.lean
theorem dist_eq_sInf : G.dist u v = sInf (Set.range (Walk.length : G.Walk u v → ℕ))
-- Mathlib/LinearAlgebra/TensorProduct/Pi.lean
@[simp]
lemma piScalarRight_symm_single (x : N) (i : ι) :
    (piScalarRight R S N ι).symm (Pi.single i x) = x ⊗ₜ Pi.single i 1
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
theorem IsAdjointPair.add (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B B' f' g') :
    IsAdjointPair B B' (f + f') (g + g')
-- Mathlib/Algebra/Group/Equiv/Basic.lean
/-- Given a pair of monoid homomorphisms `f`, `g` such that `g.comp f = id` and `f.comp g = id`,
returns a multiplicative equivalence with `toFun = f` and `invFun = g`.  This constructor is
useful if the underlying type(s) have specialized `ext` lemmas for monoid homomorphisms. -/
@[to_additive (attr := simps (config := .asFn))
  "Given a pair of additive monoid homomorphisms `f`, `g` such that `g.comp f = id`
  and `f.comp g = id`, returns an additive equivalence with `toFun = f` and `invFun = g`.  This
  constructor is useful if the underlying type(s) have specialized `ext` lemmas for additive
  monoid homomorphisms."]
def MonoidHom.toMulEquiv [MulOneClass M] [MulOneClass N] (f : M →* N) (g : N →* M)
    (h₁ : g.comp f = MonoidHom.id _) (h₂ : f.comp g = MonoidHom.id _) : M ≃* N
-- Mathlib/GroupTheory/Index.lean
@[to_additive]
theorem relindex_iInf_le {ι : Type*} [Fintype ι] (f : ι → Subgroup G) :
    (⨅ i, f i).relindex L ≤ ∏ i, (f i).relindex L
-- Mathlib/Order/MinMax.lean
@[gcongr] theorem min_le_min_left (c) (h : a ≤ b) : min c a ≤ min c b
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
@[reassoc (attr := simp)]
theorem lift_comp_kernelIsoOfEq_inv {Z} {f g : X ⟶ Y} [HasKernel f] [HasKernel g] (h : f = g)
    (e : Z ⟶ X) (he) :
    kernel.lift _ e he ≫ (kernelIsoOfEq h).inv = kernel.lift _ e (by simp [h, he])
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
/-- The parametric integral over a continuous function on a compact set is continuous,
  under mild assumptions on the topologies involved. -/
theorem continuous_parametric_integral_of_continuous
    [FirstCountableTopology X] [LocallyCompactSpace X]
    [OpensMeasurableSpace Y] [SecondCountableTopologyEither Y E] [IsLocallyFiniteMeasure μ]
    {f : X → Y → E} (hf : Continuous f.uncurry) {s : Set Y} (hs : IsCompact s) :
    Continuous (∫ y in s, f · y ∂μ)
-- Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean
/-- The degree-sum formula.  This is also known as the handshaking lemma, which might
more specifically refer to `SimpleGraph.even_card_odd_degree_vertices`. -/
theorem sum_degrees_eq_twice_card_edges : ∑ v, G.degree v = 2 * G.edgeFinset.card
-- Mathlib/Order/Disjointed.lean
protected lemma Monotone.disjointed_succ_sup {f : ℕ → α} (hf : Monotone f) (n : ℕ) :
    disjointed f (n + 1) ⊔ f n = f (n + 1)
-- Mathlib/Logic/Unique.lean
theorem eq_default (a : α) : a = default
-- Mathlib/Data/Quot.lean
@[simp]
theorem liftOn₂_mk (a : α) (b : β) (f : α → β → γ) (hr : ∀ a b₁ b₂, s b₁ b₂ → f a b₁ = f a b₂)
    (hs : ∀ a₁ a₂ b, r a₁ a₂ → f a₁ b = f a₂ b) :
    Quot.liftOn₂ (Quot.mk r a) (Quot.mk s b) f hr hs = f a b
-- Mathlib/Data/Complex/Basic.lean
theorem normSq_mul (z w : ℂ) : normSq (z * w) = normSq z * normSq w
-- Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean
@[to_additive]
theorem lt_iff_exists_mul [CovariantClass α α (· * ·) (· < ·)] : a < b ↔ ∃ c > 1, b = a * c
-- Mathlib/RingTheory/Adjoin/FG.lean
theorem is_noetherian_subring_closure (s : Set R) (hs : s.Finite) :
    IsNoetherianRing (Subring.closure s)
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem eval_eq_πJ (l : Products I) (hl : l.isGood (π C (· ∈ s))) :
    l.eval C = πJ C s (l.eval (π C (· ∈ s)))
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem exists_maximal_independent (s : ι → M) :
    ∃ I : Set ι,
      (LinearIndependent R fun x : I => s x) ∧
        ∀ i ∉ I, ∃ a : R, a ≠ 0 ∧ a • s i ∈ span R (s '' I)
-- Mathlib/Algebra/Group/Defs.lean
theorem zpow_negSucc (a : G) (n : ℕ) : a ^ (Int.negSucc n) = (a ^ (n + 1))⁻¹
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[to_additive (attr := measurability)]
theorem Multiset.measurable_prod (s : Multiset (α → M)) (hs : ∀ f ∈ s, Measurable f) :
    Measurable fun x => (s.map fun f : α → M => f x).prod
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
theorem BinaryCofan.isColimit_iff_isIso_inr {X Y : C} (h : IsInitial X) (c : BinaryCofan X Y) :
    Nonempty (IsColimit c) ↔ IsIso c.inr
-- Mathlib/Algebra/Algebra/Equiv.lean
/-- An algebra isomorphism induces a group isomorphism between automorphism groups.

This is a more bundled version of `AlgEquiv.equivCongr`. -/
@[simps apply]
def autCongr (ϕ : A₁ ≃ₐ[R] A₂) : (A₁ ≃ₐ[R] A₁) ≃* A₂ ≃ₐ[R] A₂
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive (attr := fun_prop)]
theorem ContinuousAt.inv (hf : ContinuousAt f x) : ContinuousAt (fun x => (f x)⁻¹) x
-- Mathlib/Order/Cover.lean
theorem mk_covBy_mk_iff : (a₁, b₁) ⋖ (a₂, b₂) ↔ a₁ ⋖ a₂ ∧ b₁ = b₂ ∨ b₁ ⋖ b₂ ∧ a₁ = a₂
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem norm_inner_eq_norm_tfae (x y : E) :
    List.TFAE [‖⟪x, y⟫‖ = ‖x‖ * ‖y‖,
      x = 0 ∨ y = (⟪x, y⟫ / ⟪x, x⟫) • x,
      x = 0 ∨ ∃ r : 𝕜, y = r • x,
      x = 0 ∨ y ∈ 𝕜 ∙ x]
-- Mathlib/Topology/UniformSpace/Cauchy.lean
/-- If `x` is an adherent (cluster) point for a Cauchy filter `f`, then it is a limit point
for `f`. -/
theorem le_nhds_of_cauchy_adhp {f : Filter α} {x : α} (hf : Cauchy f) (adhs : ClusterPt x f) :
    f ≤ 𝓝 x
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
@[simp]
theorem mkOfCompact_apply [CompactSpace α] (f : C(α, β)) (a : α) : mkOfCompact f a = f a
-- Mathlib/Data/Set/Prod.lean
theorem Disjoint.set_pi (hi : i ∈ s) (ht : Disjoint (t₁ i) (t₂ i)) : Disjoint (s.pi t₁) (s.pi t₂)
-- Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean
theorem projectiveSeminorm_apply (x : ⨂[𝕜] i, E i) :
    projectiveSeminorm x = iInf (fun (p : lifts x) ↦ projectiveSeminormAux p.1)
-- Mathlib/Algebra/Group/Int.lean
lemma eq_one_or_neg_one_of_mul_eq_one' (h : u * v = 1) : u = 1 ∧ v = 1 ∨ u = -1 ∧ v = -1
-- Mathlib/Topology/Filter.lean
theorem monotone_nhds : Monotone (𝓝 : Filter α → Filter (Filter α))
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
@[fun_prop]
protected theorem HasFDerivAt.prodMap (hf : HasFDerivAt f f' p.1) (hf₂ : HasFDerivAt f₂ f₂' p.2) :
    HasFDerivAt (Prod.map f f₂) (f'.prodMap f₂') p
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem SameCycle.of_zpow {n : ℤ} : SameCycle (f ^ n) x y → SameCycle f x y
-- Mathlib/RingTheory/Polynomial/ScaleRoots.lean
@[simp]
lemma one_scaleRoots (r : R) :
    (1 : R[X]).scaleRoots r = 1
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
@[simp]
theorem coe_mul [Mul R] [BoundedMul R] [ContinuousMul R] (f g : α →ᵇ R) : ⇑(f * g) = f * g
-- Mathlib/Data/Part.lean
theorem mod_def [Mod α] (a b : Part α) : a % b = bind a fun y => map (y % ·) b
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem normalize_coe_units (u : αˣ) : normalize (u : α) = 1
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem comap_radical : comap f (radical K) = radical (comap f K)
-- Mathlib/Algebra/Ring/CentroidHom.lean
@[simp]
theorem toEnd_neg (x : CentroidHom α) : (-x).toEnd = -x.toEnd
-- Mathlib/LinearAlgebra/Trace.lean
/-- The trace of a linear map correspond to the contraction pairing under the isomorphism
 `End(M) ≃ M* ⊗ M`-/
theorem trace_eq_contract_of_basis [Finite ι] (b : Basis ι R M) :
    LinearMap.trace R M ∘ₗ dualTensorHom R M M = contractLeft R M
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
theorem coeIdeal_injective : Function.Injective (fun (I : Ideal R) ↦ (I : FractionalIdeal R⁰ K))
-- Mathlib/Data/Finsupp/Basic.lean
@[simp]
theorem mapDomain_single {f : α → β} {a : α} {b : M} : mapDomain f (single a b) = single (f a) b
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem aleph0_mul_nat {n : ℕ} (hn : n ≠ 0) : ℵ₀ * n = ℵ₀
-- Mathlib/Probability/ProbabilityMassFunction/Basic.lean
theorem coe_le_one (p : PMF α) (a : α) : p a ≤ 1
-- Mathlib/NumberTheory/Cyclotomic/Gal.lean
/-- `IsPrimitiveRoot.autToPow` is injective in the case that it's considered over a cyclotomic
field extension. -/
theorem autToPow_injective : Function.Injective <| hμ.autToPow K
-- Mathlib/LinearAlgebra/Span.lean
theorem map_eq_top_iff {f : F} (hf : range f = ⊤) {p : Submodule R M} :
    p.map f = ⊤ ↔ p ⊔ LinearMap.ker f = ⊤
-- Mathlib/CategoryTheory/FintypeCat.lean
/-- The fully faithful embedding of `FintypeCat` into the category of types. -/
@[simps!]
def incl : FintypeCat ⥤ Type*
-- Mathlib/Data/List/Basic.lean
theorem _root_.Function.LeftInverse.list_map {f : α → β} {g : β → α} (h : LeftInverse f g) :
    LeftInverse (map f) (map g)
-- Mathlib/Algebra/Module/Projective.lean
/-- Free modules are projective. -/
theorem Projective.of_basis {ι : Type*} (b : Basis ι R P) : Projective R P
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem negSucc_ediv (m : Nat) {b : Int} (H : 0 < b) : -[m+1] / b = -(div m b + 1)
-- Mathlib/ModelTheory/Substructures.lean
theorem comap_strictMono_of_surjective : StrictMono (comap f)
-- Mathlib/ModelTheory/Encoding.lean
/-- An encoding of terms as lists. -/
@[simps]
protected def encoding : Encoding (L.Term α)
-- Mathlib/RingTheory/AdjoinRoot.lean
theorem algebraMap_eq' [CommSemiring S] [Algebra S R] :
    algebraMap S (AdjoinRoot f) = (of f).comp (algebraMap S R)
-- Mathlib/Algebra/Exact.lean
lemma of_ladder_addEquiv_of_exact (comm₁₂ : g₁₂.comp e₁ = AddMonoidHom.comp e₂ f₁₂)
    (comm₂₃ : g₂₃.comp e₂ = AddMonoidHom.comp e₃ f₂₃) (H : Exact f₁₂ f₂₃) : Exact g₁₂ g₂₃
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem lt_of_sub_lt_sub_left {a b c : Int} (h : c - a < c - b) : b < a
-- Mathlib/Algebra/AddTorsor.lean
/-- The same point subtracted from two points produces equal results
if and only if those points are equal. -/
@[simp]
theorem vsub_left_cancel_iff {p₁ p₂ p : P} : p₁ -ᵥ p = p₂ -ᵥ p ↔ p₁ = p₂
-- Mathlib/MeasureTheory/Integral/MeanInequalities.lean
/-- A version of Hölder with multiple arguments, one of which plays a distinguished role. -/
theorem lintegral_mul_prod_norm_pow_le {α ι : Type*} [MeasurableSpace α] {μ : Measure α}
    (s : Finset ι) {g : α →  ℝ≥0∞} {f : ι → α → ℝ≥0∞} (hg : AEMeasurable g μ)
    (hf : ∀ i ∈ s, AEMeasurable (f i) μ) (q : ℝ) {p : ι → ℝ} (hpq : q + ∑ i ∈ s, p i = 1)
    (hq :  0 ≤ q) (hp : ∀ i ∈ s, 0 ≤ p i) :
    ∫⁻ a, g a ^ q * ∏ i ∈ s, f i a ^ p i ∂μ ≤
      (∫⁻ a, g a ∂μ) ^ q * ∏ i ∈ s, (∫⁻ a, f i a ∂μ) ^ p i
-- Mathlib/Analysis/Normed/Group/AddTorsor.lean
@[simp]
theorem nndist_vadd_right (v : V) (x : P) : nndist x (v +ᵥ x) = ‖v‖₊
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
@[simp]
theorem refl_toEquiv : (Diffeomorph.refl I M n).toEquiv = Equiv.refl _
-- Mathlib/Algebra/Order/Ring/Unbundled/Nonneg.lean
@[simp, norm_cast]
protected theorem coe_nsmul [AddMonoid α] [Preorder α] [CovariantClass α α (· + ·) (· ≤ ·)]
    (n : ℕ) (a : { x : α // 0 ≤ x }) : ((n • a : { x : α // 0 ≤ x }) : α) = n • (a : α)
-- Mathlib/Topology/MetricSpace/Ultra/Basic.lean
lemma closedBall_subset_trichotomy :
    closedBall x r ⊆ closedBall y s ∨ closedBall y s ⊆ closedBall x r ∨
    Disjoint (closedBall x r) (closedBall y s)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_ite_index (p : Prop) [Decidable p] (s t : Finset α) (f : α → β) :
    ∏ x ∈ if p then s else t, f x = if p then ∏ x ∈ s, f x else ∏ x ∈ t, f x
-- Mathlib/MeasureTheory/Decomposition/Jordan.lean
@[simp]
theorem neg_posPart : (-j).posPart = j.negPart
-- Mathlib/Topology/Algebra/Algebra.lean
@[simp]
theorem _root_.Subalgebra.topologicalClosure_coe
    (s : Subalgebra R A) :
  (s.topologicalClosure : Set A) = closure ↑s
-- Mathlib/Algebra/Category/ModuleCat/Presheaf/Sheafify.lean
lemma comp_sheafifyHomEquiv'_symm_hom {F : PresheafOfModules.{v} R.val}
    (hF : Presheaf.IsSheaf J F.presheaf) (f : M₀ ⟶ (restrictScalars α).obj F) :
    φ ≫ ((sheafifyHomEquiv' α φ hF).symm f).hom = f.hom
-- Mathlib/CategoryTheory/GradedObject.lean
lemma isIso_of_isIso_apply (f : X ⟶ Y) [hf : ∀ i, IsIso (f i)] :
    IsIso f
-- Mathlib/Data/Fin/Basic.lean
/-- `succ` commutes with `succAbove`. -/
@[simp] lemma succ_succAbove_succ {n : ℕ} (i : Fin (n + 1)) (j : Fin n) :
    i.succ.succAbove j.succ = (i.succAbove j).succ
-- Mathlib/Data/Set/Function.lean
theorem surjOn_empty (f : α → β) (s : Set α) : SurjOn f s ∅
-- Mathlib/MeasureTheory/Function/Jacobian.lean
/-- A version of Sard lemma in fixed dimension: given a differentiable function from `E` to `E` and
a set where the differential is not invertible, then the image of this set has zero measure. -/
theorem addHaar_image_eq_zero_of_det_fderivWithin_eq_zero
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (h'f' : ∀ x ∈ s, (f' x).det = 0) :
    μ (f '' s) = 0
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem sub_le_sub_iff_right {n : Nat} (h : k ≤ m) : n - k ≤ m - k ↔ n ≤ m
-- Mathlib/RingTheory/Bialgebra/Hom.lean
@[simp]
theorem id_toAlgHom : BialgHom.id R A = AlgHom.id R A
-- Mathlib/Data/ENNReal/Basic.lean
theorem lt_iff_exists_coe : a < b ↔ ∃ p : ℝ≥0, a = p ∧ ↑p < b
-- Mathlib/Data/Sum/Order.lean
@[simp]
theorem inr_lt_inr_iff [LT α] [LT β] {a b : β} : (inr a : α ⊕ β) < inr b ↔ a < b
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem eventuallyEq_principal {s : Set α} {f g : α → β} : f =ᶠ[𝓟 s] g ↔ EqOn f g s
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
theorem subgraphOfAdj_symm {v w : V} (hvw : G.Adj v w) :
    G.subgraphOfAdj hvw.symm = G.subgraphOfAdj hvw
-- Mathlib/CategoryTheory/Simple.lean
theorem mono_to_simple_zero_of_not_iso {X Y : C} [Simple Y] {f : X ⟶ Y} [Mono f]
    (w : IsIso f → False) : f = 0
-- Mathlib/Order/GaloisConnection.lean
theorem u_sInf_l_image [CompleteLattice α] [CompleteLattice β] (gi : GaloisCoinsertion l u)
    (s : Set α) : u (sInf (l '' s)) = sInf s
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem le_comap_mul : comap f K * comap f L ≤ comap f (K * L)
-- Mathlib/RingTheory/AdicCompletion/Functoriality.lean
@[simp]
theorem map_id :
    map I (LinearMap.id (M := M)) =
      LinearMap.id (R := AdicCompletion I R) (M := AdicCompletion I M)
-- .lake/packages/lean4/src/lean/Init/Data/Option/Lemmas.lean
@[simp] theorem bind_none (x : Option α) : x.bind (fun _ => none (α := β)) = none
-- Mathlib/NumberTheory/EllipticDivisibilitySequence.lean
/-- The identity sequence is an EDS. -/
theorem isEllDivSequence_id : IsEllDivSequence id
-- Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean
@[reassoc (attr := simp)]
lemma inl_v_desc_f (p q : ℤ) (h : p + (-1) = q) :
    (inl φ).v p q h ≫ (desc φ α β eq).f q = α.v p q h
-- Mathlib/RingTheory/WittVector/IsPoly.lean
theorem ext [Fact p.Prime] {f g} (hf : IsPoly₂ p f) (hg : IsPoly₂ p g)
    (h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ),
        ghostComponent n (f x y) = ghostComponent n (g x y)) :
    ∀ (R) [_Rcr : CommRing R] (x y : 𝕎 R), f x y = g x y
-- Mathlib/CategoryTheory/WithTerminal.lean
/-- A variant of `lift_unique` with `Z` a terminal object. -/
@[simps!]
def liftToTerminalUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z)
    (G : WithTerminal C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToTerminal F hZ
-- Mathlib/Topology/Algebra/Constructions/DomMulAct.lean
@[to_additive] theorem inducing_mk_symm : Inducing (@mk M).symm
-- Mathlib/Order/Interval/Multiset.lean
@[simp]
theorem Icc_eq_zero_iff : Icc a b = 0 ↔ ¬a ≤ b
-- Mathlib/Algebra/Order/Hom/Monoid.lean
@[to_additive (attr := simp)]
theorem mk_coe (f : α →*o β) (h) : OrderMonoidHom.mk (f : α →* β) h = f
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
theorem smul_of_tower_mem (s : S) {x : M} (h : x ∈ p) : s • x ∈ p
-- Mathlib/Topology/Order/UpperLowerSetTopology.lean
protected lemma monotone_iff_continuous [TopologicalSpace α] [TopologicalSpace β]
    [Topology.IsUpperSet α] [Topology.IsUpperSet β] {f : α → β} : Monotone f ↔ Continuous f
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem iff_false_intro (h : ¬a) : a ↔ False
-- Mathlib/FieldTheory/SplittingField/IsSplittingField.lean
theorem IntermediateField.splits_of_splits (h : p.Splits (algebraMap K L))
    (hF : ∀ x ∈ p.rootSet L, x ∈ F) : p.Splits (algebraMap K F)
-- Mathlib/Algebra/Polynomial/Coeff.lean
theorem isUnit_C {x : R} : IsUnit (C x) ↔ IsUnit x
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
@[simp]
theorem mk0_inj {a b : G₀} (ha : a ≠ 0) (hb : b ≠ 0) : Units.mk0 a ha = Units.mk0 b hb ↔ a = b
-- Mathlib/Data/Set/Image.lean
theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻¹' s).Nonempty) :
    s.Nonempty
-- Mathlib/Analysis/Convex/Side.lean
theorem WSameSide.map {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) (f : P →ᵃ[R] P') :
    (s.map f).WSameSide (f x) (f y)
-- Mathlib/Data/Seq/Computation.lean
theorem terminates_congr {c₁ c₂ : Computation α} (h : c₁ ~ c₂) : Terminates c₁ ↔ Terminates c₂
-- Mathlib/FieldTheory/PrimitiveElement.lean
/-- This is the heart of the proof of the primitive element theorem. It shows that if `F` is
infinite and `α` and `β` are separable over `F` then `F⟮α, β⟯` is generated by a single element. -/
theorem primitive_element_inf_aux [Algebra.IsSeparable F E] : ∃ γ : E, F⟮α, β⟯ = F⟮γ⟯
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem sup_image [DecidableEq β] (s : Finset γ) (f : γ → β) (g : β → α) :
    (s.image f).sup g = s.sup (g ∘ f)
-- Mathlib/Analysis/Convex/Between.lean
@[simp]
theorem wbtw_lineMap_iff [NoZeroSMulDivisors R V] {x y : P} {r : R} :
    Wbtw R x (lineMap x y r) y ↔ x = y ∨ r ∈ Set.Icc (0 : R) 1
-- Mathlib/CategoryTheory/Bicategory/Basic.lean
@[reassoc]
theorem whisker_assoc_symm (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g') (h : c ⟶ d) :
    f ◁ η ▷ h = (α_ f g h).inv ≫ (f ◁ η) ▷ h ≫ (α_ f g' h).hom
-- Mathlib/FieldTheory/Adjoin.lean
@[elab_as_elim]
theorem adjoin_induction {s : Set E} {p : E → Prop} {x} (h : x ∈ adjoin F s) (mem : ∀ x ∈ s, p x)
    (algebraMap : ∀ x, p (algebraMap F E x)) (add : ∀ x y, p x → p y → p (x + y))
    (neg : ∀ x, p x → p (-x)) (inv : ∀ x, p x → p x⁻¹) (mul : ∀ x y, p x → p y → p (x * y)) :
    p x
-- Mathlib/Algebra/Regular/Basic.lean
/-- If `R` is a monoid, an element in `Rˣ` is regular. -/
@[to_additive "If `R` is an additive monoid, an element in `add_units R` is add-regular."]
theorem Units.isRegular (a : Rˣ) : IsRegular (a : R)
-- Mathlib/Topology/Algebra/Module/UniformConvergence.lean
/-- Let `E` be a TVS, `𝔖 : Set (Set α)` and `H` a submodule of `α →ᵤ[𝔖] E`. If the image of any
`S ∈ 𝔖` by any `u ∈ H` is bounded (in the sense of `Bornology.IsVonNBounded`), then `H`,
equipped with the topology of `𝔖`-convergence, is a TVS.

If you have a hard time using this lemma, try the one above instead. -/
theorem UniformOnFun.continuousSMul_submodule_of_image_bounded (H : Submodule 𝕜 (α →ᵤ[𝔖] E))
    (h : ∀ u ∈ H, ∀ s ∈ 𝔖, Bornology.IsVonNBounded 𝕜 (u '' s)) :
    @ContinuousSMul 𝕜 H _ _ ((UniformOnFun.topologicalSpace α E 𝔖).induced ((↑) : H → α →ᵤ[𝔖] E))
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
protected theorem leftInverse : LeftInverse I.symm I
-- Mathlib/LinearAlgebra/Ray.lean
/-- If two nonzero vectors are equivalent, so are their negations. -/
@[simp]
theorem equiv_neg_iff {v₁ v₂ : RayVector R M} : -v₁ ≈ -v₂ ↔ v₁ ≈ v₂
-- Mathlib/LinearAlgebra/Pi.lean
@[simp]
theorem mem_pi : x ∈ pi I p ↔ ∀ i ∈ I, x i ∈ p i
-- Mathlib/Topology/Algebra/Module/Basic.lean
/-- A maximal proper subspace of a topological module (i.e a `Submodule` satisfying `IsCoatom`)
is either closed or dense. -/
theorem Submodule.isClosed_or_dense_of_isCoatom (s : Submodule R M) (hs : IsCoatom s) :
    IsClosed (s : Set M) ∨ Dense (s : Set M)
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
/-- Homotopy between morphisms of short complexes is compatible with composition. -/
@[simps!]
def comp (h : Homotopy φ₁ φ₂) {ψ₁ ψ₂ : S₂ ⟶ S₃} (h' : Homotopy ψ₁ ψ₂) :
    Homotopy (φ₁ ≫ ψ₁) (φ₂ ≫ ψ₂)
-- Mathlib/Data/Int/ModEq.lean
theorem _root_.Dvd.dvd.modEq_zero_int (h : n ∣ a) : a ≡ 0 [ZMOD n]
-- Mathlib/AlgebraicGeometry/Restrict.lean
/-- The global sections of the restriction is isomorphic to the sections on the open set. -/
@[simps!]
def topIso : Γ(U, ⊤) ≅ Γ(X, U)
-- Mathlib/Data/Nat/Fib/Basic.lean
lemma le_fib_add_one : ∀ n, n ≤ fib n + 1
-- Mathlib/Algebra/GradedMulAction.lean
/-- A graded version of `MulAction`. -/
class GMulAction [AddMonoid ιA] [VAdd ιA ιM] [GMonoid A] extends GSMul A M where
  /-- One is the neutral element for `•` -/
  one_smul (b : GradedMonoid M) : (1 : GradedMonoid A) • b = b
  /-- Associativity of `•` and `*` -/
  mul_smul (a a' : GradedMonoid A) (b : GradedMonoid M) : (a * a') • b = a • a' • b
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
/-- If words `w₁ w₂` are such that `w₁` reduces to `w₂`, then `w₂` reduces to the maximal reduction
  of `w₁`. -/
@[to_additive "If words `w₁ w₂` are such that `w₁` reduces to `w₂`, then `w₂` reduces to the maximal
  reduction of `w₁`."]
theorem reduce.rev (H : Red L₁ L₂) : Red L₂ (reduce L₁)
-- Mathlib/Data/Finset/Sym.lean
theorem sym2_toFinset [DecidableEq α] (m : Multiset α) :
    m.toFinset.sym2 = m.sym2.toFinset
-- Mathlib/Order/SuccPred/Basic.lean
theorem pred_eq_pred_iff_of_not_isMin (ha : ¬IsMin a) (hb : ¬IsMin b) :
    pred a = pred b ↔ a = b
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem replace_cons_self [LawfulBEq α] {a : α} : (a::as).replace a b = b::as
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean
theorem condexpL1_neg (f : α → F') : condexpL1 hm μ (-f) = -condexpL1 hm μ f
-- Mathlib/NumberTheory/KummerDedekind.lean
/-- The **Kummer-Dedekind Theorem**. -/
theorem normalizedFactors_ideal_map_eq_normalizedFactors_min_poly_mk_map (hI : IsMaximal I)
    (hI' : I ≠ ⊥) (hx : (conductor R x).comap (algebraMap R S) ⊔ I = ⊤) (hx' : IsIntegral R x) :
    normalizedFactors (I.map (algebraMap R S)) =
      Multiset.map
        (fun f =>
          ((normalizedFactorsMapEquivNormalizedFactorsMinPolyMk hI hI' hx hx').symm f : Ideal S))
        (normalizedFactors (Polynomial.map (Ideal.Quotient.mk I) (minpoly R x))).attach
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
protected theorem mdifferentiableOn (h : M ≃ₘ^n⟮I, I'⟯ M') (s : Set M) (hn : 1 ≤ n) :
    MDifferentiableOn I I' h s
-- Mathlib/Data/ZMod/Basic.lean
theorem val_mul {n : ℕ} (a b : ZMod n) : (a * b).val = a.val * b.val % n
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
@[simp]
theorem sinh_lt_self_iff : sinh x < x ↔ x < 0
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem succ_pos : ∀ c : Cardinal, 0 < succ c
-- Mathlib/Algebra/Lie/Nilpotent.lean
theorem derivedSeries_le_lowerCentralSeries (k : ℕ) :
    derivedSeries R L k ≤ lowerCentralSeries R L L k
-- Mathlib/Data/Finset/Sups.lean
@[simp]
theorem sups_empty : s ⊻ ∅ = ∅
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
/-- We say that a type has `MeasurableMul₂` if `uncurry (· * ·)` is a measurable functions.
For a typeclass assuming measurability of `(c * ·)` and `(· * c)` see `MeasurableMul`. -/
@[to_additive MeasurableAdd₂]
class MeasurableMul₂ (M : Type*) [MeasurableSpace M] [Mul M] : Prop where
  measurable_mul : Measurable fun p : M × M => p.1 * p.2
-- Mathlib/Computability/Primrec.lean
theorem of_prim {n f} : Primrec f → @Primrec' n f
-- Mathlib/LinearAlgebra/Matrix/Charpoly/Univ.lean
lemma univ_monic : (univ R n).Monic
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Ico_subset_Icc_self : Ico a b ⊆ Icc a b
-- Mathlib/Probability/Independence/Conditional.lean
theorem CondIndepSets.condIndep
    {p1 p2 : Set (Set Ω)} (h1 : m₁ ≤ mΩ) (h2 : m₂ ≤ mΩ)
    (hp1 : IsPiSystem p1) (hp2 : IsPiSystem p2)
    (hpm1 : m₁ = generateFrom p1) (hpm2 : m₂ = generateFrom p2)
    (hyp : CondIndepSets m' hm' p1 p2 μ) :
    CondIndep m' m₁ m₂ hm' μ
-- Mathlib/Analysis/Analytic/Composition.lean
@[simp]
theorem comp_id (p : FormalMultilinearSeries 𝕜 E F) : p.comp (id 𝕜 E) = p
-- Mathlib/Data/Sym/Basic.lean
@[simp]
theorem encode_decode [DecidableEq α] (s : Sym (Option α) n ⊕ Sym α n.succ) :
    encode (decode s) = s
-- Mathlib/Algebra/Group/NatPowAssoc.lean
theorem npow_mul_comm (m n : ℕ) (x : M) :
    x ^ m * x ^ n = x ^ n * x ^ m