ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/Normed/Module/WeakDual.lean
/-- The image under `↑ : WeakDual 𝕜 E → (E → 𝕜)` of a polar `WeakDual.polar 𝕜 s` of a
neighborhood `s` of the origin is a closed set. -/
theorem isClosed_image_polar_of_mem_nhds {s : Set E} (s_nhd : s ∈ 𝓝 (0 : E)) :
    IsClosed (((↑) : WeakDual 𝕜 E → E → 𝕜) '' polar 𝕜 s)
-- Mathlib/Data/List/Perm.lean
theorem perm_of_mem_permutationsAux :
    ∀ {ts is l : List α}, l ∈ permutationsAux ts is → l ~ ts ++ is
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem measure_liminf_eq_zero {s : ℕ → Set α} (h : (∑' i, μ (s i)) ≠ ∞) :
    μ (liminf s atTop) = 0
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
theorem ne_of_adj_of_not_adj {v w x : V} (h : G.Adj v x) (hn : ¬G.Adj w x) : v ≠ w
-- Mathlib/AlgebraicGeometry/Restrict.lean
theorem image_morphismRestrict_preimage {X Y : Scheme.{u}} (f : X ⟶ Y) (U : Y.Opens) (V : Opens U) :
    (f ⁻¹ᵁ U).ι ''ᵁ ((f ∣_ U) ⁻¹ᵁ V) = f ⁻¹ᵁ (U.ι ''ᵁ V)
-- Mathlib/Order/Basic.lean
lemma ltTrichotomy_congr {x' y' : α} {p' q' r' : P} (ltc : (x < y) ↔ (x' < y'))
    (gtc : (y < x) ↔ (y' < x')) (hh'₁ : x' < y' → p = p')
    (hh'₂ : x' = y' → q = q') (hh'₃ : y' < x' → r = r') :
    ltTrichotomy x y p q r = ltTrichotomy x' y' p' q' r'
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem insert_replicate_self {a : α} (h : 0 < n) : (replicate n a).insert a = replicate n a
-- Mathlib/Logic/Equiv/Option.lean
theorem removeNone_aux_none {x : α} (h : e (some x) = none) :
    some (removeNone_aux e x) = e none
-- Mathlib/CategoryTheory/Sites/Types.lean
theorem typesGrothendieckTopology_eq_canonical :
    typesGrothendieckTopology.{u} = Sheaf.canonicalTopology (Type u)
-- Mathlib/Algebra/CharP/Algebra.lean
/-- If `R →+* A` is injective, then `R` is of characteristic `p` if and only if `A` is also of
characteristic `p`. Similar to `RingHom.charZero_iff`. -/
theorem RingHom.charP_iff {R A : Type*} [NonAssocSemiring R] [NonAssocSemiring A] (f : R →+* A)
    (H : Function.Injective f) (p : ℕ) : CharP R p ↔ CharP A p
-- Mathlib/CategoryTheory/Monoidal/End.lean
@[reassoc]
theorem right_unitality_app (n : M) (X : C) :
    F.ε.app ((F.obj n).obj X) ≫ (F.μ n (𝟙_ M)).app X ≫ (F.map (ρ_ n).hom).app X = 𝟙 _
-- Mathlib/Order/Heyting/Basic.lean
theorem IsCompl.hnot_eq (h : IsCompl a b) : ￢a = b
-- Mathlib/ModelTheory/Basic.lean
@[simp]
theorem comp_toEmbedding (hnp : N ≃[L] P) (hmn : M ≃[L] N) :
    (hnp.comp hmn).toEmbedding = hnp.toEmbedding.comp hmn.toEmbedding
-- Mathlib/MeasureTheory/Function/LpSpace.lean
@[simp]
lemma Memℒp.toLp_const : Memℒp.toLp _ (memℒp_const c) = Lp.const p μ c
-- Mathlib/Topology/Separation.lean
/-- If `f x = g x` for all `x ∈ s` and `f`, `g` are continuous on `t`, `s ⊆ t ⊆ closure s`, then
`f x = g x` for all `x ∈ t`. See also `Set.EqOn.closure`. -/
theorem Set.EqOn.of_subset_closure [T2Space Y] {s t : Set X} {f g : X → Y} (h : EqOn f g s)
    (hf : ContinuousOn f t) (hg : ContinuousOn g t) (hst : s ⊆ t) (hts : t ⊆ closure s) :
    EqOn f g t
-- Mathlib/Order/Minimal.lean
theorem minimals_inter_subset : minimals r s ∩ t ⊆ minimals r (s ∩ t)
-- Mathlib/MeasureTheory/Decomposition/RadonNikodym.lean
lemma _root_.MeasurableEmbedding.rnDeriv_map_aux (hf : MeasurableEmbedding f)
    (hμν : μ ≪ ν) [SigmaFinite μ] [SigmaFinite ν] :
    (fun x ↦ (μ.map f).rnDeriv (ν.map f) (f x)) =ᵐ[ν] μ.rnDeriv ν
-- Mathlib/Analysis/Convex/Cone/Basic.lean
theorem Pointed.mono {S T : ConvexCone 𝕜 E} (h : S ≤ T) : S.Pointed → T.Pointed
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
@[simp]
lemma ψ_neg (n : ℤ) : W.ψ (-n) = -W.ψ n
-- Mathlib/Order/Bounds/Basic.lean
theorem isGLB_Icc (h : a ≤ b) : IsGLB (Icc a b) a
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
/-- If `u` is a superset of `t` with the same (finite) measure (both sets possibly non-measurable),
then for any measurable set `s` one also has `μ (t ∩ s) = μ (u ∩ s)`. -/
theorem measure_inter_eq_of_measure_eq {s t u : Set α} (hs : MeasurableSet s) (h : μ t = μ u)
    (htu : t ⊆ u) (ht_ne_top : μ t ≠ ∞) : μ (t ∩ s) = μ (u ∩ s)
-- Mathlib/Topology/UniformSpace/Cauchy.lean
/-- A sequentially complete uniform space with a countable basis of the uniformity filter is
complete. -/
theorem complete_of_cauchySeq_tendsto (H' : ∀ u : ℕ → α, CauchySeq u → ∃ a, Tendsto u atTop (𝓝 a)) :
    CompleteSpace α
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem symm_continuousLinearEquivAt_eq (e : Trivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) : ((e.continuousLinearEquivAt R b hb).symm : F → E b) = e.symmL R b
-- Mathlib/Algebra/CubicDiscriminant.lean
@[simp]
theorem degree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).degree = 1
-- Mathlib/Topology/Homotopy/HomotopyGroup.lean
theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d)
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem mul_left_cancel_iff_of_pos [PosMulReflectLE α] (a0 : 0 < a) : a * b = a * c ↔ b = c
-- Mathlib/Data/Set/Sigma.lean
@[simp]
theorem union_sigma : (s₁ ∪ s₂).sigma t = s₁.sigma t ∪ s₂.sigma t
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
theorem nndist_midpoint_left (p₁ p₂ : P) :
    nndist (midpoint 𝕜 p₁ p₂) p₁ = ‖(2 : 𝕜)‖₊⁻¹ * nndist p₁ p₂
-- .lake/packages/batteries/Batteries/Data/List/Pairwise.lean
@[simp] theorem pwFilter_cons_of_pos [DecidableRel (α := α) R] {a : α} {l : List α}
    (h : ∀ b ∈ pwFilter R l, R a b) : pwFilter R (a :: l) = a :: pwFilter R l
-- Mathlib/RingTheory/Perfection.lean
theorem coeff_add_ne_zero {f : Ring.Perfection R p} {n : ℕ} (hfn : coeff R p n f ≠ 0) (k : ℕ) :
    coeff R p (n + k) f ≠ 0
-- Mathlib/FieldTheory/RatFunc/Basic.lean
theorem coe_mapAlgHom_eq_coe_map (φ : K[X] →ₐ[S] R[X]) (hφ : K[X]⁰ ≤ R[X]⁰.comap φ) :
    (mapAlgHom φ hφ : RatFunc K → RatFunc R) = map φ hφ
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/StructureSheaf.lean
@[simp]
theorem Proj.stalkIso'_germ (U : Opens (ProjectiveSpectrum.top 𝒜)) (x : U)
    (s : (Proj.structureSheaf 𝒜).1.obj (op U)) :
    Proj.stalkIso' 𝒜 x ((Proj.structureSheaf 𝒜).presheaf.germ x s) = s.1 x
-- Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean
theorem ker_mfderiv_eq_bot {x : M} (hx : x ∈ e.source) : LinearMap.ker (mfderiv I I' e x) = ⊥
-- Mathlib/LinearAlgebra/Dual.lean
theorem map_dualCoannihilator_le (Φ : Submodule R (Module.Dual R M)) :
    Φ.dualCoannihilator.map (Module.Dual.eval R M) ≤ Φ.dualAnnihilator
-- Mathlib/Analysis/SpecialFunctions/Exp.lean
@[simp]
theorem coe_expOrderIso_apply (x : ℝ) : (expOrderIso x : ℝ) = exp x
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
theorem testBit_lt_two_pow {x i : Nat} (lt : x < 2^i) : x.testBit i = false
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/-- A function which can be uniformly approximated by continuous functions is continuous. -/
theorem continuous_of_uniform_approx_of_continuous
    (L : ∀ u ∈ 𝓤 β, ∃ F, Continuous F ∧ ∀ y, (f y, F y) ∈ u) : Continuous f
-- Mathlib/Geometry/Manifold/ContMDiffMap.lean
@[simp]
theorem coeFn_mk (f : M → M') (hf : ContMDiff I I' n f) :
    DFunLike.coe (F := C^n⟮I, M; I', M'⟯) ⟨f, hf⟩ = f
-- Mathlib/Topology/Connected/PathConnected.lean
theorem IsPathConnected.joinedIn (h : IsPathConnected F) :
    ∀ᵉ (x ∈ F) (y ∈ F), JoinedIn F x y
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
theorem rank_span_le (s : Set M) : Module.rank R (span R s) ≤ #s
-- Mathlib/Order/Hom/Order.lean
theorem iterate_sup_le_sup_iff {α : Type*} [SemilatticeSup α] (f : α →o α) :
    (∀ n₁ n₂ a₁ a₂, f^[n₁ + n₂] (a₁ ⊔ a₂) ≤ f^[n₁] a₁ ⊔ f^[n₂] a₂) ↔
      ∀ a₁ a₂, f (a₁ ⊔ a₂) ≤ f a₁ ⊔ a₂
-- Mathlib/AlgebraicGeometry/Morphisms/Constructors.lean
/-- If `P` respects isos, then `stalkwise P` respects isos. -/
lemma stalkwise_respectsIso (hP : RingHom.RespectsIso P) :
    (stalkwise P).RespectsIso
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
lemma rpow_intCast_mul (x : ℝ≥0∞) (n : ℤ) (z : ℝ) : x ^ (n * z) = (x ^ n) ^ z
-- Mathlib/NumberTheory/PellMatiyasevic.lean
theorem n_lt_a_pow : ∀ n : ℕ, n < a ^ n
-- Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
theorem cmp_dist_eq_cmp_dist_coe_center (z w : ℍ) (r : ℝ) :
    cmp (dist z w) r = cmp (dist (z : ℂ) (w.center r)) (w.im * Real.sinh r)
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem HasMFDerivWithinAt.mono_of_mem (h : HasMFDerivWithinAt I I' f s x f') (ht : s ∈ 𝓝[t] x) :
    HasMFDerivWithinAt I I' f t x f'
-- Mathlib/RingTheory/Idempotents.lean
lemma CompleteOrthogonalIdempotents.of_isIdempotentElem {e : R} (he : IsIdempotentElem e) :
    CompleteOrthogonalIdempotents ![e, 1 - e]
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem IsNormal.monotone {f} (H : IsNormal f) : Monotone f
-- Mathlib/Algebra/Polynomial/Laurent.lean
@[simp]
theorem T_zero : (T 0 : R[T;T⁻¹]) = 1
-- Mathlib/Data/List/AList.lean
theorem keys_nodup (s : AList β) : s.keys.Nodup
-- Mathlib/Computability/TMToPartrec.lean
@[simp]
theorem contSupp_halt : contSupp Cont'.halt = ∅
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsLittleO.isBigOWith (hgf : f =o[l] g) : IsBigOWith 1 l f g
-- Mathlib/Data/List/Sigma.lean
theorem NodupKeys.eq_of_mk_mem {a : α} {b b' : β a} {l : List (Sigma β)} (nd : NodupKeys l)
    (h : Sigma.mk a b ∈ l) (h' : Sigma.mk a b' ∈ l) : b = b'
-- Mathlib/RingTheory/PowerBasis.lean
@[simp]
theorem coe_basis (pb : PowerBasis R S) : ⇑pb.basis = fun i : Fin pb.dim => pb.gen ^ (i : ℕ)
-- Mathlib/Analysis/Convex/Cone/Proper.lean
@[simp]
theorem mem_map {f : E →L[ℝ] F} {K : ProperCone ℝ E} {y : F} :
    y ∈ K.map f ↔ y ∈ (PointedCone.map (f : E →ₗ[ℝ] F) ↑K).closure
-- Mathlib/Data/Finsupp/NeLocus.lean
@[simp]
theorem neLocus_self_add_left : neLocus (f + g) f = g.support
-- Mathlib/RingTheory/Ideal/Over.lean
theorem comap_lt_comap_of_integral_mem_sdiff [Algebra R S] [hI : I.IsPrime] (hIJ : I ≤ J) {x : S}
    (mem : x ∈ (J : Set S) \ I) (integral : IsIntegral R x) :
    I.comap (algebraMap R S) < J.comap (algebraMap R S)
-- Mathlib/NumberTheory/SmoothNumbers.lean
/-- The non-zero non-`s`-factored numbers are `≥ N` when `s` contains all primes less than `N`. -/
lemma factoredNumbers_compl {N : ℕ} {s : Finset ℕ} (h : primesBelow N ≤ s) :
    (factoredNumbers s)ᶜ \ {0} ⊆ {n | N ≤ n}
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem sub_pos_of_lt (h : m < n) : 0 < n - m
-- Mathlib/Order/Interval/Multiset.lean
theorem right_not_mem_Ioo : b ∉ Ioo a b
-- Mathlib/ModelTheory/Ultraproducts.lean
theorem realize_formula_cast {β : Type*} (φ : L.Formula β) (x : β → ∀ a, M a) :
    (φ.Realize fun i => (x i : (u : Filter α).Product M)) ↔
      ∀ᶠ a : α in u, φ.Realize fun i => x i a
-- Mathlib/MeasureTheory/Function/UniformIntegrable.lean
theorem eLpNorm_indicator_le_of_bound {f : α → β} (hp_top : p ≠ ∞) {ε : ℝ} (hε : 0 < ε) {M : ℝ}
    (hf : ∀ x, ‖f x‖ < M) :
    ∃ (δ : ℝ) (hδ : 0 < δ), ∀ s, MeasurableSet s →
      μ s ≤ ENNReal.ofReal δ → eLpNorm (s.indicator f) p μ ≤ ENNReal.ofReal ε
-- Mathlib/NumberTheory/ClassNumber/Finite.lean
theorem mkMMem_surjective [IsDedekindDomain S] [Algebra.IsAlgebraic R L] :
    Function.Surjective (ClassGroup.mkMMem bS adm)
-- Mathlib/Data/Set/Prod.lean
theorem subsingleton_univ_pi (ht : ∀ i, (t i).Subsingleton) :
    (univ.pi t).Subsingleton
-- Mathlib/Data/Complex/Basic.lean
theorem equivRealProdAddHom_symm_apply (p : ℝ × ℝ) :
    equivRealProdAddHom.symm p = p.1 + p.2 * I
-- Mathlib/Data/List/Iterate.lean
@[simp]
theorem mem_iterate {f : α → α} {a : α} {n : ℕ} {b : α} :
    b ∈ iterate f a n ↔ ∃ m < n, b = f^[m] a
-- Mathlib/Data/Multiset/Basic.lean
theorem erase_comm (s : Multiset α) (a b : α) : (s.erase a).erase b = (s.erase b).erase a
-- Mathlib/NumberTheory/DiophantineApproximation.lean
private theorem aux₁ : 0 < fract ξ
-- Mathlib/Data/Set/Pointwise/SMul.lean
theorem preimage_smul_inv₀ (ha : a ≠ 0) (t : Set β) : (fun x ↦ a⁻¹ • x) ⁻¹' t = a • t
-- Mathlib/Order/Filter/NAry.lean
@[simp]
theorem map₂_bot_right : map₂ m f ⊥ = ⊥
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
@[simp]
lemma leftUnshift_zero (a n' : ℤ) (hn' : n + a = n') :
    (0 : Cochain (K⟦a⟧) L n').leftUnshift n hn' = 0
-- Mathlib/Order/Hom/Basic.lean
theorem RelEmbedding.toOrderHom_injective
    (f : ((· < ·) : α → α → Prop) ↪r ((· < ·) : β → β → Prop)) :
    Function.Injective (f : ((· < ·) : α → α → Prop) →r ((· < ·) : β → β → Prop)).toOrderHom
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem norm_integral_le_integral_norm (h : a ≤ b) :
    ‖∫ x in a..b, f x ∂μ‖ ≤ ∫ x in a..b, ‖f x‖ ∂μ
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
theorem fst_map_prod_mk₀ {X : α → β} {Y : α → γ} {μ : Measure α}
    (hY : AEMeasurable Y μ) : (μ.map fun a => (X a, Y a)).fst = μ.map X
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
protected theorem MeasurableSet.const (p : Prop) : MeasurableSet { _a : α | p }
-- Mathlib/NumberTheory/Bernoulli.lean
@[simp]
theorem bernoulli_zero : bernoulli 0 = 1
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
@[nontriviality, measurability]
theorem Subsingleton.measurableSet [Subsingleton α] {s : Set α} : MeasurableSet s
-- Mathlib/Analysis/MeanInequalitiesPow.lean
theorem add_rpow_le_rpow_add {p : ℝ} (a b : ℝ≥0) (hp1 : 1 ≤ p) : a ^ p + b ^ p ≤ (a + b) ^ p
-- Mathlib/Topology/MetricSpace/Ultra/Basic.lean
lemma mem_closedBall_iff {x y: X} {r : ℝ} :
    y ∈ closedBall x r ↔ x ∈ closedBall y r
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
theorem FiniteDimensional.of_rank_eq_zero (h : Module.rank K V = 0) : FiniteDimensional K V
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem nfp_lt_ord {f : Ordinal → Ordinal} {c} (hc : ℵ₀ < cof c) (hf : ∀ i < c, f i < c) {a} :
    a < c → nfp f a < c
-- Mathlib/FieldTheory/Adjoin.lean
/-- If `K` is a field with `F ⊆ K` and `S ⊆ K` then `adjoin F S ≤ K`. -/
theorem adjoin_le_subfield {K : Subfield E} (HF : Set.range (algebraMap F E) ⊆ K) (HS : S ⊆ K) :
    (adjoin F S).toSubfield ≤ K
-- Mathlib/Order/Interval/Set/ProjIcc.lean
theorem monotone_projIci : Monotone (projIci a)
-- Mathlib/Order/Filter/Basic.lean
theorem le_map_iff {f : Filter α} {m : α → β} {g : Filter β} : g ≤ f.map m ↔ ∀ s ∈ f, m '' s ∈ g
-- Mathlib/Algebra/Polynomial/Expand.lean
theorem expand_pow (f : R[X]) : expand R (p ^ q) f = (expand R p)^[q] f
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma comp_zero_cochain_v (z₁ : Cochain F G n) (z₂ : Cochain G K 0) (p q : ℤ) (hpq : p + n = q) :
    (z₁.comp z₂ (add_zero n)).v p q hpq = z₁.v p q hpq ≫ z₂.v q q (add_zero q)
-- Mathlib/Algebra/Ring/Divisibility/Basic.lean
/-- If an element `a` divides another element `b` in a ring, `a` divides the difference of `b` and
another element `c` iff `a` divides `c`. -/
theorem dvd_sub_right (h : a ∣ b) : a ∣ b - c ↔ a ∣ c
-- Mathlib/Data/Set/UnionLift.lean
theorem preimage_iUnionLift (t : Set β) :
    iUnionLift S f hf T hT ⁻¹' t =
      inclusion hT ⁻¹' (⋃ i, inclusion (subset_iUnion S i) '' (f i ⁻¹' t))
-- Mathlib/Topology/MetricSpace/Basic.lean
@[simp]
theorem zero_eq_dist {x y : γ} : 0 = dist x y ↔ x = y
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma smul_fin3_ext (P : Fin 3 → R) (u : R) :
    (u • P) x = u ^ 2 * P x ∧ (u • P) y = u ^ 3 * P y ∧ (u • P) z = u * P z
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem ContDiffWithinAt.csinh {n} (hf : ContDiffWithinAt ℂ n f s x) :
    ContDiffWithinAt ℂ n (fun x => Complex.sinh (f x)) s x
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- The bijection of `Fork.IsLimit.homIso` is natural in `Z`. -/
theorem Fork.IsLimit.homIso_natural {X Y : C} {f g : X ⟶ Y} {t : Fork f g} (ht : IsLimit t)
    {Z Z' : C} (q : Z' ⟶ Z) (k : Z ⟶ t.pt) :
    (Fork.IsLimit.homIso ht _ (q ≫ k) : Z' ⟶ X) = q ≫ (Fork.IsLimit.homIso ht _ k : Z ⟶ X)
-- Mathlib/Data/Set/Prod.lean
theorem univ_prod {t : Set β} : (univ : Set α) ×ˢ t = Prod.snd ⁻¹' t
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem Right.neg_of_mul_neg_left [MulPosMono α] (h : a * b < 0) (b0 : 0 ≤ b) : a < 0
-- Mathlib/FieldTheory/Minpoly/Basic.lean
theorem eq_zero (hx : ¬IsIntegral A x) : minpoly A x = 0
-- Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean
theorem HasDerivWithinAt.log (hf : HasDerivWithinAt f f' s x) (hx : f x ≠ 0) :
    HasDerivWithinAt (fun y => log (f y)) (f' / f x) s x
-- Mathlib/GroupTheory/Perm/Basic.lean
/-- `Equiv.Perm.subtypeCongr` as a `MonoidHom`. -/
@[simps]
def subtypeCongrHom (p : α → Prop) [DecidablePred p] :
    Perm { a // p a } × Perm { a // ¬p a } →* Perm α
-- Mathlib/RingTheory/Ideal/Basic.lean
/-- **Krull's theorem**: if `I` is an ideal that is not the whole ring, then it is included in some
    maximal ideal. -/
theorem exists_le_maximal (I : Ideal α) (hI : I ≠ ⊤) : ∃ M : Ideal α, M.IsMaximal ∧ I ≤ M
-- Mathlib/Algebra/Module/Submodule/Bilinear.lean
@[simp]
theorem map₂_bot_right (f : M →ₗ[R] N →ₗ[R] P) (p : Submodule R M) : map₂ f p ⊥ = ⊥
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem dif_pos {c : Prop} {h : Decidable c} (hc : c) {α : Sort u} {t : c → α} {e : ¬ c → α} : (dite c t e) = t hc
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem ofList_cons (a : α) (l) : ofList (a::l) = cons a (ofList l)
-- Mathlib/Order/Monotone/Basic.lean
theorem Function.monotone_eval {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] (i : ι) :
    Monotone (Function.eval i : (∀ i, α i) → α i)
-- Mathlib/MeasureTheory/Measure/Dirac.lean
@[simp]
theorem dirac_apply_of_mem {a : α} (h : a ∈ s) : dirac a s = 1
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem linearMapAt_def_of_not_mem (e : Pretrivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∉ e.baseSet) : e.linearMapAt R b = 0
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
/-- The angle at a point is at most π. -/
nonrec theorem angle_le_pi (p1 p2 p3 : P) : ∠ p1 p2 p3 ≤ π
-- Mathlib/CategoryTheory/Iso.lean
@[simp]
theorem mapIso_trans (F : C ⥤ D) {X Y Z : C} (i : X ≅ Y) (j : Y ≅ Z) :
    F.mapIso (i ≪≫ j) = F.mapIso i ≪≫ F.mapIso j
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
@[local simp] theorem neg_ofNat_succ (n : Nat) : -(succ n : Int) = -[n+1]
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem gcd_assoc [NormalizedGCDMonoid α] (m n k : α) : gcd (gcd m n) k = gcd m (gcd n k)
-- Mathlib/Data/Num/Lemmas.lean
theorem cast_mul [Ring α] (m n) : ((m * n : ZNum) : α) = m * n
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem zipWith_append (f : α → β → γ) (l la : List α) (l' lb : List β)
    (h : l.length = l'.length) :
    zipWith f (l ++ la) (l' ++ lb) = zipWith f l l' ++ zipWith f la lb
-- Mathlib/Data/Vector/MapLemmas.lean
theorem mapAccumr₂_flip (f : α → β → σ → σ × γ) :
    mapAccumr₂ f xs ys s = mapAccumr₂ (flip f) ys xs s
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma Exact.mono_g (hS : S.Exact) (hf : S.f = 0) : Mono S.g
-- Mathlib/Topology/Sheaves/Sheaf.lean
theorem id_app (F : Sheaf C X) (t) : (𝟙 F : F ⟶ F).1.app t = 𝟙 _
-- Mathlib/RingTheory/WittVector/Defs.lean
theorem add_coeff (x y : 𝕎 R) (n : ℕ) :
    (x + y).coeff n = peval (wittAdd p n) ![x.coeff, y.coeff]
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
theorem isoExt_inv_m : (isoExt hF hF').inv ≫ F.m = F'.m
-- Mathlib/Algebra/Ring/Idempotents.lean
theorem eq {p : M} (h : IsIdempotentElem p) : p * p = p
-- Mathlib/Order/Filter/Bases.lean
theorem mem_filter_iff (B : FilterBasis α) {U : Set α} : U ∈ B.filter ↔ ∃ s ∈ B, s ⊆ U
-- Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean
theorem GammaAux_recurrence1 (s : ℂ) (n : ℕ) (h1 : -s.re < ↑n) :
    GammaAux n s = GammaAux n (s + 1) / s
-- .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean
theorem list_succ (n) : list (n+1) = 0 :: (list n).map Fin.succ
-- Mathlib/FieldTheory/Finite/Basic.lean
theorem X_pow_card_sub_X_ne_zero (hp : 1 < p) : (X ^ p - X : K'[X]) ≠ 0
-- Mathlib/CategoryTheory/FiberedCategory/Cartesian.lean
/-- The proposition that a morphism `φ : a ⟶ b` in `𝒳` lying over `f : R ⟶ S` in `𝒮` is a
strongly cartesian morphism.

See <https://stacks.math.columbia.edu/tag/02XK> -/
class IsStronglyCartesian extends IsHomLift p f φ : Prop where
  universal_property' {a' : 𝒳} (g : p.obj a' ⟶ R) (φ' : a' ⟶ b) [IsHomLift p (g ≫ f) φ'] :
      ∃! χ : a' ⟶ a, IsHomLift p g χ ∧ χ ≫ φ = φ'
-- Mathlib/Algebra/DirectSum/Decomposition.lean
@[simp]
theorem decompose_add (x y : M) : decompose ℳ (x + y) = decompose ℳ x + decompose ℳ y
-- Mathlib/Data/Set/Finite.lean
lemma Infinite.exists_not_mem_finset (hs : s.Infinite) (t : Finset α) : ∃ a ∈ s, a ∉ t
-- Mathlib/Order/UpperLower/Basic.lean
lemma IsUpperSet.isLowerSet_preimage_coe (hs : IsUpperSet s) :
    IsLowerSet ((↑) ⁻¹' t : Set s) ↔ ∀ b ∈ s, ∀ c ∈ t, b ≤ c → b ∈ t
-- Mathlib/Analysis/InnerProductSpace/TwoDim.lean
@[simp]
theorem rightAngleRotation_trans_neg_orientation :
    (-o).rightAngleRotation = o.rightAngleRotation.trans (LinearIsometryEquiv.neg ℝ)
-- Mathlib/Algebra/Ring/InjSurj.lean
/-- Pushforward a `RightDistribClass` instance along a surjective function. -/
theorem rightDistribClass [Mul α] [Add α] [RightDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
    (mul : ∀ x y, f (x * y) = f x * f y) : RightDistribClass β
-- Mathlib/Geometry/Manifold/VectorBundle/Basic.lean
theorem smoothOn_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
    (he' : e' ∈ a.pretrivializationAtlas) :
    SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (a.smoothCoordChange IB he he') (e.baseSet ∩ e'.baseSet)
-- Mathlib/Logic/Equiv/TransferInstance.lean
theorem pow_def {N : Type*} [Pow β N] (n : N) (x : α) :
    letI := e.pow N
    x ^ n = e.symm (e x ^ n)
-- Mathlib/CategoryTheory/Abelian/LeftDerived.lean
@[reassoc (attr := simp)]
lemma leftDerivedZeroIsoSelf_hom_inv_id :
    F.fromLeftDerivedZero ≫ F.leftDerivedZeroIsoSelf.inv = 𝟙 _
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem measurableSet_range_inl [MeasurableSpace α] :
    MeasurableSet (range Sum.inl : Set (α ⊕ β))
-- Mathlib/LinearAlgebra/StdBasis.lean
@[simp] lemma surjective_piEquiv_apply_iff (v : ι → M) :
    Surjective (piEquiv ι R M v) ↔ span R (range v) = ⊤
-- Mathlib/Data/Fintype/Card.lean
theorem card_of_subtype {p : α → Prop} (s : Finset α) (H : ∀ x : α, x ∈ s ↔ p x)
    [Fintype { x // p x }] : card { x // p x } = s.card
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem forall_mem_map_iff {f : α → β} {l : List α} {P : β → Prop} :
    (∀ (i) (_ : i ∈ l.map f), P i) ↔ ∀ (j) (_ : j ∈ l), P (f j)
-- Mathlib/Data/List/Rotate.lean
theorem reverse_rotate (l : List α) (n : ℕ) :
    (l.rotate n).reverse = l.reverse.rotate (l.length - n % l.length)
-- Mathlib/Order/SuccPred/LinearLocallyFinite.lean
theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax (succ^[n] i0)) :
    toZ i0 (succ^[n] i0) = n
-- Mathlib/Data/Finsupp/Order.lean
@[simp]
theorem orderEmbeddingToFun_apply {f : ι →₀ α} {i : ι} : orderEmbeddingToFun f i = f i
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
lemma adjoin_eq_span (s : Set A) :
    (adjoin R s).toSubmodule = Submodule.span R (Subsemigroup.closure (s ∪ star s))
-- Mathlib/Algebra/Ring/InjSurj.lean
/-- Pullback a `LeftDistribClass` instance along an injective function. -/
theorem leftDistribClass [Mul α] [Add α] [LeftDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
    (mul : ∀ x y, f (x * y) = f x * f y) : LeftDistribClass β
-- Mathlib/CategoryTheory/Shift/Induced.lean
@[simp]
lemma add_inv_app_obj (a b : A) (X : C) :
    (add F s i a b).inv.app (F.obj X) =
      (s b).map ((i a).hom.app X) ≫ (i b).hom.app ((shiftFunctor C a).obj X) ≫
        F.map ((shiftFunctorAdd C a b).inv.app X) ≫ (i (a + b)).inv.app X
-- Mathlib/Algebra/Polynomial/Basic.lean
theorem support_C_mul_X_pow (n : ℕ) {c : R} (h : c ≠ 0) :
    Polynomial.support (C c * X ^ n) = singleton n
-- Mathlib/Algebra/PUnitInstances/Algebra.lean
theorem gcd_eq {x y : PUnit} : gcd x y = unit
-- Mathlib/Topology/Order/Basic.lean
theorem nhds_top_basis_Ici [TopologicalSpace α] [LinearOrder α] [OrderTop α] [OrderTopology α]
    [Nontrivial α] [DenselyOrdered α] : (𝓝 ⊤).HasBasis (fun a : α => a < ⊤) Ici
-- Mathlib/Data/Real/Sqrt.lean
theorem sqrt_eq_zero_of_nonpos (h : x ≤ 0) : sqrt x = 0
-- Mathlib/Data/Finset/Card.lean
theorem le_card_iff_exists_subset_card : n ≤ s.card ↔ ∃ t ⊆ s, t.card = n
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem sign_two_zsmul_eq_sign_iff {θ : Angle} :
    ((2 : ℤ) • θ).sign = θ.sign ↔ θ = π ∨ |θ.toReal| < π / 2