ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Topology/Order/LeftRightNhds.lean
/-- The following statements are equivalent:

0. `s` is a neighborhood of `b` within `(-∞, b]`
1. `s` is a neighborhood of `b` within `[a, b]`
2. `s` is a neighborhood of `b` within `(a, b]`
3. `s` includes `(l, b]` for some `l ∈ [a, b)`
4. `s` includes `(l, b]` for some `l < b` -/
theorem TFAE_mem_nhdsWithin_Iic {a b : α} (h : a < b) (s : Set α) :
    TFAE [s ∈ 𝓝[≤] b,-- 0 : `s` is a neighborhood of `b` within `(-∞, b]`
      s ∈ 𝓝[Icc a b] b,-- 1 : `s` is a neighborhood of `b` within `[a, b]`
      s ∈ 𝓝[Ioc a b] b,-- 2 : `s` is a neighborhood of `b` within `(a, b]`
      ∃ l ∈ Ico a b, Ioc l b ⊆ s,-- 3 : `s` includes `(l, b]` for some `l ∈ [a, b)`
      ∃ l ∈ Iio b, Ioc l b ⊆ s]
-- Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
@[simp] theorem op_reverse (x : CliffordAlgebra Q) : op (reverse x) = reverseOp x
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
theorem coeff_eq_zero_of_totalDegree_lt {f : MvPolynomial σ R} {d : σ →₀ ℕ}
    (h : f.totalDegree < ∑ i ∈ d.support, d i) : coeff d f = 0
-- Mathlib/RingTheory/DedekindDomain/FiniteAdeleRing.lean
/-- The tuple `(1)_v` is a finite adèle. -/
theorem one : (1 : K_hat R K).IsFiniteAdele
-- Mathlib/RingTheory/Nilpotent/Defs.lean
@[simp] lemma nilpotencyClass_eq_one [Nontrivial R] :
    nilpotencyClass x = 1 ↔ x = 0
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem default_coe_singleton (x : α) : (default : ({x} : Set α)) = ⟨x, rfl⟩
-- Mathlib/Probability/Independence/Kernel.lean
theorem IndepSets.indep' {_mΩ : MeasurableSpace Ω}
    {κ : Kernel α Ω} {μ : Measure α} [IsMarkovKernel κ]
    {p1 p2 : Set (Set Ω)} (hp1m : ∀ s ∈ p1, MeasurableSet s) (hp2m : ∀ s ∈ p2, MeasurableSet s)
    (hp1 : IsPiSystem p1) (hp2 : IsPiSystem p2) (hyp : IndepSets p1 p2 κ μ) :
    Indep (generateFrom p1) (generateFrom p2) κ μ
-- Mathlib/GroupTheory/Perm/Basic.lean
@[simp]
theorem sigmaCongrRight_one {α : Type*} {β : α → Type*} :
    sigmaCongrRight (1 : ∀ a, Equiv.Perm <| β a) = 1
-- Mathlib/Topology/Order/Basic.lean
theorem induced_orderTopology {α : Type u} {β : Type v} [Preorder α] [ta : TopologicalSpace β]
    [Preorder β] [OrderTopology β] (f : α → β) (hf : ∀ {x y}, f x < f y ↔ x < y)
    (H : ∀ {x y}, x < y → ∃ a, x < f a ∧ f a < y) : @OrderTopology _ (induced f ta) _
-- Mathlib/RingTheory/PiTensorProduct.lean
/-- `PiTensorProduct.tprod` as a `MonoidHom`. -/
@[simps]
def tprodMonoidHom : (Π i, A i) →* ⨂[R] i, A i
-- Mathlib/Analysis/InnerProductSpace/ProdL2.lean
@[simp] theorem prod_apply (v : OrthonormalBasis ι₁ 𝕜 E) (w : OrthonormalBasis ι₂ 𝕜 F) :
    ∀ i : ι₁ ⊕ ι₂, v.prod w i =
      Sum.elim ((LinearMap.inl 𝕜 E F) ∘ v) ((LinearMap.inr 𝕜 E F) ∘ w) i
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem map_append (f : α → β) : ∀ l₁ l₂, map f (l₁ ++ l₂) = map f l₁ ++ map f l₂
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
protected theorem injective : Injective e
-- Mathlib/Computability/TuringMachine.lean
theorem reaches₁_fwd {σ} {f : σ → Option σ} {a b c} (h₁ : Reaches₁ f a c) (h₂ : b ∈ f a) :
    Reaches f b c
