ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Set/Prod.lean
theorem eval_preimage [DecidableEq ι] {s : Set (α i)} :
    eval i ⁻¹' s = pi univ (update (fun i => univ) i s)
-- Mathlib/Algebra/Ring/Parity.lean
lemma Even.neg_one_zpow (h : Even n) : (-1 : α) ^ n = 1
-- Mathlib/RingTheory/Valuation/Basic.lean
theorem map_sum_lt' {ι : Type*} {s : Finset ι} {f : ι → R} {g : Γ₀} (hg : 0 < g)
    (hf : ∀ i ∈ s, v (f i) < g) : v (∑ i ∈ s, f i) < g
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
theorem TendstoLocallyUniformlyOn.congr {G : ι → α → β} (hf : TendstoLocallyUniformlyOn F f p s)
    (hg : ∀ n, s.EqOn (F n) (G n)) : TendstoLocallyUniformlyOn G f p s
-- Mathlib/CategoryTheory/Comma/Over.lean
@[simp]
lemma toUnder_comp_forget (F : S ⥤ T) (X : T) (f : (Y : S) → X ⟶ F.obj Y)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), f Y ≫ F.map g = f Z) : F.toUnder X f h ⋙ Under.forget _ = F
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive ne_zero_of_mem_unit_sphere]
theorem ne_one_of_mem_unit_sphere (x : sphere (1 : E) 1) : (x : E) ≠ 1
-- Mathlib/CategoryTheory/Monoidal/CommMon_.lean
@[simp]
theorem forget₂_Mon_map_hom {A B : CommMon_ C} (f : A ⟶ B) : ((forget₂Mon_ C).map f).hom = f.hom
-- Mathlib/Topology/Order/Lattice.lean
lemma ContinuousAt.finset_inf (hs : ∀ i ∈ s, ContinuousAt (f i) x) :
    ContinuousAt (s.inf f) x
