ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/AlgebraicTopology/SimplicialSet/Monoidal.lean
@[simp]
lemma leftUnitor_hom_app_apply (K : SSet.{u}) {Δ : SimplexCategoryᵒᵖ} (x : (𝟙_ _ ⊗ K).obj Δ) :
    (λ_ K).hom.app Δ x = x.2
-- Mathlib/Topology/Homeomorph.lean
protected theorem t2Space [T2Space X] (h : X ≃ₜ Y) : T2Space Y
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem Or.imp_right (f : b → c) : a ∨ b → a ∨ c
-- Mathlib/Topology/Sets/Opens.lean
@[simp]
theorem coe_comap (f : C(α, β)) (U : Opens β) : ↑(comap f U) = f ⁻¹' U
-- Mathlib/InformationTheory/Hamming.lean
@[simp]
theorem toHamming_ofHamming (x : Hamming β) : toHamming (ofHamming x) = x
-- Mathlib/RingTheory/Kaehler/Basic.lean
theorem KaehlerDifferential.map_surjective_of_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.map R S A B)
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
@[ext high]
theorem ext_ring_op {σ : Rᵐᵒᵖ →+* S} {f g : R →ₛₗ[σ] M₃} (h : f (1 : R) = g (1 : R)) :
    f = g
-- Mathlib/NumberTheory/NumberField/Basic.lean
protected theorem isAlgebraic : Algebra.IsAlgebraic ℚ K
-- Mathlib/Data/Stream/Init.lean
theorem interleave_tail_tail (s₁ s₂ : Stream' α) : tail s₁ ⋈ tail s₂ = tail (tail (s₁ ⋈ s₂))
-- Mathlib/Data/Bundle.lean
@[simp]
theorem TotalSpace.exists {p : TotalSpace F E → Prop} : (∃ x, p x) ↔ ∃ b y, p ⟨b, y⟩
-- Mathlib/MeasureTheory/Measure/Regular.lean
/-- A measure `μ` is outer regular if `μ(A) = inf {μ(U) | A ⊆ U open}` for a measurable set `A`.

This definition implies the same equality for any (not necessarily measurable) set, see
`Set.measure_eq_iInf_isOpen`. -/
class OuterRegular (μ : Measure α) : Prop where
  protected outerRegular :
    ∀ ⦃A : Set α⦄, MeasurableSet A → ∀ r > μ A, ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < r
-- Mathlib/Data/TypeVec.lean
theorem const_nil {β} (x : β) (α : TypeVec 0) : TypeVec.const x α = nilFun
-- Mathlib/Data/Finset/Sym.lean
@[simp]
theorem sym_union (s t : Finset α) (n : ℕ) : s.sym n ∪ t.sym n ⊆ (s ∪ t).sym n
-- Mathlib/Analysis/Convex/Gauge.lean
theorem exists_lt_of_gauge_lt (absorbs : Absorbent ℝ s) (h : gauge s x < a) :
    ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- Affine map from a smaller to a larger subspace of the same space.

This is the affine version of `Submodule.inclusion`. -/
@[simps linear]
def inclusion (h : S₁ ≤ S₂) : S₁ →ᵃ[k] S₂
-- Mathlib/Topology/MetricSpace/Basic.lean
theorem MetricSpace.replaceTopology_eq {γ} [U : TopologicalSpace γ] (m : MetricSpace γ)
    (H : U = m.toPseudoMetricSpace.toUniformSpace.toTopologicalSpace) :
    m.replaceTopology H = m
-- Mathlib/Algebra/Polynomial/Reverse.lean
@[simp] lemma reverse_add_C (p : R[X]) (t : R) :
    reverse (p + C t) = reverse p + C t * X ^ p.natDegree
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
@[reassoc (attr := simp)]
theorem cokernelComparison_map_desc [HasCokernel f] [HasCokernel (G.map f)] {Z : C} {h : Y ⟶ Z}
    (w : f ≫ h = 0) :
    cokernelComparison f G ≫ G.map (cokernel.desc _ h w) =
      cokernel.desc _ (G.map h) (by simp only [← G.map_comp, w, Functor.map_zero])
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
theorem subtype_eq_val : (SubMulAction.subtype p : p → M) = Subtype.val
-- Mathlib/Data/ENNReal/Inv.lean
protected theorem div_lt_iff (h0 : b ≠ 0 ∨ c ≠ 0) (ht : b ≠ ∞ ∨ c ≠ ∞) : c / b < a ↔ c < a * b
-- Mathlib/Order/Hom/Basic.lean
/-- The identity function as bundled monotone function. -/
@[simps (config := .asFn)]
def id : α →o α
-- Mathlib/Order/Sublattice.lean
lemma map_inf_le (L M : Sublattice α) (f : LatticeHom α β) : map f (L ⊓ M) ≤ map f L ⊓ map f M
-- Mathlib/MeasureTheory/Measure/Lebesgue/VolumeOfBalls.lean
theorem MeasureTheory.volume_sum_rpow_lt_one :
    volume {x : ι → ℝ | ∑ i, |x i| ^ p < 1} =
      .ofReal ((2 * Gamma (1 / p + 1)) ^ card ι / Gamma (card ι / p + 1))
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/-- A locally uniform limit of continuous functions is continuous. -/
protected theorem TendstoLocallyUniformly.continuous (h : TendstoLocallyUniformly F f p)
    (hc : ∀ᶠ n in p, Continuous (F n)) [NeBot p] : Continuous f
-- Mathlib/Algebra/Module/Submodule/Map.lean
theorem map_toAddSubmonoid' (f : M →ₛₗ[σ₁₂] M₂) (p : Submodule R M) :
    (p.map f).toAddSubmonoid = p.toAddSubmonoid.map f
-- Mathlib/Algebra/Lie/Quotient.lean
@[simp]
theorem surjective_mk' : Function.Surjective (mk' N)
-- Mathlib/Order/BoundedOrder.lean
theorem lt_top_iff_ne_top : a < ⊤ ↔ a ≠ ⊤
-- Mathlib/Geometry/Euclidean/Basic.lean
/-- The condition for two points on a line to be equidistant from
another point. -/
theorem dist_smul_vadd_eq_dist {v : V} (p₁ p₂ : P) (hv : v ≠ 0) (r : ℝ) :
    dist (r • v +ᵥ p₁) p₂ = dist p₁ p₂ ↔ r = 0 ∨ r = -2 * ⟪v, p₁ -ᵥ p₂⟫ / ⟪v, v⟫
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem mem_factorSet_top {p : Associates α} {hp : Irreducible p} : p ∈ (⊤ : FactorSet α)
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- If the coequalizer of two morphisms is a monomorphism, then the two morphisms are equal. -/
theorem eq_of_mono_coequalizer [HasCoequalizer f g] [Mono (coequalizer.π f g)] : f = g
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
/-- In the case of the manifold structure on a vector space, the extended charts are just the
identity. -/
theorem extChartAt_model_space_eq_id (x : E) : extChartAt 𝓘(𝕜, E) x = PartialEquiv.refl E
-- Mathlib/GroupTheory/GroupAction/Quotient.lean
theorem _root_.QuotientGroup.out'_conj_pow_minimalPeriod_mem (a : α) (q : α ⧸ H) :
    q.out'⁻¹ * a ^ Function.minimalPeriod (a • ·) q * q.out' ∈ H
-- Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
theorem ae_eq_zero_of_forall_setIntegral_eq_of_finStronglyMeasurable_trim (hm : m ≤ m0) {f : α → E}
    (hf_int_finite : ∀ s, MeasurableSet[m] s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s : Set α, MeasurableSet[m] s → μ s < ∞ → ∫ x in s, f x ∂μ = 0)
    (hf : FinStronglyMeasurable f (μ.trim hm)) : f =ᵐ[μ] 0
-- Mathlib/Order/Ideal.lean
@[simp]
theorem coe_sup : ↑(s ⊔ t) = { x | ∃ a ∈ s, ∃ b ∈ t, x ≤ a ⊔ b }
-- Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
/-- For a linear map `f` from `M` to `N`,
`ExteriorAlgebra.map g` is a retraction of `ExteriorAlgebra.map f` iff
`g` is a retraction of `f`. -/
@[simp]
lemma leftInverse_map_iff {f : M →ₗ[R] N} {g : N →ₗ[R] M} :
    LeftInverse (map g) (map f) ↔ LeftInverse g f
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- Every equalizer of `(f, g)`, where `f = g`, is an isomorphism. -/
theorem isIso_limit_cone_parallelPair_of_eq (h₀ : f = g) {c : Fork f g} (h : IsLimit c) :
    IsIso c.ι
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem data_takeWhile (p) : ∀ {s}, Valid s →
    (s.takeWhile p).toString.1 = s.toString.1.takeWhile p
