ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem differentiableOn_inv' : DifferentiableOn 𝕜 (fun x : R => x⁻¹) {x | x ≠ 0}
-- Mathlib/Topology/MetricSpace/Kuratowski.lean
/--
The Kuratowski embedding is an isometry.
Theorem 2.1 of [Assaf Naor, *Metric Embeddings and Lipschitz Extensions*][Naor-2015]. -/
protected theorem kuratowskiEmbedding.isometry (α : Type u) [MetricSpace α] [SeparableSpace α] :
    Isometry (kuratowskiEmbedding α)
-- Mathlib/Data/Nat/PSub.lean
@[simp]
theorem ppred_zero : ppred 0 = none
-- Mathlib/Data/Rat/Sqrt.lean
@[simp]
theorem sqrt_ofNat (n : ℕ) : Rat.sqrt (no_index (OfNat.ofNat n) : ℚ) = Nat.sqrt (OfNat.ofNat n)
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[simp]
theorem starClosure_toNonunitalSubalgebra {S : NonUnitalSubalgebra R A} :
    S.starClosure.toNonUnitalSubalgebra = S ⊔ star S
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
theorem or_and_distrib_right : ∀ (x y z : Bool), (x && y || z) = ((x || z) && (y || z))
-- Mathlib/Order/Bounds/Basic.lean
theorem isLUB_pi {s : Set (∀ a, π a)} {f : ∀ a, π a} :
    IsLUB s f ↔ ∀ a, IsLUB (Function.eval a '' s) (f a)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Bounds.lean
