ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/ENNReal/Inv.lean
/-- The inverse map `fun x ↦ x⁻¹` is an order isomorphism between `ℝ≥0∞` and its `OrderDual` -/
@[simps! apply]
def _root_.OrderIso.invENNReal : ℝ≥0∞ ≃o ℝ≥0∞ᵒᵈ
-- Mathlib/Probability/Distributions/Uniform.lean
theorem uniformOfFinset_apply_of_mem (ha : a ∈ s) : uniformOfFinset s hs a = (s.card : ℝ≥0∞)⁻¹
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
@[simp] theorem gcd_gcd_self_left_left (m n : Nat) : gcd (gcd m n) m = gcd m n
-- Mathlib/Data/Subtype.lean
theorem equivalence (p : α → Prop) : Equivalence (@HasEquiv.Equiv (Subtype p) _)
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem gcd_comm [NormalizedGCDMonoid α] (a b : α) : gcd a b = gcd b a
-- Mathlib/Combinatorics/Configuration.lean
theorem sum_lineCount_eq_sum_pointCount [Fintype P] [Fintype L] :
    ∑ p : P, lineCount L p = ∑ l : L, pointCount P l
-- Mathlib/GroupTheory/Perm/Cycle/Type.lean
theorem cycleType_ofSubtype {p : α → Prop} [DecidablePred p] {g : Perm (Subtype p)} :
    cycleType (ofSubtype g) = cycleType g