-- Mathlib/CategoryTheory/Iso.lean
/-- Identity isomorphism. -/
@[refl, simps]
def refl (X : C) : X ≅ X
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
@[to_additive card_le_one_iff_eq_bot]
theorem card_le_one_iff_eq_bot : card S ≤ 1 ↔ S = ⊥
-- Mathlib/Order/InitialSeg.lean
theorem down (f : r ≺i s) : ∀ {b : β}, s b f.top ↔ ∃ a, f a = b
-- Mathlib/Topology/Algebra/StarSubalgebra.lean
@[elab_as_elim]
theorem induction_on {x y : A}
    (hy : y ∈ elementalStarAlgebra R x) {P : (u : A) → u ∈ elementalStarAlgebra R x → Prop}
    (self : P x (self_mem R x)) (star_self : P (star x) (star_self_mem R x))
    (algebraMap : ∀ r, P (algebraMap R A r) (_root_.algebraMap_mem _ r))
    (add : ∀ u hu v hv, P u hu → P v hv → P (u + v) (add_mem hu hv))
    (mul : ∀ u hu v hv, P u hu → P v hv → P (u * v) (mul_mem hu hv))
    (closure : ∀ s : Set A, (hs : s ⊆ elementalStarAlgebra R x) → (∀ u, (hu : u ∈ s) →
      P u (hs hu)) → ∀ v, (hv : v ∈ closure s) → P v (closure_minimal hs (isClosed R x) hv)) :
    P y hy
-- Mathlib/Algebra/CharP/Two.lean
theorem sub_eq_add' : HSub.hSub = ((· + ·) : R → R → R)
-- Mathlib/Order/BoundedOrder.lean
@[simp] theorem down_bot [Bot α] : down (⊥ : ULift α) = ⊥
-- Mathlib/Data/Set/NAry.lean
lemma image2_range (f : α' → β' → γ) (g : α → α') (h : β → β') :
    image2 f (range g) (range h) = range fun x : α × β ↦ f (g x.1) (h x.2)
-- Mathlib/NumberTheory/LucasLehmer.lean
theorem residue_eq_zero_iff_sMod_eq_zero (p : ℕ) (w : 1 < p) :
    lucasLehmerResidue p = 0 ↔ sMod p (p - 2) = 0
-- Mathlib/SetTheory/Surreal/Basic.lean
/-- Same as `moveLeft_lt`, but for `Surreal` instead of `PGame` -/
theorem mk_moveLeft_lt_mk {x : PGame} (o : Numeric x) (i) :
    Surreal.mk (x.moveLeft i) (Numeric.moveLeft o i) < Surreal.mk x o
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem map_copy (hu : u = u') (hv : v = v') :
    (p.copy hu hv).map f = (p.map f).copy (hu ▸ rfl) (hv ▸ rfl)
-- Mathlib/Topology/ClopenBox.lean
theorem TopologicalSpace.Clopens.exists_prod_subset (W : Clopens (X × Y)) {a : X × Y} (h : a ∈ W) :
    ∃ U : Clopens X, a.1 ∈ U ∧ ∃ V : Clopens Y, a.2 ∈ V ∧ U ×ˢ V ≤ W
-- Mathlib/Topology/Category/TopCat/Opens.lean
/-- An open map `f : X ⟶ Y` induces a functor `Opens X ⥤ Opens Y`.
-/
@[simps obj_coe]
def IsOpenMap.functor {X Y : TopCat} {f : X ⟶ Y} (hf : IsOpenMap f) : Opens X ⥤ Opens Y
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
/-- Two products which differ by an equivalence in the indexing type,
and up to isomorphism in the factors, are isomorphic.
-/
@[simps]
def Pi.whiskerEquiv {J K : Type*} {f : J → C} {g : K → C} (e : J ≃ K) (w : ∀ j, g (e j) ≅ f j)
    [HasProduct f] [HasProduct g] : ∏ᶜ f ≅ ∏ᶜ g