lemma lt_sin (hx : x < 0) : x < sin x
-- Mathlib/Order/Filter/Basic.lean
theorem tendsto_comap'_iff {m : α → β} {f : Filter α} {g : Filter β} {i : γ → α} (h : range i ∈ f) :
    Tendsto (m ∘ i) (comap i f) g ↔ Tendsto m f g
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
theorem cos_surjective : Function.Surjective cos
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
protected lemma add_comp {n₁ n₂ n₁₂ : ℤ} (z₁ z₁' : Cochain F G n₁) (z₂ : Cochain G K n₂)
    (h : n₁ + n₂ = n₁₂) : (z₁ + z₁').comp z₂ h = z₁.comp z₂ h + z₁'.comp z₂ h
-- Mathlib/Algebra/Lie/Rank.lean
lemma rank_le_natTrailingDegree_charpoly_ad :
    rank R L M ≤ (toEnd R L M x).charpoly.natTrailingDegree
-- Mathlib/Geometry/Manifold/InteriorBoundary.lean
/-- Type class for manifold without boundary. This differs from `ModelWithCorners.Boundaryless`,
  which states that the `ModelWithCorners` maps to the whole model vector space. -/
class _root_.BoundarylessManifold {𝕜 : Type*} [NontriviallyNormedField 𝕜]
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
    {H : Type*} [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H)
    (M : Type*) [TopologicalSpace M] [ChartedSpace H M] : Prop where
  isInteriorPoint' : ∀ x : M, IsInteriorPoint I x
-- Mathlib/RingTheory/Multiplicity.lean
theorem eq_top_iff_not_finite {a b : α} : multiplicity a b = ⊤ ↔ ¬Finite a b
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem or_append {x₁ x₂ : BitVec w} {y₁ y₂ : BitVec v} :
    (x₁ ++ y₁) ||| (x₂ ++ y₂) = (x₁ ||| x₂) ++ (y₁ ||| y₂)
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
/-- A function is `C^∞` on a domain with unique derivatives if and only if it is differentiable
there, and its derivative (expressed with `fderivWithin`) is `C^∞`. -/
theorem contDiffOn_top_iff_fderivWithin (hs : UniqueDiffOn 𝕜 s) :
    ContDiffOn 𝕜 ∞ f s ↔
      DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 ∞ (fun y => fderivWithin 𝕜 f s y) s
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[to_additive]
nonrec theorem QuotientGroup.measurable_from_quotient {G} [Group G] [MeasurableSpace G]
    {S : Subgroup G} {f : G ⧸ S → α} : Measurable f ↔ Measurable (f ∘ ((↑) : G → G ⧸ S))
-- Mathlib/Algebra/Homology/DerivedCategory/Ext.lean
private lemma neg_hom' (α : Ext X Y n) : (-α).hom' = -α.hom'
-- Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
theorem continuousAt_ofReal_cpow_const (x : ℝ) (y : ℂ) (h : 0 < y.re ∨ x ≠ 0) :
    ContinuousAt (fun a => (a : ℂ) ^ y : ℝ → ℂ) x
-- Mathlib/RingTheory/Nilpotent/Defs.lean
/-- A structure that has zero and pow is reduced if it has no nonzero nilpotent elements. -/
@[mk_iff]
class IsReduced (R : Type*) [Zero R] [Pow R ℕ] : Prop where
  /-- A reduced structure has no nonzero nilpotent elements. -/
  eq_zero : ∀ x : R, IsNilpotent x → x = 0
-- Mathlib/Algebra/Lie/Engel.lean
/-- Engel's theorem.

See also `LieModule.isNilpotent_iff_forall'` which assumes that `M` is Noetherian instead of `L`. -/
theorem LieModule.isNilpotent_iff_forall [IsNoetherian R L] :
    LieModule.IsNilpotent R L M ↔ ∀ x, _root_.IsNilpotent <| toEnd R L M x
-- Mathlib/Algebra/Order/Interval/Set/Instances.lean
theorem coe_ne_zero {x : Icc (0 : α) 1} : (x : α) ≠ 0 ↔ x ≠ 0
-- Mathlib/Topology/Algebra/Order/Compact.lean
/-- A continuous function is bounded below on a compact set. -/
theorem IsCompact.bddBelow_image [ClosedIicTopology α] [Nonempty α] {f : β → α} {K : Set β}
    (hK : IsCompact K) (hf : ContinuousOn f K) : BddBelow (f '' K)
-- Mathlib/Order/Height.lean
theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subchain, length l = n
-- Mathlib/Data/Finset/PImage.lean
@[simp]
theorem coe_toFinset (o : Part α) [Decidable o.Dom] : (o.toFinset : Set α) = { x | x ∈ o }
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
@[simp]
theorem weightedVSubVSubWeights_apply_left [DecidableEq ι] {i j : ι} (h : i ≠ j) :
    weightedVSubVSubWeights k i j i = 1
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem monomial_natDegree_leadingCoeff_eq_self (h : p.support.card ≤ 1) :
    monomial p.natDegree p.leadingCoeff = p
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem iUnion_div_right_image : ⋃ a ∈ t, (· / a) '' s = s / t
-- Mathlib/Data/Real/Irrational.lean
theorem irrational_sqrt_ofNat_iff {n : ℕ} [n.AtLeastTwo] :
    Irrational (√(no_index (OfNat.ofNat n))) ↔ ¬IsSquare (OfNat.ofNat n)
-- Mathlib/Topology/PartialHomeomorph.lean
theorem eq_of_eqOnSource_univ {e e' : PartialHomeomorph X Y} (h : e ≈ e') (s : e.source = univ)
    (t : e.target = univ) : e = e'
-- Mathlib/Analysis/RCLike/Basic.lean
@[simp, rclike_simps]
theorem ofNat_re (n : ℕ) [n.AtLeastTwo] : re (no_index (OfNat.ofNat n) : K) = OfNat.ofNat n
-- Mathlib/Algebra/Lie/Semisimple/Basic.lean
lemma LieModule.nontrivial_of_isIrreducible [LieModule.IsIrreducible R L M] : Nontrivial M
-- Mathlib/Computability/Primrec.lean
theorem fin_succ {n} : Primrec (@Fin.succ n)
-- Mathlib/Algebra/Homology/ShortComplex/ConcreteCategory.lean
lemma ShortExact.surjective_g (hS : S.ShortExact) :
    Function.Surjective ((forget₂ C Ab).map S.g)
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
@[simp]
theorem toIdeal_sInf (ℐ : Set (HomogeneousIdeal 𝒜)) : (sInf ℐ).toIdeal = ⨅ s ∈ ℐ, toIdeal s
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
@[simp]
theorem abs_arg_lt_pi_div_two_iff {z : ℂ} : |arg z| < π / 2 ↔ 0 < re z ∨ z = 0
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive]
theorem orderOf_dvd_iff_pow_eq_one {n : ℕ} : orderOf x ∣ n ↔ x ^ n = 1
-- Mathlib/Data/Sum/Basic.lean
theorem isRight_right (h : LiftRel r s (inr b) y) : y.isRight
-- Mathlib/SetTheory/Ordinal/Exponential.lean
theorem opow_le_of_limit {a b c : Ordinal} (a0 : a ≠ 0) (h : IsLimit b) :
    a ^ b ≤ c ↔ ∀ b' < b, a ^ b' ≤ c
-- Mathlib/Algebra/Group/UniqueProds.lean
/-- `UniqueProds G` says that for any two nonempty `Finset`s `A` and `B` in `G`, `A × B`
  contains a unique pair with the `UniqueMul` property. Strojnowski showed that if `G` is
  a group, then we only need to check this when `A = B`.
  Here we generalize the result to cancellative semigroups.
  Non-cancellative counterexample: the AddMonoid {0,1} with 1+1=1. -/
@[to_additive] theorem of_same {G} [Semigroup G] [IsCancelMul G]
    (h : ∀ {A : Finset G}, A.Nonempty → ∃ a1 ∈ A, ∃ a2 ∈ A, UniqueMul A A a1 a2) :
    UniqueProds G
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem not_dvd_of_natDegree_lt (hp : Monic p) (h0 : q ≠ 0) (hl : natDegree q < natDegree p) :
    ¬p ∣ q
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_eq_range_psigma (s : ι → Set β) : ⋃ i, s i = range fun a : Σ'i, s i => a.2
-- Mathlib/Order/Concept.lean
theorem extentClosure_swap (s : Set α) : extentClosure (swap r) s = intentClosure r s
-- Mathlib/Data/Finset/Interval.lean
theorem Icc_eq_filter_powerset : Icc s t = t.powerset.filter (s ⊆ ·)
-- Mathlib/Probability/Kernel/Invariance.lean
theorem Invariant.comp [IsSFiniteKernel κ] (hκ : Invariant κ μ) (hη : Invariant η μ) :
    Invariant (κ ∘ₖ η) μ
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
theorem nndist_right_lineMap (p₁ p₂ : P) (c : 𝕜) :
    nndist p₂ (lineMap p₁ p₂ c) = ‖1 - c‖₊ * nndist p₁ p₂
-- Mathlib/Data/String/Basic.lean
@[simp]
theorem length_asString (l : List Char) : l.asString.length = l.length
-- .lake/packages/lean4/src/lean/Init/Prelude.lean
/-- Bijection between `α` and `PLift α` -/
theorem PLift.up_down {α : Sort u} (b : PLift α) : Eq (up (down b)) b
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp]
theorem coe_setPreimage (f : α → β) : ⇑(setPreimage f) = preimage f
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem fundamentalSequenceProp_inl_some (o a) :
    FundamentalSequenceProp o (Sum.inl (some a)) ↔ o.repr = succ a.repr ∧ (o.NF → a.NF)
