ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/SetTheory/Game/PGame.lean
protected theorem equiv_comm {x y : PGame} : (x ≈ y) ↔ (y ≈ x)
-- Mathlib/Algebra/Module/LinearMap/End.lean
theorem _root_.Module.End_isUnit_apply_inv_apply_of_isUnit
    {f : Module.End R M} (h : IsUnit f) (x : M) :
    f (h.unit.inv x) = x
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem mem_join {a S} : a ∈ @join α S ↔ ∃ s ∈ S, a ∈ s
-- Mathlib/Data/Nat/Cast/Synonym.lean
@[simp]
theorem toLex_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    (toLex (no_index (OfNat.ofNat n : α))) = OfNat.ofNat n
-- Mathlib/MeasureTheory/Group/Pointwise.lean
@[to_additive]
theorem MeasurableSet.const_smul {G α : Type*} [Group G] [MulAction G α] [MeasurableSpace G]
    [MeasurableSpace α] [MeasurableSMul G α] {s : Set α} (hs : MeasurableSet s) (a : G) :
    MeasurableSet (a • s)
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem inf'_cons {b : β} {hb : b ∉ s} :
    (cons b s hb).inf' (nonempty_cons hb) f = f b ⊓ s.inf' H f
-- Mathlib/Topology/Sheaves/Limits.lean
theorem limit_isSheaf [HasLimits C] {X : TopCat} (F : J ⥤ Presheaf.{v} C X)
    (H : ∀ j, (F.obj j).IsSheaf) : (limit F).IsSheaf
-- Mathlib/Topology/PartitionOfUnity.lean
theorem nonneg (i : ι) (x : X) : 0 ≤ f i x
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem relIso_enum' {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] (f : r ≃r s) (o : Ordinal) :
    ∀ (hr : o < type r) (hs : o < type s), f (enum r o hr) = enum s o hs
-- Mathlib/Algebra/Polynomial/Div.lean
theorem div_modByMonic_unique {f g} (q r : R[X]) (hg : Monic g)
    (h : r + g * q = f ∧ degree r < degree g) : f /ₘ g = q ∧ f %ₘ g = r
-- Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
theorem root_exists (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0)
    (ha₂ : a₂.coeff 0 ≠ 0) : ∃ b : k, (succNthDefiningPoly p n a₁ a₂ bs).IsRoot b
-- Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
@[simp]
theorem ι_range_map_map (f : M →ₗ[R] N) :
    Submodule.map (AlgHom.toLinearMap (map f)) (LinearMap.range (ι R (M := M))) =
    Submodule.map (ι R) (LinearMap.range f)
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
/--
Given a profinite set `S` and a closed embedding `S → (I → Bool)`, the `ℤ`-module
`LocallyConstant C ℤ` is free.
-/
theorem Nobeling_aux : Module.Free ℤ (LocallyConstant S ℤ)
-- Mathlib/Algebra/DirectLimit.lean
@[simp]
theorem lift_of (i x) : lift G f P g Hg (of G f i x) = g i x
-- Mathlib/Order/Filter/IndicatorFunction.lean
@[to_additive]
theorem tendsto_mulIndicator_biUnion_finset {ι} [One β] (s : ι → Set α) (f : α → β) (a : α) :
    Tendsto (fun n : Finset ι => mulIndicator (⋃ i ∈ n, s i) f a) atTop
      (pure <| mulIndicator (iUnion s) f a)
-- Mathlib/RingTheory/DedekindDomain/Different.lean
lemma le_dual_inv_aux (hIJ : I * J ≤ 1) :
    J ≤ dual A K I
-- Mathlib/Algebra/Homology/ShortComplex/ConcreteCategory.lean
lemma ShortExact.injective_f (hS : S.ShortExact) :
    Function.Injective ((forget₂ C Ab).map S.f)
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem dvd_C_mul (ha : a ≠ 0) : p ∣ Polynomial.C a * q ↔ p ∣ q
-- Mathlib/Algebra/MonoidAlgebra/Support.lean
/-- An element of `MonoidAlgebra k G` is in the subalgebra generated by its support. -/
theorem mem_span_support (f : MonoidAlgebra k G) :
    f ∈ Submodule.span k (of k G '' (f.support : Set G))