-- Mathlib/Data/Int/Sqrt.lean
theorem sqrt_nonneg (n : ℤ) : 0 ≤ sqrt n
-- Mathlib/CategoryTheory/Limits/Over.lean
theorem epi_iff_epi_left [HasPushouts C] {f g : Over X} (h : f ⟶ g) : Epi h ↔ Epi h.left
-- Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean
/-- The canonical linear map `S.X₁ →ₗ[R] LinearMap.ker S.g` induced by `S.f`. -/
@[simps]
def moduleCatToCycles : S.X₁ →ₗ[R] LinearMap.ker S.g
-- Mathlib/Data/Set/Finite.lean
lemma Set.finite_diff_iUnion_Ioo (s : Set α) : (s \ ⋃ (x ∈ s) (y ∈ s), Ioo x y).Finite
-- Mathlib/Data/Multiset/Antidiagonal.lean
theorem antidiagonal_coe (l : List α) : @antidiagonal α l = revzip (powersetAux l)
-- Mathlib/Data/Finsupp/Defs.lean
@[simp]
theorem embDomain_add (f : α ↪ β) (v w : α →₀ M) :
    embDomain f (v + w) = embDomain f v + embDomain f w
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
theorem bounds_bddBelow {f : E →SL[σ₁₂] F} : BddBelow { c | 0 ≤ c ∧ ∀ x, ‖f x‖ ≤ c * ‖x‖ }
-- Mathlib/Order/Filter/AtTopBot.lean
@[simp]
theorem tendsto_neg_atBot_iff : Tendsto (fun x => -f x) l atBot ↔ Tendsto f l atTop
-- Mathlib/Data/Fintype/Perm.lean
theorem length_permsOfList : ∀ l : List α, length (permsOfList l) = l.length !
-- .lake/packages/lean4/src/lean/Init/Data/Option/Lemmas.lean
@[simp] theorem map_comp_map (f : α → β) (g : β → γ) :
    Option.map g ∘ Option.map f = Option.map (g ∘ f)
-- Mathlib/MeasureTheory/Measure/Stieltjes.lean
theorem measure_Iic {l : ℝ} (hf : Tendsto f atBot (𝓝 l)) (x : ℝ) :
    f.measure (Iic x) = ofReal (f x - l)
-- Mathlib/Topology/MetricSpace/DilationEquiv.lean
@[simp]
lemma map_cobounded (e : F) : map e (cobounded X) = cobounded Y
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
theorem rank_add_rank_le_rank_prod [Nontrivial R] :
    Module.rank R M + Module.rank R M₁ ≤ Module.rank R (M × M₁)
-- Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
private lemma ringChar_ne : ringChar ℂ ≠ ringChar F
-- Mathlib/RingTheory/Polynomial/Chebyshev.lean
@[simp]
theorem U_neg_one : U R (-1) = 0
-- Mathlib/Algebra/Module/PID.lean
/-- **Structure theorem of finitely generated modules over a PID** : A finitely generated
  module over a PID is isomorphic to the product of a free module and a direct sum of some
  `R ⧸ R ∙ (p i ^ e i)` where the `p i ^ e i` are prime powers. -/
