ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/Normed/Group/Quotient.lean
theorem Submodule.Quotient.norm_mk_le (m : M) : ‖(Submodule.Quotient.mk m : M ⧸ S)‖ ≤ ‖m‖
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean
@[simp]
theorem tmul_tensorLId_apply
    (Q₂ : QuadraticForm R M₂) (x : R ⊗[R] M₂) :
    Q₂ (TensorProduct.lid R M₂ x) = QuadraticForm.tmul (sq (R := R)) Q₂ x
-- Mathlib/Analysis/Complex/Basic.lean
@[simp]
theorem I_to_complex : IC = Complex.I
-- Mathlib/Topology/DenseEmbedding.lean
theorem extend_eq_of_tendsto [T2Space γ] {b : β} {c : γ} {f : α → γ}
    (hf : Tendsto f (comap i (𝓝 b)) (𝓝 c)) : di.extend f b = c
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
theorem le_nadd_right {a b c} (h : a ≤ b) : a ≤ b ♯ c
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem integral_iUnion_ae {ι : Type*} [Countable ι] {s : ι → Set X}
    (hm : ∀ i, NullMeasurableSet (s i) μ) (hd : Pairwise (AEDisjoint μ on s))
    (hfi : IntegrableOn f (⋃ i, s i) μ) : ∫ x in ⋃ n, s n, f x ∂μ = ∑' n, ∫ x in s n, f x ∂μ
-- Mathlib/FieldTheory/Adjoin.lean
theorem _root_.AlgHom.map_fieldRange {L : Type*} [Field L] [Algebra F L]
    (f : E →ₐ[F] K) (g : K →ₐ[F] L) : f.fieldRange.map g = (g.comp f).fieldRange
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iio_union_Ico' (h₁ : c ≤ b) : Iio b ∪ Ico c d = Iio (max b d)
-- Mathlib/Data/List/Nodup.lean
theorem Option.toList_nodup : ∀ o : Option α, o.toList.Nodup
-- Mathlib/ModelTheory/Satisfiability.lean
/-- The Łoś–Vaught Test : a criterion for categorical theories to be complete. -/
theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
    (h2 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) (hS : T.IsSatisfiable)
    (hT : ∀ M : Theory.ModelType.{u, v, max u v} T, Infinite M) : T.IsComplete