-- Mathlib/Order/BooleanGenerators.lean
lemma atomistic (hS : BooleanGenerators S) (a : α) (ha : a ≤ sSup S) : ∃ T ⊆ S, a = sSup T
-- Mathlib/Data/Nat/Totient.lean
theorem prime_iff_card_units (p : ℕ) [Fintype (ZMod p)ˣ] :
    p.Prime ↔ Fintype.card (ZMod p)ˣ = p - 1
-- Mathlib/Control/Functor/Multivariate.lean
theorem LiftP_PredLast_iff {β} (P : β → Prop) (x : F (α ::: β)) :
    LiftP' (PredLast' _ P) x ↔ LiftP (PredLast _ P) x
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
theorem right_nonuniformWitnesses_subset (h : ¬G.IsUniform ε s t) :
    (G.nonuniformWitnesses ε s t).2 ⊆ t
-- Mathlib/Algebra/Group/Submonoid/MulOpposite.lean
/-- Pull a submonoid back to an opposite submonoid along `MulOpposite.unop`-/
@[to_additive (attr := simps) "Pull an additive submonoid back to an opposite submonoid along
`AddOpposite.unop`"]
protected def op (x : Submonoid M) : Submonoid Mᵐᵒᵖ
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iio_inter_Ici : Iio a ∩ Ici b = Ico b a
-- Mathlib/Tactic/NormNum/Pow.lean
theorem isRat_zpow_neg {α : Type*} [DivisionRing α] {a : α} {b : ℤ} {nb : ℕ}
    {num : ℤ} {den : ℕ}
    (pb : IsInt b (Int.negOfNat nb)) (pe' : IsRat ((a^nb)⁻¹) num den) :
    IsRat (a^b) num den
-- Mathlib/CategoryTheory/Idempotents/FunctorExtension.lean
/-- A natural transformation between functors `Karoubi C ⥤ D` is determined
by its value on objects coming from `C`. -/
theorem natTrans_eq {F G : Karoubi C ⥤ D} (φ : F ⟶ G) (P : Karoubi C) :
    φ.app P = F.map (decompId_i P) ≫ φ.app P.X ≫ G.map (decompId_p P)
-- Mathlib/Logic/Equiv/Basic.lean
/-- Product of two equivalences. If `α₁ ≃ α₂` and `β₁ ≃ β₂`, then `α₁ × β₁ ≃ α₂ × β₂`. This is
`Prod.map` as an equivalence. -/
-- Porting note: in Lean 3 there was also a @[congr] tag
@[simps (config := .asFn) apply]
def prodCongr (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) : α₁ × β₁ ≃ α₂ × β₂
-- Mathlib/RingTheory/Kaehler/Basic.lean
@[ext]
theorem Derivation.liftKaehlerDifferential_unique (f f' : Ω[S⁄R] →ₗ[S] M)
    (hf : f.compDer (KaehlerDifferential.D R S) = f'.compDer (KaehlerDifferential.D R S)) :
    f = f'
-- Mathlib/Order/RelSeries.lean
@[simp] lemma last_snoc' (p : RelSeries r) (newLast : α) (rel : r p.last newLast) :
    p.snoc newLast rel (Fin.last (p.length + 1)) = newLast
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem isCycle_swap_mul_aux₂ {α : Type*} [DecidableEq α] :
    ∀ (n : ℤ) {b x : α} {f : Perm α} (_ : (swap x (f x) * f) b ≠ b) (_ : (f ^ n) (f x) = b),
      ∃ i : ℤ, ((swap x (f x) * f) ^ i) (f x) = b
-- Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
@[simp]
theorem iteratedDerivWithin_one {x : 𝕜} (h : UniqueDiffWithinAt 𝕜 s x) :
    iteratedDerivWithin 1 f s x = derivWithin f s x
-- Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean
lemma supSum_union_add_supSum_infs (𝒜 ℬ : Finset (Finset α)) :
    supSum (𝒜 ∪ ℬ) + supSum (𝒜 ⊼ ℬ) = supSum 𝒜 + supSum ℬ
-- Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
/-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
  Fubini's theorem is measurable.
  This version has `f` in curried form. -/
theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SFinite ν] ⦃f : α → β → E⦄
    (hf : StronglyMeasurable (uncurry f)) : StronglyMeasurable fun x => ∫ y, f x y ∂ν
-- Mathlib/Topology/MetricSpace/Contracting.lean
theorem efixedPoint_mem' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
    (hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
    efixedPoint' f hsc hsf hf x hxs hx ∈ s
-- Mathlib/Data/Nat/Defs.lean
lemma one_lt_succ_succ (n : ℕ) : 1 < n.succ.succ
-- Mathlib/GroupTheory/Perm/List.lean
theorem formPerm_ext_iff {x y x' y' : α} {l l' : List α} (hd : Nodup (x :: y :: l))
    (hd' : Nodup (x' :: y' :: l')) :
    formPerm (x :: y :: l) = formPerm (x' :: y' :: l') ↔ (x :: y :: l) ~r (x' :: y' :: l')
-- Mathlib/ModelTheory/Complexity.lean
theorem IsPrenex.induction_on_all_not {P : ∀ {n}, L.BoundedFormula α n → Prop}
    {φ : L.BoundedFormula α n} (h : IsPrenex φ)
    (hq : ∀ {m} {ψ : L.BoundedFormula α m}, ψ.IsQF → P ψ)
    (ha : ∀ {m} {ψ : L.BoundedFormula α (m + 1)}, P ψ → P ψ.all)
    (hn : ∀ {m} {ψ : L.BoundedFormula α m}, P ψ → P ψ.not) : P φ
-- Mathlib/Topology/Homotopy/Path.lean
/-- Casting a `Homotopy p₀ p₁` to a `Homotopy q₀ q₁` where `p₀ = q₀` and `p₁ = q₁`. -/
@[simps!]
def cast {p₀ p₁ q₀ q₁ : Path x₀ x₁} (F : Homotopy p₀ p₁) (h₀ : p₀ = q₀) (h₁ : p₁ = q₁) :
    Homotopy q₀ q₁
-- Mathlib/Data/Seq/WSeq.lean
theorem LiftRelO.swap (R : α → β → Prop) (C) :
    swap (LiftRelO R C) = LiftRelO (swap R) (swap C)
-- Mathlib/Algebra/GeomSum.lean
theorem geom_sum₂_comm {α : Type u} [CommSemiring α] (x y : α) (n : ℕ) :
    ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) = ∑ i ∈ range n, y ^ i * x ^ (n - 1 - i)
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem norm_derivWithin_eq_norm_fderivWithin : ‖derivWithin f s x‖ = ‖fderivWithin 𝕜 f s x‖
-- Mathlib/Topology/QuasiSeparated.lean
theorem isQuasiSeparated_univ_iff {α : Type*} [TopologicalSpace α] :
    IsQuasiSeparated (Set.univ : Set α) ↔ QuasiSeparatedSpace α
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- The edist to a set depends continuously on the point -/
@[continuity]
theorem continuous_infEdist : Continuous fun x => infEdist x s
-- Mathlib/MeasureTheory/Group/Action.lean
@[to_additive (attr := simp)]
theorem smul_mem_ae (c : G) {s : Set α} : c • s ∈ ae μ ↔ s ∈ ae μ
-- Mathlib/Order/Cover.lean
theorem wcovBy_of_eq_or_eq (hab : a ≤ b) (h : ∀ c, a ≤ c → c ≤ b → c = a ∨ c = b) : a ⩿ b
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem coeff_succ_X_mul (n : ℕ) (φ : R⟦X⟧) : coeff R (n + 1) (X * φ) = coeff R n φ
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive of_forall_le_norm]
lemma DiscreteTopology.of_forall_le_norm' (hpos : 0 < r) (hr : ∀ x : E, x ≠ 1 → r ≤ ‖x‖) :
    DiscreteTopology E
-- Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
/-- A class registering that either `α` is countable or `β` is a countably generated
measurable space. -/
class CountableOrCountablyGenerated (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] : Prop :=
  countableOrCountablyGenerated : Countable α ∨ MeasurableSpace.CountablyGenerated β
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp)]
theorem inv_eq_empty : s⁻¹ = ∅ ↔ s = ∅
-- Mathlib/RepresentationTheory/Action/Monoidal.lean
@[simp]
theorem functorCategoryMonoidalEquivalence.inverse_map {A B : SingleObj G ⥤ V} (f : A ⟶ B) :
    (functorCategoryMonoidalEquivalenceInverse _ _).map f =
      FunctorCategoryEquivalence.inverse.map f