theorem equiv_free_prod_directSum [h' : Module.Finite R N] :
    ∃ (n : ℕ) (ι : Type u) (_ : Fintype ι) (p : ι → R) (_ : ∀ i, Irreducible <| p i) (e : ι → ℕ),
      Nonempty <| N ≃ₗ[R] (Fin n →₀ R) × ⨁ i : ι, R ⧸ R ∙ p i ^ e i
-- Mathlib/Topology/LocallyConstant/Basic.lean
@[simp]
lemma piecewise'_apply_left {C₀ C₁ C₂ : Set X} (h₀ : C₀ ⊆ C₁ ∪ C₂) (h₁ : IsClosed C₁)
    (h₂ : IsClosed C₂) (f₁ : LocallyConstant C₁ Z) (f₂ : LocallyConstant C₂ Z)
    [DecidablePred (· ∈ C₁)] (hf : ∀ x (hx : x ∈ C₁ ∩ C₂), f₁ ⟨x, hx.1⟩ = f₂ ⟨x, hx.2⟩)
    (x : C₀) (hx : x.val ∈ C₁) :
    piecewise' h₀ h₁ h₂ f₁ f₂ hf x = f₁ ⟨x.val, hx⟩
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem hasLineDerivAt_iff_tendsto_slope_zero :
    HasLineDerivAt 𝕜 f f' x v ↔
      Tendsto (fun (t : 𝕜) ↦ t⁻¹ • (f (x + t • v) - f x)) (𝓝[≠] 0) (𝓝 f')
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem l_csSup (gc : GaloisConnection l u) {s : Set α} (hne : s.Nonempty) (hbdd : BddAbove s) :
    l (sSup s) = ⨆ x : s, l x
-- Mathlib/Order/CompleteLattice.lean
theorem iSup₂_mono {f g : ∀ i, κ i → α} (h : ∀ i j, f i j ≤ g i j) :
    ⨆ (i) (j), f i j ≤ ⨆ (i) (j), g i j
-- Mathlib/Topology/Basic.lean
@[simp]
theorem closure_iUnion_of_finite [Finite ι] (f : ι → Set X) :
    closure (⋃ i, f i) = ⋃ i, closure (f i)
-- Mathlib/Algebra/Order/Ring/Abs.lean
lemma pow_eq_one_iff_of_ne_zero (hn : n ≠ 0) : a ^ n = 1 ↔ a = 1 ∨ a = -1 ∧ Even n
-- Mathlib/Algebra/Tropical/Basic.lean
theorem untrop_monotone [Preorder R] : Monotone (untrop : Tropical R → R)
-- Mathlib/Data/List/MinMax.lean
theorem argmax_eq_some_iff :
    argmax f l = some m ↔
      m ∈ l ∧ (∀ a ∈ l, f a ≤ f m) ∧ ∀ a ∈ l, f m ≤ f a → l.indexOf m ≤ l.indexOf a
-- Mathlib/Topology/Algebra/Module/Basic.lean
theorem symm_map_nhds_eq (e : M₁ ≃SL[σ₁₂] M₂) (x : M₁) : map e.symm (𝓝 (e x)) = 𝓝 x
-- Mathlib/Data/Matroid/Map.lean
@[simp] lemma restrictSubtype_dual : (M.restrictSubtype M.E)✶ = M✶.restrictSubtype M.E
-- Mathlib/Data/ENNReal/Operations.lean
protected theorem add_le_add_iff_right : a ≠ ∞ → (b + a ≤ c + a ↔ b ≤ c)
-- Mathlib/Data/Nat/Factorization/Defs.lean
theorem factorization_eq_primeFactorsList_multiset (n : ℕ) :
    n.factorization = Multiset.toFinsupp (n.primeFactorsList : Multiset ℕ)
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_eq_univ_iff {f : ι → Set α} : ⋃ i, f i = univ ↔ ∀ x, ∃ i, x ∈ f i
-- Mathlib/GroupTheory/Perm/List.lean
theorem formPerm_apply_getElem_zero (l : List α) (h : Nodup l) (hl : 1 < l.length) :
    formPerm l l[0] = l[1]
-- Mathlib/Data/DFinsupp/Order.lean
@[simp, norm_cast]
lemma coe_inf [∀ i, SemilatticeInf (α i)] (f g : Π₀ i, α i) : f ⊓ g = ⇑f ⊓ g
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem Filter.EventuallyEq.lineDerivWithin_eq_nhds (h : f₁ =ᶠ[𝓝 x] f) :
    lineDerivWithin 𝕜 f₁ s x v = lineDerivWithin 𝕜 f s x v
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
@[simp]
theorem map_id : I.map (AlgHom.id _ _) = I
-- Mathlib/GroupTheory/GroupAction/FixingSubgroup.lean
/-- Fixed points of sup of submonoids is intersection -/
theorem fixedPoints_submonoid_sup {P Q : Submonoid M} :
    fixedPoints (↥(P ⊔ Q)) α = fixedPoints P α ∩ fixedPoints Q α
-- Mathlib/MeasureTheory/Function/UnifTight.lean
/-- Forward direction of Vitali's convergnece theorem, with a.e. instead of InMeasure convergence.-/
theorem tendsto_Lp_of_tendsto_ae (hp : 1 ≤ p) (hp' : p ≠ ∞)
    {f : ℕ → α → β} {g : α → β} (haef : ∀ n, AEStronglyMeasurable (f n) μ)
    (hg' : Memℒp g p μ) (hui : UnifIntegrable f p μ) (hut : UnifTight f p μ)
    (hfg : ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))) :
    Tendsto (fun n => eLpNorm (f n - g) p μ) atTop (𝓝 0)
-- Mathlib/Analysis/Analytic/Basic.lean
/-- If `f` has formal power series `∑ n, pₙ` at `x`, then
`f y - f z - p 1 (fun _ ↦ y - z) = O(‖(y, z) - (x, x)‖ * ‖y - z‖)` as `(y, z) → (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
    (fun y : E × E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[𝓝 (x, x)] fun y =>
      ‖y - (x, x)‖ * ‖y.1 - y.2‖
-- Mathlib/Analysis/Seminorm.lean
theorem mem_ball_zero : y ∈ ball p 0 r ↔ p y < r
-- Mathlib/Algebra/Order/Field/Unbundled/Basic.lean
lemma one_div_neg : 1 / a < 0 ↔ a < 0
-- Mathlib/Order/Interval/Set/Basic.lean
theorem mem_Ico_of_Ioo (h : x ∈ Ioo a b) : x ∈ Ico a b
-- Mathlib/Data/Set/Pointwise/SMul.lean
theorem vsub_inter_subset : s -ᵥ t₁ ∩ t₂ ⊆ (s -ᵥ t₁) ∩ (s -ᵥ t₂)
-- Mathlib/Analysis/Convex/Strong.lean
private lemma aux_sub (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) :
    a * (f x - m / (2 : ℝ) * ‖x‖ ^ 2) + b * (f y - m / (2 : ℝ) * ‖y‖ ^ 2) +
      m / (2 : ℝ) * ‖a • x + b • y‖ ^ 2
      = a * f x + b * f y - m / (2 : ℝ) * a * b * ‖x - y‖ ^ 2
-- Mathlib/Probability/Independence/Kernel.lean
theorem indepSets_singleton_iff {s t : Set Ω} {_mΩ : MeasurableSpace Ω}
    {κ : Kernel α Ω} {μ : Measure α} :
    IndepSets {s} {t} κ μ ↔ ∀ᵐ a ∂μ, κ a (s ∩ t) = κ a s * κ a t
-- Mathlib/NumberTheory/FLT/Three.lean
/-- Given `S : Solution`, we have that `2 ≤ S.multiplicity`. -/
lemma Solution.two_le_multiplicity : 2 ≤ S.multiplicity
-- Mathlib/Algebra/Ring/CentroidHom.lean
@[simp]
theorem comp_apply (g f : CentroidHom α) (a : α) : g.comp f a = g (f a)
-- Mathlib/Algebra/GradedMonoid.lean
@[simp]
theorem List.dProdIndex_cons (a : α) (l : List α) (fι : α → ι) :
    (a :: l).dProdIndex fι = fι a + l.dProdIndex fι
-- Mathlib/Data/List/OfFn.lean
theorem last_ofFn_succ {n : ℕ} (f : Fin n.succ → α)
    (h : ofFn f ≠ [] := mt ofFn_eq_nil_iff.mp (Nat.succ_ne_zero _)) :
    getLast (ofFn f) h = f (Fin.last _)
-- Mathlib/Data/Multiset/Nodup.lean
theorem le_iff_subset {s t : Multiset α} : Nodup s → (s ≤ t ↔ s ⊆ t)
-- Mathlib/Data/Int/Log.lean
@[simp]
theorem log_ofNat (b : ℕ) (n : ℕ) [n.AtLeastTwo] :
    log b (no_index (OfNat.ofNat n : R)) = Nat.log b (OfNat.ofNat n)
-- Mathlib/Algebra/Polynomial/Div.lean
@[simp]
theorem zero_modByMonic (p : R[X]) : 0 %ₘ p = 0
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem support_eq [MeasurableSpace α] [Zero β] (f : α →ₛ β) :
    support f = ⋃ y ∈ f.range.filter fun y => y ≠ 0, f ⁻¹' {y}
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
@[simp]
theorem sinh_le_sinh : sinh x ≤ sinh y ↔ x ≤ y
-- Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean
/-- The quadratic character as a multiplicative character. -/
@[simps]
def quadraticChar : MulChar F ℤ
-- Mathlib/Algebra/GCDMonoid/Basic.lean
lemma gcd_neg [NormalizedGCDMonoid α] {a b : α} : gcd a (-b) = gcd a b
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive (attr := simp)]
theorem prod_take_succ :
    ∀ (L : List M) (i : ℕ) (p : i < L.length), (L.take (i + 1)).prod = (L.take i).prod * L[i]
-- Mathlib/Order/SuccPred/Basic.lean
theorem exists_succ_iterate_or : (∃ n, succ^[n] a = b) ∨ ∃ n, succ^[n] b = a
-- Mathlib/RingTheory/Derivation/Basic.lean
protected theorem map_zero : D 0 = 0
-- Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
theorem orthogonal_le (h : N ≤ L) : B.orthogonal L ≤ B.orthogonal N
-- Mathlib/Computability/Primrec.lean
theorem curry {f : α × β → σ} : Primrec₂ (Function.curry f) ↔ Primrec f
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
/-- The rank of the direct sum is the sum of the ranks. -/
@[simp]
theorem rank_directSum {ι : Type v} (M : ι → Type w) [∀ i : ι, AddCommGroup (M i)]
    [∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] :
    Module.rank R (⨁ i, M i) = Cardinal.sum fun i => Module.rank R (M i)
-- Mathlib/Order/Bounds/Basic.lean
/-- If `s` is bounded, then so is `s ∩ t` -/
theorem BddBelow.inter_of_left (h : BddBelow s) : BddBelow (s ∩ t)
-- Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean
theorem exists_mulVec_eq_zero_iff {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
    {M : Matrix n n A} : (∃ v ≠ 0, M *ᵥ v = 0) ↔ M.det = 0
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem le_add_of_neg_le_sub_right {a b c : Int} (h : -b ≤ a - c) : c ≤ a + b
-- Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
theorem χ₈_nat_eq_if_mod_eight (n : ℕ) :
    χ₈ n = if n % 2 = 0 then 0 else if n % 8 = 1 ∨ n % 8 = 7 then 1 else -1
-- Mathlib/Logic/Encodable/Basic.lean
theorem sequence_mono_nat {r : β → β → Prop} {f : α → β} (hf : Directed r f) (n : ℕ) :
    r (f (hf.sequence f n)) (f (hf.sequence f (n + 1)))
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
@[reassoc (attr := simp)]
lemma homologyπ_comp_leftHomologyIso_inv :
    S.homologyπ ≫ S.leftHomologyIso.inv = S.leftHomologyπ
-- Mathlib/Algebra/Module/Submodule/Lattice.lean
/-- The top submodule is linearly equivalent to the module.

This is the module version of `AddSubmonoid.topEquiv`. -/
@[simps]
def topEquiv : (⊤ : Submodule R M) ≃ₗ[R] M
-- Mathlib/Algebra/Polynomial/BigOperators.lean
/-- The degree of a product of polynomials is equal to
the sum of the degrees, where the degree of the zero polynomial is ⊥.
`[Nontrivial R]` is needed, otherwise for `l = []` we have `⊥` in the LHS and `0` in the RHS.
-/
theorem degree_list_prod [Nontrivial R] (l : List R[X]) : l.prod.degree = (l.map degree).sum
-- Mathlib/Data/Set/Card.lean
theorem ncard_inter_le_ncard_right (s t : Set α) (ht : t.Finite := by toFinite_tac) :
    (s ∩ t).ncard ≤ t.ncard
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem dvd_ord_proj_of_dvd {n p : ℕ} (hn : n ≠ 0) (pp : p.Prime) (h : p ∣ n) : p ∣ ord_proj[p] n
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem coprime_ord_compl {n p : ℕ} (hp : Prime p) (hn : n ≠ 0) : Coprime p (ord_compl[p] n)
-- Mathlib/CategoryTheory/Abelian/NonPreadditive.lean
theorem sub_comp {X Y Z : C} (f g : X ⟶ Y) (h : Y ⟶ Z) : (f - g) ≫ h = f ≫ h - g ≫ h
-- .lake/packages/lean4/src/lean/Init/Omega/Int.lean
theorem le_of_ge {x y : Int} (h : x ≥ y) : y ≤ x
-- Mathlib/CategoryTheory/Bicategory/Functor/Pseudofunctor.lean
@[reassoc]
lemma mapComp_assoc_left_inv {c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) :
    (F.mapComp f g).inv ▷ F.map h ≫ (F.mapComp (f ≫ g) h).inv =
    (α_ (F.map f) (F.map g) (F.map h)).hom ≫ F.map f ◁ (F.mapComp g h).inv ≫
    (F.mapComp f (g ≫ h)).inv ≫ F.map₂ (α_ f g h).inv
-- .lake/packages/lean4/src/lean/Init/Omega/Constraint.lean
theorem normalize_sat {s x v} (w : s.sat' x v) :
    (normalizeConstraint s x).sat' (normalizeCoeffs s x) v
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem nonpos_of_mul_nonneg_right [MulPosStrictMono α]
    (h : 0 ≤ a * b) (ha : a < 0) : b ≤ 0
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
@[reassoc (attr := simp)]
lemma liftCycles_i : S.liftCycles k hk ≫ S.iCycles = k
-- Mathlib/Order/GameAdd.lean
theorem GameAdd.fix_eq {C : α → α → Sort*} (hr : WellFounded rα)
    (IH : ∀ a₁ b₁, (∀ a₂ b₂, Sym2.GameAdd rα s(a₂, b₂) s(a₁, b₁) → C a₂ b₂) → C a₁ b₁) (a b : α) :
    GameAdd.fix hr IH a b = IH a b fun a' b' _ => GameAdd.fix hr IH a' b'
-- Mathlib/Algebra/Order/BigOperators/Ring/List.lean
/-- The product of a list of positive natural numbers is positive,
and likewise for any nontrivial ordered semiring. -/
lemma prod_pos [StrictOrderedSemiring R] (l : List R) (h : ∀ a ∈ l, (0 : R) < a) :
    0 < l.prod
-- Mathlib/Order/Disjoint.lean
theorem disjoint_left_iff (h : IsCompl y z) : Disjoint x y ↔ x ≤ z
-- Mathlib/Data/Complex/ExponentialBounds.lean
theorem exp_one_near_20 : |exp 1 - 363916618873 / 133877442384| ≤ 1 / 10 ^ 20
-- Mathlib/RingTheory/PowerSeries/Order.lean
/-- The order of a formal power series is at least `n` if
the `i`th coefficient is `0` for all `i < n`. -/
theorem nat_le_order (φ : R⟦X⟧) (n : ℕ) (h : ∀ i < n, coeff R i φ = 0) : ↑n ≤ order φ
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
protected theorem mul_one (k : Fin (n + 1)) : k * 1 = k
-- Mathlib/RingTheory/Trace/Basic.lean
theorem Algebra.trace_surjective [FiniteDimensional K L] [Algebra.IsSeparable K L] :
    Function.Surjective (Algebra.trace K L)
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem iff_congr {p₁ p₂ q₁ q₂ : Prop} (h₁ : p₁ ↔ p₂) (h₂ : q₁ ↔ q₂) : (p₁ ↔ q₁) ↔ (p₂ ↔ q₂)
-- Mathlib/Algebra/Star/StarAlgHom.lean
@[simp]
theorem id_comp (f : A →⋆ₙₐ[R] B) : (NonUnitalStarAlgHom.id _ _).comp f = f
-- Mathlib/Topology/Inseparable.lean
@[simp]
theorem tendsto_lift_nhds_mk {f : X → α} {hf : ∀ x y, (x ~ᵢ y) → f x = f y} {l : Filter α} :
    Tendsto (lift f hf) (𝓝 <| mk x) l ↔ Tendsto f (𝓝 x) l
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[simp]
theorem mk_π_app_one {W : C} (fst : W ⟶ X) (snd : W ⟶ Y) (eq : fst ≫ f = snd ≫ g) :
    (mk fst snd eq).π.app WalkingCospan.one = fst ≫ f
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
theorem le_nadd_left {a b c} (h : a ≤ c) : a ≤ b ♯ c
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem mem_top {s : Set α} : s ∈ (⊤ : Filter α) ↔ s = univ
-- Mathlib/Combinatorics/Additive/Corner/Roth.lean
@[simp]
private lemma mk_mem_triangleIndices : (a, b, c) ∈ triangleIndices A ↔ (a, b) ∈ A ∧ c = a + b
-- Mathlib/Algebra/Polynomial/EraseLead.lean
theorem card_support_eq_one_of_eraseLead_eq_zero (h₀ : f ≠ 0) (h₁ : f.eraseLead = 0) :
    f.support.card = 1
-- Mathlib/Algebra/Lie/Basic.lean
theorem congr_fun {f g : M →ₗ⁅R,L⁆ N} (h : f = g) (x : M) : f x = g x
-- Mathlib/CategoryTheory/Monoidal/Types/Basic.lean
@[simp] theorem associator_inv_apply_1_1 {X Y Z : Type u} {x} :
    (((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) x).1.1 = x.1
-- Mathlib/Topology/Instances/Real.lean
theorem Real.uniformContinuous_neg : UniformContinuous (@Neg.neg ℝ _)
-- Mathlib/Topology/MetricSpace/DilationEquiv.lean
@[simp] theorem refl_trans (e : X ≃ᵈ Y) : (refl X).trans e = e
-- Mathlib/CategoryTheory/Bicategory/Kan/HasKan.lean
theorem LeftLift.IsKan.hasLeftKanLift {t : LeftLift f g} (H : IsKan t) : HasLeftKanLift f g
-- Mathlib/Data/List/Cycle.lean
@[simp]
theorem subsingleton_reverse_iff {s : Cycle α} : s.reverse.Subsingleton ↔ s.Subsingleton
-- Mathlib/Data/Set/Image.lean
@[simp]
theorem preimage_const_of_mem {b : β} {s : Set β} (h : b ∈ s) : (fun _ : α => b) ⁻¹' s = univ
-- Mathlib/Data/Finset/Basic.lean
@[gcongr]
theorem inter_subset_inter_left (h : t ⊆ u) : s ∩ t ⊆ s ∩ u
-- Mathlib/Data/Bool/AllAny.lean
theorem any_of_mem {p : α → Bool} (h₁ : a ∈ l) (h₂ : p a) : any l p
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
theorem isOrthoᵢ_def {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M} {v : n → M₁} :
    B.IsOrthoᵢ v ↔ ∀ i j : n, i ≠ j → B (v i) (v j) = 0
-- Mathlib/Algebra/Quaternion.lean
@[simp] nonrec theorem neg_im : (-a).im = -a.im
-- Mathlib/Data/List/Range.lean
@[simp]
theorem unzip_enum_eq_prod (l : List α) : l.enum.unzip = (range l.length, l)
-- Mathlib/CategoryTheory/Sites/SheafOfTypes.lean
theorem isSeparated_of_isSheaf (P : Cᵒᵖ ⥤ Type w) (h : IsSheaf J P) : IsSeparated J P
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
/-- The rotation of a vector by `θ` has an angle of `-θ` from that vector. -/
@[simp]
theorem oangle_rotation_self_left {x : V} (hx : x ≠ 0) (θ : Real.Angle) :
    o.oangle (o.rotation θ x) x = -θ
-- Mathlib/Topology/Algebra/Module/Basic.lean
theorem Submodule.topologicalClosure_mono {s : Submodule R M} {t : Submodule R M} (h : s ≤ t) :
    s.topologicalClosure ≤ t.topologicalClosure
-- Mathlib/Data/NNRat/Defs.lean
@[simp] lemma den_pow (q : ℚ≥0) (n : ℕ) : (q ^ n).den = q.den ^ n
-- Mathlib/Order/Filter/Prod.lean
theorem compl_mem_coprod {s : Set (α × β)} {la : Filter α} {lb : Filter β} :
    sᶜ ∈ la.coprod lb ↔ (Prod.fst '' s)ᶜ ∈ la ∧ (Prod.snd '' s)ᶜ ∈ lb