ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Fin/Tuple/Basic.lean
@[simp]
theorem append_right {α : Type*} (u : Fin m → α) (v : Fin n → α) (i : Fin n) :
    append u v (natAdd m i) = v i
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
@[simp]
theorem zero_fst : (0 : WithLp p (α × β)).fst = 0
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
theorem zero_mem (h : (p : Set M).Nonempty) : (0 : M) ∈ p
-- Mathlib/Order/UpperLower/Basic.lean
protected theorem compl_inf (s t : LowerSet α) : (s ⊓ t).compl = s.compl ⊓ t.compl
-- Mathlib/RingTheory/RingHom/Integral.lean
theorem isIntegral_stableUnderComposition : StableUnderComposition fun f => f.IsIntegral
-- Mathlib/Data/Int/Defs.lean
/-- If two integers are congruent to a sufficiently large modulus, they are equal. -/
lemma eq_of_mod_eq_of_natAbs_sub_lt_natAbs {a b c : ℤ} (h1 : a % b = c)
    (h2 : natAbs (a - c) < natAbs b) : a = c
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
/-- The square
```
  Y --inr--> X ⊞ Y
  |            |
  0           fst
  |            |
  v            v
  0 ---0-----> X
```
is a pushout square.
-/
theorem inr_fst (X Y : C) [HasBinaryBiproduct X Y] :
    IsPushout biprod.inr (0 : Y ⟶ 0) biprod.fst (0 : 0 ⟶ X)
-- Mathlib/Data/Set/Basic.lean
theorem setOf_subset {p : α → Prop} {s : Set α} : setOf p ⊆ s ↔ ∀ x, p x → x ∈ s
-- Mathlib/Data/Vector/Basic.lean
@[simp]
theorem inductionOn_nil {C : ∀ {n : ℕ}, Vector α n → Sort*}
    (nil : C nil) (cons : ∀ {n : ℕ} {x : α} {w : Vector α n}, C w → C (x ::ᵥ w)) :
    Vector.nil.inductionOn nil cons = nil
-- Mathlib/Data/Complex/Basic.lean
theorem normSq_zero : normSq 0 = 0
-- Mathlib/Algebra/Order/Floor.lean
theorem floor_lt (ha : 0 ≤ a) : ⌊a⌋₊ < n ↔ a < n
-- Mathlib/Data/Finset/Basic.lean
theorem Nonempty.forall_const {s : Finset α} (h : s.Nonempty) {p : Prop} : (∀ x ∈ s, p) ↔ p
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem monic_zero_iff_subsingleton : Monic (0 : R[X]) ↔ Subsingleton R
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem enumOrd_zero : enumOrd S 0 = sInf S
-- Mathlib/Logic/Function/Basic.lean
lemma not_injective : Injective Not
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem ball_disjoint (h : ε₁ + ε₂ ≤ edist x y) : Disjoint (ball x ε₁) (ball y ε₂)
-- Mathlib/Geometry/Euclidean/Triangle.lean
/-- **Stewart's Theorem**. -/
theorem dist_sq_mul_dist_add_dist_sq_mul_dist (a b c p : P) (h : ∠ b p c = π) :
    dist a b ^ 2 * dist c p + dist a c ^ 2 * dist b p =
    dist b c * (dist a p ^ 2 + dist b p * dist c p)
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem coe_addEquiv_refl : (RingEquiv.refl R : R ≃+ R) = AddEquiv.refl R
-- Mathlib/Data/ENNReal/Inv.lean
theorem monotone_zpow {x : ℝ≥0∞} (hx : 1 ≤ x) : Monotone ((x ^ ·) : ℤ → ℝ≥0∞)
-- Mathlib/Data/Seq/Seq.lean
@[simp]
theorem get?_nil (n : ℕ) : (@nil α).get? n = none
-- Mathlib/ModelTheory/Syntax.lean
@[simp]
theorem relabel_all (g : α → β ⊕ (Fin n)) {k} (φ : L.BoundedFormula α (k + 1)) :
    φ.all.relabel g = (φ.relabel g).all
