ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Topology/Algebra/ProperAction.lean
/-- If a discrete group acts on a T2 space `X` such that `X × X` is compactly generated,
then the action is properly discontinuous if and only if it is continuous in the second variable
and proper. -/
theorem properlyDiscontinuousSMul_iff_properSMul [T2Space X] [DiscreteTopology G]
    [ContinuousConstSMul G X]
    (compactlyGenerated : ∀ s : Set (X × X), IsClosed s ↔ ∀ ⦃K⦄, IsCompact K → IsClosed (s ∩ K)) :
    ProperlyDiscontinuousSMul G X ↔ ProperSMul G X
-- Mathlib/Topology/Basic.lean
theorem IsClosed.closure_subset (hs : IsClosed s) : closure s ⊆ s
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
@[simp]
theorem contMDiffOn_transDiffeomorph_left {f : M → M'} {s} :
    ContMDiffOn (I.transDiffeomorph e) I' n f s ↔ ContMDiffOn I I' n f s
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem hasFDerivAt_list_prod_finRange' {n : ℕ} {x : Fin n → 𝔸} :
    HasFDerivAt (𝕜 := 𝕜) (fun x ↦ ((List.finRange n).map x).prod)
      (∑ i : Fin n, (((List.finRange n).take i).map x).prod •
        smulRight (proj i) (((List.finRange n).drop (.succ i)).map x).prod) x
-- Mathlib/Data/Fintype/Basic.lean
theorem ssubset_univ_iff {s : Finset α} : s ⊂ univ ↔ s ≠ univ
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
@[simp] lemma op_whiskerRight {X Y : C} (f : X ⟶ Y) (Z : C) :
    (f ▷ Z).op = f.op ▷ op Z
-- Mathlib/Analysis/Convex/Segment.lean
theorem segment_eq_Icc' (x y : 𝕜) : [x -[𝕜] y] = Icc (min x y) (max x y)
-- Mathlib/Topology/MetricSpace/Lipschitz.lean
lemma cauchySeq_comp (hf : LipschitzOnWith K f s)
    {u : ℕ → α} (hu : CauchySeq u) (h'u : range u ⊆ s) :
    CauchySeq (f ∘ u)
-- Mathlib/Probability/Independence/Conditional.lean
theorem condIndep_iSup_of_disjoint {m : ι → MeasurableSpace Ω}
    (h_le : ∀ i, m i ≤ mΩ) (h_indep : iCondIndep m' hm' m μ) {S T : Set ι} (hST : Disjoint S T) :
    CondIndep m' (⨆ i ∈ S, m i) (⨆ i ∈ T, m i) hm' μ
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
private lemma aux {i j : ℕ} (hj : 0 < j) : j * (j - 1) * (i / j + 1) ^ 2 < (i + j) ^ 2
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
@[simp]
theorem leadingCoeff_mul (p q : R[X]) : leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q
-- Mathlib/CategoryTheory/Limits/IsLimit.lean
/-- If `F.cocones` is corepresented by `X`, the cocone corresponding to a morphism `f : Y ⟶ X` is
the colimit cocone extended by `f`. -/
theorem coconeOfHom_fac {Y : C} (f : X ⟶ Y) : coconeOfHom h f = (colimitCocone h).extend f
-- Mathlib/Data/Nat/Dist.lean
@[simp]
theorem dist_self (n : ℕ) : dist n n = 0
-- Mathlib/Order/UpperLower/Hom.lean
@[simp]
theorem iciSupHom_apply (a : α) : iciSupHom a = Ici a
-- Mathlib/Topology/Compactness/LocallyCompact.lean
/-- A reformulation of the definition of locally compact space: In a locally compact space,
  every open set containing `x` has a compact subset containing `x` in its interior. -/
theorem exists_compact_subset [LocallyCompactSpace X] {x : X} {U : Set X} (hU : IsOpen U)
    (hx : x ∈ U) : ∃ K : Set X, IsCompact K ∧ x ∈ interior K ∧ K ⊆ U
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem sqrtTwoAddSeries_monotone_left {x y : ℝ} (h : x ≤ y) :
    ∀ n : ℕ, sqrtTwoAddSeries x n ≤ sqrtTwoAddSeries y n
-- .lake/packages/batteries/Batteries/Data/AssocList.lean
@[simp] theorem toList_toAssocList (l : AssocList α β) : l.toList.toAssocList = l
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem type_eq_of_heq (h : HEq a b) : α = β
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Ioo_subset_Ioo_right (h : b₁ ≤ b₂) : Ioo a b₁ ⊆ Ioo a b₂
-- Mathlib/Topology/Sheaves/LocalPredicate.lean
/-- The `stalkToFiber` map is injective at `x` if any two allowed sections which agree at `x`
agree on some neighborhood of `x`.
-/
theorem stalkToFiber_injective (P : LocalPredicate T) (x : X)
    (w :
      ∀ (U V : OpenNhds x) (fU : ∀ y : U.1, T y) (_ : P.pred fU) (fV : ∀ y : V.1, T y)
        (_ : P.pred fV) (_ : fU ⟨x, U.2⟩ = fV ⟨x, V.2⟩),
        ∃ (W : OpenNhds x) (iU : W ⟶ U) (iV : W ⟶ V), ∀ w : W.1,
          fU (iU w : U.1) = fV (iV w : V.1)) :
    Function.Injective (stalkToFiber P x)
-- Mathlib/Logic/Function/Basic.lean
theorem Injective.of_comp {g : γ → α} (I : Injective (f ∘ g)) : Injective g
-- Mathlib/LinearAlgebra/PiTensorProduct.lean
protected theorem map_smul [DecidableEq ι] (i : ι) (c : R) (u : s i →ₗ[R] t i) :
    map (update f i (c • u)) = c • map (update f i u)
-- Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
@[simp]
theorem parallelFamily_obj_one : (parallelFamily f).obj one = Y
-- Mathlib/Algebra/Algebra/RestrictScalars.lean
theorem RestrictScalars.lsmul_apply_apply (s : S) (x : RestrictScalars R S M) :
    RestrictScalars.lsmul R S M s x =
      (RestrictScalars.addEquiv R S M).symm (s • RestrictScalars.addEquiv R S M x)
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
protected theorem inf_le_left (f g : α →ₘ[μ] β) : f ⊓ g ≤ f
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem IsLUB.mul_right {s : Set α} (ha : 0 ≤ a) (hs : IsLUB s b) :
    IsLUB ((fun b => b * a) '' s) (b * a)
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem mem_leadingCoeff (x) : x ∈ I.leadingCoeff ↔ ∃ p ∈ I, Polynomial.leadingCoeff p = x
-- Mathlib/RingTheory/HahnSeries/Basic.lean
@[simp]
theorem single_eq_zero_iff {a : Γ} {r : R} : single a r = 0 ↔ r = 0
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem map_zero_left (g : N →ₗ[R] Q) : map (0 : M →ₗ[R] P) g = 0
-- Mathlib/MeasureTheory/Measure/Haar/NormedSpace.lean
theorem integral_comp_div (g : ℝ → F) (a : ℝ) : (∫ x : ℝ, g (x / a)) = |a| • ∫ y : ℝ, g y
-- Mathlib/MeasureTheory/Function/SpecialFunctions/Basic.lean
@[measurability]
theorem Measurable.csinh : Measurable fun x => Complex.sinh (f x)
-- Mathlib/Algebra/Polynomial/AlgebraMap.lean
theorem isRoot_of_eval₂_map_eq_zero (hf : Function.Injective f) {r : R} :
    eval₂ f (f r) p = 0 → p.IsRoot r
-- Mathlib/RingTheory/Etale/Basic.lean
theorem localization_base [FormallyEtale R Sₘ] : FormallyEtale Rₘ Sₘ
-- Mathlib/Algebra/Group/Action/Defs.lean
lemma Function.End.mul_def (f g : Function.End α) : (f * g) = f ∘ g
-- Mathlib/Topology/Order/Basic.lean
theorem pi_Ico_mem_nhds (ha : ∀ i, a i < x i) (hb : ∀ i, x i < b i) : Ico a b ∈ 𝓝 x
-- Mathlib/Algebra/Ring/Subring/Basic.lean
/-- The image under a ring homomorphism of the subring generated by a set equals
the subring generated by the image of the set. -/
theorem map_closure (f : R →+* S) (s : Set R) : (closure s).map f = closure (f '' s)
-- Mathlib/GroupTheory/PresentedGroup.lean
/-- The generators of a presented group generate the presented group. That is, the subgroup closure
of the set of generators equals `⊤`. -/
@[simp]
theorem closure_range_of (rels : Set (FreeGroup α)) :
    Subgroup.closure (Set.range (PresentedGroup.of : α → PresentedGroup rels)) = ⊤
-- Mathlib/Data/Matroid/Map.lean
/-- `M.restrictSubtype X` is isomorphic to `M ↾ X`. -/
@[simp] lemma map_val_restrictSubtype_eq (M : Matroid α) (X : Set α) :
    (M.restrictSubtype X).map (↑) Subtype.val_injective.injOn = M ↾ X
-- Mathlib/FieldTheory/Galois.lean
theorem fixingSubgroup_fixedField [FiniteDimensional F E] : fixingSubgroup (fixedField H) = H
-- Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean
/-- If `ringChar F = 2`, then `quadraticChar F` takes the value `1` on nonzero elements. -/
theorem quadraticChar_eq_one_of_char_two (hF : ringChar F = 2) {a : F} (ha : a ≠ 0) :
    quadraticChar F a = 1
-- Mathlib/RingTheory/Unramified/Finite.lean
/-- An unramified free algebra is finitely generated. Iversen I.2.8 -/
lemma finite_of_free [Module.Free R S] : Module.Finite R S
-- Mathlib/Analysis/Convex/Cone/Pointed.lean
theorem toConvexCone_injective : Injective ((↑) : PointedCone 𝕜 E → ConvexCone 𝕜 E)
-- Mathlib/Analysis/Normed/Module/WeakDual.lean
theorem toWeakDual_continuous : Continuous fun x' : Dual 𝕜 E => toWeakDual x'
-- Mathlib/LinearAlgebra/Matrix/Symmetric.lean
@[simp]
theorem IsSymm.conjTranspose [Star α] {A : Matrix n n α} (h : A.IsSymm) : Aᴴ.IsSymm
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) * A ^ n = 1
-- Mathlib/Algebra/DirectLimit.lean
theorem toModule_totalize_of_le [∀ i (k : G i), Decidable (k ≠ 0)] {x : DirectSum ι G} {i j : ι}
    (hij : i ≤ j) (hx : ∀ k ∈ x.support, k ≤ i) :
    DirectSum.toModule R ι (G j) (fun k => totalize G f k j) x =
      f i j hij (DirectSum.toModule R ι (G i) (fun k => totalize G f k i) x)
-- Mathlib/RingTheory/IsAdjoinRoot.lean
theorem coeff_apply_coe (h : IsAdjoinRootMonic S f) (z : S) (i : Fin (natDegree f)) :
    h.coeff z i = h.basis.repr z i
-- Mathlib/Algebra/Group/Action/Defs.lean
@[simp] lemma ofAdd_smul [VAdd α β] (a : α) (b : β) : ofAdd a • b = a +ᵥ b
-- Mathlib/Data/TypeVec.lean
protected theorem casesCons_append1 (n : ℕ) {β : TypeVec (n + 1) → Sort*}
    (f : ∀ (t) (v : TypeVec n), β (v ::: t)) (v : TypeVec n) (α) :
    TypeVec.casesCons n f (v ::: α) = f α v
-- Mathlib/Algebra/Associated/Basic.lean
protected theorem rfl [Monoid α] {x : α} : x ~ᵤ x
-- Mathlib/Order/Interval/Set/Pi.lean
/-- If `x`, `y`, `x'`, and `y'` are functions `Π i : ι, α i`, then
the set difference between the box `[x, y]` and the product of the open intervals `(x' i, y' i)`
is covered by the union of the following boxes: for each `i : ι`, we take
`[x, update y i (x' i)]` and `[update x i (y' i), y]`.

E.g., if `x' = x` and `y' = y`, then this lemma states that the difference between a closed box
`[x, y]` and the corresponding open box `{z | ∀ i, x i < z i < y i}` is covered by the union
of the faces of `[x, y]`. -/
theorem Icc_diff_pi_univ_Ioo_subset (x y x' y' : ∀ i, α i) :
    (Icc x y \ pi univ fun i ↦ Ioo (x' i) (y' i)) ⊆
    (⋃ i : ι, Icc x (update y i (x' i))) ∪ ⋃ i : ι, Icc (update x i (y' i)) y
-- Mathlib/Analysis/Convex/Segment.lean
/-- A point is in an `Ico` iff it can be expressed as a semistrict convex combination of the
endpoints. -/
theorem Convex.mem_Ico (h : x < y) :
    z ∈ Ico x y ↔ ∃ a b, 0 < a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- The first projection in a product is `C^∞`. -/
theorem contDiff_fst : ContDiff 𝕜 n (Prod.fst : E × F → E)
-- Mathlib/Order/Disjointed.lean
theorem disjointed_eq_inf_compl (f : ℕ → α) (n : ℕ) : disjointed f n = f n ⊓ ⨅ i < n, (f i)ᶜ
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[simp]
theorem coe_bot : ↑(⊥ : Subtype (MeasurableSet : Set α → Prop)) = (⊥ : Set α)
-- Mathlib/Analysis/Convex/Cone/Pointed.lean
@[simp, norm_cast]
theorem toConvexCone_dual (S : PointedCone ℝ E) : ↑(dual S) = (S : Set E).innerDualCone
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- Replacing the third point by one on the same line but the opposite ray adds π to the oriented
angle. -/
theorem _root_.Sbtw.oangle_eq_add_pi_right
    {p₁ p₂ p₃ p₃' : P} (h : Sbtw ℝ p₃ p₂ p₃') (hp₁p₂ : p₁ ≠ p₂) :
    ∡ p₁ p₂ p₃ = ∡ p₁ p₂ p₃' + π
-- Mathlib/Data/List/EditDistance/Defs.lean
theorem impl_cons_fst_zero (h : 0 < (impl C (x :: xs) y ⟨d :: ds, w⟩).val.length)
    (w' : 0 < List.length ds) : (impl C (x :: xs) y ⟨d :: ds, w⟩).1[0] =
      let ⟨r, w⟩ := impl C xs y ⟨ds, w'⟩
      min (C.delete x + r[0]) (min (C.insert y + d) (C.substitute x y + ds[0]))
-- Mathlib/RingTheory/Multiplicity.lean
theorem exists_eq_pow_mul_and_not_dvd {a b : α} (hfin : Finite a b) :
    ∃ c : α, b = a ^ (multiplicity a b).get hfin * c ∧ ¬a ∣ c
-- Mathlib/Analysis/Normed/Ring/SeminormFromConst.lean
/-- The function `seminormFromConst' hf1 hc hpm` is power-multiplicative. -/
theorem seminormFromConst_isPowMul : IsPowMul (seminormFromConst' hf1 hc hpm)
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem monic_X_pow_add {n : ℕ} (H : degree p ≤ n) : Monic (X ^ (n + 1) + p)
-- Mathlib/Probability/IdentDistrib.lean
protected theorem coe_nnreal_ennreal {f : α → ℝ≥0} {g : β → ℝ≥0} (h : IdentDistrib f g μ ν) :
    IdentDistrib (fun x => (f x : ℝ≥0∞)) (fun x => (g x : ℝ≥0∞)) μ ν
-- Mathlib/Data/List/Sigma.lean
theorem mem_dlookup_kunion_middle {a} {b : β a} {l₁ l₂ l₃ : List (Sigma β)}
    (h₁ : b ∈ dlookup a (kunion l₁ l₃)) (h₂ : a ∉ keys l₂) :
    b ∈ dlookup a (kunion (kunion l₁ l₂) l₃)
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean
theorem polarBilin_baseChange [Invertible (2 : A)] (Q : QuadraticForm R M₂) :
    polarBilin (Q.baseChange A) = (polarBilin Q).baseChange A
-- Mathlib/RingTheory/Multiplicity.lean
theorem lt_top_iff_finite {a b : α} : multiplicity a b < ⊤ ↔ Finite a b
-- Mathlib/Algebra/Star/Basic.lean
@[simp]
theorem star_zero [AddMonoid R] [StarAddMonoid R] : star (0 : R) = 0
-- Mathlib/Algebra/Polynomial/Expand.lean
theorem contract_one {f : R[X]} : contract 1 f = f
-- Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean
theorem Matrix.Represents.congr_fun {A : Matrix ι ι R} {f : Module.End R M} (h : A.Represents b f)
    (x) : Fintype.total R R b (A *ᵥ x) = f (Fintype.total R R b x)
-- Mathlib/Algebra/Quaternion.lean
@[simp] theorem one_im : (1 : ℍ[R]).im = 0
-- Mathlib/Data/Multiset/Basic.lean
theorem filter_cons {a : α} (s : Multiset α) :
    filter p (a ::ₘ s) = (if p a then {a} else 0) + filter p s
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem linearIndependent_powers_iff_aeval (f : M →ₗ[R] M) (v : M) :
    (LinearIndependent R fun n : ℕ => (f ^ n) v) ↔ ∀ p : R[X], aeval f p v = 0 → p = 0
-- Mathlib/CategoryTheory/Adhesive.lean
theorem adhesive_of_reflective [HasPullbacks D] [Adhesive C] [HasPullbacks C] [HasPushouts C]
    [H₂ : ∀ {X Y S : D} (f : S ⟶ X) (g : S ⟶ Y) [Mono f], HasPushout f g]
    {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Gr.Full] [Gr.Faithful]
    [PreservesLimitsOfShape WalkingCospan Gl] :
    Adhesive D
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
theorem mem_prod_list_ofFn {a : α} {s : Fin n → Finset α} :
    a ∈ (List.ofFn s).prod ↔ ∃ f : ∀ i : Fin n, s i, (List.ofFn fun i => (f i : α)).prod = a
-- Mathlib/CategoryTheory/Adjunction/Basic.lean
@[simp, reassoc]
lemma comp_unit_app (X : C) :
    (adj₁.comp adj₂).unit.app X = adj₁.unit.app X ≫ G.map (adj₂.unit.app (F.obj X))
-- Mathlib/RingTheory/Coalgebra/Basic.lean
theorem comul_comp_snd :
    comul ∘ₗ .snd R A B = TensorProduct.map (.snd R A B) (.snd R A B) ∘ₗ comul
-- Mathlib/Data/Option/Basic.lean
theorem forall_mem_map {f : α → β} {o : Option α} {p : β → Prop} :
    (∀ y ∈ o.map f, p y) ↔ ∀ x ∈ o, p (f x)
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_subtype_of_equiv {α β : Type u} (p : β → Prop) (e : α ≃ β) :
    #{ a : α // p (e a) } = #{ b : β // p b }
-- Mathlib/CategoryTheory/NatIso.lean
theorem app_inv {F G : C ⥤ D} (α : F ≅ G) (X : C) : (α.app X).inv = α.inv.app X
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Completeness.lean
/-- Let `f : E → F` be a map, let `g : α → E →SL[σ₁₂] F` be a family of continuous (semi)linear maps
that takes values in a bounded set and converges to `f` pointwise along a nontrivial filter. Then
`f` is a continuous (semi)linear map. -/
@[simps! (config := .asFn) apply]
def ofTendstoOfBoundedRange {α : Type*} {l : Filter α} [l.NeBot] (f : E' → F)
    (g : α → E' →SL[σ₁₂] F) (hf : Tendsto (fun a x => g a x) l (𝓝 f))
    (hg : IsBounded (Set.range g)) : E' →SL[σ₁₂] F
-- Mathlib/Combinatorics/Enumerative/Composition.lean
@[simp]
theorem ones_embedding (i : Fin (ones n).length) (h : 0 < (ones n).blocksFun i) :
    (ones n).embedding i ⟨0, h⟩ = ⟨i, lt_of_lt_of_le i.2 (ones n).length_le⟩
-- Mathlib/CategoryTheory/Subterminal.lean
@[simp]
theorem subterminals_to_monoOver_terminal_comp_forget [HasTerminal C] :
    (subterminalsEquivMonoOverTerminal C).functor ⋙ MonoOver.forget _ ⋙ Over.forget _ =
      subterminalInclusion C
-- Mathlib/Data/Nat/Bits.lean
@[simp]
theorem one_bits : Nat.bits 1 = [true]
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem get_extract_loop_ge_aux (as bs : Array α) (size start : Nat) (hge : i ≥ bs.size)
    (h : i < (extract.loop as size start bs).size) : start + i - bs.size < as.size
-- Mathlib/Analysis/Convex/Basic.lean
@[simp]
theorem mem_convexAddSubmonoid {s : Set E} : s ∈ convexAddSubmonoid 𝕜 E ↔ Convex 𝕜 s
-- Mathlib/Combinatorics/Enumerative/Composition.lean
theorem card_boundaries_pos : 0 < Finset.card c.boundaries
-- Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
theorem Filter.Tendsto.bddBelow_range_of_cofinite [IsDirected α (· ≥ ·)]
    (h : Tendsto u cofinite (𝓝 a)) : BddBelow (Set.range u)
-- Mathlib/Topology/ContinuousOn.lean
theorem continuousOn_piecewise_ite {s s' t : Set α} {f f' : α → β} [∀ x, Decidable (x ∈ t)]
    (h : ContinuousOn f s) (h' : ContinuousOn f' s') (H : s ∩ frontier t = s' ∩ frontier t)
    (Heq : EqOn f f' (s ∩ frontier t)) : ContinuousOn (t.piecewise f f') (t.ite s s')
-- Mathlib/Algebra/Symmetrized.lean
theorem unsym_inj {a b : αˢʸᵐ} : unsym a = unsym b ↔ a = b
-- .lake/packages/lean4/src/lean/Init/Data/List/Control.lean
@[simp] theorem forIn_nil [Monad m] (f : α → β → m (ForInStep β)) (b : β) : forIn [] b f = pure b
-- Mathlib/Probability/Kernel/Composition.lean
theorem compProd_apply_univ_le (κ : Kernel α β) (η : Kernel (α × β) γ) [IsFiniteKernel η] (a : α) :
    (κ ⊗ₖ η) a Set.univ ≤ κ a Set.univ * IsFiniteKernel.bound η
-- Mathlib/Order/Interval/Set/Pi.lean
@[to_additive]
theorem image_mulSingle_uIcc_left (i : ι) (a : α i) :
    Pi.mulSingle i '' uIcc a 1 = uIcc (Pi.mulSingle i a) 1
-- .lake/packages/lean4/src/lean/Init/GetElem.lean
@[simp] theorem getElem?_fin [h : GetElem? Cont Nat Elem Dom] (a : Cont) (i : Fin n)
    [Decidable (Dom a i)] : a[i]? = a[i.1]?
-- Mathlib/Topology/Instances/ENNReal.lean
@[continuity, fun_prop]
theorem Continuous.edist [TopologicalSpace β] {f g : β → α} (hf : Continuous f)
    (hg : Continuous g) : Continuous fun b => edist (f b) (g b)
-- Mathlib/Order/Interval/Set/UnorderedInterval.lean
/-- A sort of triangle inequality. -/
lemma uIcc_subset_uIcc_union_uIcc : [[a, c]] ⊆ [[a, b]] ∪ [[b, c]]
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- An angle in a right-angled triangle expressed using `arctan`. -/
theorem angle_add_eq_arctan_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x ≠ 0) :
    angle x (x + y) = Real.arctan (‖y‖ / ‖x‖)
-- Mathlib/MeasureTheory/Order/UpperLower.lean
/-- If we can fit a small ball inside a set `s` intersected with any neighborhood of `x`, then the
density of `s` near `x` is not `0`.

Along with `aux₁`, this proves that `x` is a Lebesgue point of `s`. This will be used to prove that
the frontier of an order-connected set is null. -/
private lemma aux₀
    (h : ∀ δ, 0 < δ →
      ∃ y, closedBall y (δ / 4) ⊆ closedBall x δ ∧ closedBall y (δ / 4) ⊆ interior s) :
    ¬Tendsto (fun r ↦ volume (closure s ∩ closedBall x r) / volume (closedBall x r)) (𝓝[>] 0)
        (𝓝 0)
-- Mathlib/Topology/UniformSpace/UniformEmbedding.lean
theorem UniformInducing.inducing {f : α → β} (h : UniformInducing f) : Inducing f
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem map_sup_comap_of_surjective (I J : Ideal S) : (I.comap f ⊔ J.comap f).map f = I ⊔ J
-- Mathlib/Algebra/MvPolynomial/Rename.lean
theorem rename_eq (f : σ → τ) (p : MvPolynomial σ R) :
    rename f p = Finsupp.mapDomain (Finsupp.mapDomain f) p
-- Mathlib/Logic/Basic.lean
theorem exists_mem_of_exists (H : ∀ x, p x) : (∃ x, q x) → ∃ (x : _) (_ : p x), q x
-- Mathlib/Order/OmegaCompletePartialOrder.lean
@[simp]
theorem forall_forall_merge' (c₀ : Chain (α →𝒄 β)) (c₁ : Chain α) (z : β) :
    (∀ j i : ℕ, (c₀ i) (c₁ j) ≤ z) ↔ ∀ i : ℕ, (c₀ i) (c₁ i) ≤ z
-- Mathlib/Data/Nat/Factorial/Cast.lean
/-- Convenience lemma. The `a - 1` is not using truncated subtraction, as opposed to the definition
of `Nat.descFactorial` as a natural. -/
theorem cast_descFactorial_two : (a.descFactorial 2 : S) = a * (a - 1)
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem Exists.imp' {β} {q : β → Prop} (f : α → β) (hpq : ∀ a, p a → q (f a)) :
    (∃ a, p a) → ∃ b, q b
-- Mathlib/RepresentationTheory/Rep.lean
/-- Porting note: if we generate this with `@[simps]` the linter complains some types in the LHS
simplify. -/
theorem homEquiv_apply_hom (f : A ⊗ B ⟶ C) :
    (homEquiv A B C f).hom = (TensorProduct.curry f.hom).flip
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean
theorem mem_carrier_iff' (q : Spec.T A⁰_ f) (a : A) :
    a ∈ carrier f_deg q ↔
      ∀ i, (Localization.mk (proj 𝒜 i a ^ m) ⟨f ^ i, ⟨i, rfl⟩⟩ : Localization.Away f) ∈
          algebraMap (HomogeneousLocalization.Away 𝒜 f) (Localization.Away f) '' { s | s ∈ q.1 }
-- Mathlib/Algebra/Group/AddChar.lean
@[simp] lemma one_apply (a : A) : (1 : AddChar A M) a = 1
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zpow_ne_zero_of_isUnit_det [Nonempty n'] [Nontrivial R] {A : M} (ha : IsUnit A.det)
    (z : ℤ) : A ^ z ≠ 0
-- Mathlib/Order/Hom/Basic.lean
protected theorem surjective (e : α ≃o β) : Function.Surjective e
-- Mathlib/Data/ENNReal/Inv.lean
@[simp, norm_cast]
theorem coe_div (hr : r ≠ 0) : (↑(p / r) : ℝ≥0∞) = p / r
-- Mathlib/CategoryTheory/Shift/ShiftedHom.lean
lemma comp_assoc {a₁ a₂ a₃ a₁₂ a₂₃ a : M}
    (α : ShiftedHom X Y a₁) (β : ShiftedHom Y Z a₂) (γ : ShiftedHom Z T a₃)
    (h₁₂ : a₂ + a₁ = a₁₂) (h₂₃ : a₃ + a₂ = a₂₃) (h : a₃ + a₂ + a₁ = a) :
    (α.comp β h₁₂).comp γ (show a₃ + a₁₂ = a by rw [← h₁₂, ← add_assoc, h]) =
      α.comp (β.comp γ h₂₃) (by rw [← h₂₃, h])
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem add_mul_right_right {x y : R} (h : IsCoprime x y) (z : R) : IsCoprime x (y + z * x)
-- Mathlib/Analysis/InnerProductSpace/LinearPMap.lean
theorem adjointAux_unique (y : T.adjointDomain) {x₀ : E}
    (hx₀ : ∀ x : T.domain, ⟪x₀, x⟫ = ⟪(y : F), T x⟫) : adjointAux hT y = x₀
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
lemma FractionalIdeal.inv_le_comm {I J : FractionalIdeal A⁰ K} (hI : I ≠ 0) (hJ : J ≠ 0) :
    I⁻¹ ≤ J ↔ J⁻¹ ≤ I
-- Mathlib/Data/Vector/Basic.lean
@[to_additive]
theorem prod_set [Monoid α] (v : Vector α n) (i : Fin n) (a : α) :
    (v.set i a).toList.prod = (v.take i).toList.prod * a * (v.drop (i + 1)).toList.prod
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
/-- `liminf` over a general filter is measurable. See `measurable_liminf` for the version over `ℕ`.
-/
theorem measurable_liminf' {ι ι'} {f : ι → δ → α} {v : Filter ι} (hf : ∀ i, Measurable (f i))
    {p : ι' → Prop} {s : ι' → Set ι} (hv : v.HasCountableBasis p s) (hs : ∀ j, (s j).Countable) :
    Measurable fun x => liminf (f · x) v
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_const_mul_Ico_of_neg (a b : α) {c : α} (h : c < 0) :
    (c * ·) ⁻¹' Ico a b = Ioc (b / c) (a / c)
-- Mathlib/Probability/Kernel/RadonNikodym.lean
/-- The singular part of `κ` with respect to `η` is mutually singular with `η`. -/
lemma mutuallySingular_singularPart (κ η : Kernel α γ) [IsFiniteKernel κ] [IsFiniteKernel η]
    (a : α) :
    singularPart κ η a ⟂ₘ η a
-- Mathlib/Algebra/Group/Nat.lean
@[simp] lemma not_even_one : ¬Even 1
-- Mathlib/GroupTheory/Perm/Support.lean
theorem coe_support_eq_set_support (f : Perm α) : (f.support : Set α) = { x | f x ≠ x }
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem range_eq_empty_iff : range n = ∅ ↔ n = 0
-- Mathlib/CategoryTheory/Conj.lean
theorem conj_apply (f : End X) : α.conj f = α.inv ≫ f ≫ α.hom
-- Mathlib/Algebra/Field/Basic.lean
theorem div_add_div (a : α) (c : α) (hb : b ≠ 0) (hd : d ≠ 0) :
    a / b + c / d = (a * d + b * c) / (b * d)
-- Mathlib/Data/Bool/Basic.lean
theorem eq_true_of_not_eq_false {b : Bool} : ¬b = false → b = true
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
@[simp, norm_cast] lemma coe_id : ⇑(Hom.id : G →g G) = id
-- Mathlib/RingTheory/RootsOfUnity/Complex.lean
/-- The complex `n`-th roots of unity are exactly the
complex numbers of the form `exp (2 * Real.pi * Complex.I * (i / n))` for some `i < n`. -/
nonrec theorem mem_rootsOfUnity (n : ℕ+) (x : Units ℂ) :
    x ∈ rootsOfUnity n ℂ ↔ ∃ i < (n : ℕ), exp (2 * π * I * (i / n)) = x
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem continuous_compLp [Fact (1 ≤ p)] (hg : LipschitzWith c g) (g0 : g 0 = 0) :
    Continuous (hg.compLp g0 : Lp E p μ → Lp F p μ)
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
@[reassoc (attr := simp)]
theorem ImageMap.factor_map {f g : Arrow C} [HasImage f.hom] [HasImage g.hom] (sq : f ⟶ g)
    (m : ImageMap sq) : factorThruImage f.hom ≫ m.map = sq.left ≫ factorThruImage g.hom