-- Mathlib/Data/Matrix/ColumnRowPartitioned.lean
@[simp]
lemma toColumns₂_apply (A : Matrix m (n₁ ⊕ n₂) R) (i : m) (j : n₂) :
    (toColumns₂ A) i j = A i (Sum.inr j)
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem lt_of_lt_mul_of_le_one_of_nonneg_left [PosMulMono α] (h : a < b * c) (hc : c ≤ 1)
    (hb : 0 ≤ b) : a < b
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
@[simp]
theorem iUnion_single (h : J ≤ I) : (single I J h).iUnion = J
-- Mathlib/MeasureTheory/Integral/Bochner.lean
/-- If `F i → f` in `L1`, then `∫ x, F i x ∂μ → ∫ x, f x ∂μ`. -/
theorem tendsto_integral_of_L1 {ι} (f : α → G) (hfi : Integrable f μ) {F : ι → α → G} {l : Filter ι}
    (hFi : ∀ᶠ i in l, Integrable (F i) μ)
    (hF : Tendsto (fun i => ∫⁻ x, ‖F i x - f x‖₊ ∂μ) l (𝓝 0)) :
    Tendsto (fun i => ∫ x, F i x ∂μ) l (𝓝 <| ∫ x, f x ∂μ)
-- Mathlib/Algebra/Order/Floor.lean
theorem fract_eq_iff {a b : α} : fract a = b ↔ 0 ≤ b ∧ b < 1 ∧ ∃ z : ℤ, a - b = z
-- Mathlib/Algebra/Module/Basic.lean
lemma indicator_const_smul_apply (s : Set α) (r : R) (f : α → M) (a : α) :
    indicator s (r • f ·) a = r • indicator s f a