-- Mathlib/Order/Filter/Basic.lean
@[simp] theorem eventually_true (f : Filter α) : ∀ᶠ _ in f, True
-- Mathlib/Algebra/Category/ModuleCat/Presheaf/Sheafify.lean
lemma isCompatible_map_smul_aux {Y Z : C} (f : Y ⟶ X) (g : Z ⟶ Y)
    (r₀ : R₀.obj (Opposite.op Y)) (r₀' : R₀.obj (Opposite.op Z))
    (m₀ : M₀.presheaf.obj (Opposite.op Y)) (m₀' : M₀.presheaf.obj (Opposite.op Z))
    (hr₀ : α.app _ r₀ = R.map f.op r) (hr₀' : α.app _ r₀' = R.map (f.op ≫ g.op) r)
    (hm₀ : φ.app _ m₀ = A.map f.op m) (hm₀' : φ.app _ m₀' = A.map (f.op ≫ g.op) m) :
    φ.app _ (M₀.presheaf.map g.op (r₀ • m₀)) = φ.app _ (r₀' • m₀')
-- Mathlib/GroupTheory/Coxeter/Length.lean
theorem isRightDescent_iff {w : W} {i : B} :
    cs.IsRightDescent w i ↔ ℓ (w * s i) + 1 = ℓ w
-- Mathlib/MeasureTheory/Integral/Average.lean
theorem average_eq' (f : α → E) : ⨍ x, f x ∂μ = ∫ x, f x ∂(μ univ)⁻¹ • μ
-- Mathlib/Algebra/Lie/Normalizer.lean
theorem gc_top_lie_normalizer :
    GaloisConnection (fun N : LieSubmodule R L M => ⁅(⊤ : LieIdeal R L), N⁆) normalizer
-- Mathlib/Order/Chain.lean
/-- **Hausdorff's maximality principle**

There exists a maximal totally ordered set of `α`.
Note that we do not require `α` to be partially ordered by `r`. -/
theorem maxChain_spec : IsMaxChain r (maxChain r)
-- Mathlib/Data/Finset/Card.lean
lemma card_le_card_of_surjOn (f : α → β) (hf : Set.SurjOn f s t) : t.card ≤ s.card
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
@[simp]
lemma polyCharpolyAux_map_eq_charpoly [Module.Finite R M] [Module.Free R M]
    (x : L) :
    (polyCharpolyAux φ b bₘ).map (MvPolynomial.eval (b.repr x)) = (φ x).charpoly
-- Mathlib/Topology/Category/Stonean/Basic.lean
/--
A morphism in `Stonean` is an epi iff it is surjective.
-/
lemma epi_iff_surjective {X Y : Stonean} (f : X ⟶ Y) :
    Epi f ↔ Function.Surjective f
-- Mathlib/Order/Bounded.lean
theorem bounded_le_Iio [Preorder α] (a : α) : Bounded (· ≤ ·) (Iio a)
-- Mathlib/Data/Set/Function.lean
theorem _root_.Function.invFunOn_injOn_image [Nonempty α] (f : α → β) (s : Set α) :
    Set.InjOn (invFunOn f s) (f '' s)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/InverseDeriv.lean
theorem contDiffAt_arcsin_iff {x : ℝ} {n : ℕ∞} : ContDiffAt ℝ n arcsin x ↔ n = 0 ∨ x ≠ -1 ∧ x ≠ 1
-- Mathlib/NumberTheory/ArithmeticFunction.lean
theorem sigma_one_apply (n : ℕ) : σ 1 n = ∑ d ∈ divisors n, d
-- Mathlib/Data/Matrix/Notation.lean
@[simp]
theorem col_cons (x : α) (u : Fin m → α) :
    col ι (vecCons x u) = of (vecCons (fun _ => x) (col ι u))
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isBigOWith_refl (f : α → E) (l : Filter α) : IsBigOWith 1 l f f
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem HasFDerivWithinAt.union (hs : HasFDerivWithinAt f f' s x)
    (ht : HasFDerivWithinAt f f' t x) : HasFDerivWithinAt f f' (s ∪ t) x
-- Mathlib/MeasureTheory/PiSystem.lean
theorem generateFrom_piiUnionInter_singleton_left (s : ι → Set α) (S : Set ι) :
    generateFrom (piiUnionInter (fun k => {s k}) S) = generateFrom { t | ∃ k ∈ S, s k = t }
-- Mathlib/Topology/Order/LocalExtr.lean
nonrec theorem IsLocalMin.min (hf : IsLocalMin f a) (hg : IsLocalMin g a) :
    IsLocalMin (fun x => min (f x) (g x)) a
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
theorem edist_le_infEdist_add_ediam (hy : y ∈ s) : edist x y ≤ infEdist x s + diam s
-- Mathlib/Data/List/Duplicate.lean
theorem Duplicate.ne_singleton (h : x ∈+ l) (y : α) : l ≠ [y]
-- Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
theorem continuous_ofReal_cpow_const {y : ℂ} (hs : 0 < y.re) :
    Continuous (fun x => (x : ℂ) ^ y : ℝ → ℂ)
-- Mathlib/Order/Minimal.lean
@[simp]
theorem minimals_singleton : minimals r {a} = {a}
-- Mathlib/Topology/Order/IsLUB.lean
theorem isGLB_of_mem_nhds :
    ∀ {s : Set α} {a : α} {f : Filter α}, a ∈ lowerBounds s → s ∈ f → NeBot (f ⊓ 𝓝 a) → IsGLB s a
-- Mathlib/Order/InitialSeg.lean
theorem topLTTop {r : α → α → Prop} {s : β → β → Prop} {t : γ → γ → Prop} [IsWellOrder γ t]
    (f : PrincipalSeg r s) (g : PrincipalSeg s t) (h : PrincipalSeg r t) : t h.top g.top
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem comp_assoc (f : BoundedLatticeHom γ δ) (g : BoundedLatticeHom β γ)
    (h : BoundedLatticeHom α β) : (f.comp g).comp h = f.comp (g.comp h)
-- Mathlib/Order/Fin/Basic.lean
lemma val_strictMono : StrictMono (val : Fin n → ℕ)
-- Mathlib/AlgebraicGeometry/Scheme.lean
lemma Spec_carrier (R : CommRingCat.{u}) : (Spec R).carrier = PrimeSpectrum R
-- Mathlib/GroupTheory/GroupAction/Blocks.lean
/-- A subgroup containing the stabilizer of `a`
  is the stabilizer of the orbit of `a` under that subgroup -/
theorem stabilizer_orbit_eq {a : X} {H : Subgroup G} (hH : stabilizer G a ≤ H) :
    stabilizer G (orbit H a) = H
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem setValue_eq (f : α ≃ β) (a : α) (b : β) : setValue f a b a = b
-- Mathlib/Order/Monotone/Basic.lean
lemma monotone_inclusion_lt_le_of_le [Preorder α] {k j : α} (hkj : k ≤ j) :
    Monotone (fun ⟨i, hi⟩ => ⟨i, hi.le.trans hkj⟩ : { i // i < k } → { i // i ≤ j})
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
@[reassoc (attr := simp)]
theorem d_comp_d (C : HomologicalComplex V c) (i j k : ι) : C.d i j ≫ C.d j k = 0
-- Mathlib/CategoryTheory/Monoidal/Preadditive.lean
@[ext]
theorem rightDistributor_ext₂_right {J : Type} [Fintype J]
    {f : J → C} {X Y Z : C} {g h : X ⟶ ((⨁ f) ⊗ Y) ⊗ Z}
    (w : ∀ j, g ≫ ((biproduct.π f j ▷ Y) ▷ Z) = h ≫ ((biproduct.π f j ▷ Y) ▷ Z)) :
    g = h
-- Mathlib/Algebra/MvPolynomial/Variables.lean
@[simp]
theorem vars_0 : (0 : MvPolynomial σ R).vars = ∅
-- Mathlib/Topology/UniformSpace/Separation.lean
theorem map_comp {f : α → β} {g : β → γ} (hf : UniformContinuous f) (hg : UniformContinuous g) :
    map g ∘ map f = map (g ∘ f)
-- Mathlib/Order/SupClosed.lean
@[simp] lemma latticeClosure_singleton (a : α) : latticeClosure {a} = {a}
-- Mathlib/Analysis/SpecificLimits/Basic.lean
theorem ENNReal.tsum_geometric_add_one (r : ℝ≥0∞) : ∑' n : ℕ, r ^ (n + 1) = r * (1 - r)⁻¹
-- Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
theorem card_sphere_le_rothNumberNat (n d k : ℕ) :
    (sphere n d k).card ≤ rothNumberNat ((2 * d - 1) ^ n)
-- Mathlib/Geometry/Euclidean/Circumcenter.lean
/-- The sum of a function over `PointsWithCircumcenterIndex`. -/
theorem sum_pointsWithCircumcenter {α : Type*} [AddCommMonoid α] {n : ℕ}
    (f : PointsWithCircumcenterIndex n → α) :
    ∑ i, f i = (∑ i : Fin (n + 1), f (pointIndex i)) + f circumcenterIndex
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
theorem liftAux_tmul (m n) : liftAux f (m ⊗ₜ n) = f m n
-- Mathlib/Data/Nat/BitIndices.lean
@[simp] theorem bitIndices_zero : bitIndices 0 = []
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- An inner product with a sum on the left. -/
theorem sum_inner {ι : Type*} (s : Finset ι) (f : ι → E) (x : E) :
    ⟪∑ i ∈ s, f i, x⟫ = ∑ i ∈ s, ⟪f i, x⟫
-- Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean
theorem sheafifyLift_unique {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (hQ : Presheaf.IsSheaf J Q)
    (γ : J.sheafify P ⟶ Q) : J.toSheafify P ≫ γ = η → γ = sheafifyLift J η hQ
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
theorem mem_edgeFinset : e ∈ G.edgeFinset ↔ e ∈ G.edgeSet
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
@[simp] protected theorem zero_max (a) : max 0 a = a
-- Mathlib/Analysis/Normed/Group/Hom.lean
/-- The norm of the `0` operator is `0`. -/
theorem opNorm_zero : ‖(0 : NormedAddGroupHom V₁ V₂)‖ = 0
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem neg_equiv_neg {f g : CauSeq β abv} (hf : f ≈ g) : -f ≈ -g
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- The affine span, converted to a set, is `spanPoints`. -/
@[simp]
theorem coe_affineSpan (s : Set P) : (affineSpan k s : Set P) = spanPoints k s
-- Mathlib/Data/Int/Log.lean
@[simp]
theorem log_inv (b : ℕ) (r : R) : log b r⁻¹ = -clog b r
-- Mathlib/Logic/Function/Iterate.lean
theorem iterate_add_apply (m n : ℕ) (x : α) : f^[m + n] x = f^[m] (f^[n] x)
-- Mathlib/Algebra/Lie/Weights/Basic.lean
lemma weightSpaceOf_ne_bot (χ : Weight R L M) (x : L) :
    weightSpaceOf M (χ x) x ≠ ⊥
-- Mathlib/Algebra/Divisibility/Units.lean
/-- In a commutative monoid, an element `a` divides an element `b` iff `a` divides all left
    associates of `b`. -/
@[simp]
theorem dvd_mul_left (hu : IsUnit u) : a ∣ u * b ↔ a ∣ b
-- Mathlib/Data/Set/Card.lean
theorem encard_ne_zero : s.encard ≠ 0 ↔ s.Nonempty
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
/-- Alias of `Nat.cast_lt`, specialized to `Ordinal` --/
theorem natCast_lt {m n : ℕ} : (m : Ordinal) < n ↔ m < n
-- Mathlib/Order/Monotone/Basic.lean
theorem Antitone.comp_monotoneOn (hg : Antitone g) (hf : MonotoneOn f s) : AntitoneOn (g ∘ f) s
-- Mathlib/Order/Iterate.lean
theorem iterate_pos_lt_iff_map_lt (h : Commute f g) (hf : Monotone f) (hg : StrictMono g) {x n}
    (hn : 0 < n) : f^[n] x < g^[n] x ↔ f x < g x
-- Mathlib/Order/Atoms.lean
lemma IsCoatom.le_iff_eq (ha : IsCoatom a) (hb : b ≠ ⊤) : a ≤ b ↔ b = a
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem IsNormal.cof_eq {f} (hf : IsNormal f) {a} (ha : IsLimit a) : cof (f a) = cof a
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
lemma IsEquipartition.card_interedges_sparsePairs_le (hP : P.IsEquipartition) (hε : 0 ≤ ε) :
    ((P.sparsePairs G ε).biUnion fun (U, V) ↦ G.interedges U V).card ≤ 4 * ε * A.card ^ 2
-- Mathlib/Order/Filter/Basic.lean
@[to_additive]
theorem EventuallyEq.mul [Mul β] {f f' g g' : α → β} {l : Filter α} (h : f =ᶠ[l] g)
    (h' : f' =ᶠ[l] g') : (fun x => f x * f' x) =ᶠ[l] fun x => g x * g' x
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
theorem opNorm_neg (f : E →SL[σ₁₂] F) : ‖-f‖ = ‖f‖
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem UniformContinuous.inf_dom_right {f : α → β} {u₁ u₂ : UniformSpace α} {u₃ : UniformSpace β}
    (hf : UniformContinuous[u₂, u₃] f) : UniformContinuous[u₁ ⊓ u₂, u₃] f
-- .lake/packages/batteries/Batteries/Data/RBMap/Basic.lean
theorem All.imp (H : ∀ {x : α}, p x → q x) : ∀ {t : RBNode α}, t.All p → t.All q
-- Mathlib/Logic/Equiv/Set.lean
@[simp]
theorem range_eq_univ {α : Type*} {β : Type*} (e : α ≃ β) : range e = univ
-- Mathlib/Probability/Process/Stopping.lean
theorem Adapted.stronglyMeasurable_stoppedProcess_of_discrete [DiscreteTopology ι]
    (hu : Adapted f u) (hτ : IsStoppingTime f τ) (n : ι) :
    StronglyMeasurable (MeasureTheory.stoppedProcess u τ n)
-- Mathlib/Topology/Instances/AddCircle.lean
theorem coe_neg {x : 𝕜} : (↑(-x) : AddCircle p) = -(x : AddCircle p)
-- Mathlib/Data/List/Sublists.lean
@[simp]
theorem length_sublistsLen :
    ∀ (n) (l : List α), length (sublistsLen n l) = Nat.choose (length l) n
-- Mathlib/Algebra/Order/Field/Basic.lean
@[simp]
theorem half_lt_self_iff : a / 2 < a ↔ 0 < a
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
theorem neg_mem (hx : x ∈ p) : -x ∈ p
-- Mathlib/CategoryTheory/Types.lean
theorem types_comp {X Y Z : Type u} (f : X ⟶ Y) (g : Y ⟶ Z) : f ≫ g = g ∘ f
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem exists_of_replaceF : ∀ {l : List α} {a a'} (al : a ∈ l) (pa : p a = some a'),
    ∃ a a' l₁ l₂,
      (∀ b ∈ l₁, p b = none) ∧ p a = some a' ∧ l = l₁ ++ a :: l₂ ∧ l.replaceF p = l₁ ++ a' :: l₂
-- Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean
/-- `convs'` returns the same value for a gcf and the corresponding squashed gcf at the
squashed position. -/
theorem succ_nth_conv'_eq_squashGCF_nth_conv' :
    g.convs' (n + 1) = (squashGCF g n).convs' n
-- Mathlib/Computability/Language.lean
@[simp]
lemma reverse_one : (1 : Language α).reverse = 1
-- Mathlib/Data/Nat/Cast/Defs.lean
lemma one_lt : 1 < n
-- Mathlib/Topology/Order/Basic.lean
theorem nhds_top_basis [TopologicalSpace α] [LinearOrder α] [OrderTop α] [OrderTopology α]
    [Nontrivial α] : (𝓝 ⊤).HasBasis (fun a : α => a < ⊤) fun a : α => Ioi a
-- Mathlib/Algebra/Lie/Abelian.lean
theorem isTrivial_iff_max_triv_eq_top : IsTrivial L M ↔ maxTrivSubmodule R L M = ⊤
-- Mathlib/Order/Disjointed.lean
protected lemma Monotone.disjointed_succ {f : ℕ → α} (hf : Monotone f) (n : ℕ) :
    disjointed f (n + 1) = f (n + 1) \ f n
-- Mathlib/Analysis/Normed/Group/ZeroAtInfty.lean
theorem ZeroAtInftyContinuousMapClass.norm_le (f : 𝓕) (ε : ℝ) (hε : 0 < ε) :
    ∃ (r : ℝ), ∀ (x : E) (_hx : r < ‖x‖), ‖f x‖ < ε
-- Mathlib/Algebra/Polynomial/AlgebraMap.lean
lemma aeval_apply_smul_mem_of_le_comap'
    [Semiring A] [Algebra R A] [Module A M] [IsScalarTower R A M] (a : A)
    (hq : q ≤ q.comap (Algebra.lsmul R R M a)) :
    aeval a p • m ∈ q
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast]
theorem coe_add : ((x + y : R) : ℍ[R]) = x + y
-- Mathlib/Data/Seq/Computation.lean
theorem mem_of_get_eq {a} : get s = a → a ∈ s
-- Mathlib/Data/Nat/Factorization/Basic.lean
@[simp]
theorem ord_proj_of_not_prime (n p : ℕ) (hp : ¬p.Prime) : ord_proj[p] n = 1
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
@[simp]
lemma Pi.map'_id {f g : α → C} [HasProduct f] [HasProduct g] (p : ∀ b, f b ⟶ g b) :
    Pi.map' id p = Pi.map p
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
@[simp]
theorem LinearMap.toMatrix'_id : LinearMap.toMatrix' (LinearMap.id : (n → R) →ₗ[R] n → R) = 1
-- Mathlib/GroupTheory/GroupAction/ConjAct.lean
theorem units_smul_def (g : ConjAct Mˣ) (h : M) : g • h = ofConjAct g * h * ↑(ofConjAct g)⁻¹
-- Mathlib/Algebra/Algebra/Hom.lean
theorem toAlgHom_injective [FaithfulSMul M A] :
    Function.Injective (MulSemiringAction.toAlgHom R A : M → A →ₐ[R] A)
-- Mathlib/RingTheory/Trace/Defs.lean
@[simp]
theorem trace_comp_trace [Algebra S T] [IsScalarTower R S T]
    [Module.Free R S] [Module.Finite R S] [Module.Free S T] [Module.Finite S T] :
    (trace R S).comp ((trace S T).restrictScalars R) = trace R T
-- Mathlib/Topology/UniformSpace/Cauchy.lean
/-- The union of two totally bounded sets is totally bounded. -/
protected lemma TotallyBounded.union {s t : Set α} (hs : TotallyBounded s) (ht : TotallyBounded t) :
    TotallyBounded (s ∪ t)
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean
theorem associated_tmul [Invertible (2 : A)] (Q₁ : QuadraticForm A M₁) (Q₂ : QuadraticForm R M₂) :
    associated (R := A) (Q₁.tmul Q₂)
      = (associated (R := A) Q₁).tmul (associated (R := R) Q₂)
-- Mathlib/CategoryTheory/Bicategory/Kan/HasKan.lean
theorem of_lan_comp_iso [HasLeftKanExtension f g]
    {x : B} {h : c ⟶ x} [HasLeftKanExtension f (g ≫ h)]
    (i : f⁺ (g ≫ h) ≅ f⁺ g ≫ h)
    (w : lanUnit f (g ≫ h) ≫ f ◁ i.hom = lanUnit f g ▷ h ≫ (α_ _ _ _).hom) :
    Lan.CommuteWith f g h
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
lemma isIso_homologyι (hg : S.g = 0) [S.HasHomology] :
    IsIso S.homologyι
-- Mathlib/Combinatorics/SimpleGraph/Hamiltonian.lean
lemma IsPath.isHamiltonian_iff (hp : p.IsPath) : p.IsHamiltonian ↔ ∀ w, w ∈ p.support
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
theorem div_rec_lemma {x y : Nat} : 0 < y ∧ y ≤ x → x - y < x
-- Mathlib/Probability/ProbabilityMassFunction/Basic.lean
@[simp]
theorem toOuterMeasure_inj {p q : PMF α} : p.toOuterMeasure = q.toOuterMeasure ↔ p = q
-- Mathlib/CategoryTheory/Comma/Arrow.lean
@[reassoc (attr := simp)]
lemma hom_inv_id_right (e : f ≅ g) : e.hom.right ≫ e.inv.right = 𝟙 _
-- Mathlib/Topology/MetricSpace/Polish.lean
/-- A Polish space is a topological space with second countable topology, that can be endowed
with a metric for which it is complete.
We register an instance from complete second countable metric space to polish space, and not the
other way around as this is the most common use case.

To endow a Polish space with a complete metric space structure, do `letI := upgradePolishSpace α`.
-/
class PolishSpace (α : Type*) [h : TopologicalSpace α]
    extends SecondCountableTopology α : Prop where
  complete : ∃ m : MetricSpace α, m.toUniformSpace.toTopologicalSpace = h ∧
    @CompleteSpace α m.toUniformSpace
-- Mathlib/CategoryTheory/Limits/IsLimit.lean
/-- A cone `t` on `F` is a limit cone if each cone on `F` admits a unique
cone morphism to `t`.

See <https://stacks.math.columbia.edu/tag/002E>.
  -/
-- porting note (#5171): removed @[nolint has_nonempty_instance]
structure IsLimit (t : Cone F) where
  /-- There is a morphism from any cone point to `t.pt` -/
  lift : ∀ s : Cone F, s.pt ⟶ t.pt
  /-- The map makes the triangle with the two natural transformations commute -/
  fac : ∀ (s : Cone F) (j : J), lift s ≫ t.π.app j = s.π.app j := by aesop_cat
  /-- It is the unique such map to do this -/
  uniq : ∀ (s : Cone F) (m : s.pt ⟶ t.pt) (_ : ∀ j : J, m ≫ t.π.app j = s.π.app j), m = lift s := by
    aesop_cat
-- Mathlib/Computability/Partrec.lean
theorem fst : Computable (@Prod.fst α β)
-- Mathlib/LinearAlgebra/AffineSpace/Restrict.lean
theorem AffineSubspace.nonempty_map {E : AffineSubspace k P₁} [Ene : Nonempty E] {φ : P₁ →ᵃ[k] P₂} :
    Nonempty (E.map φ)
-- Mathlib/ModelTheory/LanguageMap.lean
theorem card_constantsOn : (constantsOn α).card = #α
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Ioc_coe_top : Ioc (a : WithTop α) ⊤ = insertNone (Ioi a)
-- Mathlib/Analysis/Convex/Topology.lean
/-- A nonempty convex set is connected. -/
protected theorem Convex.isConnected {s : Set E} (h : Convex ℝ s) (hne : s.Nonempty) :
    IsConnected s
-- Mathlib/Data/Multiset/FinsetOps.lean
@[simp]
theorem ndinter_cons_of_not_mem {a : α} (s : Multiset α) {t : Multiset α} (h : a ∉ t) :
    ndinter (a ::ₘ s) t = ndinter s t
-- Mathlib/Data/Set/Lattice.lean
theorem image_seq {f : β → γ} {s : Set (α → β)} {t : Set α} :
    f '' seq s t = seq ((f ∘ ·) '' s) t
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem sigma_singleton (b : α → β) :
    (({a} : Multiset α).sigma fun a => ({b a} : Multiset β)) = {⟨a, b a⟩}
-- Mathlib/Data/Bool/Basic.lean
theorem dichotomy (b : Bool) : b = false ∨ b = true
-- Mathlib/Data/Nat/Defs.lean
@[simp] lemma pred_eq_succ_iff : n - 1 = m + 1 ↔ n = m + 2
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
@[simp high]
theorem _root_.LinearIsometryEquiv.piLpCongrRight_single (e : ∀ i, α i ≃ₗᵢ[𝕜] β i) [DecidableEq ι]
    (i : ι) (v : α i) :
    LinearIsometryEquiv.piLpCongrRight p e ((WithLp.equiv p (∀ i, α i)).symm <| Pi.single i v) =
      (WithLp.equiv p (∀ i, β i)).symm (Pi.single i (e _ v))
-- Mathlib/LinearAlgebra/Matrix/HermitianFunctionalCalculus.lean
lemma cfc_eq (f : ℝ → ℝ) : cfc f A = hA.cfc f
-- Mathlib/Topology/Order/IntermediateValue.lean
/-- If a function `f : α → β` is continuous on a nonempty interval `s`, its restriction to `s`
tends to `at_bot : Filter β` along `at_bot : Filter ↥s` and tends to `Filter.atTop : Filter β` along
`Filter.atTop : Filter ↥s`, then the restriction of `f` to `s` is surjective. We formulate the
conclusion as `Function.surjOn f s Set.univ`. -/
theorem ContinuousOn.surjOn_of_tendsto {f : α → δ} {s : Set α} [OrdConnected s] (hs : s.Nonempty)
    (hf : ContinuousOn f s) (hbot : Tendsto (fun x : s => f x) atBot atBot)
    (htop : Tendsto (fun x : s => f x) atTop atTop) : SurjOn f s univ
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem contMDiff_finprod (h : ∀ i, ContMDiff I' I n (f i))
    (hfin : LocallyFinite fun i => mulSupport (f i)) : ContMDiff I' I n fun x => ∏ᶠ i, f i x
-- Mathlib/Order/SymmDiff.lean
theorem symmDiff_def [Sup α] [SDiff α] (a b : α) : a ∆ b = a \ b ⊔ b \ a
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
@[continuity]
theorem continuous_setIntegral [NormedSpace ℝ E] (s : Set X) :
    Continuous fun f : X →₁[μ] E => ∫ x in s, f x ∂μ
-- Mathlib/LinearAlgebra/Quotient.lean
@[simp]
theorem comap_map_mkQ : comap p.mkQ (map p.mkQ p') = p ⊔ p'
-- Mathlib/Topology/Hom/Open.lean
/-- `ContinuousOpenMapClass F α β` states that `F` is a type of continuous open maps.

You should extend this class when you extend `ContinuousOpenMap`. -/
class ContinuousOpenMapClass (F : Type*) (α β : outParam Type*) [TopologicalSpace α]
  [TopologicalSpace β] [FunLike F α β] extends ContinuousMapClass F α β : Prop where
  map_open (f : F) : IsOpenMap f
-- Mathlib/Topology/Compactification/OnePoint.lean
theorem continuousAt_infty {Y : Type*} [TopologicalSpace Y] {f : OnePoint X → Y} :
    ContinuousAt f ∞ ↔
      ∀ s ∈ 𝓝 (f ∞), ∃ t : Set X, IsClosed t ∧ IsCompact t ∧ MapsTo (f ∘ (↑)) tᶜ s
-- Mathlib/Topology/MetricSpace/MetricSeparated.lean
@[simp]
theorem union_left_iff {s'} :
    IsMetricSeparated (s ∪ s') t ↔ IsMetricSeparated s t ∧ IsMetricSeparated s' t
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- A side of a right-angled triangle divided by the tangent of the opposite angle equals the
adjacent side, version subtracting vectors. -/
theorem norm_div_tan_oangle_sub_right_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : ‖x‖ / Real.Angle.tan (o.oangle y (y - x)) = ‖y‖
-- Mathlib/NumberTheory/Divisors.lean
theorem properDivisors_subset_divisors : properDivisors n ⊆ divisors n
-- Mathlib/Topology/LocallyConstant/Basic.lean
theorem prod_mk {Y'} {f : X → Y} {f' : X → Y'} (hf : IsLocallyConstant f)
    (hf' : IsLocallyConstant f') : IsLocallyConstant fun x => (f x, f' x)
-- Mathlib/Analysis/Convex/Join.lean
protected theorem Convex.convexJoin (hs : Convex 𝕜 s) (ht : Convex 𝕜 t) :
    Convex 𝕜 (convexJoin 𝕜 s t)
-- Mathlib/Data/Matroid/Restrict.lean
@[simp] theorem restrict_dep_iff : (M ↾ R).Dep X ↔ ¬ M.Indep X ∧ X ⊆ R
-- Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
theorem mfderivWithin_eq (hs : UniqueMDiffWithinAt 𝓘(𝕜, E) s x) :
    mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f s x = f
-- Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean
lemma negMulLog_nonneg {x : ℝ} (h1 : 0 ≤ x) (h2 : x ≤ 1) : 0 ≤ negMulLog x
-- Mathlib/Probability/Density.lean
/-- **The Law of the Unconscious Statistician** for nonnegative random variables. -/
theorem lintegral_pdf_mul {X : Ω → E} [HasPDF X ℙ μ] {f : E → ℝ≥0∞}
    (hf : AEMeasurable f μ) : ∫⁻ x, pdf X ℙ μ x * f x ∂μ = ∫⁻ x, f (X x) ∂ℙ
-- Mathlib/Data/Complex/Basic.lean
@[simp]
theorem ofReal_eq_zero {z : ℝ} : (z : ℂ) = 0 ↔ z = 0
-- Mathlib/RingTheory/Ideal/Norm.lean
@[simp]
theorem spanNorm_mul_of_field {K : Type*} [Field K] [Algebra K S] [IsDomain S] [Module.Finite K S]
    (I J : Ideal S) : spanNorm K (I * J) = spanNorm K I * spanNorm K J
-- Mathlib/Topology/ContinuousOn.lean
theorem ContinuousOn.isOpen_inter_preimage {f : α → β} {s : Set α} {t : Set β}
    (hf : ContinuousOn f s) (hs : IsOpen s) (ht : IsOpen t) : IsOpen (s ∩ f ⁻¹' t)
-- Mathlib/Combinatorics/SimpleGraph/Coloring.lean
theorem Coloring.color_classes_independent (c : α) : IsAntichain G.Adj (C.colorClass c)
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
theorem map_comap_eq (f : R →+* S) (t : Subsemiring S) : (t.comap f).map f = t ⊓ f.rangeS
-- Mathlib/RingTheory/Valuation/ValuationSubring.lean
@[ext]
theorem ext (A B : ValuationSubring K) (h : ∀ x, x ∈ A ↔ x ∈ B) : A = B