-- Mathlib/Topology/Order/NhdsSet.lean
theorem Iio_mem_nhdsSet_Iic_iff : Iio b ∈ 𝓝ˢ (Iic a) ↔ a < b
-- Mathlib/Topology/Sets/Closeds.lean
/-- The type of closed subsets of a topological space. -/
structure Closeds (α : Type*) [TopologicalSpace α] where
  /-- the carrier set, i.e. the points in this set -/
  carrier : Set α
  closed' : IsClosed carrier
-- Mathlib/Topology/UniformSpace/Cauchy.lean
theorem seq_pair_mem ⦃N m n : ℕ⦄ (hm : N ≤ m) (hn : N ≤ n) :
    (seq hf U_mem m, seq hf U_mem n) ∈ U N
-- Mathlib/Algebra/Order/Interval/Basic.lean
@[to_additive (attr := simp) toProd_add]
theorem toProd_mul : (s * t).toProd = s.toProd * t.toProd
-- Mathlib/Analysis/Convex/Mul.lean
lemma ConcaveOn.smul'' (hf : ConcaveOn 𝕜 s f) (hg : ConcaveOn 𝕜 s g) (hf₀ : ∀ ⦃x⦄, x ∈ s → f x ≤ 0)
    (hg₀ : ∀ ⦃x⦄, x ∈ s → g x ≤ 0) (hfg : MonovaryOn f g s) : ConvexOn 𝕜 s (f • g)
