ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- Change-of-variables formula for `Ioi` integrals of vector-valued functions, proved by taking
limits from the result for finite intervals. -/
theorem integral_comp_smul_deriv_Ioi {f f' : ℝ → ℝ} {g : ℝ → E} {a : ℝ}
    (hf : ContinuousOn f <| Ici a) (hft : Tendsto f atTop atTop)
    (hff' : ∀ x ∈ Ioi a, HasDerivWithinAt f (f' x) (Ioi x) x)
    (hg_cont : ContinuousOn g <| f '' Ioi a) (hg1 : IntegrableOn g <| f '' Ici a)
    (hg2 : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a)) :
    (∫ x in Ioi a, f' x • (g ∘ f) x) = ∫ u in Ioi (f a), g u
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
theorem HasStrictFDerivAt.sum (h : ∀ i ∈ u, HasStrictFDerivAt (A i) (A' i) x) :
    HasStrictFDerivAt (fun y => ∑ i ∈ u, A i y) (∑ i ∈ u, A' i) x
-- Mathlib/Data/List/Basic.lean
theorem get?_pmap {p : α → Prop} (f : ∀ a, p a → β) {l : List α} (h : ∀ a ∈ l, p a) (n : ℕ) :
    get? (pmap f l h) n = Option.pmap f (get? l n) fun x H => h x (get?_mem H)
-- Mathlib/Logic/Equiv/Defs.lean
protected lemma existsUnique_congr_left : (∃! a, p a) ↔ ∃! b, p (e.symm b)
-- Mathlib/Data/Nat/PartENat.lean
@[simp]
theorem get_le_get {x y : PartENat} {hx : x.Dom} {hy : y.Dom} : x.get hx ≤ y.get hy ↔ x ≤ y
-- Mathlib/Data/Rat/Init.lean
@[norm_cast] lemma cast_id (n : ℚ) : Rat.cast n = n
-- Mathlib/Data/Real/ConjExponents.lean
lemma inv_ne_zero : p⁻¹ ≠ 0
-- Mathlib/Computability/Partrec.lean
theorem of_eq {f g : α → σ} (hf : Computable f) (H : ∀ n, f n = g n) : Computable g
-- Mathlib/Data/Finset/Preimage.lean
@[simp, norm_cast]
theorem coe_preimage {f : α → β} (s : Finset β) (hf : Set.InjOn f (f ⁻¹' ↑s)) :
    (↑(preimage s f hf) : Set α) = f ⁻¹' ↑s
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[simp]
theorem pdiv_apply [GroupWithZero R] (f g : ArithmeticFunction R) (n : ℕ) :
    pdiv f g n = f n / g n
-- Mathlib/Algebra/MvPolynomial/Monad.lean
@[simp]
theorem bind₁_X_left : bind₁ (X : σ → MvPolynomial σ R) = AlgHom.id R _
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
@[simp]
theorem coeff_natTrailingDegree_pred_eq_zero {p : R[X]} {hp : (0 : ℕ∞) < natTrailingDegree p} :
    p.coeff (p.natTrailingDegree - 1) = 0
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem castNum_xor : ∀ m n : Num, ↑(m ^^^ n) = (↑m ^^^ ↑n : ℕ)
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
@[simp]
lemma _root_.NonUnitalAlgHom.map_adjoin_singleton (f : F) (x : A) :
    map f (adjoin R {x}) = adjoin R {f x}
-- Mathlib/Analysis/Normed/Operator/WeakOperatorTopology.lean
/-- The weak operator topology is coarser than the norm topology, i.e. the inclusion map is
continuous. -/
@[continuity, fun_prop]
lemma ContinuousLinearMap.continuous_toWOT :
    Continuous (ContinuousLinearMap.toWOT 𝕜 E F)
-- Mathlib/Order/Filter/Germ/Basic.lean
@[simp]
theorem map_const (l : Filter α) (a : β) (f : β → γ) : (↑a : Germ l β).map f = ↑(f a)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive (attr := simp)]
theorem prod_cons (h : a ∉ s) : ∏ x ∈ cons a s h, f x = f a * ∏ x ∈ s, f x
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
/-- An isomorphism of short complexes `S₁ ≅ S₂` induces an isomorphism on the `Q` fields
of right homology data of `S₁` and `S₂`. -/
@[simps]
def opcyclesMapIso' (e : S₁ ≅ S₂) (h₁ : S₁.RightHomologyData)
    (h₂ : S₂.RightHomologyData) : h₁.Q ≅ h₂.Q
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt64.toNat_mod (x y : UInt64) : (x % y).toNat = x.toNat % y.toNat
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem le_natDegree_of_coe_le_degree (hdeg : ↑n ≤ p.degree) : n ≤ p.natDegree
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
    ∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ
-- Mathlib/Analysis/Normed/Field/UnitBall.lean
@[simp, norm_cast]
theorem coe_one_unitClosedBall [SeminormedRing 𝕜] [NormOneClass 𝕜] :
    ((1 : closedBall (0 : 𝕜) 1) : 𝕜) = 1
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt64.le_antisymm {x y : UInt64} (h1 : x ≤ y) (h2 : y ≤ x) : x = y
-- Mathlib/Topology/Homotopy/HomotopyGroup.lean
@[ext]
theorem ext (f g : Ω^ N X x) (H : ∀ y, f y = g y) : f = g
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem card_join (S) : card (@join α S) = sum (map card S)
-- Mathlib/Algebra/Category/BoolRing.lean
@[simp]
theorem coe_of (α : Type*) [BooleanRing α] : ↥(of α) = α
-- Mathlib/GroupTheory/CoprodI.lean
/-- The Ping-Pong-Lemma.

Given a group action of `G` on `X` so that the generators of the free groups act in specific
ways on disjoint subsets `X i` and `Y i` we can prove that `lift f` is injective, and thus the image
of `lift f` is isomorphic to the free group.

Often the Ping-Pong-Lemma is stated with regard to group elements that generate the whole group;
we generalize to arbitrary group homomorphisms from the free group to `G` and do not require the
group to be generated by the elements.
-/
theorem _root_.FreeGroup.injective_lift_of_ping_pong : Function.Injective (FreeGroup.lift a)
-- Mathlib/Order/Filter/Basic.lean
lemma Tendsto.eventually_mem {f : α → β} {l₁ : Filter α} {l₂ : Filter β} {s : Set β}
    (hf : Tendsto f l₁ l₂) (h : s ∈ l₂) : ∀ᶠ x in l₁, f x ∈ s
-- Mathlib/Algebra/GCDMonoid/Multiset.lean
@[simp]
theorem lcm_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).lcm = GCDMonoid.lcm s₁.lcm s₂.lcm
-- Mathlib/Order/SupIndep.lean
@[simp]
theorem independent_pempty (t : PEmpty → α) : Independent t
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive add_image_prod]
theorem image_mul_prod : (fun x : α × α => x.fst * x.snd) '' s ×ˢ t = s * t
-- Mathlib/Algebra/Lie/InvariantForm.lean
lemma atomistic : ∀ I : LieIdeal K L, sSup {J : LieIdeal K L | IsAtom J ∧ J ≤ I} = I
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Basic.lean
theorem bind_congr [Bind m] {x : m α} {f g : α → m β} (h : ∀ a, f a = g a) : x >>= f = x >>= g
-- Mathlib/Topology/Instances/Matrix.lean
@[continuity]
theorem Continuous.matrix_blockDiag' {A : X → Matrix (Σi, m' i) (Σi, n' i) R} (hA : Continuous A) :
    Continuous fun x => blockDiag' (A x)
-- Mathlib/Logic/Relation.lean
theorem Symmetric.flip_eq (h : Symmetric r) : flip r = r
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/-- Two subgroups are equal if they have the same elements. -/
@[to_additive (attr := ext) "Two `AddSubgroup`s are equal if they have the same elements."]
theorem ext {H K : Subgroup G} (h : ∀ x, x ∈ H ↔ x ∈ K) : H = K
-- Mathlib/Data/Part.lean
/-- `Part` eta expansion -/
@[simp]
theorem eta : ∀ o : Part α, (⟨o.Dom, fun h => o.get h⟩ : Part α) = o
-- Mathlib/Data/Multiset/Basic.lean
theorem filter_eq' (s : Multiset α) (b : α) : s.filter (· = b) = replicate (count b s) b
-- Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
theorem mdifferentiableOn_const : MDifferentiableOn I I' (fun _ : M => c) s
-- Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean
/-- Functions `ℍ → ℂ` that are invariant under the `SlashAction`. -/
structure SlashInvariantForm where
  toFun : ℍ → ℂ
  slash_action_eq' : ∀ γ : Γ, toFun ∣[k] γ = toFun
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[mono]
theorem toAddSubmonoid_strictMono :
    StrictMono (toAddSubmonoid : NonUnitalSubsemiring R → AddSubmonoid R)
-- Mathlib/Algebra/Star/Free.lean
@[simp]
theorem star_of (x : α) : star (of x) = of x
-- Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean
/-- A strong epi category is a category in which every epimorphism is strong. -/
class StrongEpiCategory : Prop where
  /-- A strong epi category is a category in which every epimorphism is strong. -/
  strongEpi_of_epi : ∀ {X Y : C} (f : X ⟶ Y) [Epi f], StrongEpi f
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_add_const_Ioc : (fun x => x + a) ⁻¹' Ioc b c = Ioc (b - a) (c - a)
-- Mathlib/Topology/Instances/Matrix.lean
theorem Summable.matrix_blockDiag' {f : X → Matrix (Σi, m' i) (Σi, n' i) R} (hf : Summable f) :
    Summable fun x => blockDiag' (f x)
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem attach_zero : (0 : Multiset α).attach = 0
-- Mathlib/Data/Sign.lean
@[simp, norm_cast] lemma coe_mul {α} [MulZeroOneClass α] [HasDistribNeg α] (a b : SignType) :
    ↑(a * b) = (a : α) * b
-- Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean
@[simp]
theorem initial.to_comp [HasInitial C] {P Q : C} (f : P ⟶ Q) : initial.to P ≫ f = initial.to Q
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem monic_of_degree_le_of_coeff_eq_one (n : ℕ) (pn : p.degree ≤ n) (p1 : p.coeff n = 1) :
    Monic p
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[simp]
theorem mem_coe (a : α) (s : Subtype (MeasurableSet : Set α → Prop)) : a ∈ (s : Set α) ↔ a ∈ s
-- Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
theorem toLin_restrict_ker_eq_inf_orthogonal (B : BilinForm K V) (W : Subspace K V) (b : B.IsRefl) :
    (B.domRestrict W).ker.map W.subtype = (W ⊓ B.orthogonal ⊤ : Subspace K V)
-- Mathlib/Order/Interval/Set/OrdConnected.lean
lemma not_ordConnected_inter_Icc_iff (hx : x ∈ s) (hy : y ∈ s) :
    ¬ OrdConnected (s ∩ Icc x y) ↔ ∃ z ∉ s, z ∈ Ioo x y
-- Mathlib/RingTheory/PrincipalIdealDomain.lean
theorem ne_zero_of_mem_factors {R : Type v} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R]
    {a b : R} (ha : a ≠ 0) (hb : b ∈ factors a) : b ≠ 0
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
theorem dimH_of_mem_nhds {x : E} {s : Set E} (h : s ∈ 𝓝 x) : dimH s = finrank ℝ E
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem le_einfsep_pair : edist x y ⊓ edist y x ≤ ({x, y} : Set α).einfsep
-- Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean
/-- This lemma demonstrates the origin of the `foldr` name. -/
theorem foldr_prod_map_ι (l : List M) (f : M →ₗ[R] N →ₗ[R] N) (hf) (n : N) :
    foldr Q f hf n (l.map <| ι Q).prod = List.foldr (fun m n => f m n) n l
-- Mathlib/CategoryTheory/Category/ULift.lean
@[simp]
theorem objUp_objDown {C} (A : ULiftHom C) : ULiftHom.objUp A.objDown = A
-- Mathlib/RingTheory/ClassGroup.lean
@[simp]
theorem toPrincipalIdeal_eq_iff {I : (FractionalIdeal R⁰ K)ˣ} {x : Kˣ} :
    toPrincipalIdeal R K x = I ↔ spanSingleton R⁰ (x : K) = I
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
theorem dimH_finite {s : Set X} (hs : s.Finite) : dimH s = 0
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
lemma polyCharpolyAux_baseChange (A : Type*) [CommRing A] [Algebra R A] :
    polyCharpolyAux (tensorProduct _ _ _ _ ∘ₗ φ.baseChange A) (basis A b) (basis A bₘ) =
      (polyCharpolyAux φ b bₘ).map (MvPolynomial.map (algebraMap R A))
-- Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean
/-- This lemma follows from the finite correctness proof, the determinant equality, and
by simplifying the difference. -/
theorem sub_convs_eq {ifp : IntFractPair K}
    (stream_nth_eq : IntFractPair.stream v n = some ifp) :
    let g := of v
    let B := (g.contsAux (n + 1)).b
    let pB := (g.contsAux n).b
    v - g.convs n = if ifp.fr = 0 then 0 else (-1) ^ n / (B * (ifp.fr⁻¹ * B + pB))
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem le_add_of_neg_le_sub_left {a b c : Int} (h : -a ≤ b - c) : c ≤ a + b
-- Mathlib/Order/Disjoint.lean
theorem disjoint_right_iff (h : IsCompl y z) : Disjoint x z ↔ x ≤ y
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
@[simp]
theorem isLittleO_prod_left : (fun x => (f' x, g' x)) =o[l] k' ↔ f' =o[l] k' ∧ g' =o[l] k'
-- Mathlib/Analysis/CstarAlgebra/Multiplier.lean
@[simp]
theorem zero_toProd : (0 : 𝓜(𝕜, A)).toProd = 0
-- Mathlib/LinearAlgebra/Prod.lean
@[simp]
theorem ker_prod (f : M →ₗ[R] M₂) (g : M →ₗ[R] M₃) : ker (prod f g) = ker f ⊓ ker g
-- Mathlib/GroupTheory/Coxeter/Basic.lean
/-- The two words of length `M i i'` that alternate between `i` and `i'` have the same product.
This is known as the "braid relation" or "Artin-Tits relation". -/
theorem wordProd_braidWord_eq (i i' : B) :
    π (braidWord M i i') = π (braidWord M i' i)
-- Mathlib/Analysis/CstarAlgebra/Matrix.lean
/-- The operator norm on `Matrix n n 𝕜` given by the identification with (continuous) linear
endmorphisms of `EuclideanSpace 𝕜 n` makes it into a `L2OpRing`. -/
lemma instCstarRing : CstarRing (Matrix n n 𝕜)
-- Mathlib/Order/JordanHolder.lean
@[simp]
theorem head_le {s : CompositionSeries X} (i : Fin (s.length + 1)) : s.head ≤ s i
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem MeasurableSet.tProd (l : List δ) {s : ∀ i, Set (π i)} (hs : ∀ i, MeasurableSet (s i)) :
    MeasurableSet (Set.tprod l s)
-- Mathlib/GroupTheory/SemidirectProduct.lean
@[simp]
theorem map_right (g : N ⋊[φ] G) : (map f₁ f₂ h g).right = f₂ g.right
-- Mathlib/Topology/Constructions.lean
theorem IsOpen.trans (ht : IsOpen t) (hs : IsOpen s) : IsOpen (t : Set X)
-- Mathlib/Topology/MetricSpace/Thickening.lean
@[simp]
theorem cthickening_union (δ : ℝ) (s t : Set α) :
    cthickening δ (s ∪ t) = cthickening δ s ∪ cthickening δ t
-- Mathlib/MeasureTheory/Decomposition/Lebesgue.lean
lemma _root_.AEMeasurable.withDensity_rnDeriv {β : Type*} {_ : MeasurableSpace β} {f : α → β}
    (hf : AEMeasurable f μ) (ν : Measure α) :
    AEMeasurable f (ν.withDensity (μ.rnDeriv ν))
-- Mathlib/Computability/DFA.lean
@[simp]
theorem symm_reindex (g : σ ≃ σ') : (reindex (α := α) g).symm = reindex g.symm
-- Mathlib/CategoryTheory/Sites/Sheafification.lean
theorem toSheafification_app (P : Cᵒᵖ ⥤ D) : (toSheafification J D).app P = toSheafify J P
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem split_dvd {o o' m} [NF o] (h : split o = (o', m)) : ω ∣ repr o'
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem mul_limZero_left {f} (g : CauSeq β abv) (hg : LimZero f) : LimZero (f * g)
-- Mathlib/Topology/Order/Hom/Esakia.lean
@[simp]
theorem coe_id_continuousOrderHom : (EsakiaHom.id α : α →Co α) = ContinuousOrderHom.id α
-- Mathlib/NumberTheory/ArithmeticFunction.lean
theorem cardFactors_mul {m n : ℕ} (m0 : m ≠ 0) (n0 : n ≠ 0) : Ω (m * n) = Ω m + Ω n
-- Mathlib/Logic/Basic.lean
theorem and_or_imp {a b c : Prop} : a ∧ b ∨ (a → c) ↔ a → b ∨ c
-- Mathlib/RingTheory/MvPowerSeries/Inverse.lean
@[simp]
theorem constantCoeff_invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) :
    constantCoeff σ R (invOfUnit φ u) = ↑u⁻¹
-- Mathlib/Dynamics/PeriodicPts.lean
theorem minimalPeriod_eq_minimalPeriod_iff {g : β → β} {y : β} :
    minimalPeriod f x = minimalPeriod g y ↔ ∀ n, IsPeriodicPt f n x ↔ IsPeriodicPt g n y
-- Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
@[simp] lemma op_hom_braiding (X Y : C) : (β_ X Y).hom.op = (β_ (op Y) (op X)).hom
-- Mathlib/Tactic/NormNum/Ineq.lean
theorem isRat_le_true [LinearOrderedRing α] : {a b : α} → {na nb : ℤ} → {da db : ℕ} →
    IsRat a na da → IsRat b nb db →
    decide (Int.mul na (.ofNat db) ≤ Int.mul nb (.ofNat da)) → a ≤ b
-- Mathlib/Tactic/ReduceModChar.lean
lemma CharP.isInt_of_mod {e' r : ℤ} {α : Type _} [Ring α] {n n' : ℕ} (inst : CharP α n) {e : α}
    (he : IsInt e e') (hn : IsNat n n') (h₂ : IsInt (e' % n') r) : IsInt e r
-- Mathlib/Algebra/Symmetrized.lean
theorem sym_surjective : Surjective (sym : α → αˢʸᵐ)
-- Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean
theorem IsBigO.rpow (hr : 0 ≤ r) (hg : 0 ≤ᶠ[l] g) (h : f =O[l] g) :
    (fun x => f x ^ r) =O[l] fun x => g x ^ r
-- Mathlib/Algebra/Module/Submodule/Ker.lean
theorem ker_smul (f : V →ₗ[K] V₂) (a : K) (h : a ≠ 0) : ker (a • f) = ker f
-- Mathlib/Data/Complex/Abs.lean
lemma ne_zero_of_one_lt_re {s : ℂ} (hs : 1 < s.re) : s ≠ 0
-- Mathlib/Order/UpperLower/Basic.lean
@[simp, norm_cast]
theorem coe_eq_empty : (s : Set α) = ∅ ↔ s = ⊥
-- Mathlib/GroupTheory/Perm/Support.lean
theorem disjoint_prod_perm {l₁ l₂ : List (Perm α)} (hl : l₁.Pairwise Disjoint) (hp : l₁ ~ l₂) :
    l₁.prod = l₂.prod
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem nfpFamily_le_apply [Nonempty ι] (H : ∀ i, IsNormal (f i)) {a b} :
    (∃ i, nfpFamily.{u, v} f a ≤ f i b) ↔ nfpFamily.{u, v} f a ≤ b
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem tan_sub_nat_mul_pi (x : ℝ) (n : ℕ) : tan (x - n * π) = tan x
-- Mathlib/Data/Fin/Basic.lean
@[simp] lemma succAbove_pred_self (p : Fin (n + 1)) (h : p ≠ 0) :
    succAbove p (p.pred h) = (p.pred h).castSucc
-- Mathlib/FieldTheory/Adjoin.lean
@[simp]
theorem top_toSubalgebra : (⊤ : IntermediateField F E).toSubalgebra = ⊤
-- Mathlib/Algebra/Module/Submodule/Equiv.lean
@[simp]
theorem equivSubtypeMap_apply {p : Submodule R M} {q : Submodule R p} (x : q) :
    (p.equivSubtypeMap q x : M) = p.subtype.domRestrict q x
-- Mathlib/CategoryTheory/Comma/Over.lean
@[simp]
theorem forget_map {U V : Under X} {f : U ⟶ V} : (forget X).map f = f.right
-- Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
/-- The head term of the sequence with head of `v` is just the integer part of `v`. -/
@[simp]
theorem IntFractPair.seq1_fst_eq_of : (IntFractPair.seq1 v).fst = IntFractPair.of v
-- Mathlib/Algebra/Polynomial/EraseLead.lean
@[simp]
theorem card_support_eraseLead : f.eraseLead.support.card = f.support.card - 1
-- Mathlib/Algebra/Ring/Defs.lean
/-- A typeclass stating that multiplication is right distributive over addition. -/
class RightDistribClass (R : Type*) [Mul R] [Add R] : Prop where
  /-- Multiplication is right distributive over addition -/
  protected right_distrib : ∀ a b c : R, (a + b) * c = a * c + b * c
-- Mathlib/Algebra/Lie/TraceForm.lean
lemma traceForm_eq_sum_finrank_nsmul_mul (x y : L) :
    traceForm K L M x y = ∑ χ : Weight K L M, finrank K (weightSpace M χ) • (χ x * χ y)
-- Mathlib/NumberTheory/RamificationInertia.lean
/-- If `b` mod `p` spans `S/p` as `R/p`-space, then `b` itself spans `Frac(S)` as `K`-space.

Here,
 * `p` is an ideal of `R` such that `R / p` is nontrivial
 * `K` is a field that has an embedding of `R` (in particular we can take `K = Frac(R)`)
 * `L` is a field extension of `K`
 * `S` is the integral closure of `R` in `L`

More precisely, we avoid quotients in this statement and instead require that `b ∪ pS` spans `S`.
-/
theorem FinrankQuotientMap.span_eq_top [IsDomain R] [IsDomain S] [Algebra K L] [IsNoetherian R S]
    [Algebra R L] [IsScalarTower R S L] [IsScalarTower R K L] [IsIntegralClosure S R L]
    [NoZeroSMulDivisors R K] (hp : p ≠ ⊤) (b : Set S)
    (hb' : Submodule.span R b ⊔ (p.map (algebraMap R S)).restrictScalars R = ⊤) :
    Submodule.span K (algebraMap S L '' b) = ⊤
-- Mathlib/Analysis/SpecialFunctions/Complex/LogBounds.lean
/-- Represent `log (1 - z)⁻¹` as an integral over the unit interval -/
lemma log_inv_eq_integral {z : ℂ} (hz : 1 - z ∈ slitPlane) :
    log (1 - z)⁻¹ = z * ∫ (t : ℝ) in (0 : ℝ)..1, (1 - t • z)⁻¹
-- Mathlib/Analysis/SpecialFunctions/Gamma/Deligne.lean
lemma Gammaℝ_def (s : ℂ) : Gammaℝ s = π ^ (-s / 2) * Gamma (s / 2)
-- Mathlib/Algebra/ContinuedFractions/Translations.lean
theorem exists_conts_a_of_num {A : K} (nth_num_eq : g.nums n = A) :
    ∃ conts, g.conts n = conts ∧ conts.a = A
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem zero_not_mem_normalizedFactors (x : α) : (0 : α) ∉ normalizedFactors x
-- Mathlib/Dynamics/OmegaLimit.lean
theorem eventually_mapsTo_of_isOpen_of_omegaLimit_subset [CompactSpace β] {v : Set β}
    (hv₁ : IsOpen v) (hv₂ : ω f ϕ s ⊆ v) : ∀ᶠ t in f, MapsTo (ϕ t) s v
-- Mathlib/Analysis/InnerProductSpace/OfNorm.lean
theorem innerProp_neg_one : innerProp' E ((-1 : ℤ) : 𝕜)
-- Mathlib/Logic/Function/Basic.lean
@[simp]
theorem cast_inj {α β : Type u} (h : α = β) {x y : α} : cast h x = cast h y ↔ x = y
-- Mathlib/Topology/ContinuousFunction/Compact.lean
theorem norm_lt_iff {M : ℝ} (M0 : 0 < M) : ‖f‖ < M ↔ ∀ x, ‖f x‖ < M
-- Mathlib/Topology/Sets/Closeds.lean
@[simp]
theorem mem_sInf {S : Set (Closeds α)} {x : α} : x ∈ sInf S ↔ ∀ s ∈ S, x ∈ s
-- Mathlib/NumberTheory/LucasLehmer.lean
theorem sMod'_eq_sMod (p k : ℕ) (hp : 2 ≤ p) : (sMod' (2 ^ p - 1) k : ℤ) = sMod p k
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Bilinear.lean
@[simp]
theorem opNorm_flip (f : E →SL[σ₁₃] F →SL[σ₂₃] G) : ‖f.flip‖ = ‖f‖
-- Mathlib/Order/Interval/Finset/Basic.lean
/-- A function from a locally finite partial order is monotone if and only if it is monotone when
restricted to pairs satisfying `a ⋖ b`. -/
lemma monotone_iff_forall_covBy [PartialOrder α] [LocallyFiniteOrder α] [Preorder β]
    (f : α → β) : Monotone f ↔ ∀ a b : α, a ⋖ b → f a ≤ f b
-- Mathlib/Analysis/Convex/Side.lean
theorem _root_.Wbtw.wOppSide₃₁ {s : AffineSubspace R P} {x y z : P} (h : Wbtw R x y z)
    (hy : y ∈ s) : s.WOppSide z x
-- Mathlib/Analysis/Analytic/Constructions.lean
/-- `f x / g x` is analytic away from `g x = 0` -/
theorem AnalyticOn.div {f g : E → 𝕝} {s : Set E}
    (fa : AnalyticOn 𝕜 f s) (ga : AnalyticOn 𝕜 g s) (g0 : ∀ x ∈ s, g x ≠ 0) :
    AnalyticOn 𝕜 (fun x ↦ f x / g x) s
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem contDiffWithinAt_top : ContDiffWithinAt 𝕜 ∞ f s x ↔ ∀ n : ℕ, ContDiffWithinAt 𝕜 n f s x
-- Mathlib/RingTheory/Ideal/Maps.lean
/-- If `f : R ≃+* S` is a ring isomorphism and `I : Ideal R`, then `map f I = comap f.symm I`. -/
theorem map_comap_of_equiv (I : Ideal R) (f : R ≃+* S) : I.map (f : R →+* S) = I.comap f.symm
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem continuousOn_coordChange [VectorBundle R F E] (e e' : Trivialization F (π F E))
    [MemTrivializationAtlas e] [MemTrivializationAtlas e'] :
    ContinuousOn (fun b => Trivialization.coordChangeL R e e' b : B → F →L[R] F)
      (e.baseSet ∩ e'.baseSet)
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
@[simp] theorem back?_push (a : Array α) : (a.push x).back? = some x
-- Mathlib/Analysis/Calculus/SmoothSeries.lean
/-- Consider a series of functions `∑' n, f n x` on a preconnected open set. If the series converges
at a point, and all functions in the series are differentiable with a summable bound on the
derivatives, then the series is differentiable on the set and its derivative is the sum of the
derivatives. -/
theorem hasFDerivAt_tsum_of_isPreconnected (hu : Summable u) (hs : IsOpen s)
    (h's : IsPreconnected s) (hf : ∀ n x, x ∈ s → HasFDerivAt (f n) (f' n x) x)
    (hf' : ∀ n x, x ∈ s → ‖f' n x‖ ≤ u n) (hx₀ : x₀ ∈ s) (hf0 : Summable fun n => f n x₀)
    (hx : x ∈ s) : HasFDerivAt (fun y => ∑' n, f n y) (∑' n, f' n x) x
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
@[ext]
theorem ext {f g : CauSeq β abv} (h : ∀ i, f i = g i) : f = g
-- Mathlib/Algebra/Lie/Solvable.lean
theorem abelian_iff_derived_succ_eq_bot (I : LieIdeal R L) (k : ℕ) :
    IsLieAbelian (derivedSeriesOfIdeal R L k I) ↔ derivedSeriesOfIdeal R L (k + 1) I = ⊥
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
@[elementwise, reassoc]
theorem toOpen_comp_comap (f : R →+* S) (U : Opens (PrimeSpectrum.Top R)) :
    (toOpen R U ≫ comap f U (Opens.comap (PrimeSpectrum.comap f) U) fun _ => id) =
      CommRingCat.ofHom f ≫ toOpen S _
-- Mathlib/Data/Sym/Sym2.lean
@[simp]
theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔ ∃ a, a ∈ z ∧ f a = b
-- Mathlib/Algebra/Lie/Abelian.lean
@[simp]
theorem ad_ker_eq_self_module_ker : (ad R L).ker = LieModule.ker R L L
-- Mathlib/Tactic/Positivity/Basic.lean
private lemma max_ne (ha : a ≠ c) (hb : b ≠ c) : max a b ≠ c
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
/-- If A ≠ B and C ≠ B then ∠ABC = π if and only if (dist A C) = (dist A B) + (dist B C). -/
theorem dist_eq_add_dist_iff_angle_eq_pi {p1 p2 p3 : P} (hp1p2 : p1 ≠ p2) (hp3p2 : p3 ≠ p2) :
    dist p1 p3 = dist p1 p2 + dist p3 p2 ↔ ∠ p1 p2 p3 = π
-- Mathlib/Data/Multiset/Basic.lean
theorem mem_replicate {a b : α} {n : ℕ} : b ∈ replicate n a ↔ n ≠ 0 ∧ b = a
-- Mathlib/GroupTheory/Perm/Sign.lean
private theorem signAux_swap_zero_one' (n : ℕ) : signAux (swap (0 : Fin (n + 2)) 1) = -1
-- Mathlib/Order/RelIso/Basic.lean
theorem map_rel_iff (f : r ↪r s) {a b} : s (f a) (f b) ↔ r a b
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
theorem div_eq_of_lt (h₀ : a < b) : a / b = 0
-- Mathlib/Analysis/Calculus/BumpFunction/Basic.lean
/-- `ContDiffBump` is `𝒞ⁿ` in all its arguments. -/
protected theorem _root_.ContDiffWithinAt.contDiffBump {c g : X → E} {s : Set X}
    {f : ∀ x, ContDiffBump (c x)} {x : X} (hc : ContDiffWithinAt ℝ n c s x)
    (hr : ContDiffWithinAt ℝ n (fun x => (f x).rIn) s x)
    (hR : ContDiffWithinAt ℝ n (fun x => (f x).rOut) s x)
    (hg : ContDiffWithinAt ℝ n g s x) :
    ContDiffWithinAt ℝ n (fun x => f x (g x)) s x
-- Mathlib/Topology/Order.lean
@[simp]
theorem isOpen_singleton_true : IsOpen ({True} : Set Prop)
-- Mathlib/Topology/EMetricSpace/Basic.lean
@[simp]
theorem edist_toAdd (a b : Multiplicative X) : edist (toAdd a) (toAdd b) = edist a b