ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Nat/Defs.lean
lemma decreasingInduction_succ {n} {motive : (m : ℕ) → m ≤ n + 1 → Sort*} (of_succ self)
    (mn : m ≤ n) (msn : m ≤ n + 1) :
    (decreasingInduction (motive := motive) of_succ self msn : motive m msn) =
      decreasingInduction (motive := fun m h => motive m (le_succ_of_le h))
        (fun i hi => of_succ _ _) (of_succ _ _ self) mn
-- Mathlib/Data/Finsupp/Basic.lean
@[simp, norm_cast]
theorem coe_sumElim {α β γ : Type*} [Zero γ] (f : α →₀ γ) (g : β →₀ γ) :
    ⇑(sumElim f g) = Sum.elim f g
-- Mathlib/CategoryTheory/Monoidal/Internal/FunctorCategory.lean
/-- When `D` is a braided monoidal category,
commutative monoid objects in `C ⥤ D` are the same thing
as functors from `C` into the commutative monoid objects of `D`.
-/
@[simps]
def commMonFunctorCategoryEquivalence : CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
lemma ofJ_0_of_three_eq_zero (h3 : (3 : F) = 0) :
    ofJ 0 = @ofJ1728 _ _ (invertibleOfNonzero <| two_or_three_ne_zero.neg_resolve_right h3)
-- Mathlib/Data/Matrix/Basic.lean
theorem single_vecMul_diagonal [Fintype n] [DecidableEq n] [NonUnitalNonAssocSemiring R] (v : n → R)
    (j : n) (x : R) : (Pi.single j x) ᵥ* (diagonal v) = Pi.single j (x * v j)
-- Mathlib/NumberTheory/ZetaValues.lean
theorem integral_bernoulliFun_eq_zero {k : ℕ} (hk : k ≠ 0) :
    ∫ x : ℝ in (0)..1, bernoulliFun k x = 0
-- Mathlib/Probability/Distributions/Poisson.lean
@[measurability]
lemma stronglyMeasurable_poissonPMFReal (r : ℝ≥0) : StronglyMeasurable (poissonPMFReal r)
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[simp]
protected theorem ZMod.exponent (n : ℕ) : AddMonoid.exponent (ZMod n) = n
-- Mathlib/RingTheory/Ideal/Cotangent.lean
lemma subsingleton_cotangentSpace_iff [IsNoetherianRing R] :
    Subsingleton (CotangentSpace R) ↔ IsField R
-- Mathlib/NumberTheory/LSeries/Linearity.lean
lemma LSeriesSummable.of_smul {f : ℕ → ℂ} {c s : ℂ} (hc : c ≠ 0) (hf : LSeriesSummable (c • f) s) :
    LSeriesSummable f s
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem disc_eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
    φ P.disc = (φ P.a * φ P.a * (x - y) * (x - z) * (y - z)) ^ 2
-- Mathlib/Order/SymmDiff.lean
theorem bihimp_right_comm : a ⇔ b ⇔ c = a ⇔ c ⇔ b
-- Mathlib/Topology/Homeomorph.lean
@[simp]
theorem range_coe (h : X ≃ₜ Y) : range h = univ
-- Mathlib/Probability/Martingale/OptionalSampling.lean
/-- If `τ` and `σ` are two stopping times with `σ ≤ τ` and `τ` is bounded, then the value of a
martingale `f` at `σ` is the conditional expectation of its value at `τ` with respect to the
σ-algebra generated by `σ`. -/
theorem stoppedValue_ae_eq_condexp_of_le_of_countable_range (h : Martingale f ℱ μ)
    (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) (hσ_le_τ : σ ≤ τ) (hτ_le : ∀ x, τ x ≤ n)
    (hτ_countable_range : (Set.range τ).Countable) (hσ_countable_range : (Set.range σ).Countable)
    [SigmaFinite (μ.trim (hσ.measurableSpace_le_of_le fun x => (hσ_le_τ x).trans (hτ_le x)))] :
    stoppedValue f σ =ᵐ[μ] μ[stoppedValue f τ|hσ.measurableSpace]
-- Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean
lemma differentiableAt_completedCosZeta
    (a : UnitAddCircle) {s : ℂ} (hs : s ≠ 0) (hs' : s ≠ 1 ∨ a ≠ 0) :
    DifferentiableAt ℂ (completedCosZeta a) s
-- Mathlib/Analysis/ODE/Gronwall.lean
/-- If `f` and `g` are two approximate solutions of the same ODE, then the distance between them
can't grow faster than exponentially. This is a simple corollary of Grönwall's inequality, and some
people call this Grönwall's inequality too.

This version assumes all inequalities to be true in some time-dependent set `s t`,
and assumes that the solutions never leave this set. -/
theorem dist_le_of_approx_trajectories_ODE_of_mem
    (hf : ContinuousOn f (Icc a b))
    (hf' : ∀ t ∈ Ico a b, HasDerivWithinAt f (f' t) (Ici t) t)
    (f_bound : ∀ t ∈ Ico a b, dist (f' t) (v t (f t)) ≤ εf)
    (hfs : ∀ t ∈ Ico a b, f t ∈ s t)
    (hg : ContinuousOn g (Icc a b))
    (hg' : ∀ t ∈ Ico a b, HasDerivWithinAt g (g' t) (Ici t) t)
    (g_bound : ∀ t ∈ Ico a b, dist (g' t) (v t (g t)) ≤ εg)
    (hgs : ∀ t ∈ Ico a b, g t ∈ s t)
    (ha : dist (f a) (g a) ≤ δ) :
    ∀ t ∈ Icc a b, dist (f t) (g t) ≤ gronwallBound δ K (εf + εg) (t - a)
-- Mathlib/Algebra/Group/Defs.lean
/-- Auxiliary typeclass for types with an involutive `Inv`. -/
@[to_additive]
class InvolutiveInv (G : Type*) extends Inv G where
  protected inv_inv : ∀ x : G, x⁻¹⁻¹ = x
-- Mathlib/LinearAlgebra/Dual.lean
theorem dualRestrict_leftInverse (W : Subspace K V) :
    Function.LeftInverse W.dualRestrict W.dualLift
-- Mathlib/Algebra/Ring/BooleanRing.lean
theorem sup_inf_self (a b : α) : a ⊔ a ⊓ b = a
-- Mathlib/Topology/Baire/Lemmas.lean
/-- If a countable family of closed sets cover a dense `Gδ` set, then the union of their interiors
is dense. Formulated here with `⋃`. -/
theorem IsGδ.dense_iUnion_interior_of_closed [Countable ι] {s : Set X} (hs : IsGδ s) (hd : Dense s)
    {f : ι → Set X} (hc : ∀ i, IsClosed (f i)) (hU : s ⊆ ⋃ i, f i) :
    Dense (⋃ i, interior (f i))
-- Mathlib/Combinatorics/SetFamily/FourFunctions.lean
lemma collapse_nonneg (hf : 0 ≤ f) : 0 ≤ collapse 𝒜 a f
-- Mathlib/Order/Height.lean
@[simp]
theorem chainHeight_dual : (ofDual ⁻¹' s).chainHeight = s.chainHeight
-- Mathlib/Algebra/Star/Basic.lean
/-- Typeclass for a star operation with is involutive.
-/
class InvolutiveStar (R : Type u) extends Star R where
  /-- Involutive condition. -/
  star_involutive : Function.Involutive star
-- Mathlib/GroupTheory/Torsion.lean
/-- The image of a surjective torsion group homomorphism is torsion. -/
@[to_additive AddIsTorsion.of_surjective
      "The image of a surjective additive torsion group homomorphism is torsion."]
theorem IsTorsion.of_surjective {f : G →* H} (hf : Function.Surjective f) (tG : IsTorsion G) :
    IsTorsion H
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
theorem fderivWithin_list_prod' {l : List ι} {x : E}
    (hxs : UniqueDiffWithinAt 𝕜 s x) (h : ∀ i ∈ l, DifferentiableWithinAt 𝕜 (f i ·) s x) :
    fderivWithin 𝕜 (fun x ↦ (l.map (f · x)).prod) s x =
      ∑ i : Fin l.length, ((l.take i).map (f · x)).prod •
        smulRight (fderivWithin 𝕜 (fun x ↦ f (l.get i) x) s x)
          ((l.drop (.succ i)).map (f · x)).prod
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
@[simp]
theorem stdBasis_apply_ofIsComplex_snd (x : E K) (w : {w : InfinitePlace K // IsComplex w}) :
    (stdBasis K).repr x (Sum.inr ⟨w, 1⟩) = (x.2 w).im
-- Mathlib/Data/Finset/Basic.lean
theorem Subset.antisymm_iff {s₁ s₂ : Finset α} : s₁ = s₂ ↔ s₁ ⊆ s₂ ∧ s₂ ⊆ s₁
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
@[simp]
theorem arccos_neg_one : arccos (-1) = π
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem not_ssubset_empty (s : Finset α) : ¬s ⊂ ∅
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem Differentiable.smul_const (hc : Differentiable 𝕜 c) (f : F) :
    Differentiable 𝕜 fun y => c y • f
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma isUnit_addZ_of_X_ne {P Q : Fin 3 → F} (hx : P x * Q z ^ 2 ≠ Q x * P z ^ 2) :
    IsUnit <| addZ P Q
-- Mathlib/RingTheory/Polynomial/Pochhammer.lean
theorem descPochhammer_mul (n m : ℕ) :
    descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m)
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
@[local simp] theorem ofNat_mul_ofNat (m n : Nat) : (↑m * ↑n : Int) = ↑(m * n)
-- Mathlib/Topology/Order/Hom/Esakia.lean
theorem toFun_eq_coe {f : PseudoEpimorphism α β} : f.toFun = (f : α → β)
-- Mathlib/Order/Interval/Set/Basic.lean
theorem nonempty_Ioc_subtype (h : a < b) : Nonempty (Ioc a b)
-- Mathlib/RingTheory/Valuation/ValuationSubring.lean
theorem principalUnitGroup_injective :
    Function.Injective (principalUnitGroup : ValuationSubring K → Subgroup _)
-- Mathlib/Order/Lattice.lean
theorem inf_inf_distrib_left (a b c : α) : a ⊓ (b ⊓ c) = a ⊓ b ⊓ (a ⊓ c)
-- Mathlib/Data/Fin/Tuple/Basic.lean
@[simp] lemma removeNth_update (p : Fin (n + 1)) (x) (f : ∀ j, α j) :
    removeNth p (update f p x) = removeNth p f
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem verts_iInf {f : ι → G.Subgraph} : (⨅ i, f i).verts = ⋂ i, (f i).verts
-- Mathlib/Algebra/Lie/IdealOperations.lean
theorem map_bracket_eq : map f ⁅I, N⁆ = ⁅I, map f N⁆
-- Mathlib/Data/TypeVec.lean
@[simp]
theorem prod_fst_mk {α β : TypeVec n} (i : Fin2 n) (a : α i) (b : β i) :
    TypeVec.prod.fst i (prod.mk i a b) = a
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem posMulReflectLT_iff_contravariant_pos :
    PosMulReflectLT α ↔ ContravariantClass α>0 α (fun x y => x * y) (· < ·)
-- Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean
theorem SuperpolynomialDecay.trans_abs_le (hf : SuperpolynomialDecay l k f)
    (hfg : ∀ x, |g x| ≤ |f x|) : SuperpolynomialDecay l k g
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem coe_adj_sub (G' : Subgraph G) (u v : G'.verts) (h : G'.coe.Adj u v) : G.Adj u v
-- Mathlib/LinearAlgebra/Projection.lean
@[simp]
theorem quotientEquivOfIsCompl_apply_mk_coe (h : IsCompl p q) (x : q) :
    quotientEquivOfIsCompl p q h (Quotient.mk x) = x
-- Mathlib/NumberTheory/Divisors.lean
lemma divisors_filter_dvd_of_dvd {n m : ℕ} (hn : n ≠ 0) (hm : m ∣ n) :
    (n.divisors.filter (· ∣ m)) = m.divisors
-- Mathlib/MeasureTheory/Measure/EverywherePos.lean
/-- In a space with an inner regular measure, any measurable set coincides almost everywhere with
its everywhere positive subset. -/
lemma everywherePosSubset_ae_eq [OpensMeasurableSpace α] [InnerRegular μ] (hs : MeasurableSet s) :
    μ.everywherePosSubset s =ᵐ[μ] s
-- Mathlib/MeasureTheory/Integral/Bochner.lean
@[integral_simps]
theorem integral_neg (f : α →₁[μ] E) : integral (-f) = -integral f
-- Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
theorem mul_nat_iff (hn : n ≠ 0) : LiouvilleWith p (x * n) ↔ LiouvilleWith p x
-- Mathlib/Algebra/Lie/IdealOperations.lean
theorem lieIdeal_oper_eq_linear_span' :
    (↑⁅I, N⁆ : Submodule R M) = Submodule.span R { m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m }
-- Mathlib/Order/RelIso/Basic.lean
protected theorem wellFounded : ∀ (_ : r ↪r s) (_ : WellFounded s), WellFounded r
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iic_inter_Ioc_of_le (h : a ≤ c) : Iic a ∩ Ioc b c = Ioc b a
-- Mathlib/RingTheory/Polynomial/SeparableDegree.lean
/-- In exponential characteristic one, the separable degree equals the degree. -/
theorem HasSeparableContraction.eq_degree {f : F[X]} (hf : HasSeparableContraction 1 f) :
    hf.degree = f.natDegree
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
@[to_additive (attr := simp)]
theorem prod_map_mul : (m.map fun i => f i * g i).prod = (m.map f).prod * (m.map g).prod
-- Mathlib/Algebra/DirectSum/Module.lean
/-- Linear isomorphism obtained by separating the term of index `none` of a direct sum over
`Option ι`. -/
@[simps]
noncomputable def lequivProdDirectSum : (⨁ i, α i) ≃ₗ[R] α none × ⨁ i, α (some i)
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Subperm.exists_of_length_lt {l₁ l₂ : List α} (s : l₁ <+~ l₂) (h : length l₁ < length l₂) :
    ∃ a, a :: l₁ <+~ l₂
-- Mathlib/MeasureTheory/Integral/Average.lean
/-- **First moment method**. The minimum of an integrable function is smaller than its integral. -/
theorem exists_le_integral (hf : Integrable f μ) : ∃ x, f x ≤ ∫ a, f a ∂μ
-- Mathlib/SetTheory/Game/Impartial.lean
theorem le_zero_iff {G : PGame} [G.Impartial] : G ≤ 0 ↔ 0 ≤ G
-- Mathlib/SetTheory/Surreal/Multiplication.lean
/-- P3 follows from `IH3` (so P4 (with `y₁` a left option of `y₂`) follows from the induction
  hypothesis). -/
theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)
    (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :
    P3 x₁ x₂ y₁ y₂
-- Mathlib/Topology/MetricSpace/DilationEquiv.lean
@[simp]
theorem ratio_inv (e : X ≃ᵈ X) : ratio (e⁻¹) = (ratio e)⁻¹
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem add_mul_left_left (h : IsRelPrime x y) : IsRelPrime (x + y * z) y
-- Mathlib/CategoryTheory/Sites/IsSheafFor.lean
theorem isAmalgamation_sieveExtend {R : Presieve X} (x : FamilyOfElements P R) (t : P.obj (op X))
    (ht : x.IsAmalgamation t) : x.sieveExtend.IsAmalgamation t
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
/-- In a space with second countable topology, strongly measurable and measurable are equivalent. -/
theorem _root_.aestronglyMeasurable_iff_aemeasurable [PseudoMetrizableSpace β] [BorelSpace β]
    [SecondCountableTopology β] : AEStronglyMeasurable f μ ↔ AEMeasurable f μ
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- Pythagorean theorem, subtracting vectors, if-and-only-if vector angle form. -/
theorem norm_sub_sq_eq_norm_sq_add_norm_sq_iff_angle_eq_pi_div_two (x y : V) :
    ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem linearMapAt_symmₗ (e : Pretrivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) (y : F) : e.linearMapAt R b (e.symmₗ R b y) = y
-- Mathlib/Data/Rel.lean
theorem core_comp (s : Rel β γ) (t : Set γ) : core (r • s) t = core r (core s t)
-- Mathlib/Order/Minimal.lean
theorem mem_maximals_iff_forall_ssubset_not_mem {x : Set α} {s : Set (Set α)} :
    x ∈ maximals (· ⊆ ·) s ↔ x ∈ s ∧ ∀ ⦃y⦄, x ⊂ y → y ∉ s
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem IsLimit.succ_lt {o a : Ordinal} (h : IsLimit o) : a < o → succ a < o
-- Mathlib/Order/Zorn.lean
/-- **Zorn's lemma**

If every chain has an upper bound, then there exists a maximal element. -/
theorem exists_maximal_of_chains_bounded (h : ∀ c, IsChain r c → ∃ ub, ∀ a ∈ c, a ≺ ub)
    (trans : ∀ {a b c}, a ≺ b → b ≺ c → a ≺ c) : ∃ m, ∀ a, m ≺ a → a ≺ m
-- Mathlib/Data/ENNReal/Operations.lean
theorem mul_lt_mul_right : c ≠ 0 → c ≠ ∞ → (a * c < b * c ↔ a < b)
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem USize.toNat_div (x y : USize) : (x / y).toNat = x.toNat / y.toNat
-- Mathlib/Algebra/Ring/Prod.lean
@[simp]
theorem coe_prodComm : ⇑(prodComm : R × S ≃+* S × R) = Prod.swap
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_lt_smul' [PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ < b₂)
    (h₂ : 0 < a₂) (h₁ : 0 < b₁) : a₁ • b₁ < a₂ • b₂
-- Mathlib/Algebra/Group/Action/Sum.lean
@[to_additive (attr := simp)]
theorem smul_inr : a • (inr c : α ⊕ β) = inr (a • c)
-- Mathlib/Algebra/Algebra/Equiv.lean
@[deprecated map_one (since := "2024-06-20")]
protected theorem map_one : e 1 = 1
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n
-- Mathlib/Data/Int/Cast/Basic.lean
@[simp high, nolint simpNF, norm_cast]
theorem cast_natCast (n : ℕ) : ((n : ℤ) : R) = n
-- Mathlib/Order/Fin/Basic.lean
lemma strictMono_succAbove (p : Fin (n + 1)) : StrictMono (succAbove p)
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
@[to_additive (attr := simp, norm_cast)]
lemma coe_eq_one : (a : WithBot α) = 1 ↔ a = 1
-- Mathlib/Data/Matroid/Constructions.lean
@[simp] theorem freeOn_empty (α : Type*) : freeOn (∅ : Set α) = emptyOn α
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt 𝕜 f f' x v) :
    LineDifferentiableAt 𝕜 f x v
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1S_zero_left' {T : Set α → E →L[ℝ] F}
    (h_zero : ∀ s, MeasurableSet s → μ s < ∞ → T s = 0) (f : α →₁ₛ[μ] E) : setToL1S T f = 0
-- Mathlib/Topology/Separation.lean
protected theorem IsGδ.singleton [T1Space X] (x : X) : IsGδ ({x} : Set X)
-- Mathlib/AlgebraicTopology/DoldKan/EquivalencePseudoabelian.lean
/-- The functor `N` for the equivalence is obtained by composing
`N' : SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ)` and the inverse
of the equivalence `ChainComplex C ℕ ≌ Karoubi (ChainComplex C ℕ)`. -/
@[simps!, nolint unusedArguments]
def N [IsIdempotentComplete C] [HasFiniteCoproducts C] : SimplicialObject C ⥤ ChainComplex C ℕ
-- Mathlib/Algebra/Ring/Subring/MulOpposite.lean
/-- A subring `S` of `R` determines a subring `S.op` of the opposite ring `Rᵐᵒᵖ`. -/
@[simps]
def opEquiv : Subring R ≃o Subring Rᵐᵒᵖ
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
lemma homologyMap_op [HasHomology S₁] [HasHomology S₂] :
    (homologyMap φ).op =
      (S₂.homologyOpIso).inv ≫ homologyMap (opMap φ) ≫ (S₁.homologyOpIso).hom
-- Mathlib/Algebra/EuclideanDomain/Basic.lean
theorem lcm_dvd {x y z : R} (hxz : x ∣ z) (hyz : y ∣ z) : lcm x y ∣ z
-- Mathlib/Data/Erased.lean
@[simp]
theorem bind_def {α β} : ((· >>= ·) : Erased α → (α → Erased β) → Erased β) = @bind _ _
-- Mathlib/Topology/Defs/Filter.lean
/-- Type class for compact spaces. Separation is sometimes included in the definition, especially
in the French literature, but we do not include it here. -/
class CompactSpace : Prop where
  /-- In a compact space, `Set.univ` is a compact set. -/
  isCompact_univ : IsCompact (Set.univ : Set X)
-- Mathlib/Analysis/Analytic/Inverse.lean
/-- Second technical lemma to control the growth of coefficients of the inverse. Bound the explicit
expression for `∑_{k<n+1} aᵏ Qₖ` in terms of a sum of powers of the same sum one step before,
in the specific setup we are interesting in, by reducing to the general bound in
`radius_rightInv_pos_of_radius_pos_aux1`. -/
theorem radius_rightInv_pos_of_radius_pos_aux2 {n : ℕ} (hn : 2 ≤ n + 1)
    (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) {r a C : ℝ} (hr : 0 ≤ r) (ha : 0 ≤ a)
    (hC : 0 ≤ C) (hp : ∀ n, ‖p n‖ ≤ C * r ^ n) :
    ∑ k ∈ Ico 1 (n + 1), a ^ k * ‖p.rightInv i k‖ ≤
      ‖(i.symm : F →L[𝕜] E)‖ * a +
        ‖(i.symm : F →L[𝕜] E)‖ * C *
          ∑ k ∈ Ico 2 (n + 1), (r * ∑ j ∈ Ico 1 n, a ^ j * ‖p.rightInv i j‖) ^ k
-- Mathlib/RingTheory/DedekindDomain/FiniteAdeleRing.lean
/-- The tuple `(0)_v` is a finite adèle. -/
theorem zero : (0 : K_hat R K).IsFiniteAdele
-- Mathlib/Data/Finsupp/Multiset.lean
@[simp]
theorem toFinsupp_sum_eq (s : Multiset α) : s.toFinsupp.sum (fun _ ↦ id) = Multiset.card s
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem lowerClosure_singleton (a : α) : lowerClosure ({a} : Set α) = LowerSet.Iic a
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- Given a set of points, together with a chosen base point in this set, if we affinely transport
all other members of the set along the line joining them to this base point, the affine span is
unchanged. -/
theorem affineSpan_eq_affineSpan_lineMap_units [Nontrivial k] {s : Set P} {p : P} (hp : p ∈ s)
    (w : s → Units k) :
    affineSpan k (Set.range fun q : s => AffineMap.lineMap p ↑q (w q : k)) = affineSpan k s
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/--
An isomorphism of groups gives an order isomorphism between the lattices of subgroups,
defined by sending subgroups to their inverse images.

See also `MulEquiv.mapSubgroup` which maps subgroups to their forward images.
-/
@[simps]
def comapSubgroup (f : G ≃* H) : Subgroup H ≃o Subgroup G
-- Mathlib/RingTheory/Localization/FractionRing.lean
@[norm_cast, simp]
-- Porting note: using `↑` didn't work, so I needed to explicitly put in the cast myself
theorem coe_inj {a b : R} : (Algebra.cast a : K) = Algebra.cast b ↔ a = b
-- Mathlib/LinearAlgebra/Lagrange.lean
theorem basis_eq_prod_sub_inv_mul_nodal_div (hi : i ∈ s) :
    Lagrange.basis s v i = C (nodalWeight s v i) * (nodal s v / (X - C (v i)))
-- Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean
nonrec theorem closure_ball (x : E) {r : ℝ} (h : r ≠ 0) : closure (ball x r) = closedBall x r
-- Mathlib/LinearAlgebra/Prod.lean
theorem prodMap_mul (f₁₂ : M →ₗ[R] M) (f₂₃ : M →ₗ[R] M) (g₁₂ : M₂ →ₗ[R] M₂) (g₂₃ : M₂ →ₗ[R] M₂) :
    f₂₃.prodMap g₂₃ * f₁₂.prodMap g₁₂ = (f₂₃ * f₁₂).prodMap (g₂₃ * g₁₂)
-- Mathlib/CategoryTheory/Opposites.lean
lemma rightOp_map_unop {F : Cᵒᵖ ⥤ D} {X Y} (f : X ⟶ Y) :
    (F.rightOp.map f).unop = F.map f.op
-- Mathlib/Algebra/Order/Archimedean.lean
theorem eq_of_forall_rat_lt_iff_lt (h : ∀ q : ℚ, (q : α) < x ↔ (q : α) < y) : x = y
-- Mathlib/Data/Set/Card.lean
theorem one_lt_ncard_iff (hs : s.Finite := by toFinite_tac) :
    1 < s.ncard ↔ ∃ a b, a ∈ s ∧ b ∈ s ∧ a ≠ b
-- Mathlib/FieldTheory/IntermediateField.lean
theorem fieldRange_le : (algebraMap K L).fieldRange ≤ S.toSubfield
-- Mathlib/Topology/Algebra/Order/Field.lean
theorem tendsto_const_mul_zpow_atTop_zero {n : ℤ} {c : 𝕜} (hn : n < 0) :
    Tendsto (fun x => c * x ^ n) atTop (𝓝 0)
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem tendsto_setIntegral_of_monotone {ι : Type*} [Countable ι] [SemilatticeSup ι]
    {s : ι → Set X} (hsm : ∀ i, MeasurableSet (s i)) (h_mono : Monotone s)
    (hfi : IntegrableOn f (⋃ n, s n) μ) :
    Tendsto (fun i => ∫ x in s i, f x ∂μ) atTop (𝓝 (∫ x in ⋃ n, s n, f x ∂μ))
-- Mathlib/Order/Interval/Finset/Defs.lean
@[simp, norm_cast]
theorem coe_Ioo (a b : α) : (Ioo a b : Set α) = Set.Ioo a b
-- Mathlib/Algebra/Group/Units.lean
@[to_additive]
protected lemma div_mul_right (h : IsUnit a) (b : α) : a / (a * b) = 1 / b
-- Mathlib/Data/Finsupp/Basic.lean
@[simp]
theorem equivCongrLeft_apply (f : α ≃ β) (l : α →₀ M) : equivCongrLeft f l = equivMapDomain f l
-- Mathlib/Order/CompleteBooleanAlgebra.lean
theorem iInf_sup_iInf {ι ι' : Type*} {f : ι → α} {g : ι' → α} :
    ((⨅ i, f i) ⊔ ⨅ i, g i) = ⨅ i : ι × ι', f i.1 ⊔ g i.2
-- Mathlib/Computability/Reduce.lean
theorem OneOneEquiv.le_congr_left {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]
    {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : OneOneEquiv p q) : p ≤₁ r ↔ q ≤₁ r
-- Mathlib/CategoryTheory/Sites/DenseSubsite.lean
lemma isLocallyFaithful : G.IsLocallyFaithful K
-- Mathlib/RingTheory/DedekindDomain/IntegralClosure.lean
theorem integralClosure_le_span_dualBasis [Algebra.IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    Subalgebra.toSubmodule (integralClosure A L) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b)
-- Mathlib/MeasureTheory/Measure/WithDensityFinite.lean
lemma densityToFinite_def (μ : Measure α) [SFinite μ] :
    μ.densityToFinite = fun a ↦ ∑' n, (sFiniteSeq μ n).rnDeriv μ.toFinite a
-- Mathlib/Computability/PartrecCode.lean
theorem evaln_bound : ∀ {k c n x}, x ∈ evaln k c n → n < k
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Cospan.lean
@[simp]
theorem cospanCompIso_inv_app_left : (cospanCompIso F f g).inv.app WalkingCospan.left = 𝟙 _
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem LineDifferentiableWithinAt.congr_mono (h : LineDifferentiableWithinAt 𝕜 f s x v)
    (ht : EqOn f₁ f t) (hx : f₁ x = f x) (h₁ : t ⊆ s) :
    LineDifferentiableWithinAt 𝕜 f₁ t x v
-- Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean
lemma snd_δ_inr : (pullback.snd _ _ : S.P ⟶ _) ≫ S.δ ≫ (pushout.inr _ _ : _ ⟶ S.P') =
    pullback.fst _ _ ≫ S.v₁₂.τ₂ ≫ pushout.inl _ _
-- Mathlib/Algebra/Group/Units.lean
@[to_additive]
theorem isUnit_iff_exists_inv [CommMonoid M] {a : M} : IsUnit a ↔ ∃ b, a * b = 1
-- Mathlib/Data/Sum/Interval.lean
@[simp]
lemma Ico_inl_inr : Ico (inlₗ a) (inrₗ b) = ((Ici a).disjSum (Iio b)).map toLex.toEmbedding
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive add_le_of_nonpos_left]
theorem mul_le_of_le_one_left' [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b : α} (h : b ≤ 1) :
    b * a ≤ a
-- Mathlib/Geometry/Manifold/VectorBundle/Basic.lean
protected nonrec theorem SmoothOn.coordChangeL
    (hf : SmoothOn IM IB f s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
    SmoothOn IM 𝓘(𝕜, F →L[𝕜] F) (fun y ↦ (e.coordChangeL 𝕜 e' (f y) : F →L[𝕜] F)) s
-- Mathlib/Data/Seq/Computation.lean
@[simp]
theorem destruct_map (f : α → β) (s) : destruct (map f s) = lmap f (rmap (map f) (destruct s))
-- Mathlib/RepresentationTheory/Invariants.lean
/-- The `averageMap` sends elements of `V` to the subspace of invariants.
-/
theorem averageMap_invariant (v : V) : averageMap ρ v ∈ invariants ρ
-- Mathlib/Topology/ContinuousOn.lean
theorem Set.MapsTo.closure_of_continuousOn {f : α → β} {s : Set α} {t : Set β} (h : MapsTo f s t)
    (hc : ContinuousOn f (closure s)) : MapsTo f (closure s) (closure t)
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_pos_iff_of_neg_left (ha : a < 0) : 0 < a • b ↔ b < 0