-- Mathlib/Algebra/Module/Submodule/LinearMap.lean
lemma restrict_comp
    {M₂ M₃ : Type*} [AddCommMonoid M₂] [AddCommMonoid M₃] [Module R M₂] [Module R M₃]
    {p : Submodule R M} {p₂ : Submodule R M₂} {p₃ : Submodule R M₃}
    {f : M →ₗ[R] M₂} {g : M₂ →ₗ[R] M₃}
    (hf : MapsTo f p p₂) (hg : MapsTo g p₂ p₃) (hfg : MapsTo (g ∘ₗ f) p p₃ := hg.comp hf) :
    (g ∘ₗ f).restrict hfg = (g.restrict hg) ∘ₗ (f.restrict hf)
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
theorem eval_one_cyclotomic_not_prime_pow {R : Type*} [Ring R] {n : ℕ}
    (h : ∀ {p : ℕ}, p.Prime → ∀ k : ℕ, p ^ k ≠ n) : eval 1 (cyclotomic n R) = 1
-- Mathlib/AlgebraicTopology/DoldKan/Faces.lean
theorem of_succ {Y : C} {n q : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish (q + 1) φ) :
    HigherFacesVanish q φ
-- Mathlib/AlgebraicGeometry/Spec.lean
lemma Spec.locallyRingedSpaceObj_presheaf' (R : Type u) [CommRing R] :
    (Spec.locallyRingedSpaceObj <| CommRingCat.of R).presheaf = (structureSheaf R).1