-- Mathlib/CategoryTheory/Sums/Associator.lean
@[simp]
theorem inverseAssociator_map_inr_inr {X Y : E} (f : inr (inr X) ⟶ inr (inr Y)) :
    (inverseAssociator C D E).map f = f
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive]
theorem dist_mulIndicator (s t : Set α) (f : α → E) (x : α) :
    dist (s.mulIndicator f x) (t.mulIndicator f x) = ‖(s ∆ t).mulIndicator f x‖
-- Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.lean
lemma eq_induced : haveI := F.reflects_preregular
    regularTopology C =
      F.inducedTopology (regularTopology _)
-- Mathlib/Data/QPF/Multivariate/Basic.lean
theorem liftR_iff {α : TypeVec n} (r : ∀ /- ⦃i⦄ -/ {i}, α i → α i → Prop) (x y : F α) :
    LiftR r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j)
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := mono)]
theorem div_subset_div : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ / t₁ ⊆ s₂ / t₂
-- Mathlib/Analysis/NormedSpace/FunctionSeries.lean
/-- An infinite sum of functions with summable sup norm is the uniform limit of its partial sums.
Version relative to a set, with index set `ℕ`. -/
theorem tendstoUniformlyOn_tsum_nat {f : ℕ → β → F} {u : ℕ → ℝ} (hu : Summable u) {s : Set β}
    (hfu : ∀ n x, x ∈ s → ‖f n x‖ ≤ u n) :
    TendstoUniformlyOn (fun N => fun x => ∑ n ∈ Finset.range N, f n x) (fun x => ∑' n, f n x) atTop
      s
-- Mathlib/Topology/Homeomorph.lean
lemma toHomeomorph_trans (e : X ≃ Y) (f : Y ≃ Z) (he hf) :
    (e.trans f).toHomeomorph (fun _s ↦ (he _).trans (hf _)) =
    (e.toHomeomorph he).trans (f.toHomeomorph hf)
-- Mathlib/Algebra/Algebra/Hom.lean
@[simp, norm_cast]
theorem coe_ringHom_mk {f : A →+* B} (h) : ((⟨f, h⟩ : A →ₐ[R] B) : A →+* B) = f
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem mem_center_iff {a : A} : a ∈ center R A ↔ ∀ b : A, b * a = a * b
-- Mathlib/Data/Matroid/Constructions.lean
theorem uniqueBaseOn_restrict (h : I ⊆ E) (R : Set α) :
    (uniqueBaseOn I E) ↾ R = uniqueBaseOn (I ∩ R) R
-- Mathlib/Order/Atoms.lean
@[simp]
theorem Set.Ici.isAtom_iff {b : Set.Ici a} : IsAtom b ↔ a ⋖ b
-- Mathlib/Algebra/AddTorsor.lean
/-- An `AddTorsor G P` gives a structure to the nonempty type `P`,
acted on by an `AddGroup G` with a transitive and free action given
by the `+ᵥ` operation and a corresponding subtraction given by the
`-ᵥ` operation. In the case of a vector space, it is an affine
space. -/
class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P,
  VSub G P where
  [nonempty : Nonempty P]
  /-- Torsor subtraction and addition with the same element cancels out. -/
  vsub_vadd' : ∀ p₁ p₂ : P, (p₁ -ᵥ p₂ : G) +ᵥ p₂ = p₁
  /-- Torsor addition and subtraction with the same element cancels out. -/
  vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g
-- Mathlib/Algebra/Order/Floor/Div.lean
lemma support_floorDiv_subset : (f ⌊/⌋ a).support ⊆ f.support
-- Mathlib/Tactic/NormNum/Basic.lean
theorem isInt_neg {α} [Ring α] : ∀ {f : α → α} {a : α} {a' b : ℤ},
    f = Neg.neg → IsInt a a' → Int.neg a' = b → IsInt (-a) b
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem sum_lt_lift_of_isRegular {ι : Type u} {f : ι → Cardinal} {c : Cardinal} (hc : IsRegular c)
    (hι : Cardinal.lift.{v, u} #ι < c) (hf : ∀ i, f i < c) : sum f < c
-- Mathlib/Data/NNReal/Basic.lean
protected theorem eq_iff {n m : ℝ≥0} : n = m ↔ (n : ℝ) = (m : ℝ)
-- Mathlib/Analysis/SpecialFunctions/CompareExp.lean
lemma isTheta_cpow_exp_re_mul_log (hl : IsExpCmpFilter l) (a : ℂ) :
    (· ^ a) =Θ[l] fun z ↦ Real.exp (re a * Real.log (abs z))
-- Mathlib/Data/Set/Function.lean
theorem preimage_restrictPreimage {u : Set t} :
    t.restrictPreimage f ⁻¹' u = (fun a : f ⁻¹' t ↦ f a) ⁻¹' (Subtype.val '' u)
-- Mathlib/Data/TypeVec.lean
theorem subtypeVal_toSubtype' {α : TypeVec n} (r : α ⊗ α ⟹ «repeat» n Prop) :
    subtypeVal r ⊚ toSubtype' r = fun i x => prod.mk i x.1.fst x.1.snd
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
/-- See also `Finset.prod_boole`. -/
@[to_additive "See also `Finset.sum_boole`."]
theorem prod_ite_one (s : Finset α) (p : α → Prop) [DecidablePred p]
    (h : ∀ i ∈ s, ∀ j ∈ s, p i → p j → i = j) (a : β) :
    ∏ i ∈ s, ite (p i) a 1 = ite (∃ i ∈ s, p i) a 1
-- Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean
theorem isPartition_unionComplToSubordinate (π₁ : TaggedPrepartition I) (π₂ : Prepartition I)
    (hU : π₂.iUnion = ↑I \ π₁.iUnion) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    IsPartition (π₁.unionComplToSubordinate π₂ hU r)
-- Mathlib/Topology/Order/LeftRightNhds.lean
theorem nhds_basis_zero_abs_sub_lt [NoMaxOrder α] :
    (𝓝 (0 : α)).HasBasis (fun ε : α => (0 : α) < ε) fun ε => { b | |b| < ε }
-- Mathlib/Algebra/Ring/Defs.lean
theorem mul_boole {α} [MulZeroOneClass α] (P : Prop) [Decidable P] (a : α) :
    (a * if P then 1 else 0) = if P then a else 0
-- Mathlib/Data/Finmap.lean
@[simp]
theorem replace_toFinmap (a : α) (b : β a) (s : AList β) :
    replace a b ⟦s⟧ = (⟦s.replace a b⟧ : Finmap β)
-- Mathlib/Data/Nat/Defs.lean
@[simp] protected lemma lt_mul_iff_one_lt_right (ha : 0 < a) : a < a * b ↔ 1 < b
-- Mathlib/Deprecated/Subgroup.lean
@[to_additive]
theorem trivial_eq_closure : trivial G = Group.closure ∅
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- If the inner product of two vectors is equal to the product of their norms (i.e.,
`⟪x, y⟫ = ‖x‖ * ‖y‖`), then the two vectors are nonnegative real multiples of each other. One form
of the equality case for Cauchy-Schwarz.
Compare `norm_inner_eq_norm_iff`, which takes the weaker hypothesis `abs ⟪x, y⟫ = ‖x‖ * ‖y‖`. -/
theorem inner_eq_norm_mul_iff {x y : E} :
    ⟪x, y⟫ = (‖x‖ : 𝕜) * ‖y‖ ↔ (‖y‖ : 𝕜) • x = (‖x‖ : 𝕜) • y
-- Mathlib/Topology/Specialization.lean
@[simp, nolint simpNF] lemma ofEquiv_inj {a b : Specialization α} : ofEquiv a = ofEquiv b ↔ a = b
-- Mathlib/Order/BoundedOrder.lean
theorem ne_top_of_le_ne_top (hb : b ≠ ⊤) (hab : a ≤ b) : a ≠ ⊤
-- Mathlib/Data/Set/Function.lean
@[simp]
lemma mapsTo_range_iff {g : ι → α} : MapsTo f (range g) t ↔ ∀ i, f (g i) ∈ t
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem getElem?_eq_none_iff : l[n]? = none ↔ length l ≤ n
-- Mathlib/Topology/Semicontinuous.lean
theorem ContinuousOn.lowerSemicontinuousOn {f : α → γ} (h : ContinuousOn f s) :
    LowerSemicontinuousOn f s
-- Mathlib/Tactic/Positivity/Basic.lean
private theorem mul_nonneg_of_nonneg_of_pos [OrderedSemiring α] {a b : α}
    (ha : 0 ≤ a) (hb : 0 < b) : 0 ≤ a * b
-- Mathlib/Algebra/Polynomial/Reverse.lean
@[simp] lemma reverse_mul_X (p : R[X]) : reverse (p * X) = reverse p
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
@[to_additive (attr := simp)]
theorem coe_smul [SMul K β] (c : K) (f : α →ₛ β) : ⇑(c • f) = c • ⇑f
-- Mathlib/Algebra/Order/Interval/Finset.lean
@[simp] lemma map_add_right_Ioc (a b c : α) :
    (Ioc a b).map (addRightEmbedding c) = Ioc (a + c) (b + c)
-- Mathlib/Algebra/Category/AlgebraCat/Basic.lean
@[simp]
theorem ofHom_apply {R : Type u} [CommRing R] {X Y : Type v} [Ring X] [Algebra R X] [Ring Y]
    [Algebra R Y] (f : X →ₐ[R] Y) (x : X) : ofHom f x = f x
-- Mathlib/Analysis/SpecialFunctions/Polynomials.lean
theorem div_tendsto_atBot_of_degree_gt' (hdeg : Q.degree < P.degree)
    (hneg : P.leadingCoeff / Q.leadingCoeff < 0) :
    Tendsto (fun x => eval x P / eval x Q) atTop atBot
-- Mathlib/Algebra/Ring/Hom/Defs.lean
@[simp]
theorem coe_copy (f : α →ₙ+* β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
theorem nondegenerate_iff_det_ne_zero {B : BilinForm A M₃} (b : Basis ι A M₃) :
    B.Nondegenerate ↔ (BilinForm.toMatrix b B).det ≠ 0
-- Mathlib/Topology/Algebra/InfiniteSum/Group.lean
@[to_additive]
theorem Multipliable.multipliable_compl_iff {s : Set β} (hf : Multipliable (f ∘ (↑) : s → α)) :
    Multipliable (f ∘ (↑) : ↑sᶜ → α) ↔ Multipliable f
-- Mathlib/Algebra/Homology/Embedding/Boundary.lean
lemma not_boundaryGE_next' [e.IsRelIff] {j k : ι} (hj : ¬ e.BoundaryGE j) (hk : c.next j = k) :
    ¬ e.BoundaryGE k
-- Mathlib/Data/Nat/Defs.lean
lemma add_eq_two_iff : m + n = 2 ↔ m = 0 ∧ n = 2 ∨ m = 1 ∧ n = 1 ∨ m = 2 ∧ n = 0
-- Mathlib/MeasureTheory/OuterMeasure/AE.lean
lemma ae_iff_of_countable [Countable α] {p : α → Prop} : (∀ᵐ x ∂μ, p x) ↔ ∀ x, μ {x} ≠ 0 → p x
-- Mathlib/RingTheory/Localization/Basic.lean
@[inherit_doc IsLocalization.exists_of_eq]
theorem eq_iff_exists {x y} : algebraMap R S x = algebraMap R S y ↔ ∃ c : M, ↑c * x = ↑c * y
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[measurability]
theorem AEMeasurable.const_pow (hg : AEMeasurable g μ) (c : β) :
    AEMeasurable (fun x => c ^ g x) μ
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem erase_eq_of_not_mem {a : α} {s : Finset α} (h : a ∉ s) : erase s a = s
-- Mathlib/Analysis/NormedSpace/MStructure.lean
theorem Lcomplement {P : M} (h : IsLprojection X P) : IsLprojection X (1 - P)
-- Mathlib/Topology/AlexandrovDiscrete.lean
lemma IsOpen.exterior_subset_iff (ht : IsOpen t) : exterior s ⊆ t ↔ s ⊆ t
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem MulPosReflectLT.toMulPosReflectLE [MulPosReflectLT α] : MulPosReflectLE α
-- Mathlib/Algebra/Order/Floor/Prime.lean
theorem exists_prime_mul_pow_div_factorial_lt_one [LinearOrderedField K] [FloorRing K]
    (n : ℕ) (a c : K) :
    ∃ p > n, p.Prime ∧ a * c ^ p / (p - 1)! < 1
-- Mathlib/CategoryTheory/Localization/DerivabilityStructure/Constructor.lean
lemma isConnected :
    IsConnected ((TwoSquare.mk Φ.functor (Φ.functor ⋙ L) L (𝟭 _)
      (Functor.rightUnitor _).inv).CostructuredArrowDownwards y)
-- Mathlib/Combinatorics/SimpleGraph/Density.lean
@[simp]
theorem swap_mem_interedges_iff (hr : Symmetric r) {x : α × α} :
    x.swap ∈ interedges r s t ↔ x ∈ interedges r t s
-- Mathlib/Topology/Order/OrderClosed.lean
@[simp]
theorem continuousWithinAt_Ioo_iff_Iio (h : a < b) :
    ContinuousWithinAt f (Ioo a b) b ↔ ContinuousWithinAt f (Iio b) b
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
theorem le_normalClosure {H : Subgroup G} : H ≤ normalClosure ↑H
-- Mathlib/Data/Nat/Prime/Defs.lean
theorem prime_two : Prime 2
-- Mathlib/Order/Filter/Partial.lean
@[simp]
theorem rmap_rmap (r : Rel α β) (s : Rel β γ) (l : Filter α) :
    rmap s (rmap r l) = rmap (r.comp s) l
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem repr_one : repr (ofNat 1) = (1 : ℕ)
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast] lemma ratCast_imK (q : ℚ) : (q : ℍ[R]).imK = 0
-- Mathlib/GroupTheory/Coxeter/Inversion.lean
theorem leftInvSeq_take (ω : List B) (j : ℕ) :
    lis (ω.take j) = (lis ω).take j
-- Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean
/-- If `χ` is a multiplicative function such that `J(a | p) = χ p` for all odd primes `p`,
then `J(a | b)` equals `χ b` for all odd natural numbers `b`. -/
theorem value_at (a : ℤ) {R : Type*} [CommSemiring R] (χ : R →* ℤ)
    (hp : ∀ (p : ℕ) (pp : p.Prime), p ≠ 2 → @legendreSym p ⟨pp⟩ a = χ p) {b : ℕ} (hb : Odd b) :
    J(a | b) = χ b
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
theorem add_neg_one (i : Int) : i + -1 = i - 1
-- Mathlib/Data/List/Sort.lean
/-- An alternative definition of `orderedInsert` using `takeWhile` and `dropWhile`. -/
theorem orderedInsert_eq_take_drop (a : α) :
    ∀ l : List α,
      l.orderedInsert r a = (l.takeWhile fun b => ¬a ≼ b) ++ a :: l.dropWhile fun b => ¬a ≼ b
-- Mathlib/Probability/Martingale/Upcrossing.lean
theorem Adapted.integrable_upcrossingsBefore [IsFiniteMeasure μ] (hf : Adapted ℱ f) (hab : a < b) :
    Integrable (fun ω => (upcrossingsBefore a b f N ω : ℝ)) μ
-- Mathlib/Data/Multiset/Basic.lean
theorem sizeOf_lt_sizeOf_of_mem [SizeOf α] {x : α} {s : Multiset α} (hx : x ∈ s) :
    SizeOf.sizeOf x < SizeOf.sizeOf s
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
theorem restrict_nonzero_iff (μ : FiniteMeasure Ω) (A : Set Ω) : μ.restrict A ≠ 0 ↔ μ A ≠ 0
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
@[reassoc]
theorem prod.lift_fst {W X Y : C} [HasBinaryProduct X Y] (f : W ⟶ X) (g : W ⟶ Y) :
    prod.lift f g ≫ prod.fst = f
-- Mathlib/Probability/Density.lean
@[measurability]
theorem HasPDF.aemeasurable (X : Ω → E) (ℙ : Measure Ω)
    (μ : Measure E) [hX : HasPDF X ℙ μ] : AEMeasurable X ℙ
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt8.toNat_div (x y : UInt8) : (x / y).toNat = x.toNat / y.toNat
-- Mathlib/Algebra/Category/Grp/Colimits.lean
@[simp]
theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
    (coconeMorphism.{w} F j') (F.map f x) = (coconeMorphism F j) x
-- Mathlib/Topology/ContinuousFunction/ZeroAtInfty.lean
@[simp]
theorem coe_sub : ⇑(f - g) = f - g
-- Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean
theorem HasStrictFDerivAt.cpow (hf : HasStrictFDerivAt f f' x) (hg : HasStrictFDerivAt g g' x)
    (h0 : f x ∈ slitPlane) : HasStrictFDerivAt (fun x => f x ^ g x)
      ((g x * f x ^ (g x - 1)) • f' + (f x ^ g x * Complex.log (f x)) • g') x
-- .lake/packages/lean4/src/lean/Init/Data/Nat/SOM.lean
theorem Expr.eq_of_toPoly_eq (ctx : Context) (a b : Expr) (h : a.toPoly == b.toPoly) : a.denote ctx = b.denote ctx
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem head?_map (f : α → β) (l : List α) : head? (map f l) = (head? l).map f
-- Mathlib/Order/RelIso/Basic.lean
@[simp]
protected theorem cast_symm {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} (h₁ : α = β)
    (h₂ : HEq r s) : (RelIso.cast h₁ h₂).symm = RelIso.cast h₁.symm h₂.symm
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive addOrderOf_add_eq_mul_addOrderOf_of_coprime]
theorem orderOf_mul_eq_mul_orderOf_of_coprime (h : Commute x y)
    (hco : (orderOf x).Coprime (orderOf y)) : orderOf (x * y) = orderOf x * orderOf y
-- Mathlib/Data/Complex/Module.lean
@[simp]
theorem liftAux_I : liftAux I I_mul_I = AlgHom.id ℝ ℂ
-- Mathlib/CategoryTheory/ComposableArrows.lean
lemma mk₁_surjective (X : ComposableArrows C 1) : ∃ (X₀ X₁ : C) (f : X₀ ⟶ X₁), X = mk₁ f
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
lemma deriv_eqOn {f' : 𝕜 → F} (hs : IsOpen s) (hf' : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) :
    s.EqOn (deriv f) f'
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem range'_concat (s n : Nat) : range' s (n + 1) step = range' s n step ++ [s + step * n]
-- Mathlib/Data/Matrix/Basic.lean
theorem submatrix_map (f : α → β) (e₁ : l → m) (e₂ : o → n) (A : Matrix m n α) :
    (A.map f).submatrix e₁ e₂ = (A.submatrix e₁ e₂).map f
-- Mathlib/CategoryTheory/Closed/Monoidal.lean
theorem uncurry_eq (g : Y ⟶ A ⟶[C] X) : uncurry g = (A ◁ g) ≫ (ihom.ev A).app X
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem sInter_diff_singleton_univ (s : Set (Set α)) : ⋂₀ (s \ {univ}) = ⋂₀ s
-- Mathlib/Data/Matroid/Closure.lean
lemma Indep.insert_indep_iff (hI : M.Indep I) :
    M.Indep (insert e I) ↔ e ∈ M.E \ M.closure I ∨ e ∈ I
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem splits_mul_iff {f g : K[X]} (hf : f ≠ 0) (hg : g ≠ 0) :
    (f * g).Splits i ↔ f.Splits i ∧ g.Splits i
-- Mathlib/Order/UpperLower/Basic.lean
@[simp] lemma erase_idem (s : LowerSet α) (a : α) : (s.erase a).erase a = s.erase a
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem MeasurableSet.map_coe_volume {s : Set α} (hs : MeasurableSet s) :
    volume.map ((↑) : s → α) = restrict volume s
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive]
lemma comp_left_injective (e : M ≃* N) : Injective fun f : N →* P ↦ f.comp (e : M →* N)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem ne_of_lt {a b : Nat} (h : a < b) : a ≠ b
-- Mathlib/CategoryTheory/Monoidal/End.lean
@[simp]
theorem ε_inv_app_obj (n : M) (X : C) :
    F.εIso.inv.app ((F.obj n).obj X) = (F.μ n (𝟙_ M)).app X ≫ (F.map (ρ_ n).hom).app X
-- Mathlib/Probability/Kernel/MeasurableIntegral.lean
theorem _root_.Measurable.setLIntegral_kernel {f : β → ℝ≥0∞} (hf : Measurable f) {s : Set β}
    (hs : MeasurableSet s) : Measurable fun a => ∫⁻ b in s, f b ∂κ a
-- Mathlib/Order/Filter/Basic.lean
@[trans]
theorem EventuallyEq.trans {l : Filter α} {f g h : α → β} (H₁ : f =ᶠ[l] g) (H₂ : g =ᶠ[l] h) :
    f =ᶠ[l] h
-- Mathlib/LinearAlgebra/PerfectPairing.lean
@[simp]
theorem toDualLeft_apply (a : M) : p.toDualLeft a = p a
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem HasDerivAtFilter.isBigO_sub (h : HasDerivAtFilter f f' x L) :
    (fun x' => f x' - f x) =O[L] fun x' => x' - x
-- Mathlib/FieldTheory/RatFunc/AsPolynomial.lean
theorem eval₂_denom_ne_zero {x : RatFunc K} (h : eval f a x ≠ 0) :
    Polynomial.eval₂ f a (denom x) ≠ 0
-- Mathlib/LinearAlgebra/PiTensorProduct.lean
@[simp]
theorem congr_symm_tprod (f : Π i, s i ≃ₗ[R] t i) (p : Π i, t i) :
    (congr f).symm (tprod R p) = tprod R (fun (i : ι) ↦ (f i).symm (p i))
-- Mathlib/Data/List/ReduceOption.lean
@[simp]
theorem reduceOption_cons_of_none (l : List (Option α)) :
    reduceOption (none :: l) = l.reduceOption
-- Mathlib/Logic/Nonempty.lean
@[simp]
theorem nonempty_psum {α β} : Nonempty (α ⊕' β) ↔ Nonempty α ∨ Nonempty β
-- Mathlib/GroupTheory/Torsion.lean
/-- A module with a finite ring of scalars is additively torsion. -/
theorem IsTorsion.module_of_finite [Ring R] [Finite R] [Module R M] : IsTorsion M
-- Mathlib/MeasureTheory/Measure/Haar/Unique.lean
/-- The parameterized integral `x ↦ ∫ y, g (y⁻¹ * x) ∂μ` depends continuously on `y` when `g` is a
compactly supported continuous function on a topological group `G`, and `μ` is finite on compact
sets. -/
@[to_additive]
lemma continuous_integral_apply_inv_mul
    {G : Type*} [TopologicalSpace G] [LocallyCompactSpace G] [Group G] [TopologicalGroup G]
    [MeasurableSpace G] [BorelSpace G]
    {μ : Measure G} [IsFiniteMeasureOnCompacts μ] {E : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] {g : G → E}
    (hg : Continuous g) (h'g : HasCompactSupport g) :
    Continuous (fun (x : G) ↦ ∫ y, g (y⁻¹ * x) ∂μ)
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem edgeSet_bot : (⊥ : Subgraph G).edgeSet = ∅
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
@[simp]
theorem coe_mk' {s : Set R} {sm : Subsemigroup R} (hm : ↑sm = s) {sa : AddSubgroup R}
    (ha : ↑sa = s) : (NonUnitalSubring.mk' s sm sa hm ha : Set R) = s
-- Mathlib/Data/Finsupp/Basic.lean
theorem sum_smul_index' [AddMonoid M] [DistribSMul R M] [AddCommMonoid N] {g : α →₀ M} {b : R}
    {h : α → M → N} (h0 : ∀ i, h i 0 = 0) : (b • g).sum h = g.sum fun i c => h i (b • c)
-- Mathlib/Logic/Relation.lean
@[elab_as_elim]
theorem head_induction_on {P : ∀ a : α, ReflTransGen r a b → Prop} {a : α} (h : ReflTransGen r a b)
    (refl : P b refl)
    (head : ∀ {a c} (h' : r a c) (h : ReflTransGen r c b), P c h → P a (h.head h')) : P a h