-- Mathlib/Order/Bounds/Basic.lean
/-- A set `s` is not bounded below if and only if for each `x` there exists `y ∈ s` such that `x`
is not less than or equal to `y`. This version only assumes `Preorder` structure and uses
`¬(x ≤ y)`. A version for linear orders is called `not_bddBelow_iff`. -/
theorem not_bddBelow_iff' : ¬BddBelow s ↔ ∀ x, ∃ y ∈ s, ¬x ≤ y
-- Mathlib/NumberTheory/MulChar/Basic.lean
/-- The `p`th power of a quadratic character is itself, when `p` is the (prime) characteristic
of the target ring. -/
theorem IsQuadratic.pow_char {χ : MulChar R R'} (hχ : χ.IsQuadratic) (p : ℕ) [hp : Fact p.Prime]
    [CharP R' p] : χ ^ p = χ
-- Mathlib/Analysis/Calculus/FDeriv/Extend.lean
/-- If a function is differentiable on the left of a point `a : ℝ`, continuous at `a`, and
its derivative also converges at `a`, then `f` is differentiable on the left at `a`. -/
theorem hasDerivWithinAt_Iic_of_tendsto_deriv {s : Set ℝ} {e : E} {a : ℝ}
    {f : ℝ → E} (f_diff : DifferentiableOn ℝ f s) (f_lim : ContinuousWithinAt f s a)
    (hs : s ∈ 𝓝[<] a) (f_lim' : Tendsto (fun x => deriv f x) (𝓝[<] a) (𝓝 e)) :
    HasDerivWithinAt f e (Iic a) a
-- Mathlib/Algebra/Divisibility/Units.lean
theorem isRelPrime_comm : IsRelPrime x y ↔ IsRelPrime y x
-- Mathlib/Data/Real/EReal.lean
@[simp]
lemma inv_bot : (⊥ : EReal)⁻¹ = 0
-- Mathlib/NumberTheory/FLT/Three.lean
private lemma isCoprime_x_z : IsCoprime S.x S.z
-- Mathlib/Topology/Instances/Matrix.lean
@[continuity]
theorem Continuous.matrix_blockDiag {A : X → Matrix (m × p) (n × p) R} (hA : Continuous A) :
    Continuous fun x => blockDiag (A x)
-- Mathlib/MeasureTheory/Measure/LevyProkhorovMetric.lean
lemma ProbabilityMeasure.continuous_toLevyProkhorov :
    Continuous (ProbabilityMeasure.toLevyProkhorov (Ω := Ω))
-- Mathlib/Topology/Order/Category/FrameAdjunction.lean
/-- The unit of the adjunction between locales and topological spaces, which associates with
a point `x` of the space `X` a point of the locale of opens of `X`. -/
@[simps]
def localePointOfSpacePoint (x : X) : PT (Opens X)
-- Mathlib/Computability/Language.lean
theorem le_mul_congr {l₁ l₂ m₁ m₂ : Language α} : l₁ ≤ m₁ → l₂ ≤ m₂ → l₁ * l₂ ≤ m₁ * m₂
-- Mathlib/CategoryTheory/Adjunction/Mates.lean
/-- When all four functors in a sequare are left adjoints, the mates operation can be iterated:

         L₁                  R₁                  R₁
      C --→ D             C ←-- D             C ←-- D
   F₁ ↓  ↗  ↓  F₂      F₁ ↓  ↘  ↓ F₂       U₁ ↑  ↙  ↑ U₂
      E --→ F             E ←-- F             E ←-- F
         L₂                  R₂                  R₂

In this case the iterated mate equals the conjugate of the original transformation and is thus an
isomorphism if and only if the original transformation is. This explains why some Beck-Chevalley
natural transformations are natural isomorphisms.
-/
theorem iterated_mateEquiv_conjugateEquiv (α : F₁ ⋙ L₂ ⟶ L₁ ⋙ F₂) :
    mateEquiv adj₄ adj₃ (mateEquiv adj₁ adj₂ α) =
      conjugateEquiv (adj₁.comp adj₄) (adj₃.comp adj₂) α
-- Mathlib/Topology/FiberBundle/Basic.lean
theorem mem_localTrivAsPartialEquiv_source (p : Z.TotalSpace) :
    p ∈ (Z.localTrivAsPartialEquiv i).source ↔ p.1 ∈ Z.baseSet i
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/-- A subgroup is closed under division. -/
@[to_additive (attr := aesop safe apply (rule_sets := [SetLike]))
  "An additive subgroup is closed under subtraction."]
theorem div_mem {x y : M} (hx : x ∈ H) (hy : y ∈ H) : x / y ∈ H
-- Mathlib/Topology/Instances/ENNReal.lean
theorem iSup_add_iSup_le {ι ι' : Sort*} [Nonempty ι] [Nonempty ι'] {f : ι → ℝ≥0∞} {g : ι' → ℝ≥0∞}
    {a : ℝ≥0∞} (h : ∀ i j, f i + g j ≤ a) : iSup f + iSup g ≤ a
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem splits_of_isUnit [IsDomain K] {u : K[X]} (hu : IsUnit u) : u.Splits i
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
lemma twoTorsionPolynomial_disc_ne_zero [Nontrivial R] [Invertible (2 : R)] (hΔ : IsUnit W.Δ) :
    W.twoTorsionPolynomial.disc ≠ 0
-- Mathlib/Order/Estimator.lean
@[simps]
instance [Add α] {a b : Thunk α} (εa εb : Type*) [EstimatorData a εa] [EstimatorData b εb] :
    EstimatorData (a + b) (εa × εb)
-- Mathlib/LinearAlgebra/Determinant.lean
@[simp]
theorem LinearEquiv.coe_ofIsUnitDet {f : M →ₗ[R] M'} {v : Basis ι R M} {v' : Basis ι R M'}
    (h : IsUnit (LinearMap.toMatrix v v' f).det) :
    (LinearEquiv.ofIsUnitDet h : M →ₗ[R] M') = f
-- Mathlib/Analysis/Convex/Side.lean
theorem SOppSide.trans_wOppSide {s : AffineSubspace R P} {x y z : P} (hxy : s.SOppSide x y)
    (hyz : s.WOppSide y z) : s.WSameSide x z
-- Mathlib/ModelTheory/LanguageMap.lean
@[simp]
theorem coe_con {a : A} : (L.con a : M) = a
-- Mathlib/Order/Filter/NAry.lean
theorem map_prod_eq_map₂ (m : α → β → γ) (f : Filter α) (g : Filter β) :
    Filter.map (fun p : α × β => m p.1 p.2) (f ×ˢ g) = map₂ m f g
-- Mathlib/MeasureTheory/Function/LpSpace.lean
/-- The indicator of a disjoint union of two sets is the sum of the indicators of the sets. -/
theorem indicatorConstLp_disjoint_union {s t : Set α} (hs : MeasurableSet s) (ht : MeasurableSet t)
    (hμs : μ s ≠ ∞) (hμt : μ t ≠ ∞) (hst : s ∩ t = ∅) (c : E) :
    indicatorConstLp p (hs.union ht) (measure_union_ne_top hμs hμt) c =
      indicatorConstLp p hs hμs c + indicatorConstLp p ht hμt c
-- Mathlib/Algebra/Associated/Basic.lean
theorem Irreducible.isUnit_iff_not_associated_of_dvd [Monoid α]
    {x y : α} (hx : Irreducible x) (hy : y ∣ x) : IsUnit y ↔ ¬ Associated x y
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem MeasurePreserving.setLIntegral_comp_emb {mb : MeasurableSpace β} {ν : Measure β}
    {g : α → β} (hg : MeasurePreserving g μ ν) (hge : MeasurableEmbedding g) (f : β → ℝ≥0∞)
    (s : Set α) : ∫⁻ a in s, f (g a) ∂μ = ∫⁻ b in g '' s, f b ∂ν
-- Mathlib/Analysis/InnerProductSpace/Orientation.lean
/-- Every basis vector from `adjustToOrientation` is either that from the original basis or its
negation. -/
theorem adjustToOrientation_apply_eq_or_eq_neg (i : ι) :
    e.adjustToOrientation x i = e i ∨ e.adjustToOrientation x i = -e i
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem mul_mono (hik : I ≤ K) (hjl : J ≤ L) : I * J ≤ K * L
-- Mathlib/Data/ENNReal/Real.lean
theorem iSup_sub : (⨆ i, f i) - a = ⨆ i, f i - a
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive (attr := simp) mod_card_zsmul]
theorem zpow_mod_card (a : G) (n : ℤ) : a ^ (n % Fintype.card G : ℤ) = a ^ n
-- Mathlib/Order/Antichain.lean
theorem preimage_iso [LE α] [LE β] {t : Set β} (ht : IsAntichain (· ≤ ·) t) (φ : α ≃o β) :
    IsAntichain (· ≤ ·) (φ ⁻¹' t)
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[simp, norm_cast]
theorem coe_add (x y : s) : ((x + y : s) : R) = (x + y : R)
-- Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean
/-- The Mellin transform of `f` is well-defined and equal to `P.Λ s`, for all `s`. -/
theorem hasMellin (s : ℂ) : HasMellin P.f s (P.Λ s)
-- Mathlib/Geometry/Manifold/InteriorBoundary.lean
lemma isBoundaryPoint_iff {x : M} : I.IsBoundaryPoint x ↔ extChartAt I x x ∈ frontier (range I)
-- Mathlib/Data/ENat/Basic.lean
@[simp] theorem mul_top (hm : m ≠ 0) : m * ⊤ = ⊤
-- Mathlib/Algebra/Polynomial/Div.lean
@[simp]
theorem rootMultiplicity_eq_zero_iff {p : R[X]} {x : R} :
    rootMultiplicity x p = 0 ↔ IsRoot p x → p = 0
-- Mathlib/FieldTheory/Adjoin.lean
@[simp]
theorem top_toSubfield : (⊤ : IntermediateField F E).toSubfield = ⊤
-- Mathlib/Topology/Semicontinuous.lean
/-- The sum of two lower semicontinuous functions is lower semicontinuous. Formulated with
`[ContinuousAdd]`. The primed version of the lemma uses an explicit continuity assumption on
addition, for application to `EReal`. -/
theorem LowerSemicontinuous.add {f g : α → γ} (hf : LowerSemicontinuous f)
    (hg : LowerSemicontinuous g) : LowerSemicontinuous fun z => f z + g z
-- Mathlib/Data/NNReal/Basic.lean
@[simp, norm_cast] lemma one_le_coe : 1 ≤ (r : ℝ) ↔ 1 ≤ r
-- Mathlib/Data/PFun.lean
@[simp]
theorem bind_apply (f : α →. β) (g : β → α →. γ) (a : α) : f.bind g a = (f a).bind fun b => g b a
-- Mathlib/Order/LiminfLimsup.lean
theorem cofinite.bliminf_set_eq : bliminf s cofinite p = { x | { n | p n ∧ x ∉ s n }.Finite }
-- Mathlib/CategoryTheory/Localization/Bousfield.lean
/-- The bijection `(Y ⟶ Z) ≃ (X ⟶ Z)` induced by `f : X ⟶ Y` when `LeftBousfield.W P f`
and `P Z`. -/
@[simps! apply]
noncomputable def W.homEquiv {X Y : C} {f : X ⟶ Y} (hf : W P f) (Z : C) (hZ : P Z) :
    (Y ⟶ Z) ≃ (X ⟶ Z)
-- Mathlib/LinearAlgebra/Matrix/LDL.lean
/-- Inverse statement of **LDL decomposition**: we can conjugate a positive definite matrix
by some lower triangular matrix and get a diagonal matrix. -/
theorem LDL.diag_eq_lowerInv_conj : LDL.diag hS = LDL.lowerInv hS * S * (LDL.lowerInv hS)ᴴ
-- Mathlib/Data/Finset/Basic.lean
theorem sdiff_sdiff_eq_self (h : t ⊆ s) : s \ (s \ t) = t
-- Mathlib/Topology/Bases.lean
theorem IsTopologicalBasis.insert_empty {s : Set (Set α)} (h : IsTopologicalBasis s) :
    IsTopologicalBasis (insert ∅ s)
-- Mathlib/CategoryTheory/Subobject/Lattice.lean
@[simp]
theorem bot_left (X : C) : ((⊥ : MonoOver X) : C) = ⊥_ C
-- Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
theorem comp_hasFDerivWithinAt_iff' {f : G → E} {s : Set G} {x : G} {f' : G →L[𝕜] F} :
    HasFDerivWithinAt (iso ∘ f) f' s x ↔ HasFDerivWithinAt f ((iso.symm : F →L[𝕜] E).comp f') s x
-- Mathlib/Topology/Constructions.lean
theorem Filter.Tendsto.fin_insertNth {n} {π : Fin (n + 1) → Type*} [∀ i, TopologicalSpace (π i)]
    (i : Fin (n + 1)) {f : Y → π i} {l : Filter Y} {x : π i} (hf : Tendsto f l (𝓝 x))
    {g : Y → ∀ j : Fin n, π (i.succAbove j)} {y : ∀ j, π (i.succAbove j)} (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun a => i.insertNth (f a) (g a)) l (𝓝 <| i.insertNth x y)
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive (attr := simp)]
theorem singletonMulHom_apply (a : α) : singletonMulHom a = {a}
-- Mathlib/AlgebraicTopology/SimplicialCategory/Basic.lean
@[reassoc]
lemma sHom_whisker_exchange {K K' L L' : C} (f : K ⟶ K') (g : L ⟶ L') :
    sHomWhiskerLeft K' g ≫ sHomWhiskerRight f L' =
      sHomWhiskerRight f L ≫ sHomWhiskerLeft K g
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive neg_one_zsmul_add]
lemma mul_zpow_neg_one (a b : α) : (a * b) ^ (-1 : ℤ) = b ^ (-1 : ℤ) * a ^ (-1 : ℤ)
-- Mathlib/FieldTheory/RatFunc/Basic.lean
theorem monic_denom (x : RatFunc K) : (denom x).Monic
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- If the oriented angle between two vectors is `-π / 2`, the inner product of those vectors
is zero. -/
theorem inner_eq_zero_of_oangle_eq_neg_pi_div_two {x y : V} (h : o.oangle x y = (-π / 2 : ℝ)) :
    ⟪x, y⟫ = 0
-- Mathlib/Order/SuccPred/Basic.lean
@[simp]
theorem pred_coe (a : α) : pred (↑a : WithBot α) = ↑(pred a)
-- Mathlib/Algebra/Algebra/Equiv.lean
/-- Each element of the group defines an algebra equivalence.

This is a stronger version of `MulSemiringAction.toRingEquiv` and
`DistribMulAction.toLinearEquiv`. -/
@[simps! apply symm_apply toEquiv] -- Porting note: don't want redundant simps lemma `toEquiv_symm`
def toAlgEquiv (g : G) : A ≃ₐ[R] A
-- Mathlib/LinearAlgebra/Prod.lean
theorem range_prod_le (f : M →ₗ[R] M₂) (g : M →ₗ[R] M₃) :
    range (prod f g) ≤ (range f).prod (range g)
-- Mathlib/GroupTheory/Perm/Sign.lean
@[simp]
theorem sign_prodExtendRight (a : α) (σ : Perm β) : sign (prodExtendRight a σ) = sign σ
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem union_compl (s : Finset α) : s ∪ sᶜ = univ
-- Mathlib/CategoryTheory/SmallObject/Construction.lean
@[reassoc]
lemma ι_functorMapTgt (i : I) (t : A i ⟶ X) (b : B i ⟶ S) (w : t ≫ πX = f i ≫ b)
    (t' : A i ⟶ Y) (fac : t ≫ φ = t') :
    Sigma.ι _ (FunctorObjIndex.mk i t b w) ≫ functorMapTgt f πX πY φ hφ =
      Sigma.ι (functorObjTgtFamily f πY)
        (FunctorObjIndex.mk i t' b (by rw [← w, ← fac, assoc, hφ]))
-- Mathlib/Data/Fintype/Basic.lean
theorem compl_eq_univ_sdiff (s : Finset α) : sᶜ = univ \ s
-- Mathlib/Computability/TuringMachine.lean
theorem stepAux_write (q : Stmt'₁) (v : σ) (a b : Γ) (L R : ListBlank Γ) :
    stepAux (write (enc a).toList q) v (trTape' enc0 L (ListBlank.cons b R)) =
      stepAux q v (trTape' enc0 (ListBlank.cons a L) R)
-- Mathlib/Algebra/Divisibility/Basic.lean
@[refl, simp]
theorem dvd_refl (a : α) : a ∣ a
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
theorem DifferentiableAt.const_sub (hf : DifferentiableAt 𝕜 f x) (c : F) :
    DifferentiableAt 𝕜 (fun y => c - f y) x
-- Mathlib/Data/Nat/Factorization/Defs.lean
/-- For prime `p` the only prime factor of `p^k` is `p` with multiplicity `k` -/
theorem Prime.factorization_pow {p k : ℕ} (hp : Prime p) : (p ^ k).factorization = single p k
-- Mathlib/RingTheory/Artinian.lean
lemma eventually_iInf_range_pow_eq (f : Module.End R M) :
    ∀ᶠ n in atTop, ⨅ m, LinearMap.range (f ^ m) = LinearMap.range (f ^ n)
-- Mathlib/CategoryTheory/Opposites.lean
@[simp]
theorem rightOp_comp (α : F ⟶ G) (β : G ⟶ H) : NatTrans.rightOp (α ≫ β) =
    NatTrans.rightOp β ≫ NatTrans.rightOp α
-- Mathlib/Data/Set/Subsingleton.lean
lemma nontrivial_iff_ne_singleton (ha : a ∈ s) : s.Nontrivial ↔ s ≠ {a}
-- Mathlib/CategoryTheory/Adjunction/Reflective.lean
theorem unitCompPartialBijective_natural [Reflective i] (A : C) {B B' : C} (h : B ⟶ B')
    (hB : B ∈ i.essImage) (hB' : B' ∈ i.essImage) (f : A ⟶ B) :
    (unitCompPartialBijective A hB') (f ≫ h) = unitCompPartialBijective A hB f ≫ h
-- Mathlib/Order/Basic.lean
theorem min_def' [LinearOrder α] (a b : α) : min a b = if b ≤ a then b else a
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
@[gcongr]
theorem log_lt_log (hx : 0 < x) (h : x < y) : log x < log y
-- Mathlib/Algebra/Polynomial/Cardinal.lean
@[simp]
theorem cardinal_mk_eq_max {R : Type u} [Semiring R] [Nontrivial R] : #(R[X]) = max #R ℵ₀
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
@[simp]
theorem add_eq_bot : a + b = ⊥ ↔ a = ⊥ ∨ b = ⊥
-- Mathlib/Algebra/Module/Zlattice/Basic.lean
theorem Zlattice.isAddFundamentalDomain {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] {L : AddSubgroup E} [DiscreteTopology L] [IsZlattice ℝ L] [Finite ι]
    (b : Basis ι ℤ L) [MeasurableSpace E] [OpensMeasurableSpace E] (μ : MeasureTheory.Measure E) :
    MeasureTheory.IsAddFundamentalDomain L (Zspan.fundamentalDomain (b.ofZlatticeBasis ℝ)) μ
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_image_right : ⋃ b ∈ t, (f · b) '' s = image2 f s t