-- Mathlib/Topology/PartialHomeomorph.lean
theorem restr_source_inter (s : Set X) : e.restr (e.source ∩ s) = e.restr s
-- Mathlib/Order/SuccPred/Basic.lean
theorem Ioc_succ_right (h : a < succ b) : Ioc a (succ b) = insert (succ b) (Ioc a b)
-- Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
/-- If a `n`-th cyclotomic extension of `ℚ` contains a primitive `l`-th root of unity, then
`l ∣ 2 * n`. -/
theorem dvd_of_isCyclotomicExtension [NumberField K] [IsCyclotomicExtension {n} ℚ K] {ζ : K}
    {l : ℕ} (hζ : IsPrimitiveRoot ζ l) (hl : l ≠ 0) : l ∣ 2 * n
-- Mathlib/Data/Sum/Order.lean
@[simp]
theorem sumDualDistrib_inr : sumDualDistrib α β (toDual (inr b)) = inr (toDual b)
-- Mathlib/Combinatorics/SetFamily/Shatter.lean
protected lemma Shatters.nonempty (h : 𝒜.Shatters s) : 𝒜.Nonempty
-- Mathlib/Data/Nat/Cast/Basic.lean
theorem map_ofNat' {A} [AddMonoidWithOne A] [FunLike F A B] [AddMonoidHomClass F A B]
    (f : F) (h : f 1 = 1) (n : ℕ) [n.AtLeastTwo] : f (OfNat.ofNat n) = OfNat.ofNat n
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
@[simp]
theorem isBigO_norm_left : (fun x => ‖f' x‖) =O[l] g ↔ f' =O[l] g
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[mono]
theorem starClosure_mono : Monotone (starClosure (R := R) (A := A))
-- Mathlib/LinearAlgebra/Prod.lean
theorem map_coprod_prod (f : M →ₗ[R] M₃) (g : M₂ →ₗ[R] M₃) (p : Submodule R M)
    (q : Submodule R M₂) : map (coprod f g) (p.prod q) = map f p ⊔ map g q
-- Mathlib/Geometry/Manifold/ContMDiff/Atlas.lean
theorem contMDiffAt_extChartAt : ContMDiffAt I 𝓘(𝕜, E) n (extChartAt I x) x
-- Mathlib/Order/BoundedOrder.lean
@[simp]
theorem isMin_iff_eq_bot : IsMin a ↔ a = ⊥
-- Mathlib/Data/Rel.lean
theorem dom_mono {r s : Rel α β} (h : r ≤ s) : dom r ⊆ dom s
-- Mathlib/GroupTheory/HNNExtension.lean
@[simp]
theorem prod_empty : (empty : NormalWord d).prod φ = 1
-- Mathlib/RingTheory/Idempotents.lean
lemma OrthogonalIdempotents.option [Fintype I] (x)
    (hx : IsIdempotentElem x) (hx₁ : x * ∑ i, e i = 0) (hx₂ : (∑ i, e i) * x = 0) :
    OrthogonalIdempotents (Option.elim · x e)
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem Fintype.linearIndependent_iff [Fintype ι] :
    LinearIndependent R v ↔ ∀ g : ι → R, ∑ i, g i • v i = 0 → ∀ i, g i = 0
-- Mathlib/CategoryTheory/Monad/Limits.lean
/-- If `C` has limits then any coreflective subcategory has limits. -/
theorem hasLimits_of_coreflective (R : D ⥤ C) [Coreflective R] [HasLimitsOfSize.{v, u} C] :
    HasLimitsOfSize.{v, u} D
-- Mathlib/Order/CompleteLattice.lean
theorem sInf_image' {s : Set β} {f : β → α} : sInf (f '' s) = ⨅ a : s, f a
-- Mathlib/Computability/Primrec.lean
theorem of_eq {f g : α → β → σ} (hg : Primrec₂ f) (H : ∀ a b, f a b = g a b) : Primrec₂ g
-- Mathlib/Data/List/Rotate.lean
theorem get?_rotate {l : List α} {n m : ℕ} (hml : m < l.length) :
    (l.rotate n).get? m = l.get? ((m + n) % l.length)
-- Mathlib/Data/Fin/Basic.lean
@[simp, norm_cast] lemma coe_succAboveEmb (p : Fin (n + 1)) : p.succAboveEmb = p.succAbove
-- Mathlib/Logic/Equiv/Defs.lean
theorem eq_symm_apply {α β} (e : α ≃ β) {x y} : y = e.symm x ↔ e y = x
-- Mathlib/Order/Heyting/Regular.lean
theorem isRegular_top : IsRegular (⊤ : α)
-- Mathlib/Data/Nat/Prime/Defs.lean
theorem Prime.coprime_iff_not_dvd {p n : ℕ} (pp : Prime p) : Coprime p n ↔ ¬p ∣ n
-- Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean
/-- Polynomial functions in are dense in `C(s, ℝ)` when `s` is compact.

See `polynomialFunctions_closure_eq_top` for the special case `s = Set.Icc a b` which does not use
the full Stone-Weierstrass theorem. Of course, that version could be used to prove this one as
well. -/
theorem polynomialFunctions.topologicalClosure (s : Set ℝ)
    [CompactSpace s] : (polynomialFunctions s).topologicalClosure = ⊤
-- Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean
private lemma pairMap_ne_self (t : Finset σ × σ) : pairMap σ t ≠ t
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod
-- Mathlib/Topology/Compactness/LocallyCompact.lean
theorem local_compact_nhds [LocallyCompactSpace X] {x : X} {n : Set X} (h : n ∈ 𝓝 x) :
    ∃ s ∈ 𝓝 x, s ⊆ n ∧ IsCompact s
-- Mathlib/CategoryTheory/Limits/IsLimit.lean
@[reassoc]
theorem lift_comp_conePointsIsoOfNatIso_hom {F G : J ⥤ C} {r s : Cone F} {t : Cone G}
    (P : IsLimit s) (Q : IsLimit t) (w : F ≅ G) :
    P.lift r ≫ (conePointsIsoOfNatIso P Q w).hom = Q.map r w.hom
-- Mathlib/Algebra/Module/Submodule/Ker.lean
theorem ker_eq_bot_of_inverse {τ₂₁ : R₂ →+* R} [RingHomInvPair τ₁₂ τ₂₁] {f : M →ₛₗ[τ₁₂] M₂}
    {g : M₂ →ₛₗ[τ₂₁] M} (h : (g.comp f : M →ₗ[R] M) = id) : ker f = ⊥
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem nontrivial_of_einfsep_ne_top (hs : s.einfsep ≠ ∞) : s.Nontrivial
-- Mathlib/Analysis/Normed/Module/FiniteDimension.lean
theorem isOpen_setOf_nat_le_rank (n : ℕ) :
    IsOpen { f : E →L[𝕜] F | ↑n ≤ (f : E →ₗ[𝕜] F).rank }
-- Mathlib/Analysis/Normed/Operator/ContinuousLinearMap.lean
theorem continuous_of_linear_of_bound {f : E → G} (h_add : ∀ x y, f (x + y) = f x + f y)
    (h_smul : ∀ (c : 𝕜) (x), f (c • x) = c • f x) {C : ℝ} (h_bound : ∀ x, ‖f x‖ ≤ C * ‖x‖) :
    Continuous f
-- .lake/packages/batteries/Batteries/Data/Array/Lemmas.lean
theorem size_zip (as : Array α) (bs : Array β) :
    (as.zip bs).size = min as.size bs.size
-- Mathlib/MeasureTheory/Function/UniformIntegrable.lean
theorem eLpNorm_sub_le_of_dist_bdd (μ : Measure α)
    {p : ℝ≥0∞} (hp' : p ≠ ∞) {s : Set α} (hs : MeasurableSet[m] s)
    {f g : α → β} {c : ℝ} (hc : 0 ≤ c) (hf : ∀ x ∈ s, dist (f x) (g x) ≤ c) :
    eLpNorm (s.indicator (f - g)) p μ ≤ ENNReal.ofReal c * μ s ^ (1 / p.toReal)
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem linearMapAt_apply (e : Pretrivialization F (π F E)) [e.IsLinear R] {b : B} (y : E b) :
    e.linearMapAt R b y = if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0
-- Mathlib/Probability/Kernel/WithDensity.lean
theorem integral_withDensity {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    {f : β → E} [IsSFiniteKernel κ] {a : α} {g : α → β → ℝ≥0}
    (hg : Measurable (Function.uncurry g)) :
    ∫ b, f b ∂withDensity κ (fun a b => g a b) a = ∫ b, g a b • f b ∂κ a
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem isOpen_extend_preimage' {s : Set E} (hs : IsOpen s) :
    IsOpen ((f.extend I).source ∩ f.extend I ⁻¹' s)
-- Mathlib/Algebra/Group/UniqueProds.lean
/-- Let `G` be a Type with multiplication. `TwoUniqueProds G` asserts that any two non-empty
finite subsets of `G`, at least one of which is not a singleton, possesses at least two pairs
of elements satisfying the `UniqueMul` property. -/
class TwoUniqueProds (G) [Mul G] : Prop where
/-- For `A B` two finite sets whose product has cardinality at least 2,
  we can find at least two unique pairs. -/
  uniqueMul_of_one_lt_card : ∀ {A B : Finset G}, 1 < A.card * B.card →
    ∃ p1 ∈ A ×ˢ B, ∃ p2 ∈ A ×ˢ B, p1 ≠ p2 ∧ UniqueMul A B p1.1 p1.2 ∧ UniqueMul A B p2.1 p2.2
-- Mathlib/RingTheory/WittVector/Truncated.lean
theorem truncateFun_natCast (m : ℕ) : truncateFun n (m : 𝕎 R) = m
-- Mathlib/Data/Fin/Tuple/Basic.lean
theorem le_cons [∀ i, Preorder (α i)] {x : α 0} {q : ∀ i, α i} {p : ∀ i : Fin n, α i.succ} :
    q ≤ cons x p ↔ q 0 ≤ x ∧ tail q ≤ p
-- Mathlib/Topology/UniformSpace/Compact.lean
theorem Continuous.uniformContinuous_of_tendsto_cocompact {f : α → β} {x : β}
    (h_cont : Continuous f) (hx : Tendsto f (cocompact α) (𝓝 x)) : UniformContinuous f
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem compl_map (f : α ≃o β) (s : UpperSet α) : (map f s).compl = LowerSet.map f s.compl
-- Mathlib/Algebra/Polynomial/Expand.lean
theorem expand_eq_C {p : ℕ} (hp : 0 < p) {f : R[X]} {r : R} : expand R p f = C r ↔ f = C r
-- Mathlib/Algebra/Order/Group/Unbundled/Abs.lean
@[to_additive] lemma mabs_ne_one : |a|ₘ ≠ 1 ↔ a ≠ 1
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma equation_smul (P : Fin 3 → R) {u : R} (hu : IsUnit u) : W'.Equation (u • P) ↔ W'.Equation P
-- Mathlib/Algebra/MonoidAlgebra/Degree.lean
theorem sup_support_pow_le (degb0 : degb 0 ≤ 0) (degbm : ∀ a b, degb (a + b) ≤ degb a + degb b)
    (n : ℕ) (f : R[A]) : (f ^ n).support.sup degb ≤ n • f.support.sup degb
-- Mathlib/Data/List/Sublists.lean
theorem sublists'Aux_eq_map (a : α) (r₁ : List (List α)) : ∀ (r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem card_eq_nat {o} {n : ℕ} : card o = n ↔ o = n
-- Mathlib/Topology/Order/OrderClosed.lean
@[simp]
theorem closure_le_eq [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) :
    closure { b | f b ≤ g b } = { b | f b ≤ g b }
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem mul_lt_mul_of_le_of_lt (hac : a ≤ c) (hbd : b < d) (hc : 0 < c) :
    a * b < c * d
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem mk_apply : (mk s x : ∀ i, β i) i = if H : i ∈ s then x ⟨i, H⟩ else 0
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem NullMeasurableSet.subtype_coe {t : Set s} (hs : NullMeasurableSet s μ)
    (ht : NullMeasurableSet t (μ.comap Subtype.val)) : NullMeasurableSet (((↑) : s → α) '' t) μ
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
@[simp]
theorem coe_top : ((⊤ : NonUnitalSubring R) : Set R) = Set.univ
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem min_le_right (a b : Int) : min a b ≤ b
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atBot_of_add_bdd_below_left' (C) (hC : ∀ᶠ x in l, C ≤ f x)
    (h : Tendsto (fun x => f x + g x) l atBot) : Tendsto g l atBot
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem derivWithin_const (hxs : UniqueDiffWithinAt 𝕜 s x) : derivWithin (fun _ => c) s x = 0
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem comapₗ_eq_comap {β} [MeasurableSpace α] {_mβ : MeasurableSpace β} (f : α → β)
    (hfi : Injective f) (hf : ∀ s, MeasurableSet s → MeasurableSet (f '' s)) (μ : Measure β)
    (hs : MeasurableSet s) : comapₗ f μ s = comap f μ s
-- Mathlib/Algebra/Module/Submodule/Range.lean
theorem range_eq_map [RingHomSurjective τ₁₂] (f : F) : range f = map f ⊤
-- Mathlib/Topology/Homeomorph.lean
@[simp] lemma toHomeomorph_refl :
  (Equiv.refl X).toHomeomorph (fun _s ↦ Iff.rfl) = Homeomorph.refl _
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
/-- The product measure of the product of two sets is the product of their measures. Note that we
do not need the sets to be measurable. -/
@[simp]
theorem prod_prod (s : Set α) (t : Set β) : μ.prod ν (s ×ˢ t) = μ s * ν t
-- Mathlib/Algebra/Ring/Hom/Defs.lean
@[simp]
theorem toAddMonoidHom_eq_coe (f : α →+* β) : f.toAddMonoidHom = f
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem add_le_add_left {n m : Nat} (h : n ≤ m) (k : Nat) : k + n ≤ k + m
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem restrict_not_measurable {i : Set α} (hi : ¬MeasurableSet i) : v.restrict i = 0
-- Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
/-- If a function is polynomial on a set `s`, so is its Fréchet derivative. -/
theorem CPolynomialOn.fderiv (h : CPolynomialOn 𝕜 f s) :
    CPolynomialOn 𝕜 (fderiv 𝕜 f) s
-- Mathlib/Control/LawfulFix.lean
theorem continuous_curry : Continuous <| monotoneCurry α β γ
-- Mathlib/FieldTheory/PrimitiveElement.lean
theorem primitive_element_inf_aux_exists_c (f g : F[X]) :
    ∃ c : F, ∀ α' ∈ (f.map ϕ).roots, ∀ β' ∈ (g.map ϕ).roots, -(α' - α) / (β' - β) ≠ ϕ c
-- Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean
/-- Obvious triangles `X ⟶ 0 ⟶ X⟦1⟧ ⟶ X⟦1⟧` are distinguished -/
lemma contractible_distinguished₂ (X : C) :
    Triangle.mk (0 : X ⟶ 0) 0 (𝟙 (X⟦1⟧)) ∈ distTriang C
-- Mathlib/LinearAlgebra/Matrix/Adjugate.lean
theorem cramer_reindex (e : m ≃ n) (A : Matrix m m α) (b : n → α) :
    cramer (reindex e e A) b = cramer A (b ∘ e) ∘ e.symm
-- Mathlib/CategoryTheory/Sites/Coherent/ExtensiveSheaves.lean
/-- A presieve is *extensive* if it is finite and its arrows induce an isomorphism from the
coproduct to the target. -/
class Presieve.Extensive {X : C} (R : Presieve X) : Prop where
  /-- `R` consists of a finite collection of arrows that together induce an isomorphism from the
  coproduct of their sources. -/
  arrows_nonempty_isColimit : ∃ (α : Type) (_ : Finite α) (Z : α → C) (π : (a : α) → (Z a ⟶ X)),
    R = Presieve.ofArrows Z π ∧ Nonempty (IsColimit (Cofan.mk X π))
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_eq_mul_of_mem {s : Finset α} {f : α → β} (a b : α) (ha : a ∈ s) (hb : b ∈ s)
    (hn : a ≠ b) (h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1) : ∏ x ∈ s, f x = f a * f b
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_equiv_eq_zero_iff_lift_ne : #(α ≃ β') = 0 ↔ lift.{v} #α ≠ lift.{u} #β'
-- Mathlib/Data/List/Permutation.lean
theorem mem_permutationsAux2' {t : α} {ts : List α} {ys : List α} {l : List α} :
    l ∈ (permutationsAux2 t ts [] ys id).2 ↔
      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l = l₁ ++ t :: l₂ ++ ts
-- Mathlib/GroupTheory/OrderOfElement.lean
/-- If `S` is a nonempty subset of a finite group `G`, then `S ^ |G|` is a subgroup -/
@[to_additive (attr := simps!) smulCardAddSubgroup
  "If `S` is a nonempty subset of a finite add group `G`, then `|G| • S` is a subgroup"]
def powCardSubgroup {G : Type*} [Group G] [Fintype G] (S : Set G) (hS : S.Nonempty) : Subgroup G
-- Mathlib/Topology/ExtremallyDisconnected.lean
theorem StoneCech.projective [DiscreteTopology X] : CompactT2.Projective (StoneCech X)
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem neg_le_sub_left_of_le_add {a b c : Int} (h : c ≤ a + b) : -a ≤ b - c
-- Mathlib/Probability/Martingale/Upcrossing.lean
theorem exists_upperCrossingTime_eq (f : ℕ → Ω → ℝ) (N : ℕ) (ω : Ω) (hab : a < b) :
    ∃ n, upperCrossingTime a b f N n ω = N
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
theorem MeasurableSet.induction_on_open [TopologicalSpace α] [MeasurableSpace α] [BorelSpace α]
    {C : Set α → Prop} (h_open : ∀ U, IsOpen U → C U)
    (h_compl : ∀ t, MeasurableSet t → C t → C tᶜ)
    (h_union :
      ∀ f : ℕ → Set α,
        Pairwise (Disjoint on f) → (∀ i, MeasurableSet (f i)) → (∀ i, C (f i)) → C (⋃ i, f i)) :
    ∀ ⦃t⦄, MeasurableSet t → C t
-- Mathlib/Combinatorics/Enumerative/Composition.lean
@[simp]
theorem boundary_last : c.boundary (Fin.last c.length) = Fin.last n
-- Mathlib/Algebra/Group/Action/Defs.lean
/-- A typeclass mixin saying that two additive actions on the same space commute. -/
class VAddCommClass (M N α : Type*) [VAdd M α] [VAdd N α] : Prop where
  /-- `+ᵥ` is left commutative -/
  vadd_comm : ∀ (m : M) (n : N) (a : α), m +ᵥ (n +ᵥ a) = n +ᵥ (m +ᵥ a)
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem uniqueDiffOn_Ico (a b : ℝ) : UniqueDiffOn ℝ (Ico a b)
-- Mathlib/Order/Birkhoff.lean
lemma supIrredLowerSet_surjective : Surjective (supIrredLowerSet (α := α))
-- Mathlib/Data/Nat/Factors.lean
theorem primeFactorsList_chain_2 (n) : List.Chain (· ≤ ·) 2 (primeFactorsList n)
-- Mathlib/Data/List/Basic.lean
theorem indexOf_get [DecidableEq α] {a : α} {l : List α} (h) : get l ⟨indexOf a l, h⟩ = a
-- Mathlib/Topology/ContinuousOn.lean
theorem nhdsWithin_eq_map_subtype_coe {s : Set α} {a : α} (h : a ∈ s) :
    𝓝[s] a = map ((↑) : s → α) (𝓝 ⟨a, h⟩)
-- Mathlib/ModelTheory/Satisfiability.lean
theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ᵇ φ) (M : Type*)
    [L.Structure M] [M ⊨ T] [Nonempty M] : M ⊨ φ
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
lemma Measure.MutuallySingular.withDensity {ν : Measure α} {f : α → ℝ≥0∞} (h : μ ⟂ₘ ν) :
    μ.withDensity f ⟂ₘ ν
-- Mathlib/MeasureTheory/PiSystem.lean
theorem isPiSystem_Iic : IsPiSystem (range Iic : Set (Set α))
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem fst_comp_quotientInfEquivQuotientProd (I J : Ideal R) (coprime : IsCoprime I J) :
    (RingHom.fst _ _).comp
        (quotientInfEquivQuotientProd I J coprime : R ⧸ I ⊓ J →+* (R ⧸ I) × R ⧸ J) =
      Ideal.Quotient.factor (I ⊓ J) I inf_le_left
-- Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
theorem unit_mul_pow_congr_unit {ϖ : R} (hirr : Irreducible ϖ) (u v : Rˣ) (m n : ℕ)
    (h : ↑u * ϖ ^ m = v * ϖ ^ n) : u = v
-- Mathlib/RingTheory/AlgebraicIndependent.lean
@[nontriviality]
theorem algebraicIndependent_of_subsingleton [Subsingleton R] : AlgebraicIndependent R x
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
theorem monomial_zero_left (a : R) : monomial 0 a = C a
-- Mathlib/RingTheory/Jacobson.lean
theorem isJacobson_polynomial_of_isJacobson (hR : IsJacobson R) : IsJacobson R[X]
-- Mathlib/Analysis/Calculus/Deriv/Star.lean
protected theorem derivWithin.star (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (fun y => star (f y)) s x = star (derivWithin f s x)
-- Mathlib/Computability/Primrec.lean
theorem snd {α β} [Primcodable α] [Primcodable β] : Primrec (@Prod.snd α β)
-- Mathlib/Order/RelClasses.lean
theorem IsTotal.swap (r) [IsTotal α r] : IsTotal α (swap r)
-- Mathlib/Order/Filter/AtTopBot.lean
/-- The `atBot` filter for an open interval `Iio a` comes from the `atBot` filter in the ambient
order. -/
theorem atBot_Iio_eq [SemilatticeInf α] (a : α) : atBot = comap ((↑) : Iio a → α) atBot
-- Mathlib/Analysis/InnerProductSpace/Spectrum.lean
/-- A choice of orthonormal basis of eigenvectors for self-adjoint operator `T` on a
finite-dimensional inner product space `E`.

TODO Postcompose with a permutation so that these eigenvectors are listed in increasing order of
eigenvalue. -/
noncomputable irreducible_def eigenvectorBasis : OrthonormalBasis (Fin n) 𝕜 E
-- Mathlib/Data/Nat/Defs.lean
protected lemma eq_div_of_mul_eq_left (hc : c ≠ 0) (h : a * c = b) : a = b / c
-- Mathlib/Algebra/Homology/Single.lean
@[ext]
lemma to_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : K ⟶ (single V c j).obj A} (hfg : f.f j = g.f j) : f = g
-- Mathlib/Order/Monotone/Basic.lean
theorem strictAnti_nat_of_succ_lt {f : ℕ → α} (hf : ∀ n, f (n + 1) < f n) : StrictAnti f
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
/-- Introduction rule to prove that `b` is the supremum of `f`: it suffices to check that `b`
is larger than `f i` for all `i`, and that this is not the case of any `w<b`.
See `iSup_eq_of_forall_le_of_forall_lt_exists_gt` for a version in complete lattices. -/
theorem ciSup_eq_of_forall_le_of_forall_lt_exists_gt [Nonempty ι] {f : ι → α} (h₁ : ∀ i, f i ≤ b)
    (h₂ : ∀ w, w < b → ∃ i, w < f i) : ⨆ i : ι, f i = b
-- Mathlib/SetTheory/Game/PGame.lean
theorem lt_or_fuzzy_of_lf {x y : PGame} : x ⧏ y → x < y ∨ x ‖ y
-- Mathlib/Algebra/MonoidAlgebra/Degree.lean
theorem le_inf_support_multiset_prod (degt0 : 0 ≤ degt 0)
    (degtm : ∀ a b, degt a + degt b ≤ degt (a + b)) (m : Multiset R[A]) :
    (m.map fun f : R[A] => f.support.inf degt).sum ≤ m.prod.support.inf degt
-- Mathlib/Data/Setoid/Partition.lean
/-- The equivalence relation made from the equivalence classes of an equivalence
    relation r equals r. -/
theorem mkClasses_classes (r : Setoid α) : mkClasses r.classes classes_eqv_classes = r
-- Mathlib/Algebra/Lie/CartanSubalgebra.lean
theorem isCartanSubalgebra_iff_isUcsLimit : H.IsCartanSubalgebra ↔ H.toLieSubmodule.IsUcsLimit
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem add_sub_add_left (k n m : Nat) : (k + n) - (k + m) = n - m
-- Mathlib/Algebra/RingQuot.lean
private irreducible_def npow (n : ℕ) : RingQuot r → RingQuot r
-- Mathlib/ModelTheory/Basic.lean
@[simp]
theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem aleph_mul_aleph (o₁ o₂ : Ordinal) : aleph o₁ * aleph o₂ = aleph (max o₁ o₂)
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem next_of_valid' (cs cs' : List Char) :
    next ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ = ⟨utf8Len cs + (cs'.headD default).utf8Size⟩
-- Mathlib/RingTheory/DedekindDomain/Dvr.lean
/-- The localization of a Dedekind domain is a Dedekind domain. -/
theorem IsLocalization.isDedekindDomain [IsDedekindDomain A] {M : Submonoid A} (hM : M ≤ A⁰)
    (Aₘ : Type*) [CommRing Aₘ] [IsDomain Aₘ] [Algebra A Aₘ] [IsLocalization M Aₘ] :
    IsDedekindDomain Aₘ
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
@[simp]
theorem BilinForm.toMatrix_apply (B : BilinForm R₂ M₂) (i j : n) :
    BilinForm.toMatrix b B i j = B (b i) (b j)
-- Mathlib/Algebra/Ring/Subring/Basic.lean
/-- The underlying set of a non-empty directed sSup of subrings is just a union of the subrings.
  Note that this fails without the directedness assumption (the union of two subrings is
  typically not a subring) -/
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Subring R} (hS : Directed (· ≤ ·) S)
    {x : R} : (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
protected theorem compl_bot : (⊥ : UpperSet α).compl = ⊥
-- Mathlib/MeasureTheory/Measure/Regular.lean
protected theorem smul [Regular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) : (x • μ).Regular
-- Mathlib/Data/List/OfFn.lean
/-- `Fin.sigma_eq_iff_eq_comp_cast` may be useful to work with the RHS of this expression. -/
theorem ofFn_inj' {m n : ℕ} {f : Fin m → α} {g : Fin n → α} :
    ofFn f = ofFn g ↔ (⟨m, f⟩ : Σn, Fin n → α) = ⟨n, g⟩