-- Mathlib/Algebra/Module/Torsion.lean
/-- The torsion submodule of the torsion submodule (viewed as a module) is the full
torsion module. -/
-- @[simp] Porting note (#10618): simp can prove this
theorem torsion_torsion_eq_top : torsion R (torsion R M) = ⊤
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[simp]
theorem R_apply : (𝑹 I g) h = h * g
-- Mathlib/GroupTheory/Torsion.lean
/-- The `p`- and `q`-primary components are disjoint for `p ≠ q`. -/
@[to_additive "The `p`- and `q`-primary components are disjoint for `p ≠ q`."]
theorem primaryComponent.disjoint {p' : ℕ} [hp' : Fact p'.Prime] (hne : p ≠ p') :
    Disjoint (CommMonoid.primaryComponent G p) (CommMonoid.primaryComponent G p')
-- Mathlib/Algebra/BigOperators/Finsupp.lean
@[simp]
theorem prod_hom_add_index [AddZeroClass M] [CommMonoid N] {f g : α →₀ M}
    (h : α → Multiplicative M →* N) :
    ((f + g).prod fun a b => h a (Multiplicative.ofAdd b)) =
      (f.prod fun a b => h a (Multiplicative.ofAdd b)) *
        g.prod fun a b => h a (Multiplicative.ofAdd b)
-- Mathlib/NumberTheory/FermatPsp.lean
/--
This is a proof that the number produced using `psp_from_prime` is actually pseudoprime to base `b`.
The primary purpose of this lemma is to help prove `exists_infinite_pseudoprimes`.

We use <https://primes.utm.edu/notes/proofs/a_pseudoprimes.html> as a rough outline of the proof.
-/
private theorem psp_from_prime_psp {b : ℕ} (b_ge_two : 2 ≤ b) {p : ℕ} (p_prime : p.Prime)
    (p_gt_two : 2 < p) (not_dvd : ¬p ∣ b * (b ^ 2 - 1)) : FermatPsp (psp_from_prime b p) b
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem derivWithin_congr (hs : EqOn f₁ f s) (hx : f₁ x = f x) :
    derivWithin f₁ s x = derivWithin f s x
-- Mathlib/SetTheory/Game/Nim.lean
@[simp]
theorem grundyValue_zero : grundyValue 0 = 0
-- Mathlib/Tactic/ComputeDegree.lean
theorem coeff_congr {s : R} (rs : r = s) : coeff f n = s
-- Mathlib/Analysis/Calculus/Rademacher.lean
/-- *Rademacher's theorem*: a function between finite-dimensional real vector spaces which is
Lipschitz on a set is differentiable almost everywere in this set. -/
theorem ae_differentiableWithinAt_of_mem {f : E → F} (hf : LipschitzOnWith C f s) :
    ∀ᵐ x ∂μ, x ∈ s → DifferentiableWithinAt ℝ f s x
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
@[simp]
theorem affineCombinationSingleWeights_apply_of_ne [DecidableEq ι] {i j : ι} (h : j ≠ i) :
    affineCombinationSingleWeights k i j = 0
-- Mathlib/Data/Finset/Prod.lean
theorem diag_union : (s ∪ t).diag = s.diag ∪ t.diag
-- Mathlib/Analysis/Fourier/FourierTransform.lean
lemma fourierIntegralInv_eq (f : V → E) (w : V) :
    𝓕⁻ f w = ∫ v, 𝐞 ⟪v, w⟫ • f v
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
lemma IsOpen.exists_msmooth_support_eq_aux {s : Set H} (hs : IsOpen s) :
    ∃ f : H → ℝ, f.support = s ∧ Smooth I 𝓘(ℝ) f ∧ Set.range f ⊆ Set.Icc 0 1
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem contMDiffAt_finset_prod (h : ∀ i ∈ t, ContMDiffAt I' I n (f i) x) :
    ContMDiffAt I' I n (fun x => ∏ i ∈ t, f i x) x
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem HasDerivAt.deriv (h : HasDerivAt f f' x) : deriv f x = f'
-- Mathlib/RingTheory/Coalgebra/Equiv.lean
/-- The identity map is a coalgebra equivalence. -/
@[refl, simps!]
def refl : A ≃ₗc[R] A
-- Mathlib/Order/Lattice.lean
@[simp]
theorem swap_sup [Sup α] [Sup β] (p q : α × β) : (p ⊔ q).swap = p.swap ⊔ q.swap
-- Mathlib/ModelTheory/Satisfiability.lean
theorem realize_sentence_iff (h : T.IsComplete) (φ : L.Sentence) (M : Type*) [L.Structure M]
    [M ⊨ T] [Nonempty M] : M ⊨ φ ↔ T ⊨ᵇ φ
-- Mathlib/Analysis/Normed/Group/Hom.lean
theorem isClosed_ker {V₂ : Type*} [NormedAddCommGroup V₂] (f : NormedAddGroupHom V₁ V₂) :
    IsClosed (f.ker : Set V₁)
-- Mathlib/Algebra/CharP/CharAndCard.lean
/-- A prime that does not divide the cardinality of a finite commutative ring `R`
is a unit in `R`. -/
theorem not_isUnit_prime_of_dvd_card {R : Type*} [CommRing R] [Fintype R] (p : ℕ) [Fact p.Prime]
    (hp : p ∣ Fintype.card R) : ¬IsUnit (p : R)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem add_one (n : Nat) : n + 1 = succ n
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem toFinset_reverse {l : List α} : toFinset l.reverse = l.toFinset
-- Mathlib/Data/Complex/Module.lean
@[simp]
theorem reLm_coe : ⇑reLm = re
-- .lake/packages/batteries/Batteries/Classes/Order.lean
protected theorem TransCmp.compareOfLessAndEq_of_le
    [LT α] [LE α] [DecidableRel (LT.lt (α := α))] [DecidableEq α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (not_lt : ∀ {x y : α}, ¬x < y → y ≤ x)
    (le_antisymm : ∀ {x y : α}, x ≤ y → y ≤ x → x = y) :
    TransCmp (α := α) (compareOfLessAndEq · ·)
-- Mathlib/GroupTheory/GroupAction/Basic.lean
@[to_additive]
lemma orbitRel_subgroup_le (H : Subgroup G) : orbitRel H α ≤ orbitRel G α
-- Mathlib/Analysis/Normed/Field/Basic.lean
theorem Units.nnnorm_pos [Nontrivial α] (x : αˣ) : 0 < ‖(x : α)‖₊
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
@[simp]
lemma mapDomainAlgHom_comp (k A) {G₁ G₂ G₃} [CommSemiring k] [Semiring A] [Algebra k A]
    [AddMonoid G₁] [AddMonoid G₂] [AddMonoid G₃] (f : G₁ →+ G₂) (g : G₂ →+ G₃) :
    mapDomainAlgHom k A (g.comp f) = (mapDomainAlgHom k A g).comp (mapDomainAlgHom k A f)
-- .lake/packages/lean4/src/lean/Init/Omega/Int.lean
theorem fst_mk : (Prod.mk x y).fst = x
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
theorem HasGradientAtFilter.congr_of_eventuallyEq (h : HasGradientAtFilter f f' x L)
    (hL : f₁ =ᶠ[L] f) (hx : f₁ x = f x) : HasGradientAtFilter f₁ f' x L
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
/-- Predicate asserting that the word `w₁` can be reduced to `w₂` in one step, i.e. there are words
`w₃ w₄` and letter `x` such that `w₁ = w₃xx⁻¹w₄` and `w₂ = w₃w₄`  -/
@[to_additive "Predicate asserting that the word `w₁` can be reduced to `w₂` in one step, i.e. there
  are words `w₃ w₄` and letter `x` such that `w₁ = w₃ + x + (-x) + w₄` and `w₂ = w₃w₄`"]
theorem Step.length : ∀ {L₁ L₂ : List (α × Bool)}, Step L₁ L₂ → L₂.length + 2 = L₁.length
-- Mathlib/Data/Finsupp/Weight.lean
/-- Without zero divisors, nonzero weight is a `NonTorsionWeight` -/
theorem nonTorsionWeight_of [NoZeroSMulDivisors ℕ M] (hw : ∀ i : σ, w i ≠ 0) :
    NonTorsionWeight w
-- Mathlib/Topology/Compactness/Compact.lean
theorem IsCompact.nhdsSet_inf_eq_biSup {K : Set X} (hK : IsCompact K) (l : Filter X) :
    (𝓝ˢ K) ⊓ l = ⨆ x ∈ K, 𝓝 x ⊓ l
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
@[to_additive]
protected lemma _root_.MonoidHom.map_multiset_prod (f : α →* β) (s : Multiset α) :
    f s.prod = (s.map f).prod
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem filter_cons_of_neg {p : α → Bool} {a : α} (l) (pa : ¬ p a) :
    filter p (a :: l) = filter p l
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
@[simp]
theorem toNatOrdinal_cast_nat (n : ℕ) : toNatOrdinal n = n
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem neighborSet_bot (v : V) : (⊥ : G.Subgraph).neighborSet v = ∅
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
/-- A vector in `(𝕜 ∙ u)ᗮ` is orthogonal to `u`. -/
theorem mem_orthogonal_singleton_iff_inner_left {u v : E} : v ∈ (𝕜 ∙ u)ᗮ ↔ ⟪v, u⟫ = 0
-- Mathlib/Data/Matrix/Basic.lean
/-- `Matrix.conjTranspose` as an `AddEquiv` -/
@[simps apply]
def conjTransposeAddEquiv [AddMonoid α] [StarAddMonoid α] : Matrix m n α ≃+ Matrix n m α
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsLittleO.tendsto_inv_smul_nhds_zero [Module 𝕜 E'] [BoundedSMul 𝕜 E']
    {f : α → E'} {g : α → 𝕜}
    {l : Filter α} (h : f =o[l] g) : Tendsto (fun x => (g x)⁻¹ • f x) l (𝓝 0)
-- Mathlib/MeasureTheory/Integral/CircleIntegral.lean
theorem le_radius_cauchyPowerSeries (f : ℂ → E) (c : ℂ) (R : ℝ≥0) :
    ↑R ≤ (cauchyPowerSeries f c R).radius
-- Mathlib/Topology/Category/CompHaus/EffectiveEpi.lean
theorem effectiveEpi_tfae
    {B X : CompHaus.{u}} (π : X ⟶ B) :
    TFAE
    [ EffectiveEpi π
    , Epi π
    , Function.Surjective π
    ]
-- .lake/packages/lean4/src/lean/Init/Core.lean
/--
`Antisymm (·≤·)` says that `(·≤·)` is antisymmetric, that is, `a ≤ b → b ≤ a → a = b`.
-/
class Antisymm {α : Sort u} (r : α → α → Prop) where
  /-- An antisymmetric relation `(·≤·)` satisfies `a ≤ b → b ≤ a → a = b`. -/
  antisymm {a b : α} : r a b → r b a → a = b
-- Mathlib/Data/Real/EReal.lean
@[simp]
lemma preimage_coe_Ici (x : ℝ) : Real.toEReal ⁻¹' Ici x = Ici x
-- Mathlib/Data/Matroid/Constructions.lean
theorem Finite.loopyOn_finite (hE : E.Finite) : Matroid.Finite (loopyOn E)
-- .lake/packages/lean4/src/lean/Init/Data/List/TakeDrop.lean
theorem length_take_le' (n) (l : List α) : length (take n l) ≤ l.length
-- Mathlib/Data/DFinsupp/Order.lean
@[simp]
theorem add_eq_zero_iff (f g : Π₀ i, α i) : f + g = 0 ↔ f = 0 ∧ g = 0
-- Mathlib/Analysis/SpecificLimits/Basic.lean
theorem Nat.tendsto_pow_atTop_atTop_of_one_lt {m : ℕ} (h : 1 < m) :
    Tendsto (fun n : ℕ ↦ m ^ n) atTop atTop
-- Mathlib/Data/Set/Finite.lean
protected theorem toFinset_inter [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s ∩ t).Finite) : h.toFinset = hs.toFinset ∩ ht.toFinset
-- Mathlib/RepresentationTheory/Action/Concrete.lean
@[simp]
theorem ofMulAction_apply {G H : Type u} [Monoid G] [MulAction G H] (g : G) (x : H) :
    (ofMulAction G H).ρ g x = (g • x : H)
-- Mathlib/MeasureTheory/Constructions/Projective.lean
lemma measure_univ_eq (hP : IsProjectiveMeasureFamily P) (I J : Finset ι) :
    P I univ = P J univ
-- Mathlib/Analysis/Calculus/Rademacher.lean
theorem locallyIntegrable_lineDeriv (hf : LipschitzWith C f) (v : E) :
    LocallyIntegrable (fun x ↦ lineDeriv ℝ f x v) μ
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
@[simp]
theorem mop_comp {X Y Z : C} {f : X ⟶ Y} {g : Y ⟶ Z} :
    (f ≫ g).mop = f.mop ≫ g.mop
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem lt_add_of_pos_left : 0 < k → n < k + n
-- Mathlib/Algebra/Module/Submodule/Lattice.lean
@[simp]
theorem AddSubgroup.toIntSubmodule_symm :
    ⇑(AddSubgroup.toIntSubmodule.symm : _ ≃o AddSubgroup M) = Submodule.toAddSubgroup
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsLocalMinOn.inter (hf : IsLocalMinOn f s a) (t) : IsLocalMinOn f (s ∩ t) a
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
protected lemma «exists» {p : Multiplicative α → Prop} : (∃ a, p a) ↔ ∃ a, p (ofAdd a)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive card_nsmul_add_sum]
theorem pow_card_mul_prod {b : β} : b ^ s.card * ∏ a ∈ s, f a = ∏ a ∈ s, b * f a
-- Mathlib/Data/Matrix/Notation.lean
@[simp]
theorem mulVec_cons {α} [CommSemiring α] (A : m' → Fin n.succ → α) (x : α) (v : Fin n → α) :
    (of A) *ᵥ (vecCons x v) = x • vecHead ∘ A + (of (vecTail ∘ A)) *ᵥ v
-- Mathlib/ModelTheory/Substructures.lean
theorem range_eq_top {f : M →[L] N} : range f = ⊤ ↔ Function.Surjective f
-- Mathlib/RingTheory/Binomial.lean
theorem multichoose_two (k : ℕ) : multichoose (2 : R) k = k + 1
-- Mathlib/Order/BooleanAlgebra.lean
theorem sdiff_sdiff_right' : x \ (y \ z) = x \ y ⊔ x ⊓ z
-- Mathlib/Algebra/Category/ModuleCat/FilteredColimits.lean
@[simp]
theorem colimit_smul_mk_eq (r : R) (x : Σ j, F.obj j) : r • M.mk F x = M.mk F ⟨x.1, r • x.2⟩
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
/-- A bounded convergence theorem for a finite measure:
If bounded continuous non-negative functions are uniformly bounded by a constant and tend to a
limit, then their integrals against the finite measure tend to the integral of the limit.
This formulation assumes:
 * the functions tend to a limit along a countably generated filter;
 * the limit is in the almost everywhere sense;
 * boundedness holds almost everywhere;
 * integration is the pairing against non-negative continuous test functions
   (`MeasureTheory.FiniteMeasure.testAgainstNN`).

A related result using `MeasureTheory.lintegral` for integration is
`MeasureTheory.FiniteMeasure.tendsto_lintegral_nn_filter_of_le_const`.
-/
theorem tendsto_testAgainstNN_filter_of_le_const {ι : Type*} {L : Filter ι}
    [L.IsCountablyGenerated] {μ : FiniteMeasure Ω} {fs : ι → Ω →ᵇ ℝ≥0} {c : ℝ≥0}
    (fs_le_const : ∀ᶠ i in L, ∀ᵐ ω : Ω ∂(μ : Measure Ω), fs i ω ≤ c) {f : Ω →ᵇ ℝ≥0}
    (fs_lim : ∀ᵐ ω : Ω ∂(μ : Measure Ω), Tendsto (fun i => fs i ω) L (𝓝 (f ω))) :
    Tendsto (fun i => μ.testAgainstNN (fs i)) L (𝓝 (μ.testAgainstNN f))
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem mk_le_of_le_val {b : Fin n} {a : Nat} (h : a ≤ b) :
    (⟨a, Nat.lt_of_le_of_lt h b.is_lt⟩ : Fin n) ≤ b
-- Mathlib/SetTheory/Game/Domineering.lean
theorem snd_pred_mem_erase_of_mem_left {b : Board} {m : ℤ × ℤ} (h : m ∈ left b) :
    (m.1, m.2 - 1) ∈ b.erase m
-- Mathlib/Logic/Function/Defs.lean
@[simp]
theorem uncurry_curry (f : α × β → φ) : uncurry (curry f) = f
-- Mathlib/Data/Finset/Basic.lean
theorem union_sdiff_cancel_left (h : Disjoint s t) : (s ∪ t) \ s = t
-- Mathlib/Data/ENNReal/Basic.lean
lemma iInf_coe_lt_top : ⨅ i, (f i : ℝ≥0∞) < ⊤ ↔ Nonempty ι
-- Mathlib/Algebra/Ring/Equiv.lean
protected theorem isUnit_iff (f : R ≃+* S) {a} : IsUnit (f a) ↔ IsUnit a
-- Mathlib/SetTheory/Cardinal/ToNat.lean
theorem mk_toNat_eq_card [Fintype α] : toNat #α = Fintype.card α
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem edges_takeUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
    (p.takeUntil u h).edges ⊆ p.edges
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
protected theorem coe_eq_zero {x : S} : (x : A) = 0 ↔ x = 0
-- Mathlib/Computability/Primrec.lean
theorem Primrec₂.comp {f : β → γ → σ} {g : α → β} {h : α → γ} (hf : Primrec₂ f) (hg : Primrec g)
    (hh : Primrec h) : Primrec fun a => f (g a) (h a)
-- Mathlib/Topology/PartialHomeomorph.lean
@[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_coe : (s.partialHomeomorphSubtypeCoe hs : s → X) = (↑)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_list_eq_aleph0 (α : Type u) [Countable α] [Nonempty α] : #(List α) = ℵ₀
-- Mathlib/Algebra/Polynomial/Derivative.lean
theorem derivative_X_sub_C_pow (c : R) (m : ℕ) :
    derivative ((X - C c) ^ m) = C (m : R) * (X - C c) ^ (m - 1)
-- Mathlib/Data/Real/EReal.lean
lemma bot_div_of_neg_ne_bot {a : EReal} (h : a < 0) (h' : a ≠ ⊥) : ⊥ / a = ⊤
-- Mathlib/FieldTheory/Adjoin.lean
theorem adjoin_toSubalgebra_of_isAlgebraic_left (L : IntermediateField F K)
    [halg : Algebra.IsAlgebraic F E] :
    (adjoin E (L : Set K)).toSubalgebra = Algebra.adjoin E (L : Set K)
-- Mathlib/Data/SetLike/Basic.lean
theorem ext' (h : (p : Set B) = q) : p = q
-- Mathlib/Computability/Primrec.lean
theorem nat_rec₁ {f : ℕ → α → α} (a : α) (hf : Primrec₂ f) : Primrec (Nat.rec a f)
-- Mathlib/SetTheory/ZFC/Basic.lean
@[trans]
protected theorem Equiv.trans {x y z} (h1 : Equiv x y) (h2 : Equiv y z) : Equiv x z
-- Mathlib/RingTheory/Bialgebra/Hom.lean
/-- Identity map as a `BialgHom`. -/
@[simps!] protected def id : A →ₐc[R] A
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
protected theorem IsClique.map (h : G.IsClique s) {f : α ↪ β} : (G.map f).IsClique (f '' s)
-- Mathlib/RingTheory/WittVector/IsPoly.lean
/-- The composition of a binary polynomial function
 with a unary polynomial function in the first argument is polynomial. -/
theorem compLeft {g f} [IsPoly₂ p g] [IsPoly p f] :
    IsPoly₂ p fun _R _Rcr x y => g (f x) y
-- Mathlib/RingTheory/LaurentSeries.lean
theorem ofPowerSeries_powerSeriesPart (x : LaurentSeries R) :
    ofPowerSeries ℤ R x.powerSeriesPart = single (-x.order) 1 * x
-- Mathlib/Topology/Instances/ENNReal.lean
lemma continuousAt_toReal (hx : x ≠ ∞) : ContinuousAt ENNReal.toReal x
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- The inner product of a linear combination of a set of orthonormal vectors with one of those
vectors picks out the coefficient of that vector. -/
theorem Orthonormal.inner_left_fintype [Fintype ι] {v : ι → E} (hv : Orthonormal 𝕜 v) (l : ι → 𝕜)
    (i : ι) : ⟪∑ i : ι, l i • v i, v i⟫ = conj (l i)
-- Mathlib/LinearAlgebra/TensorProduct/DirectLimit.lean
@[simp] lemma toDirectLimit_tmul_of
    {i : ι} (g : G i) (m : M) :
    (toDirectLimit f M <| (of _ _ G f i g) ⊗ₜ m) = (of _ _ _ _ i (g ⊗ₜ m))
-- Mathlib/Algebra/ModEq.lean
theorem add_zsmul_modEq (z : ℤ) : a + z • p ≡ a [PMOD p]
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem replaceF_cons (a : α) (l : List α) :
    (a :: l).replaceF p = match p a with
      | none => a :: replaceF p l
      | some a' => a' :: l
-- Mathlib/RingTheory/IsAdjoinRoot.lean
@[simp]
theorem modByMonicHom_map (h : IsAdjoinRootMonic S f) (g : R[X]) :
    h.modByMonicHom (h.map g) = g %ₘ f
-- Mathlib/Data/ENNReal/Real.lean
@[gcongr]
theorem ofReal_le_ofReal {p q : ℝ} (h : p ≤ q) : ENNReal.ofReal p ≤ ENNReal.ofReal q
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
theorem bot_degree (v : V) : (⊥ : SimpleGraph V).degree v = 0
-- Mathlib/Algebra/Order/Sub/WithTop.lean
theorem map_sub [Sub β] [Bot β] {f : α → β} (h : ∀ x y, f (x - y) = f x - f y) (h₀ : f ⊥ = ⊥) :
    ∀ x y : WithTop α, (x - y).map f = x.map f - y.map f
-- Mathlib/Data/Set/Basic.lean
theorem inter_diff_distrib_left (s t u : Set α) : s ∩ (t \ u) = (s ∩ t) \ (s ∩ u)
-- Mathlib/Data/Matrix/ColumnRowPartitioned.lean
lemma fromRows_ext_iff (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (B₁ : Matrix m₁ n R)
    (B₂ : Matrix m₂ n R) :
    fromRows A₁ A₂ = fromRows B₁ B₂ ↔ A₁ = B₁ ∧ A₂ = B₂
-- Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean
/-- Upgrading `PiTensorProduct.mapL` to a `MonoidHom` when `E = E'`. -/
@[simps]
noncomputable def mapLMonoidHom : (Π i, E i →L[𝕜] E i) →* ((⨂[𝕜] i, E i) →L[𝕜] ⨂[𝕜] i, E i)
-- Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean
/-- The relation between the values of the quadratic character of one field `F` at the
cardinality of another field `F'` and of the quadratic character of `F'` at the cardinality
of `F`. -/
theorem quadraticChar_card_card [DecidableEq F] (hF : ringChar F ≠ 2) {F' : Type*} [Field F']
    [Fintype F'] [DecidableEq F'] (hF' : ringChar F' ≠ 2) (h : ringChar F' ≠ ringChar F) :
    quadraticChar F (Fintype.card F') =
    quadraticChar F' (quadraticChar F (-1) * Fintype.card F)
-- Mathlib/Combinatorics/SetFamily/Shatter.lean
lemma shatters_iff : 𝒜.Shatters s ↔ 𝒜.image (fun t ↦ s ∩ t) = s.powerset
-- Mathlib/Control/Traversable/Instances.lean
theorem mem_traverse {f : α' → Set β'} :
    ∀ (l : List α') (n : List β'), n ∈ traverse f l ↔ Forall₂ (fun b a => b ∈ f a) n l
-- Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean
theorem coe_of_s_get?_rat_eq :
    (((of q).s.get? n).map (Pair.map (↑)) : Option <| Pair K) = (of v).s.get? n
-- Mathlib/LinearAlgebra/BilinearForm/Basic.lean
/-- The restriction of a bilinear form on a submodule. -/
@[simps! apply]
def restrict (B : BilinForm R M) (W : Submodule R M) : BilinForm R W
-- Mathlib/Geometry/Manifold/VectorBundle/Basic.lean
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀
-- Mathlib/Computability/Primrec.lean
theorem list_getD (d : α) : Primrec₂ fun l n => List.getD l n d
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive]
theorem inv_mul_lt_iff_lt_mul' : c⁻¹ * a < b ↔ a < b * c
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
@[simp]
theorem coe_comp (f' : G' ↪g G'') (f : G ↪g G') : ⇑(f'.comp f) = f' ∘ f
-- .lake/packages/lean4/src/lean/Init/Core.lean
/--
An equivalence relation `~ : α → α → Prop` is a relation that is:

* reflexive: `x ~ x`
* symmetric: `x ~ y` implies `y ~ x`
* transitive: `x ~ y` and `y ~ z` implies `x ~ z`

Equality is an equivalence relation, and equivalence relations share many of
the properties of equality. In particular, `Quot α r` is most well behaved
when `r` is an equivalence relation, and in this case we use `Quotient` instead.
-/
structure Equivalence {α : Sort u} (r : α → α → Prop) : Prop where
  /-- An equivalence relation is reflexive: `x ~ x` -/
  refl  : ∀ x, r x x
  /-- An equivalence relation is symmetric: `x ~ y` implies `y ~ x` -/
  symm  : ∀ {x y}, r x y → r y x
  /-- An equivalence relation is transitive: `x ~ y` and `y ~ z` implies `x ~ z` -/
  trans : ∀ {x y z}, r x y → r y z → r x z
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive (attr := simp)]
theorem Step.not_rev {x b} : Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)
-- Mathlib/LinearAlgebra/Projection.lean
@[simp, nolint simpNF] -- Porting note: linter claims that LHS doesn't simplify, but it does
theorem linearProjOfIsCompl_of_proj (f : E →ₗ[R] p) (hf : ∀ x : p, f x = x) :
    p.linearProjOfIsCompl (ker f) (isCompl_of_proj hf) = f
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Equality case of the Rearrangement Inequality**: Pointwise scalar multiplication of `f` and
`g`, which monovary together, is unchanged by a permutation if and only if `f` and `g ∘ σ` monovary
together. Stated by permuting the entries of `g`. -/
theorem Monovary.sum_smul_comp_perm_eq_sum_smul_iff (hfg : Monovary f g) :
    ∑ i, f i • g (σ i) = ∑ i, f i • g i ↔ Monovary f (g ∘ σ)
-- Mathlib/Data/Int/ConditionallyCompleteOrder.lean
theorem csInf_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddBelow s) : sInf s ∈ s
-- Mathlib/GroupTheory/OrderOfElement.lean
/-- Elements of finite order are of finite order in submonoids. -/
@[to_additive "Elements of finite order are of finite order in submonoids."]
theorem Submonoid.isOfFinOrder_coe {H : Submonoid G} {x : H} :
    IsOfFinOrder (x : G) ↔ IsOfFinOrder x
-- Mathlib/Data/Set/Prod.lean
theorem preimage_prod_map_prod (f : α → β) (g : γ → δ) (s : Set β) (t : Set δ) :
    Prod.map f g ⁻¹' s ×ˢ t = (f ⁻¹' s) ×ˢ (g ⁻¹' t)
-- Mathlib/Order/Interval/Set/Disjoint.lean
@[simp]
theorem iUnion_Ici : ⋃ a : α, Ici a = univ
-- Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
theorem SeparatingLeft.toMatrix₂' {B : (ι → R₁) →ₗ[R₁] (ι → R₁) →ₗ[R₁] R₁} (h : B.SeparatingLeft) :
    (LinearMap.toMatrix₂' R₁ B).Nondegenerate
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem mul_pred (n m : Nat) : n * pred m = n * m - n
-- Mathlib/Analysis/Normed/Group/Bounded.lean
@[to_additive (attr := simp)]
lemma Filter.inv_cobounded : (cobounded E)⁻¹ = cobounded E
-- Mathlib/SetTheory/Ordinal/Principal.lean
theorem principal_add_omega : Principal (· + ·) omega
-- Mathlib/Data/Finset/NAry.lean
@[simp]
theorem image₂_empty_right : image₂ f s ∅ = ∅
-- Mathlib/FieldTheory/Fixed.lean
theorem eval₂ :
    Polynomial.eval₂ (Subring.subtype <| (FixedPoints.subfield G F).toSubring) x (minpoly G F x) =
      0
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsLittleO.sup (h : f =o[l] g) (h' : f =o[l'] g) : f =o[l ⊔ l'] g
-- Mathlib/Data/Set/Finite.lean
theorem Finite.fin_param {s : Set α} (h : s.Finite) :
    ∃ (n : ℕ) (f : Fin n → α), Injective f ∧ range f = s
-- Mathlib/Data/Fin/Basic.lean
/-- Equivalence between `Fin n` and `{ i // i < n }`. -/
@[simps apply symm_apply]
def equivSubtype : Fin n ≃ { i // i < n }