ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Set/Card.lean
theorem ncard_preimage_of_injective_subset_range {s : Set β} (H : f.Injective)
    (hs : s ⊆ Set.range f) :
    (f ⁻¹' s).ncard = s.ncard
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem image_sphere (x : E) (r : ℝ) : e '' Metric.sphere x r = Metric.sphere (e x) r
-- Mathlib/Analysis/LocallyConvex/Bounded.lean
@[simp]
theorem isVonNBounded_iUnion {ι : Sort*} [Finite ι] {s : ι → Set E} :
    IsVonNBounded 𝕜 (⋃ i, s i) ↔ ∀ i, IsVonNBounded 𝕜 (s i)
-- Mathlib/Analysis/Normed/Group/SemiNormedGrp.lean
@[simp]
theorem coe_of (V : Type u) [SeminormedAddCommGroup V] : (SemiNormedGrp₁.of V : Type u) = V
-- Mathlib/Analysis/BoundedVariation.lean
theorem LipschitzOnWith.comp_eVariationOn_le {f : E → F} {C : ℝ≥0} {t : Set E}
    (h : LipschitzOnWith C f t) {g : α → E} {s : Set α} (hg : MapsTo g s t) :
    eVariationOn (f ∘ g) s ≤ C * eVariationOn g s
-- Mathlib/Topology/MetricSpace/Isometry.lean
protected theorem injective (h : α ≃ᵢ β) : Injective h
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Cospan.lean
@[simp]
theorem spanCompIso_hom_app_left : (spanCompIso F f g).hom.app WalkingSpan.left = 𝟙 _
-- Mathlib/Topology/Constructions.lean
theorem continuousAt_fst {p : X × Y} : ContinuousAt Prod.fst p
-- Mathlib/Order/RelIso/Basic.lean
protected theorem isStrictTotalOrder : ∀ (_ : r ↪r s) [IsStrictTotalOrder β s],
    IsStrictTotalOrder α r
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i))
-- Mathlib/SetTheory/Game/PGame.lean
theorem rightMoves_neg : ∀ x : PGame, (-x).RightMoves = x.LeftMoves
-- Mathlib/Order/Filter/Ultrafilter.lean
@[simp]
nonrec theorem map_map (f : Ultrafilter α) (m : α → β) (n : β → γ) :
  (f.map m).map n = f.map (n ∘ m)
-- Mathlib/Analysis/Analytic/Composition.lean
/-- The norm of `q.comp_along_composition p c` is controlled by the product of
the norms of the relevant bits of `q` and `p`. -/
theorem compAlongComposition_norm {n : ℕ} (q : FormalMultilinearSeries 𝕜 F G)
    (p : FormalMultilinearSeries 𝕜 E F) (c : Composition n) :
    ‖q.compAlongComposition p c‖ ≤ ‖q c.length‖ * ∏ i, ‖p (c.blocksFun i)‖
-- Mathlib/Order/CompleteBooleanAlgebra.lean
/-- The symmetric difference of two `iSup`s is at most the `iSup` of the symmetric differences. -/
theorem iSup_symmDiff_iSup_le {g : ι → α} : (⨆ i, f i) ∆ (⨆ i, g i) ≤ ⨆ i, ((f i) ∆ (g i))
-- Mathlib/Topology/EMetricSpace/Basic.lean
/-- ε-δ characterization of uniform embeddings on pseudoemetric spaces -/
nonrec theorem uniformEmbedding_iff [PseudoEMetricSpace β] {f : α → β} :
    UniformEmbedding f ↔ Function.Injective f ∧ UniformContinuous f ∧
      ∀ δ > 0, ∃ ε > 0, ∀ {a b : α}, edist (f a) (f b) < ε → edist a b < δ