-- Mathlib/Topology/Category/LightProfinite/Sequence.lean
/--
The continuous map from `ℕ∪{∞}` to `ℝ` sending `n` to `1/(n+1)` and `∞` to `0` is a closed
embedding.
-/
lemma closedEmbedding_natUnionInftyEmbedding : ClosedEmbedding natUnionInftyEmbedding
-- Mathlib/Algebra/NeZero.lean
theorem of_pos [Preorder M] [Zero M] (h : 0 < x) : NeZero x
-- Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
theorem IsCycle.existsUnique_cycle_nontrivial_subtype {f : Perm α} (hf : IsCycle f) :
    ∃! s : { s : Cycle α // s.Nodup ∧ s.Nontrivial }, (s : Cycle α).formPerm s.prop.left = f
-- Mathlib/RingTheory/Derivation/Basic.lean
@[simp]
lemma restrictScalars_apply (d : Derivation S A M) (x : A) : d.restrictScalars R x = d x
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem Ioi_ae_eq_Ici : Ioi a =ᵐ[μ] Ici a
-- .lake/packages/batteries/Batteries/Data/List/Basic.lean
@[csimp] theorem fillNones_eq_fillNonesTR : @fillNones = @fillNonesTR
-- Mathlib/Order/Cover.lean
theorem _root_.WCovBy.fst (h : x ⩿ y) : x.1 ⩿ y.1
-- Mathlib/MeasureTheory/Measure/Complex.lean
theorem _root_.MeasureTheory.SignedMeasure.toComplexMeasure_apply
    {s t : SignedMeasure α} {i : Set α} : s.toComplexMeasure t i = ⟨s i, t i⟩
-- Mathlib/Algebra/Polynomial/Lifts.lean
/-- If `(r : R)`, then `C (f r)` lifts. -/
theorem C_mem_lifts (f : R →+* S) (r : R) : C (f r) ∈ lifts f
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
theorem derivWithin.neg (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (fun y => -f y) s x = -derivWithin f s x
-- Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean
theorem mem_edges_toSubgraph (p : G.Walk u v) {e : Sym2 V} :
    e ∈ p.toSubgraph.edgeSet ↔ e ∈ p.edges
-- Mathlib/Algebra/Module/Defs.lean
theorem self_eq_neg
    (R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M]
    {v : M} : v = -v ↔ v = 0
-- Mathlib/Algebra/TrivSqZeroExt.lean
theorem inr_sum {ι} [AddCommMonoid R] [AddCommMonoid M] (s : Finset ι) (f : ι → M) :
    (inr (∑ i ∈ s, f i) : tsze R M) = ∑ i ∈ s, inr (f i)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem dropWhile_replicate_eq_filter_not (p : α → Bool) :
    (replicate n a).dropWhile p = (replicate n a).filter (fun a => !p a)
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
/-- The quotient map to `α ⧸ G` is measure-preserving between the restriction of `volume` to a
  fundamental domain in `α` and a related measure satisfying `QuotientMeasureEqMeasurePreimage`. -/
@[to_additive IsAddFundamentalDomain.measurePreserving_add_quotient_mk]
theorem IsFundamentalDomain.measurePreserving_quotient_mk
    {𝓕 : Set α} (h𝓕 : IsFundamentalDomain G 𝓕 ν)
    (μ : Measure (Quotient α_mod_G)) [QuotientMeasureEqMeasurePreimage ν μ] :
    MeasurePreserving π (ν.restrict 𝓕) μ
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem tangentCone_mono_nhds (h : 𝓝[s] x ≤ 𝓝[t] x) :
    tangentConeAt 𝕜 s x ⊆ tangentConeAt 𝕜 t x
-- Mathlib/AlgebraicTopology/DoldKan/Compatibility.lean
/-- An intermediate equivalence `A ≅ B` obtained as the composition of `equivalence₁` and
the inverse of `eB : B ≌ B'`. -/
@[simps! functor]
def equivalence₂ : A ≌ B
-- Mathlib/Probability/Independence/Basic.lean
theorem indep_iSup_of_monotone [SemilatticeSup ι] [IsProbabilityMeasure μ]
    (h_indep : ∀ i, Indep (m i) m1 μ) (h_le : ∀ i, m i ≤ _mΩ) (h_le' : m1 ≤ _mΩ) (hm : Monotone m) :
    Indep (⨆ i, m i) m1 μ
-- Mathlib/Analysis/Complex/PhragmenLindelof.lean
/-- **Phragmen-Lindelöf principle** in a strip `U = {z : ℂ | a < re z < b}`.
Let `f : ℂ → E` be a function such that

* `f` is differentiable on `U` and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * exp(c * |im z|))` on `U` for some `c < π / (b - a)`;
* `‖f z‖` is bounded from above by a constant `C` on the boundary of `U`.

Then `‖f z‖` is bounded by the same constant on the closed strip
`{z : ℂ | a ≤ re z ≤ b}`. Moreover, it suffices to verify the second assumption
only for sufficiently large values of `|im z|`.
-/
theorem vertical_strip (hfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b))
    (hB : ∃ c < π / (b - a), ∃ B, f =O[comap (_root_.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)]
      fun z ↦ expR (B * expR (c * |z.im|)))
    (hle_a : ∀ z : ℂ, re z = a → ‖f z‖ ≤ C) (hle_b : ∀ z, re z = b → ‖f z‖ ≤ C) (hza : a ≤ re z)
    (hzb : re z ≤ b) : ‖f z‖ ≤ C
-- Mathlib/Algebra/Category/Grp/Basic.lean
@[to_additive (attr := simp)]
lemma coe_comp {X Y Z : Grp} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem toDual_inf [SemilatticeInf α] [OrderTop α] (s : Finset β) (f : β → α) :
    toDual (s.inf f) = s.sup (toDual ∘ f)
-- Mathlib/Probability/Kernel/Disintegration/Density.lean
lemma density_fst_univ (κ : Kernel α (γ × β)) [IsFiniteKernel κ] (a : α) :
    ∀ᵐ x ∂(fst κ a), density κ (fst κ) a x univ = 1
-- .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean
protected theorem Balanced.insertNew {path : Path α} (H : path.Balanced c n black 0) :
    ∃ n, (path.insertNew v).Balanced black n
-- Mathlib/Topology/Compactification/OnePoint.lean
theorem isClosed_iff_of_not_mem (h : ∞ ∉ s) :
    IsClosed s ↔ IsClosed ((↑) ⁻¹' s : Set X) ∧ IsCompact ((↑) ⁻¹' s : Set X)
-- Mathlib/Computability/TuringMachine.lean
theorem tr_eval_dom (k) (L : List (Γ k)) :
    (TM1.eval (tr M) (trInit k L)).Dom ↔ (TM2.eval M k L).Dom
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[simp]
theorem toAdd_prod (s : Finset ι) (f : ι → Multiplicative α) :
    toAdd (∏ i ∈ s, f i) = ∑ i ∈ s, toAdd (f i)
-- Mathlib/Topology/Order.lean
theorem map_nhds_induced_eq (a : α) : map f (@nhds α (induced f t) a) = 𝓝[range f] f a
-- Mathlib/Logic/Equiv/Basic.lean
/-- Given `φ : α → β → Sort*`, we have an equivalence between `∀ a b, φ a b` and `∀ b a, φ a b`.
This is `Function.swap` as an `Equiv`. -/
@[simps apply]
def piComm (φ : α → β → Sort*) : (∀ a b, φ a b) ≃ ∀ b a, φ a b
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem degree_linear_lt : degree (C a * X + C b) < 2
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
lemma Sigma.map'_eq {f : α → C} {g : β → C} [HasCoproduct f] [HasCoproduct g]
    {p p' : α → β} {q : ∀ (a : α), f a ⟶ g (p a)} {q' : ∀ (a : α), f a ⟶ g (p' a)}
    (hp : p = p') (hq : ∀ (a : α), q a ≫ eqToHom (hp ▸ rfl) = q' a) :
    Sigma.map' p q = Sigma.map' p' q'
-- Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean
lemma δ_L₃_f : S.δ ≫ S.L₃.f = 0
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem exists_cons_of_ne_nil : ∀ {l : List α}, l ≠ [] → ∃ b L, l = b :: L
-- Mathlib/RingTheory/Coprime/Lemmas.lean
theorem IsCoprime.pow_right (H : IsCoprime x y) : IsCoprime x (y ^ n)
-- .lake/packages/lean4/src/lean/Init/Data/List/BasicAux.lean
@[simp] theorem append_cancel_right_eq (as bs cs : List α) : (as ++ bs = cs ++ bs) = (as = cs)
-- Mathlib/CategoryTheory/Limits/Shapes/SingleObj.lean
/-- The limit of `J : SingleObj M ⥤ Type u` is equivalent to the fixed points of the
induced action on `J.obj (SingleObj.star M)`. -/
@[simps!]
noncomputable def Types.limitEquivFixedPoints :
    limit J ≃ MulAction.fixedPoints M (J.obj (SingleObj.star M))
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- If the equalizer of two morphisms is an epimorphism, then the two morphisms are equal. -/
theorem eq_of_epi_equalizer [HasEqualizer f g] [Epi (equalizer.ι f g)] : f = g
-- Mathlib/Algebra/Lie/Nilpotent.lean
theorem ucs_add (k l : ℕ) : N.ucs (k + l) = (N.ucs l).ucs k
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem emod_two_eq (x : Int) : x % 2 = 0 ∨ x % 2 = 1
-- Mathlib/Algebra/Module/LocalizedModule.lean
private theorem one_smul_aux (p : LocalizedModule S M) : (1 : T) • p = p
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
protected theorem mdifferentiable (h : M ≃ₘ^n⟮I, I'⟯ M') (hn : 1 ≤ n) : MDifferentiable I I' h
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- If the oriented angle between three points is `-π / 2`, the unoriented angle (reversed) is
`π / 2`. -/
theorem angle_rev_eq_pi_div_two_of_oangle_eq_neg_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(-π / 2)) : ∠ p₃ p₂ p₁ = π / 2
-- Mathlib/FieldTheory/NormalClosure.lean
lemma normal_iff_forall_map_eq' : Normal F K ↔ ∀ σ : L ≃ₐ[F] L, K.map ↑σ = K
-- Mathlib/Data/Ordmap/Ordset.lean
theorem valid_singleton {x : α} : Valid (singleton x : Ordnode α)
-- Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
theorem mfderiv_prod_right {x₀ : M} {y₀ : M'} :
    mfderiv I' (I.prod I') (fun y => (x₀, y)) y₀ =
      ContinuousLinearMap.inr 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀)
-- Mathlib/Analysis/SpecialFunctions/Arsinh.lean
@[simp]
theorem arsinh_lt_arsinh : arsinh x < arsinh y ↔ x < y
-- Mathlib/Data/Real/Hyperreal.lean
theorem ofSeq_lt_ofSeq {f g : ℕ → ℝ} : ofSeq f < ofSeq g ↔ ∀ᶠ n in hyperfilter ℕ, f n < g n
-- Mathlib/CategoryTheory/Iso.lean
theorem inv_comp_eq_id (g : X ⟶ Y) [IsIso g] {f : X ⟶ Y} : inv g ≫ f = 𝟙 Y ↔ f = g
-- Mathlib/Logic/Equiv/Basic.lean
/-- Product of two equivalences, in terms of `PProd`. If `α ≃ β` and `γ ≃ δ`, then
`PProd α γ ≃ PProd β δ`. -/
-- Porting note: in Lean 3 this had `@[congr]`
@[simps apply]
def pprodCongr (e₁ : α ≃ β) (e₂ : γ ≃ δ) : PProd α γ ≃ PProd β δ
-- Mathlib/RingTheory/PowerSeries/Inverse.lean
@[simp]
theorem Unit_of_divided_by_X_pow_order_zero : Unit_of_divided_by_X_pow_order (0 : k⟦X⟧) = 1
-- Mathlib/CategoryTheory/Conj.lean
@[simp]
theorem trans_conjAut {Z : C} (β : Y ≅ Z) (f : Aut X) :
    (α ≪≫ β).conjAut f = β.conjAut (α.conjAut f)
-- Mathlib/Data/Matrix/Block.lean
/-- `Matrix.blockDiagonal'` as a `RingHom`. -/
@[simps]
def blockDiagonal'RingHom [∀ i, DecidableEq (m' i)] [Fintype o] [∀ i, Fintype (m' i)]
    [NonAssocSemiring α] : (∀ i, Matrix (m' i) (m' i) α) →+* Matrix (Σi, m' i) (Σi, m' i) α
-- Mathlib/Combinatorics/SimpleGraph/Metric.lean
lemma edist_ne_top_iff_reachable : G.edist u v ≠ ⊤ ↔ G.Reachable u v
-- Mathlib/Data/Multiset/FinsetOps.lean
theorem le_ndunion_left {s} (t : Multiset α) (d : Nodup s) : s ≤ ndunion s t
-- Mathlib/Data/List/Permutation.lean
theorem length_foldr_permutationsAux2' (t : α) (ts : List α) (r L : List (List α)) (n)
    (H : ∀ l ∈ L, length l = n) :
    length (foldr (fun y r => (permutationsAux2 t ts r y id).2) r L) = n * length L + length r
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
@[simp]
theorem neg_apply (m : ι → M) : (-g) m = -g m
-- Mathlib/Algebra/Homology/ExactSequence.lean
/-- Functoriality maps for `ComposableArrows.sc'`. -/
@[simps]
def sc'Map {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ⟶ S₂.sc' h₂ i j k
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem mem_centralizer_iff {s : Set R} {z : R} : z ∈ centralizer s ↔ ∀ g ∈ s, g * z = z * g
-- Mathlib/Analysis/Convex/Side.lean
@[simp]
theorem _root_.AffineEquiv.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} (f : P ≃ᵃ[R] P') :
    (s.map ↑f).WSameSide (f x) (f y) ↔ s.WSameSide x y
-- Mathlib/SetTheory/Cardinal/ENat.lean
@[simp]
theorem toENat_lift {a : Cardinal.{v}} : toENat (lift.{u} a) = toENat a
-- Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
/-- Auxiliary lemma used as an argument to `CliffordAlgebra.changeForm` -/
theorem changeForm.add_proof : (B + B').toQuadraticMap = Q'' - Q
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem measure_lt_top_of_nhdsWithin (h : IsCompact s) (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝[s] x)) :
    μ s < ∞
-- Mathlib/CategoryTheory/Functor/KanExtension/Adjunction.lean
@[simp]
lemma ranAdjunction_counit : (L.ranAdjunction H).counit = L.ranCounit
-- Mathlib/SetTheory/Cardinal/ENat.lean
lemma toENat_injOn : InjOn toENat (Iic ℵ₀)
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
@[simp] theorem Bool.or_eq_true (a b : Bool) : ((a || b) = true) = (a = true ∨ b = true)
-- Mathlib/CategoryTheory/Sums/Associator.lean
@[simp]
theorem associator_map_inr {X Y : E} (f : inr X ⟶ inr Y) : (associator C D E).map f = f
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isBigO_refl_left : (fun x => f' x - f' x) =O[l] g'
-- Mathlib/Order/LiminfLimsup.lean
/-- Writing a liminf as a supremum of infimum, in a (possibly non-complete) conditionally complete
linear order. A reparametrization trick is needed to avoid taking the infimum of sets which are
not bounded below. -/
theorem HasBasis.liminf_eq_ite {v : Filter ι} {p : ι' → Prop} {s : ι' → Set ι}
    [Countable (Subtype p)] [Nonempty (Subtype p)] (hv : v.HasBasis p s) (f : ι → α) :
    liminf f v = if ∃ (j : Subtype p), s j = ∅ then sSup univ else
      if ∀ (j : Subtype p), ¬BddBelow (range (fun (i : s j) ↦ f i)) then sSup ∅
      else ⨆ (j : Subtype p), ⨅ (i : s (liminf_reparam f s p j)), f i
-- Mathlib/Topology/Constructions.lean
theorem isOpen_pi_iff {s : Set (∀ a, π a)} :
    IsOpen s ↔
      ∀ f, f ∈ s → ∃ (I : Finset ι) (u : ∀ a, Set (π a)),
        (∀ a, a ∈ I → IsOpen (u a) ∧ f a ∈ u a) ∧ (I : Set ι).pi u ⊆ s
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem c_eq_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
    φ P.c = φ P.a * (x * y + x * z + y * z)
-- Mathlib/Algebra/Quaternion.lean
@[simp]
theorem star_eq_self {a : ℍ[R]} : star a = a ↔ a = a.re
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
@[simp]
theorem finrank_ulift : finrank R (ULift M) = finrank R M
-- Mathlib/Data/QPF/Multivariate/Basic.lean
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : TypeVec n} (a : q.P.A) (f : q.P.B a ⟹ α) :
    ∀ i, supp (abs ⟨a, f⟩) i = f i '' univ
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
theorem natTrailingDegree_monomial_le : natTrailingDegree (monomial n a) ≤ n
-- Mathlib/Topology/Compactness/Lindelof.lean
theorem isLindelof_iff_countable [DiscreteTopology X] : IsLindelof s ↔ s.Countable
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
theorem Ideal.toIdeal_homogeneousCore_le : (I.homogeneousCore 𝒜).toIdeal ≤ I
-- Mathlib/Topology/MetricSpace/GromovHausdorffRealized.lean
private theorem HD_lipschitz_aux2 (f g : Cb X Y) :
    (⨆ y, ⨅ x, f (inl x, inr y)) ≤ (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g
-- Mathlib/CategoryTheory/Bicategory/Kan/HasKan.lean
@[simp]
theorem lanIsKan_desc [HasLeftKanExtension f g] (s : LeftExtension f g) :
    (lanIsKan f g).desc s = lanDesc s
-- Mathlib/Algebra/Order/Ring/WithTop.lean
@[simp, norm_cast] lemma coe_mul (a b : α) : (↑(a * b) : WithTop α) = a * b
-- Mathlib/Algebra/Polynomial/Eval.lean
/-- Polynomial evaluation commutes with `Finset.prod`
-/
theorem eval_prod {ι : Type*} (s : Finset ι) (p : ι → R[X]) (x : R) :
    eval x (∏ j ∈ s, p j) = ∏ j ∈ s, eval x (p j)
-- Mathlib/Topology/MetricSpace/MetricSeparated.lean
theorem comm : IsMetricSeparated s t ↔ IsMetricSeparated t s
-- Mathlib/GroupTheory/Perm/Basic.lean
@[simp]
theorem mul_refl (e : Perm α) : e * Equiv.refl α = e
-- Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
/-- A discrete valuation ring `R` is not a field. -/
theorem not_isField : ¬IsField R
-- Mathlib/ModelTheory/ElementaryMaps.lean
@[simp]
theorem map_constants (φ : M ↪ₑ[L] N) (c : L.Constants) : φ c = c
-- .lake/packages/lean4/src/lean/Init/Core.lean
@[simp] theorem Prod.map_fst (f : α → β) (g : γ → δ) (x) : (Prod.map f g x).1 = f x.1
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
@[simp]
lemma leftHomologyMap_add : leftHomologyMap (φ + φ') = leftHomologyMap φ + leftHomologyMap φ'
-- Mathlib/Data/Finset/Image.lean
@[simp]
theorem map_subset_map {s₁ s₂ : Finset α} : s₁.map f ⊆ s₂.map f ↔ s₁ ⊆ s₂
-- Mathlib/Data/Finset/Sups.lean
theorem sups_inter_subset_left : (s₁ ∩ s₂) ⊻ t ⊆ s₁ ⊻ t ∩ s₂ ⊻ t
-- Mathlib/CategoryTheory/Bicategory/Free.lean
@[simp]
theorem mk_left_unitor_inv : Quot.mk _ (Hom₂.left_unitor_inv f) = (λ_ f).inv
-- Mathlib/Data/Finset/Density.lean
lemma dens_sdiff (h : s ⊆ t) : dens (t \ s) = dens t - dens s
-- Mathlib/Geometry/Euclidean/Angle/Sphere.lean
/-- Given two points on a circle, the radius of that circle may be expressed explicitly as half
the distance between those two points divided by the cosine of the angle between the chord and
the radius at one of those points. -/
theorem dist_div_cos_oangle_center_div_two_eq_radius {s : Sphere P} {p₁ p₂ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) (h : p₁ ≠ p₂) :
    dist p₁ p₂ / Real.Angle.cos (∡ p₂ p₁ s.center) / 2 = s.radius
-- Mathlib/Dynamics/Ergodic/Ergodic.lean
/-- For a quasi ergodic map, sets that are almost invariant (rather than strictly invariant) are
still either almost empty or full. -/
theorem ae_empty_or_univ' (hf : QuasiErgodic f μ) (hs : MeasurableSet s) (hs' : f ⁻¹' s =ᵐ[μ] s) :
    s =ᵐ[μ] (∅ : Set α) ∨ s =ᵐ[μ] univ
-- Mathlib/CategoryTheory/Localization/HomEquiv.lean
@[reassoc]
lemma homMap_apply (G : D₁ ⥤ D₂) (e : Φ.functor ⋙ L₂ ≅ L₁ ⋙ G) (f : L₁.obj X ⟶ L₁.obj Y) :
    Φ.homMap L₁ L₂ f = e.hom.app X ≫ G.map f ≫ e.inv.app Y
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem toIcoMod_apply_left (a : α) : toIcoMod hp a a = a
-- Mathlib/MeasureTheory/Function/SimpleFuncDense.lean
theorem edist_approxOn_mono {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
    [SeparableSpace s] (x : β) {m n : ℕ} (h : m ≤ n) :
    edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist (approxOn f hf s y₀ h₀ m x) (f x)
-- Mathlib/Topology/MetricSpace/Basic.lean
@[simp] theorem nndist_toDual (a b : X) : nndist (toDual a) (toDual b) = nndist a b
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
lemma Measurable.exists [Countable ι] {p : ι → α → Prop} (hp : ∀ i, Measurable (p i)) :
    Measurable fun a ↦ ∃ i, p i a
-- Mathlib/Order/Concept.lean
@[simp]
theorem extentClosure_empty : extentClosure r ∅ = univ
-- Mathlib/Combinatorics/Young/SemistandardTableau.lean
@[simp]
theorem coe_copy {μ : YoungDiagram} (T : SemistandardYoungTableau μ) (entry' : ℕ → ℕ → ℕ)
    (h : entry' = T) : ⇑(T.copy entry' h) = entry'
-- Mathlib/Data/Real/EReal.lean
@[norm_cast]
theorem coe_ennreal_ne_one {x : ℝ≥0∞} : (x : EReal) ≠ 1 ↔ x ≠ 1
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem verts_sSup (s : Set G.Subgraph) : (sSup s).verts = ⋃ G' ∈ s, verts G'
-- Mathlib/Data/Multiset/Powerset.lean
theorem revzip_powersetAux' {l : List α} ⦃x⦄ (h : x ∈ revzip (powersetAux' l)) :
    x.1 + x.2 = ↑l
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem foldr_zero (f : α → β → β) (H b) : foldr f H b 0 = b
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
@[simp] theorem gcd_cons : gcd (x :: xs) = Nat.gcd x.natAbs (gcd xs)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/InverseDeriv.lean
theorem hasDerivWithinAt_arccos_Iic {x : ℝ} (h : x ≠ 1) :
    HasDerivWithinAt arccos (-(1 / √(1 - x ^ 2))) (Iic x) x
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp, norm_cast]
theorem coe_one : ((1 : s) : R) = 1
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
@[simp]
theorem toAffineMap_linear : f.toAffineMap.linear = f
-- Mathlib/Algebra/BigOperators/NatAntidiagonal.lean
@[to_additive]
theorem prod_antidiagonal_eq_prod_range_succ_mk {M : Type*} [CommMonoid M] (f : ℕ × ℕ → M)
    (n : ℕ) : ∏ ij ∈ antidiagonal n, f ij = ∏ k ∈ range n.succ, f (k, n - k)
-- Mathlib/Order/Interval/Set/WithBotTop.lean
theorem image_coe_Icc : (some : α → WithBot α) '' Icc a b = Icc (a : WithBot α) b
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsLocalMin.comp_continuousOn [TopologicalSpace δ] {s : Set δ} {g : δ → α} {b : δ}
    (hf : IsLocalMin f (g b)) (hg : ContinuousOn g s) (hb : b ∈ s) : IsLocalMinOn (f ∘ g) s b
-- Mathlib/Topology/Compactness/SigmaCompact.lean
theorem mem_diff_shiftr_find (x : X) : x ∈ K.shiftr (K.find x + 1) \ K.shiftr (K.find x)
-- Mathlib/Order/UpperLower/Basic.lean
lemma IsUpperSet.erase (hs : IsUpperSet s) (has : ∀ b ∈ s, b ≤ a → b = a) : IsUpperSet (s \ {a})
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
lemma tendsto_atTop_r (i : α) : Tendsto (r i) atTop atTop
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem nfp_le_fp {f} (H : Monotone f) {a b} (ab : a ≤ b) (h : f b ≤ b) : nfp f a ≤ b
-- Mathlib/Data/Option/Basic.lean
theorem iget_mem [Inhabited α] : ∀ {o : Option α}, isSome o → o.iget ∈ o
-- Mathlib/Topology/Sober.lean
protected theorem specializes (h : IsGenericPoint x S) (h' : y ∈ S) : x ⤳ y
-- Mathlib/Data/List/Sigma.lean
theorem dlookup_isSome {a : α} : ∀ {l : List (Sigma β)}, (dlookup a l).isSome ↔ a ∈ l.keys
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem le_comap_of_map_le : I.map f ≤ K → I ≤ K.comap f
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
theorem IsColimit.hom_ext {t : PushoutCocone f g} (ht : IsColimit t) {W : C} {k l : t.pt ⟶ W}
    (h₀ : inl t ≫ k = inl t ≫ l) (h₁ : inr t ≫ k = inr t ≫ l) : k = l
-- Mathlib/Order/Interval/Set/Monotone.lean
protected theorem AntitoneOn.Icc (hf : AntitoneOn f s) (hg : MonotoneOn g s) :
    MonotoneOn (fun x => Icc (f x) (g x)) s
-- Mathlib/Algebra/Algebra/Equiv.lean
theorem coe_algHom_ofAlgHom (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁ h₂) :
    ↑(ofAlgHom f g h₁ h₂) = f
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem zero_fuzzy_neg_iff {x : PGame} : 0 ‖ -x ↔ 0 ‖ x
-- Mathlib/CategoryTheory/Filtered/Basic.lean
/-- If Cᵒᵖ is cofiltered or empty, then C is filtered or empty. -/
lemma isFilteredOrEmpty_of_isCofilteredOrEmpty_op [IsCofilteredOrEmpty Cᵒᵖ] : IsFilteredOrEmpty C
-- Mathlib/Topology/Maps/Proper/Basic.lean
/-- The preimage of a compact set by a proper map is again compact. See also
`isProperMap_iff_isCompact_preimage` which proves that this property completely characterizes
proper map when the codomain is compactly generated and Hausdorff. -/
lemma IsProperMap.isCompact_preimage (h : IsProperMap f) {K : Set Y} (hK : IsCompact K) :
    IsCompact (f ⁻¹' K)
-- Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean
@[simp]
theorem braiding_naturality {X₁ X₂ Y₁ Y₂ : ModuleCat.{u} R} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
    (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f)
-- Mathlib/Logic/Encodable/Basic.lean
theorem Subtype.encode_eq (a : Subtype P) : encode a = encode a.val
-- Mathlib/Algebra/Algebra/Subalgebra/Pointwise.lean
@[simp]
theorem pointwise_smul_toSubmodule (m : R') (S : Subalgebra R A) :
    Subalgebra.toSubmodule (m • S) = m • Subalgebra.toSubmodule S
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
theorem Matrix.toLin_apply (M : Matrix m n R) (v : M₁) :
    Matrix.toLin v₁ v₂ M v = ∑ j, (M *ᵥ v₁.repr v) j • v₂ j
-- Mathlib/Data/Matrix/Block.lean
@[simp]
theorem blockDiagonal_pow [DecidableEq m] [Fintype o] [Fintype m] [Semiring α]
    (M : o → Matrix m m α) (n : ℕ) : blockDiagonal (M ^ n) = blockDiagonal M ^ n
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
/-- A variant of `app_inv_app` that gives an `eqToHom` instead of `homOfLe`. -/
@[reassoc]
theorem app_inv_app' (U : Opens Y) (hU : (U : Set Y) ⊆ Set.range f.base) :
    f.c.app (op U) ≫ invApp f ((Opens.map f.base).obj U) =
      Y.presheaf.map
        (eqToHom <|
            le_antisymm (Set.image_preimage_subset f.base U.1) <|
              (Set.image_preimage_eq_inter_range (f := f.base) (t := U.1)).symm ▸
                Set.subset_inter_iff.mpr ⟨fun _ h => h, hU⟩).op
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
theorem lipschitzWith_equiv [∀ i, PseudoEMetricSpace (β i)] :
    LipschitzWith 1 (WithLp.equiv p (∀ i, β i))