-- Mathlib/NumberTheory/Bertrand.lean
/--
**Bertrand's Postulate**: For any positive natural number, there is a prime which is greater than
it, but no more than twice as large.
-/
theorem exists_prime_lt_and_le_two_mul (n : ℕ) (hn0 : n ≠ 0) :
    ∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
-- Mathlib/RingTheory/LaurentSeries.lean
theorem single_inv (d : ℤ) {α : F} (hα : α ≠ 0) :
    single (-d) (α⁻¹ : F) = (single (d : ℤ) (α : F))⁻¹
-- Mathlib/Algebra/Divisibility/Units.lean
/-- In a monoid, an element `a` divides an element `b` iff `a` divides all
    associates of `b`. -/
theorem dvd_mul_right : a ∣ b * u ↔ a ∣ b
-- Mathlib/Order/Interval/Set/Image.lean
lemma MonotoneOn.mapsTo_Iic (h : MonotoneOn f (Iic b)) : MapsTo f (Iic b) (Iic (f b))
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
@[simp]
theorem mem_disjUnion (H : Disjoint π₁.iUnion π₂.iUnion) :
    J ∈ π₁.disjUnion π₂ H ↔ J ∈ π₁ ∨ J ∈ π₂
-- Mathlib/CategoryTheory/DiscreteCategory.lean
@[simp]
theorem id_def (X : Discrete α) : ULift.up (PLift.up (Eq.refl X.as)) = 𝟙 X
-- Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
@[simp]
theorem MonoidWithZero.inverse_apply {M : Type*} [CommMonoidWithZero M] (a : M) :
    MonoidWithZero.inverse a = Ring.inverse a
-- Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
theorem apply_mono (μ : ProbabilityMeasure Ω) {s₁ s₂ : Set Ω} (h : s₁ ⊆ s₂) : μ s₁ ≤ μ s₂
-- Mathlib/FieldTheory/Adjoin.lean
theorem map_comap_eq_self_of_surjective {f : L →ₐ[K] L'} (hf : Function.Surjective f)
    (S : IntermediateField K L') : (S.comap f).map f = S
-- Mathlib/Data/Finsupp/Basic.lean
@[simp]
theorem some_add [AddCommMonoid M] (f g : Option α →₀ M) : (f + g).some = f.some + g.some
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Asymptotics.lean
theorem isBigOWith_sub (x : E) :
    IsBigOWith ‖f‖ l (fun x' => f (x' - x)) fun x' => x' - x
-- Mathlib/Geometry/Manifold/LocalDiffeomorph.lean
/-- A local diffeomorphism on `s` is differentiable on `s`. -/
lemma IsLocalDiffeomorphOn.mdifferentiableOn (hf : IsLocalDiffeomorphOn I J n f s) (hn : 1 ≤ n) :
    MDifferentiableOn I J f s
-- Mathlib/Algebra/Order/BigOperators/Group/List.lean
@[to_additive sum_le_sum]
lemma Forall₂.prod_le_prod' [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] {l₁ l₂ : List M} (h : Forall₂ (· ≤ ·) l₁ l₂) :
    l₁.prod ≤ l₂.prod
-- Mathlib/Data/Finset/NAry.lean
theorem image₂_inter_union_subset_union :
    image₂ f (s ∩ s') (t ∪ t') ⊆ image₂ f s t ∪ image₂ f s' t'
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem map_toNonUnitalSubsemiring {S : NonUnitalSubalgebra R A} {f : F} :
    (map f S).toNonUnitalSubsemiring = S.toNonUnitalSubsemiring.map (f : A →ₙ+* B)
-- .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
@[simp] theorem getLeft?_map (f : α → β) (g : γ → δ) (x : α ⊕ γ) :
    (x.map f g).getLeft? = x.getLeft?.map f
-- Mathlib/Order/Antisymmetrization.lean
private theorem liftFun_antisymmRel (f : α →o β) :
    ((AntisymmRel.setoid α (· ≤ ·)).r ⇒ (AntisymmRel.setoid β (· ≤ ·)).r) f f
-- Mathlib/Topology/Separation.lean
theorem Set.hasSeparatingCover_empty_right (s : Set X) : HasSeparatingCover s ∅
-- Mathlib/Topology/MetricSpace/Thickening.lean
/-- The closed thickening of the empty set is empty. -/
@[simp]
theorem cthickening_empty (δ : ℝ) : cthickening δ (∅ : Set α) = ∅
-- Mathlib/RingTheory/Polynomial/Opposites.lean
theorem opRingEquiv_symm_C_mul_X_pow (r : Rᵐᵒᵖ) (n : ℕ) :
    (opRingEquiv R).symm (C r * X ^ n : Rᵐᵒᵖ[X]) = op (C (unop r) * X ^ n)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_compl_eq_mk_compl_finite_same {α : Type u} [Finite α] {s t : Set α} (h : #s = #t) :
    #(sᶜ : Set α) = #(tᶜ : Set α)
-- Mathlib/Analysis/RCLike/Basic.lean
@[simp, rclike_simps]
theorem mul_re : ∀ z w : K, re (z * w) = re z * re w - im z * im w
-- Mathlib/Algebra/Lie/Weights/Killing.lean
@[simp] lemma coroot_eq_iff (α β : Weight K H L) :
    coroot α = coroot β ↔ α = β
-- Mathlib/Analysis/Analytic/CPolynomial.lean
protected theorem CPolynomialAt.continuousAt (hf : CPolynomialAt 𝕜 f x) : ContinuousAt f x
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
/-- A non-trivial `cons` walk is representable as a `concat` walk. -/
theorem exists_cons_eq_concat {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    ∃ (x : V) (q : G.Walk u x) (h' : G.Adj x w), cons h p = q.concat h'
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem getLastD_cons (a b l) : @getLastD α (b::l) a = getLastD l b
-- Mathlib/Probability/Kernel/Disintegration/Density.lean
lemma densityProcess_def (κ : Kernel α (γ × β)) (ν : Kernel α γ) (n : ℕ) (a : α) (s : Set β) :
    (fun t ↦ densityProcess κ ν n a t s)
      = fun t ↦ (κ a (countablePartitionSet n t ×ˢ s) / ν a (countablePartitionSet n t)).toReal
-- Mathlib/Data/Set/Card.lean
theorem nonempty_of_ncard_ne_zero (hs : s.ncard ≠ 0) : s.Nonempty
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
protected theorem zero {f : ∀ b < (0 : Ordinal), Ordinal} : IsFundamentalSequence 0 0 f
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
theorem norm_int_le_one (z : ℤ) : ‖(z : ℚ_[p])‖ ≤ 1
-- Mathlib/Algebra/Order/Sub/Canonical.lean
lemma tsub_tsub_eq_min (a b : α) : a - (a - b) = min a b
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem pos_add_limZero {f g : CauSeq α abs} : Pos f → LimZero g → Pos (f + g)
-- Mathlib/Analysis/CstarAlgebra/Multiplier.lean
theorem toProdMulOpposite_injective :
    Function.Injective (toProdMulOpposite : 𝓜(𝕜, A) → (A →L[𝕜] A) × (A →L[𝕜] A)ᵐᵒᵖ)
-- Mathlib/NumberTheory/EllipticDivisibilitySequence.lean
@[simp]
lemma normEDS_three : normEDS b c d 3 = c
-- Mathlib/SetTheory/Ordinal/Notation.lean
private theorem exists_lt_mul_omega' {o : Ordinal} ⦃a⦄ (h : a < o * ω) :
    ∃ i : ℕ, a < o * ↑i + o
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- An angle in a right-angled triangle expressed using `arcsin`. -/
theorem oangle_left_eq_arcsin_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
    ∡ p₃ p₁ p₂ = Real.arcsin (dist p₃ p₂ / dist p₁ p₃)
-- Mathlib/RingTheory/HahnSeries/PowerSeries.lean
theorem ofPowerSeries_injective : Function.Injective (ofPowerSeries Γ R)
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
@[simp]
theorem map_id {f : CostructuredArrow S T} : (map (𝟙 T)).obj f = f
-- Mathlib/Data/Nat/WithBot.lean
theorem lt_one_iff_le_zero {x : WithBot ℕ} : x < 1 ↔ x ≤ 0
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive (attr := simp)]
lemma prod_erase [DecidableEq M] (ha : a ∈ l) : a * (l.erase a).prod = l.prod
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
/-- If the angle between two vectors is 0, the inner product equals the product of the norms. -/
theorem inner_eq_mul_norm_of_angle_eq_zero {x y : V} (h : angle x y = 0) : ⟪x, y⟫ = ‖x‖ * ‖y‖
-- Mathlib/LinearAlgebra/PiTensorProduct.lean
theorem add_tprodCoeff' (z₁ z₂ : R) (f : Π i, s i) :
    tprodCoeff R z₁ f + tprodCoeff R z₂ f = tprodCoeff R (z₁ + z₂) f
-- Mathlib/Data/Fintype/BigOperators.lean
/-- This lemma is specifically designed to be used backwards, whence the specialisation to `Fin n`
as the indexing type doesn't matter in practice. The more general forward direction lemma here is
`Fintype.card_piFinset`. -/
lemma card_piFinset_const {α : Type*} (s : Finset α) (n : ℕ) :
    (piFinset fun _ : Fin n ↦ s).card = s.card ^ n
-- Mathlib/Data/Finsupp/Basic.lean
@[simp]
theorem domCongr_symm [AddCommMonoid M] (e : α ≃ β) :
    (Finsupp.domCongr e).symm = (Finsupp.domCongr e.symm : (β →₀ M) ≃+ (α →₀ M))
-- Mathlib/GroupTheory/Coset.lean
@[to_additive (attr := simp)]
theorem mk_mul_of_mem (a : α) (hb : b ∈ s) : (mk (a * b) : α ⧸ s) = mk a
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
theorem lpTrimToLpMeas_ae_eq (hm : m ≤ m0) (f : Lp F p (μ.trim hm)) :
    lpTrimToLpMeas F 𝕜 p μ hm f =ᵐ[μ] f
-- Mathlib/Algebra/Algebra/Equiv.lean
@[simp]
theorem coe_refl : ⇑(refl : A₁ ≃ₐ[R] A₁) = id
-- Mathlib/Data/Complex/Module.lean
theorem realPart_apply_coe (a : A) : (ℜ a : A) = (2 : ℝ)⁻¹ • (a + star a)
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem getVert_of_length_le {u v} (w : G.Walk u v) {i : ℕ} (hi : w.length ≤ i) :
    w.getVert i = v
-- Mathlib/Data/Set/Subsingleton.lean
protected theorem Subsingleton.monotoneOn (h : s.Subsingleton) : MonotoneOn f s
-- Mathlib/Data/Stream/Init.lean
theorem take_succ (n : ℕ) (s : Stream' α) : take (succ n) s = head s::take n (tail s)
-- Mathlib/Data/Set/Function.lean
@[deprecated (since := "2023-12-25")]
lemma maps_image_to (f : α → β) (g : γ → α) (s : Set γ) (t : Set β) :
    MapsTo f (g '' s) t ↔ MapsTo (f ∘ g) s t
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive (attr := simp)]
lemma prod_map_erase [DecidableEq α] (f : α → M) {a} :
    ∀ {l : List α}, a ∈ l → f a * ((l.erase a).map f).prod = (l.map f).prod
-- Mathlib/Analysis/Normed/Operator/WeakOperatorTopology.lean
@[simp] lemma sub_apply {f g : E →WOT[𝕜] F} (x : E) : (f - g) x = f x - g x
-- Mathlib/Data/Finsupp/Defs.lean
theorem unique_single [Unique α] (x : α →₀ M) : x = single default (x default)
-- Mathlib/Order/Closure.lean
/-- Constructor for a closure operator using the weaker idempotency axiom: `f (f x) ≤ f x`. -/
@[simps]
def mk' (f : α → α) (hf₁ : Monotone f) (hf₂ : ∀ x, x ≤ f x) (hf₃ : ∀ x, f (f x) ≤ f x) :
    ClosureOperator α
-- Mathlib/Algebra/Polynomial/Laurent.lean
@[simp]
theorem _root_.Polynomial.toLaurent_comp_C : toLaurent (R := R) ∘ Polynomial.C = C
-- Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean
/-- The Gamma function does not vanish on `ℂ` (except at non-positive integers, where the function
is mathematically undefined and we set it to `0` by convention). -/
theorem Gamma_ne_zero {s : ℂ} (hs : ∀ m : ℕ, s ≠ -m) : Gamma s ≠ 0
-- Mathlib/Topology/Algebra/UniformFilterBasis.lean
theorem cauchy_iff {F : Filter G} :
    @Cauchy G B.uniformSpace F ↔
      F.NeBot ∧ ∀ U ∈ B, ∃ M ∈ F, ∀ᵉ (x ∈ M) (y ∈ M), y - x ∈ U
-- Mathlib/Order/MinMax.lean
theorem max_choice (a b : α) : max a b = a ∨ max a b = b
-- Mathlib/Probability/Martingale/Basic.lean
theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ) :
    Supermartingale (-f) ℱ μ
-- Mathlib/CategoryTheory/Functor/EpiMono.lean
theorem preservesMonomorphisms_of_adjunction {F : C ⥤ D} {G : D ⥤ C} (adj : F ⊣ G) :
    PreservesMonomorphisms G
-- Mathlib/Order/BooleanAlgebra.lean
@[simp]
theorem compl_inf : (x ⊓ y)ᶜ = xᶜ ⊔ yᶜ
-- Mathlib/Analysis/Calculus/Deriv/Prod.lean
nonrec theorem HasStrictDerivAt.prod (hf₁ : HasStrictDerivAt f₁ f₁' x)
    (hf₂ : HasStrictDerivAt f₂ f₂' x) : HasStrictDerivAt (fun x => (f₁ x, f₂ x)) (f₁', f₂') x
-- Mathlib/RingTheory/FiniteType.lean
/-- A commutative algebra is finitely generated if and only if it is a quotient
of a polynomial ring whose variables are indexed by a finset. -/
theorem iff_quotient_mvPolynomial :
    FiniteType R S ↔
      ∃ (s : Finset S) (f : MvPolynomial { x // x ∈ s } R →ₐ[R] S), Surjective f
-- Mathlib/Data/QPF/Univariate/Basic.lean
theorem Wrepr_equiv (x : q.P.W) : Wequiv (Wrepr x) x
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp]
theorem cast_natAdd_zero {n n' : Nat} (i : Fin n) (h : 0 + n = n') :
    cast h (natAdd 0 i) = cast ((Nat.zero_add _).symm.trans h) i
-- Mathlib/Geometry/Manifold/Algebra/Structures.lean
/-- A smooth (semi)ring is a topological (semi)ring. This is not an instance for technical reasons,
see note [Design choices about smooth algebraic structures]. -/
theorem topologicalSemiring_of_smooth [Semiring R] [SmoothRing I R] : TopologicalSemiring R
-- Mathlib/Algebra/Field/Basic.lean
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1
-- Mathlib/Data/ZMod/Basic.lean
theorem val_mul_of_lt {n : ℕ} {a b : ZMod n} (h : a.val * b.val < n) :
    (a * b).val = a.val * b.val
-- Mathlib/FieldTheory/Adjoin.lean
theorem induction_on_adjoin_fg (P : IntermediateField F E → Prop) (base : P ⊥)
    (ih : ∀ (K : IntermediateField F E) (x : E), P K → P (K⟮x⟯.restrictScalars F))
    (K : IntermediateField F E) (hK : K.FG) : P K
-- Mathlib/Data/Nat/Cast/Basic.lean
@[simp] lemma multiplesAddHom_symm_apply (f : ℕ →+ β) : (multiplesAddHom β).symm f = f 1
-- Mathlib/Algebra/Algebra/Basic.lean
theorem smul_algebra_smul_comm (r : R) (a : A) (m : M) : a • r • m = r • a • m