-- Mathlib/Data/Bool/Basic.lean
@[simp] lemma toNat_beq_one  (b : Bool) : (b.toNat == 1) =  b
-- Mathlib/CategoryTheory/Monoidal/Category.lean
@[reassoc]
theorem whiskerRight_tensor_symm {X X' : C} (f : X ⟶ X') (Y Z : C) :
    f ▷ Y ▷ Z = (α_ X Y Z).hom ≫ f ▷ (Y ⊗ Z) ≫ (α_ X' Y Z).inv
-- Mathlib/Order/Concept.lean
@[simp]
theorem inf_fst (c d : Concept α β r) : (c ⊓ d).fst = c.fst ∩ d.fst
-- Mathlib/Data/Real/Hyperreal.lean
theorem IsSt.add {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) :
    IsSt (x + y) (r + s)
-- Mathlib/Data/Set/Image.lean
@[simp] lemma range_comp {α : Type*} (f : ι' → α) (e : E) : range (f ∘ e) = range f
-- Mathlib/Logic/Relation.lean
@[trans]
theorem trans (hab : ReflTransGen r a b) (hbc : ReflTransGen r b c) : ReflTransGen r a c
-- Mathlib/Topology/Algebra/InfiniteSum/Ring.lean
theorem HasSum.mul_eq (hf : HasSum f s) (hg : HasSum g t)
    (hfg : HasSum (fun x : ι × κ ↦ f x.1 * g x.2) u) : s * t = u
-- Mathlib/Computability/Primrec.lean
theorem option_map {f : α → Option β} {g : α → β → σ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec fun a => (f a).map (g a)
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean
/-- `TensorProduct.lid` preserves tensor products of quadratic forms. -/
@[simps toLinearEquiv]
def tensorLId (Q₂ : QuadraticForm R M₂) :
    (QuadraticForm.tmul (sq (R := R)) Q₂).IsometryEquiv Q₂
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
@[simp] theorem one_num : (1 : Rat).num = 1
-- Mathlib/Topology/RestrictGenTopology.lean
protected theorem isOpen_iff (hS : RestrictGenTopology S) :
    IsOpen t ↔ ∀ s ∈ S, IsOpen ((↑) ⁻¹' t : Set s)
-- Mathlib/RingTheory/RingHomProperties.lean
theorem StableUnderComposition.respectsIso (hP : RingHom.StableUnderComposition @P)
    (hP' : ∀ {R S : Type u} [CommRing R] [CommRing S] (e : R ≃+* S), P e.toRingHom) :
    RingHom.RespectsIso @P
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp (default + 1))]
lemma sup_div_le [SemilatticeSup β] [OrderBot β] {s t : Finset α} {f : α → β} {a : β} :
    sup (s / t) f ≤ a ↔ ∀ x ∈ s, ∀ y ∈ t, f (x /  y) ≤ a
-- Mathlib/NumberTheory/FunctionField.lean
/-- `F` is a function field over `Fq` iff it is a finite extension of `Fq(t)`. -/
theorem functionField_iff (Fqt : Type*) [Field Fqt] [Algebra Fq[X] Fqt]
    [IsFractionRing Fq[X] Fqt] [Algebra (RatFunc Fq) F] [Algebra Fqt F] [Algebra Fq[X] F]
    [IsScalarTower Fq[X] Fqt F] [IsScalarTower Fq[X] (RatFunc Fq) F] :
    FunctionField Fq F ↔ FiniteDimensional Fqt F
-- Mathlib/Order/Filter/EventuallyConst.lean
@[to_additive]
lemma of_mulIndicator_const (h : EventuallyConst (s.mulIndicator fun _ ↦ c) l) (hc : c ≠ 1) :
    EventuallyConst s l
-- Mathlib/Algebra/Symmetrized.lean
@[simp]
theorem unsym_symm : (@unsym α).symm = sym
-- Mathlib/CategoryTheory/Galois/Prorepresentability.lean
lemma autMulEquivAutGalois_π (f : Aut F) (A : C) [IsGalois A] (a : F.obj A) :
    F.map (AutGalois.π F { obj := A, pt := a } (autMulEquivAutGalois F f).unop).hom a =
      f.hom.app A a
-- Mathlib/Algebra/Module/Equiv/Basic.lean
@[simp]
theorem toNatLinearEquiv_toAddEquiv : ↑e.toNatLinearEquiv = e
-- Mathlib/Data/List/Basic.lean
@[deprecated get_append_right' (since := "2023-01-05")]
theorem nthLe_append_right {l₁ l₂ : List α} {n : ℕ} (h₁ : l₁.length ≤ n) (h₂) :
    (l₁ ++ l₂).nthLe n h₂ = l₂.nthLe (n - l₁.length) (get_append_right_aux h₁ h₂)
-- Mathlib/Topology/Sets/Compacts.lean
theorem carrier_eq_coe (s : PositiveCompacts α) : s.carrier = s
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
theorem nadd_lt_nadd : ∀ {a b c d}, a < b → c < d → a ♯ c < b ♯ d
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem neg_right {x y : R} (h : IsCoprime x y) : IsCoprime x (-y)
-- Mathlib/CategoryTheory/Limits/FullSubcategory.lean
theorem hasLimitsOfShape_of_closedUnderLimits (h : ClosedUnderLimitsOfShape J P)
    [HasLimitsOfShape J C] : HasLimitsOfShape J (FullSubcategory P)
-- Mathlib/Order/Filter/AtTopBot.lean
/-- A sequence converges if every subsequence has a convergent subsequence. -/
theorem tendsto_of_subseq_tendsto {ι : Type*} {x : ι → α} {f : Filter α} {l : Filter ι}
    [l.IsCountablyGenerated]
    (hxy : ∀ ns : ℕ → ι, Tendsto ns atTop l →
      ∃ ms : ℕ → ℕ, Tendsto (fun n => x (ns <| ms n)) atTop f) :
    Tendsto x l f
-- Mathlib/Topology/Algebra/Order/Field.lean
/-- If a (possibly non-unital and/or non-associative) ring `R` admits a submultiplicative
nonnegative norm `norm : R → 𝕜`, where `𝕜` is a linear ordered field, and the open balls
`{ x | norm x < ε }`, `ε > 0`, form a basis of neighborhoods of zero, then `R` is a topological
ring. -/
theorem TopologicalRing.of_norm {R 𝕜 : Type*} [NonUnitalNonAssocRing R] [LinearOrderedField 𝕜]
    [TopologicalSpace R] [TopologicalAddGroup R] (norm : R → 𝕜)
    (norm_nonneg : ∀ x, 0 ≤ norm x) (norm_mul_le : ∀ x y, norm (x * y) ≤ norm x * norm y)
    (nhds_basis : (𝓝 (0 : R)).HasBasis ((0 : 𝕜) < ·) (fun ε ↦ { x | norm x < ε })) :
    TopologicalRing R
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
lemma cyclesMap_eq [S₁.HasLeftHomology] [S₂.HasLeftHomology] :
    cyclesMap φ = h₁.cyclesIso.hom ≫ γ.φK ≫ h₂.cyclesIso.inv
-- Mathlib/AlgebraicGeometry/OpenImmersion.lean
@[simp, reassoc]
lemma isoOfRangeEq_inv_fac {X Y Z : Scheme.{u}} (f : X ⟶ Z) (g : Y ⟶ Z)
    [IsOpenImmersion f] [IsOpenImmersion g] (e : Set.range f.1.base = Set.range g.1.base) :
    (isoOfRangeEq f g e).inv ≫ f = g
-- .lake/packages/lean4/src/lean/Init/Classical.lean
theorem byContradiction {p : Prop} (h : ¬p → False) : p
-- Mathlib/Analysis/Complex/Basic.lean
@[continuity]
theorem continuous_normSq : Continuous normSq
-- Mathlib/CategoryTheory/Sites/Sheaf.lean
/--
For a concrete category `(A, s)` where the forgetful functor `s : A ⥤ Type v` preserves limits and
reflects isomorphisms, and `A` has limits, an `A`-valued presheaf `P : Cᵒᵖ ⥤ A` is a sheaf iff its
underlying `Type`-valued presheaf `P ⋙ s : Cᵒᵖ ⥤ Type` is a sheaf.

Note this lemma applies for "algebraic" categories, eg groups, abelian groups and rings, but not
for the category of topological spaces, topological rings, etc since reflecting isomorphisms doesn't
hold.
-/
theorem isSheaf_iff_isSheaf_forget (s : A' ⥤ Type max v₁ u₁) [HasLimits A'] [PreservesLimits s]
    [s.ReflectsIsomorphisms] : IsSheaf J P' ↔ IsSheaf J (P' ⋙ s)
-- Mathlib/Data/Analysis/Topology.lean
@[simp]
theorem nhds_σ (F : Realizer α) (a : α) : (F.nhds a).σ = { s : F.σ // a ∈ F.F s }
-- Mathlib/LinearAlgebra/Basis.lean
@[simp]
theorem coe_mk : ⇑(Basis.mk hli hsp) = v
-- Mathlib/Data/Matroid/Basic.lean
@[simp] theorem basis_ground_iff : M.Basis B M.E ↔ M.Base B
-- Mathlib/Topology/Homeomorph.lean
protected theorem inducing (h : X ≃ₜ Y) : Inducing h
-- Mathlib/Analysis/Calculus/FDeriv/Bilinear.lean
theorem ContinuousLinearMap.fderivWithin_of_bilinear {f : G' → E} {g : G' → F} {x : G'} {s : Set G'}
    (hf : DifferentiableWithinAt 𝕜 f s x) (hg : DifferentiableWithinAt 𝕜 g s x)
    (hs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (fun y => B (f y) (g y)) s x =
      B.precompR G' (f x) (fderivWithin 𝕜 g s x) + B.precompL G' (fderivWithin 𝕜 f s x) (g x)
-- Mathlib/RingTheory/Algebraic.lean
/-- An element of an algebra over a field is algebraic if and only if it is integral. -/
theorem isAlgebraic_iff_isIntegral {x : A} : IsAlgebraic K x ↔ IsIntegral K x
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
@[simp]
theorem restrictScalarsIsometry_toLinearMap :
    (restrictScalarsIsometry 𝕜 E Fₗ 𝕜' 𝕜'').toLinearMap = restrictScalarsₗ 𝕜 E Fₗ 𝕜' 𝕜''
-- Mathlib/MeasureTheory/Decomposition/SignedLebesgue.lean
theorem singularPart_smul_nnreal (s : SignedMeasure α) (μ : Measure α) (r : ℝ≥0) :
    (r • s).singularPart μ = r • s.singularPart μ
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
theorem div_ne_zero (ha : a ≠ 0) (hb : b ≠ 0) : a / b ≠ 0
-- Mathlib/Data/List/Chain.lean
protected theorem Chain.pairwise [IsTrans α R] :
    ∀ {a : α} {l : List α}, Chain R a l → Pairwise R (a :: l)
-- Mathlib/Topology/Order/MonotoneConvergence.lean
theorem iInf_eq_iInf_subseq_of_monotone {ι₁ ι₂ α : Type*} [Preorder ι₂] [CompleteLattice α]
    {l : Filter ι₁} [l.NeBot] {f : ι₂ → α} {φ : ι₁ → ι₂} (hf : Monotone f)
    (hφ : Tendsto φ l atBot) : ⨅ i, f i = ⨅ i, f (φ i)
-- Mathlib/Computability/TMToPartrec.lean
theorem K'.elim_aux (a b c d) : K'.elim a b c d K'.aux = c
-- Mathlib/Algebra/Lie/Basic.lean
theorem one_apply (x : L₁) : (1 : L₁ →ₗ⁅R⁆ L₁) x = x
-- Mathlib/Data/List/Indexes.lean
theorem le_findIdx_of_not {p : α → Bool} {xs : List α} {i : ℕ} (h : i < xs.length)
    (h2 : ∀ j (hji : j < i), ¬p (xs.get ⟨j, hji.trans h⟩)) : i ≤ xs.findIdx p
-- Mathlib/Data/NNReal/Basic.lean
nonrec theorem half_le_self (a : ℝ≥0) : a / 2 ≤ a
-- Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean
theorem differentiable_Λ₀ : Differentiable ℂ P.Λ₀
-- Mathlib/Topology/Maps/Basic.lean
theorem Embedding.continuous_iff (hg : Embedding g) :
    Continuous f ↔ Continuous (g ∘ f)
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
/-- Eta rule for structured arrows. Prefer `StructuredArrow.eta` for rewriting, since equality of
    objects tends to cause problems. -/
theorem eq_mk (f : StructuredArrow S T) : f = mk f.hom
-- Mathlib/Algebra/Algebra/Equiv.lean
/--
Upgrade a linear equivalence to an algebra equivalence,
given that it distributes over multiplication and the identity
-/
@[simps apply]
def ofLinearEquiv : A₁ ≃ₐ[R] A₂
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem setIntegral_indicator (ht : MeasurableSet t) :
    ∫ x in s, t.indicator f x ∂μ = ∫ x in s ∩ t, f x ∂μ
-- Mathlib/Topology/Order/MonotoneContinuity.lean
/-- If `f` is a monotone function on a left neighborhood of `a` and the image of this neighborhood
under `f` meets every interval `(b, f a)`, `b < f a`, then `f` is continuous at `a` from the left.

The assumption `hfs : ∀ b < f a, ∃ c ∈ s, f c ∈ Ioo b (f a)` cannot be replaced by the weaker
assumption `hfs : ∀ b < f a, ∃ c ∈ s, f c ∈ Ico b (f a)` we use for strictly monotone functions
because otherwise the function `floor : ℝ → ℤ` would be a counter-example at `a = 0`. -/
theorem continuousWithinAt_left_of_monotoneOn_of_exists_between {f : α → β} {s : Set α} {a : α}
    (hf : MonotoneOn f s) (hs : s ∈ 𝓝[≤] a) (hfs : ∀ b < f a, ∃ c ∈ s, f c ∈ Ioo b (f a)) :
    ContinuousWithinAt f (Iic a) a
-- Mathlib/Topology/DiscreteQuotient.lean
@[simp]
theorem ofLE_ofLE (h₁ : A ≤ B) (h₂ : B ≤ C) (x : A) :
    ofLE h₂ (ofLE h₁ x) = ofLE (h₁.trans h₂) x
-- Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/Defs.lean
@[simp]
theorem GLPos.coe_neg_GL (g : GLPos n R) : ↑(-g) = -(g : GL n R)
-- Mathlib/Algebra/MvPolynomial/Equiv.lean
theorem degree_finSuccEquiv {f : MvPolynomial (Fin (n + 1)) R} (h : f ≠ 0) :
    (finSuccEquiv R n f).degree = degreeOf 0 f
-- Mathlib/Algebra/Order/Floor.lean
theorem abs_fract : |fract a| = fract a
-- Mathlib/RingTheory/Multiplicity.lean
protected theorem mul' {p a b : α} (hp : Prime p) (h : (multiplicity p (a * b)).Dom) :
    get (multiplicity p (a * b)) h =
      get (multiplicity p a) ((finite_mul_iff hp).1 h).1 +
        get (multiplicity p b) ((finite_mul_iff hp).1 h).2
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
/-- A family `𝓕 : ι → X → α` is equicontinuous at `x₀` iff `range 𝓕` is equicontinuous at `x₀`,
i.e the family `(↑) : range F → X → α` is equicontinuous at `x₀`. -/
theorem equicontinuousAt_iff_range {F : ι → X → α} {x₀ : X} :
    EquicontinuousAt F x₀ ↔ EquicontinuousAt ((↑) : range F → X → α) x₀
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
theorem pure_map (a : α) : (pure a).map f = pure (f a)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem cos_le_cos_of_nonneg_of_le_pi {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y ≤ π) (hxy : x ≤ y) :
    cos y ≤ cos x
-- Mathlib/Data/Sign.lean
theorem sign_eq_one_iff : sign a = 1 ↔ 0 < a
-- Mathlib/AlgebraicTopology/Nerve.lean
lemma δ₀_eq {x : nerve C _[n + 1]} : (nerve C).δ (0 : Fin (n + 2)) x = x.δ₀
-- Mathlib/RingTheory/Nilpotent/Basic.lean
theorem Prime.isRadical [CommMonoidWithZero R] {y : R} (hy : Prime y) : IsRadical y
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem mem_span {s : Set α} (x) : x ∈ span s ↔ ∀ p : Ideal α, s ⊆ p → x ∈ p
-- Mathlib/Algebra/Associated/Basic.lean
@[simp]
theorem associated_mul_unit_right_iff {β : Type*} [Monoid β] {a b : β} {u : Units β} :
    Associated a (b * u) ↔ Associated a b
-- Mathlib/Init/Logic.lean
theorem heq_of_eq_rec_right {φ : α → Sort v} {a a' : α} {p₁ : φ a} {p₂ : φ a'} :
    (e : a' = a) → (h₂ : p₁ = Eq.rec (motive := fun a _ ↦ φ a) p₂ e) → HEq p₁ p₂
-- Mathlib/Order/Filter/Prod.lean
theorem tendsto_prodAssoc {h : Filter γ} :
    Tendsto (Equiv.prodAssoc α β γ) ((f ×ˢ g) ×ˢ h) (f ×ˢ (g ×ˢ h))
-- Mathlib/CategoryTheory/Localization/Predicate.lean
theorem inverts : W.IsInvertedBy L
-- .lake/packages/lean4/src/lean/Init/Data/List/TakeDrop.lean
/-- The `i`-th element of a list coincides with the `i`-th element of any of its prefixes of
length `> i`. Version designed to rewrite from the big list to the small list. -/
theorem getElem_take (L : List α) {i j : Nat} (hi : i < L.length) (hj : i < j) :
    L[i] = (L.take j)[i]'(length_take .. ▸ Nat.lt_min.mpr ⟨hj, hi⟩)
-- Mathlib/MeasureTheory/Integral/Average.lean
/-- **First moment method**. The minimum of an integrable function is smaller than its integral,
while avoiding a null set. -/
theorem exists_not_mem_null_le_integral (hf : Integrable f μ) (hN : μ N = 0) :
    ∃ x, x ∉ N ∧ f x ≤ ∫ a, f a ∂μ
-- Mathlib/Data/Nat/Factorial/Basic.lean
@[gcongr]
lemma factorial_lt_of_lt {m n : ℕ} (hn : 0 < n) (h : n < m) : n ! < m !
-- Mathlib/Algebra/Ring/Parity.lean
lemma Odd.map [FunLike F α β] [RingHomClass F α β] (f : F) : Odd a → Odd (f a)
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
theorem borel_eq_generateFrom_Ico (α : Type*) [TopologicalSpace α] [SecondCountableTopology α]
    [LinearOrder α] [OrderTopology α] :
    borel α = .generateFrom { S : Set α | ∃ (l u : α), l < u ∧ Ico l u = S }
-- Mathlib/Data/Int/Cast/Lemmas.lean
@[to_additive existing (attr := simp)]
lemma zpowersHom_apply (x : α) (n : Multiplicative ℤ) : zpowersHom α x n = x ^ toAdd n
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
/-- The norm of the difference of two non-zero vectors equals the sum of their norms
if and only the angle between the two vectors is π. -/
theorem norm_sub_eq_add_norm_iff_angle_eq_pi {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ‖x - y‖ = ‖x‖ + ‖y‖ ↔ angle x y = π
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem getLast_cons {a : α} {l : List α} :
    ∀ h : l ≠ nil, getLast (a :: l) (cons_ne_nil a l) = getLast l h
-- Mathlib/Algebra/Quaternion.lean
@[simp]
theorem normSq_le_zero : normSq a ≤ 0 ↔ a = 0
-- Mathlib/Data/Matroid/Sum.lean
@[simp] lemma sum'_base_iff {B} : (Matroid.sum' M).Base B ↔ ∀ i, (M i).Base (Prod.mk i ⁻¹' B)
-- Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean
private theorem toStepOfLE'.succ (m n : ℕ) (h : m ≤ n) :
    toStepOfLE' k m (Nat.succ n) (h.trans n.le_succ) =
    (toStepSucc k n) ∘ toStepOfLE' k m n h
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
theorem coprime_mul_iff_left : Coprime (m * n) k ↔ Coprime m k ∧ Coprime n k
-- Mathlib/RingTheory/Finiteness.lean
/-- The submodule generated by a finite set is `R`-finite. -/
theorem span_of_finite {A : Set M} (hA : Set.Finite A) :
    Module.Finite R (Submodule.span R A)
-- Mathlib/NumberTheory/Cyclotomic/Basic.lean
/-- A finite cyclotomic extension of an integral noetherian domain is integral -/
theorem integral [IsDomain B] [IsNoetherianRing A] [Finite S] [IsCyclotomicExtension S A B] :
    Algebra.IsIntegral A B
-- Mathlib/MeasureTheory/Measure/MutuallySingular.lean
lemma measurableSet_nullSet (h : μ ⟂ₘ ν) : MeasurableSet h.nullSet
-- Mathlib/RingTheory/MvPowerSeries/Inverse.lean
theorem coeff_inv_aux [DecidableEq σ] (n : σ →₀ ℕ) (a : R) (φ : MvPowerSeries σ R) :
    coeff R n (inv.aux a φ) =
      if n = 0 then a
      else
        -a *
          ∑ x ∈ antidiagonal n, if x.2 < n then coeff R x.1 φ * coeff R x.2 (inv.aux a φ) else 0
-- Mathlib/CategoryTheory/Sites/CompatiblePlus.lean
@[reassoc (attr := simp)]
theorem plusCompIso_whiskerLeft {F G : D ⥤ E} (η : F ⟶ G) (P : Cᵒᵖ ⥤ D)
    [∀ X : C, PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]
    [∀ (X : C) (W : J.Cover X) (P : Cᵒᵖ ⥤ D), PreservesLimit (W.index P).multicospan F]
    [∀ X : C, PreservesColimitsOfShape (J.Cover X)ᵒᵖ G]
    [∀ (X : C) (W : J.Cover X) (P : Cᵒᵖ ⥤ D), PreservesLimit (W.index P).multicospan G] :
    whiskerLeft _ η ≫ (J.plusCompIso G P).hom =
      (J.plusCompIso F P).hom ≫ J.plusMap (whiskerLeft _ η)
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[reassoc (attr := simp)]
lemma IsColimit.inr_desc {t : PushoutCocone f g} (ht : IsColimit t) {W : C} (h : Y ⟶ W) (k : Z ⟶ W)
    (w : f ≫ h = g ≫ k) : inr t ≫ IsColimit.desc ht h k w = k
-- Mathlib/Order/Filter/Basic.lean
theorem le_generate_iff {s : Set (Set α)} {f : Filter α} : f ≤ generate s ↔ s ⊆ f.sets
-- Mathlib/Deprecated/Submonoid.lean
/-- The submonoid generated by an element of a monoid equals the set of natural number powers of
    the element. -/
@[to_additive
      "The `AddSubmonoid` generated by an element of an `AddMonoid` equals the set of
      natural number multiples of the element."]
theorem closure_singleton {x : M} : Closure ({x} : Set M) = powers x
-- Mathlib/LinearAlgebra/TensorProduct/Subalgebra.lean
@[simp]
theorem lTensorBot_one_tmul (a : A) : A.lTensorBot (1 ⊗ₜ[R] a) = a
-- Mathlib/Topology/Order/DenselyOrdered.lean
@[simp]
theorem Icc_mem_nhds_iff [NoMinOrder α] [NoMaxOrder α] {a b x : α} :
    Icc a b ∈ 𝓝 x ↔ x ∈ Ioo a b
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem le_bmex_of_forall {o : Ordinal} (f : ∀ a < o, Ordinal) {a : Ordinal}
    (H : ∀ b < a, ∃ i hi, f i hi = b) : a ≤ bmex o f
-- Mathlib/Topology/Order/OrderClosed.lean
theorem IsClosed.hypograph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s)
    (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ p.2 ≤ f p.1 }
-- Mathlib/CategoryTheory/Monoidal/NaturalTransformation.lean
/-- The cartesian product of two monoidal natural transformations is monoidal. -/
@[simps]
def prod {F G : LaxMonoidalFunctor C D} {H K : LaxMonoidalFunctor C E} (α : MonoidalNatTrans F G)
    (β : MonoidalNatTrans H K) : MonoidalNatTrans (F.prod' H) (G.prod' K)
-- Mathlib/GroupTheory/PushoutI.lean
theorem ext_smul {w₁ w₂ : NormalWord d} (i : ι)
    (h : CoprodI.of (φ i w₁.head) • w₁.toWord =
         CoprodI.of (φ i w₂.head) • w₂.toWord) :
    w₁ = w₂
-- Mathlib/Topology/Compactness/Lindelof.lean
theorem cluster_point_of_Lindelof [LindelofSpace X] (f : Filter X) [NeBot f]
    [CountableInterFilter f] : ∃ x, ClusterPt x f
-- Mathlib/FieldTheory/IsAlgClosed/Basic.lean
/--
Deprecated: `algebraMap_surjective_of_isIntegral` is identical apart from the `IsIntegral` argument,
which can be found by instance synthesis
-/
@[deprecated algebraMap_surjective_of_isIntegral (since := "2024-05-08")]
theorem algebraMap_surjective_of_isAlgebraic {k K : Type*} [Field k] [Ring K] [IsDomain K]
    [IsAlgClosed k] [Algebra k K] [Algebra.IsAlgebraic k K] :
    Function.Surjective (algebraMap k K)
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem coe_addMonoidHom_refl : (RingEquiv.refl R : R →+ R) = AddMonoidHom.id R
-- Mathlib/Topology/Sheaves/SheafCondition/EqualizerProducts.lean
@[simp]
theorem fork_ι : (fork F U).ι = res F U
-- Mathlib/Topology/Category/TopCat/Limits/Products.lean
@[reassoc (attr := simp)]
theorem piIsoPi_inv_π {ι : Type v} (α : ι → TopCat.{max v u}) (i : ι) :
    (piIsoPi α).inv ≫ Pi.π α i = piπ α i
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[reassoc (attr := simp)]
lemma IsLimit.lift_snd {t : PullbackCone f g} (ht : IsLimit t) {W : C} (h : W ⟶ X) (k : W ⟶ Y)
    (w : h ≫ f = k ≫ g) : IsLimit.lift ht h k w ≫ snd t = k
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem forall_and : (∀ x, p x ∧ q x) ↔ (∀ x, p x) ∧ (∀ x, q x)
-- Mathlib/Order/UpperLower/Basic.lean
@[simp, norm_cast]
theorem coe_sInf (S : Set (UpperSet α)) : (↑(sInf S) : Set α) = ⋃ s ∈ S, ↑s
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem HasLineDerivAt.congr_of_eventuallyEq (h : HasLineDerivAt 𝕜 f f' x v) (h₁ : f₁ =ᶠ[𝓝 x] f) :
    HasLineDerivAt 𝕜 f₁ f' x v
-- Mathlib/Algebra/Homology/ComplexShape.lean
lemma next_eq_self' (c : ComplexShape ι) (j : ι) (hj : ∀ k, ¬ c.Rel j k) :
    c.next j = j
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
/-- Product of a multiset of elements in a `Subsemiring` of a `CommSemiring`
    is in the `Subsemiring`. -/
protected theorem multiset_prod_mem {R} [CommSemiring R] (s : Subsemiring R) (m : Multiset R) :
    (∀ a ∈ m, a ∈ s) → m.prod ∈ s
-- Mathlib/Analysis/Convex/Combination.lean
/--
Convex hull of `s` is equal to the set of all centers of masses of `Finset`s `t`, `z '' t ⊆ s`.
For universe reasons, you shouldn't use this lemma to prove that a given center of mass belongs
to the convex hull. Use convexity of the convex hull instead.
-/
theorem convexHull_eq (s : Set E) : convexHull R s =
    { x : E | ∃ (ι : Type) (t : Finset ι) (w : ι → R) (z : ι → E), (∀ i ∈ t, 0 ≤ w i) ∧
      ∑ i ∈ t, w i = 1 ∧ (∀ i ∈ t, z i ∈ s) ∧ t.centerMass w z = x }
-- Mathlib/CategoryTheory/ComposableArrows.lean
@[simp]
lemma homMk₅_app_two :
    (homMk₅ app₀ app₁ app₂ app₃ app₄ app₅ w₀ w₁ w₂ w₃ w₄).app ⟨2, by valid⟩ = app₂
-- Mathlib/CategoryTheory/Generator.lean
theorem thin_of_isSeparating_empty (h : IsSeparating (∅ : Set C)) : Quiver.IsThin C