ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
/-- If three points are not collinear, the angle between them is positive. -/
theorem angle_pos_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear ℝ ({p₁, p₂, p₃} : Set P)) :
    0 < ∠ p₁ p₂ p₃
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
/-- Rectangles formed by π-systems form a π-system. -/
theorem IsPiSystem.prod {C : Set (Set α)} {D : Set (Set β)} (hC : IsPiSystem C)
    (hD : IsPiSystem D) : IsPiSystem (image2 (· ×ˢ ·) C D)
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
theorem deriv_const_smul (c : R) (hf : DifferentiableAt 𝕜 f x) :
    deriv (fun y => c • f y) x = c • deriv f x
-- Mathlib/Topology/Order/UpperLowerSetTopology.lean
lemma ofLowerSet_inj {a b : WithLowerSet α} : ofLowerSet a = ofLowerSet b ↔ a = b
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp]
theorem addCases_right {m n : Nat} {motive : Fin (m + n) → Sort _} {left right} (i : Fin n) :
    addCases (motive := motive) left right (natAdd m i) = right i
-- Mathlib/GroupTheory/Submonoid/Center.lean
@[to_additive]
theorem unitsCenterToCenterUnits_injective [Monoid M] :
    Function.Injective (unitsCenterToCenterUnits M)
-- Mathlib/Order/Monotone/Basic.lean
protected theorem Monotone.comp_monotoneOn (hg : Monotone g) (hf : MonotoneOn f s) :
    MonotoneOn (g ∘ f) s
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
@[simp] protected theorem ediv_zero : ∀ a : Int, a / 0 = 0
-- Mathlib/SetTheory/Game/PGame.lean
theorem lf_congr_imp {x₁ y₁ x₂ y₂ : PGame} (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ ⧏ y₁ → x₂ ⧏ y₂
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
/-- The coercion of a subgroupoid as a groupoid -/
@[simps comp_coe, simps (config := .lemmasOnly) inv_coe]
instance coe : Groupoid S.objs
-- Mathlib/Topology/MetricSpace/IsometricSMul.lean
@[to_additive (attr := simp)]
theorem constSMul_symm (c : G) : (constSMul c : X ≃ᵢ X).symm = constSMul c⁻¹
-- Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
/-- Special case of the **Plünnecke-Ruzsa inequality**. Multiplication version. -/
@[to_additive "Special case of the **Plünnecke-Ruzsa inequality**. Addition version."]
theorem pluennecke_ruzsa_inequality_pow_mul (hA : A.Nonempty) (B : Finset α) (n : ℕ) :
    (B ^ n).card ≤ ((A * B).card / A.card : ℚ≥0) ^ n * A.card
-- Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
@[simp, norm_cast] lemma coe_mk (μ : Measure Ω) (hμ) : toMeasure ⟨μ, hμ⟩ = μ
-- Mathlib/RingTheory/Ideal/Over.lean
theorem IsIntegralClosure.comap_ne_bot [Nontrivial R] {I : Ideal A} (I_ne_bot : I ≠ ⊥) :
    I.comap (algebraMap R A) ≠ ⊥
-- Mathlib/Combinatorics/HalesJewett.lean
/-- The type of combinatorial subspaces. A subspace `l : Subspace η α ι` in the hypercube `ι → α`
defines a function `(η → α) → ι → α` from `η → α` to the hypercube, such that for each coordinate
`i : ι` and direction `e : η`, the function `fun x ↦ l x i` is either `fun x ↦ x e` for some
direction `e : η` or constant. We require subspaces to be non-degenerate in the sense that, for
every `e : η`, `fun x ↦ l x i` is `fun x ↦ x e` for at least one `i`.

Formally, a subspace is represented by a word `l.idxFun : ι → α ⊕ η` which says whether
`fun x ↦ l x i` is `fun x ↦ x e` (corresponding to `l.idxFun i = Sum.inr e`) or constantly `a`
(corresponding to `l.idxFun i = Sum.inl a`).

When `α` has size `1` there can be many elements of `Subspace η α ι` defining the same function. -/
@[ext]
structure Subspace (η α ι : Type*) where
  /-- The word representing a combinatorial subspace. `l.idxfun i = Sum.inr e` means that
  `l x i = x e` for all `x` and `l.idxfun i = some a` means that `l x i = a` for all `x`. -/
  idxFun : ι → α ⊕ η
  /-- We require combinatorial subspaces to be nontrivial in the sense that `fun x ↦ l x i` is
  `fun x ↦ x e` for at least one coordinate `i`. -/
  proper : ∀ e, ∃ i, idxFun i = Sum.inr e
-- Mathlib/Data/Finsupp/Multiset.lean
theorem Finsupp.toMultiset_eq_iff [DecidableEq α] {f : α →₀ ℕ} {s : Multiset α} :
    Finsupp.toMultiset f = s ↔ f = Multiset.toFinsupp s
-- Mathlib/Topology/Separation.lean
theorem t0Space_iff_nhds_injective (X : Type u) [TopologicalSpace X] :
    T0Space X ↔ Injective (𝓝 : X → Filter X)
-- Mathlib/Data/Int/Interval.lean
theorem card_Ico_of_le (h : a ≤ b) : ((Ico a b).card : ℤ) = b - a
-- Mathlib/Data/ENNReal/Basic.lean
theorem image_coe_nnreal_ennreal (h : t.OrdConnected) : ((↑) '' t : Set ℝ≥0∞).OrdConnected
-- Mathlib/Topology/Connected/PathConnected.lean
theorem range_reparam (γ : Path x y) {f : I → I} (hfcont : Continuous f) (hf₀ : f 0 = 0)
    (hf₁ : f 1 = 1) : range (γ.reparam f hfcont hf₀ hf₁) = range γ
-- Mathlib/Order/Hom/Set.lean
theorem range_eq (e : α ≃o β) : Set.range e = Set.univ
-- Mathlib/NumberTheory/MulChar/Lemmas.lean
/-- There is always a character on `F` of order `#F-1` with values in a ring that has
a primitive `(#F-1)`th root of unity. -/
lemma exists_mulChar_orderOf_eq_card_units [DecidableEq F]
    {ζ : R} (hζ : IsPrimitiveRoot ζ (Monoid.orderUnits F)) :
    ∃ χ : MulChar F R, orderOf χ = Fintype.card Fˣ
-- Mathlib/Topology/MetricSpace/Isometry.lean
@[simp]
theorem ediam_image (h : α ≃ᵢ β) (s : Set α) : EMetric.diam (h '' s) = EMetric.diam s
-- Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean
@[simp]
theorem PreservesEqualizer.iso_inv_ι :
    (PreservesEqualizer.iso G f g).inv ≫ G.map (equalizer.ι f g) =
      equalizer.ι (G.map f) (G.map g)
-- Mathlib/Data/List/Indexes.lean
theorem mapIdxMAux'_eq_mapIdxMGo {α} (f : ℕ → α → m PUnit) (as : List α) (arr : Array PUnit) :
    mapIdxMAux' f arr.size as = mapIdxM.go f as arr *> pure PUnit.unit
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
lemma baseChange_polynomialX : (W.baseChange B).toAffine.polynomialX =
    (W.baseChange A).toAffine.polynomialX.map (mapRingHom f)
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem himp_bihimp_right : b ⇨ a ⇔ b = b ⇨ a
-- Mathlib/Topology/Algebra/Algebra.lean
theorem one_def : (1 : A →A[R] A) = ContinuousAlgHom.id R A
-- Mathlib/Order/JordanHolder.lean
/-- Two `CompositionSeries` are equal if they have the same elements. See also `ext_fun`. -/
@[ext]
theorem ext {s₁ s₂ : CompositionSeries X} (h : ∀ x, x ∈ s₁ ↔ x ∈ s₂) : s₁ = s₂
-- Mathlib/NumberTheory/Padics/PadicNorm.lean
theorem sum_le' {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α}
    (hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i ∈ s, F i) ≤ t
-- Mathlib/Order/SymmDiff.lean
theorem symmDiff_eq_iff_sdiff_eq (ha : a ≤ c) : a ∆ b = c ↔ c \ a = b
-- Mathlib/Combinatorics/SetFamily/FourFunctions.lean
lemma le_collapse_of_insert_mem (ha : a ∉ s) (hf : 0 ≤ f) (hts : t = insert a s) (ht : t ∈ 𝒜) :
    f t ≤ collapse 𝒜 a f s
-- Mathlib/Logic/Equiv/PartialEquiv.lean
protected theorem leftInvOn : LeftInvOn e.symm e e.source
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem isLUB_csSup' {s : Set α} (hs : BddAbove s) : IsLUB s (sSup s)
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive add_nsmul]
lemma pow_add (a : M) (m : ℕ) : ∀ n, a ^ (m + n) = a ^ m * a ^ n
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem nonnegg_comm {c d : ℕ} {x y : ℤ} : Nonnegg c d x y = Nonnegg d c y x
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem mem_merge_right (s : α → α → Bool) (h : x ∈ r) : x ∈ merge s l r
-- Mathlib/Topology/Separation.lean
theorem Function.LeftInverse.closedEmbedding [T2Space X] {f : X → Y} {g : Y → X}
    (h : Function.LeftInverse f g) (hf : Continuous f) (hg : Continuous g) : ClosedEmbedding g
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem lookup_replicate_self_of_pos {a : α} (h : 0 < n) :
    (replicate n (a, b)).lookup a = some b
-- Mathlib/Algebra/Group/Commute/Defs.lean
@[to_additive]
theorem pow_pow_self (a : M) (m n : ℕ) : Commute (a ^ m) (a ^ n)
-- Mathlib/MeasureTheory/Constructions/Polish/Basic.lean
/-- If `f : X → Z` is a Borel measurable map from a standard Borel space to a
countably separated measurable space and the range of `f` is measurable,
then the preimage of a set `s` is measurable
if and only if the intesection with `Set.range f` is measurable. -/
theorem measurableSet_preimage_iff_inter_range {f : X → Z} [CountablySeparated (range f)]
    (hf : Measurable f) (hr : MeasurableSet (range f)) {s : Set Z} :
    MeasurableSet (f ⁻¹' s) ↔ MeasurableSet (s ∩ range f)
-- Mathlib/Data/Set/Pairwise/Lattice.lean
theorem Set.PairwiseDisjoint.subset_of_biUnion_subset_biUnion (h₀ : (s ∪ t).PairwiseDisjoint f)
    (h₁ : ∀ i ∈ s, (f i).Nonempty) (h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i) : s ⊆ t
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem bihimp_himp_eq_inf : a ⇔ (a ⇨ b) = a ⊓ b
-- Mathlib/CategoryTheory/Monad/Algebra.lean
/-- Given a coalgebra morphism whose carrier part is a monomorphism, we get an algebra monomorphism.
-/
theorem algebra_mono_of_mono {X Y : Coalgebra G} (f : X ⟶ Y) [h : Mono f.f] : Mono f
-- Mathlib/Analysis/BoxIntegral/Box/Basic.lean
@[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
protected theorem one_mul (k : Fin (n + 1)) : (1 : Fin (n + 1)) * k = k
-- Mathlib/Topology/Compactness/Compact.lean
theorem Tendsto.isCompact_insert_range_of_cocompact {f : X → Y} {y}
    (hf : Tendsto f (cocompact X) (𝓝 y)) (hfc : Continuous f) : IsCompact (insert y (range f))
-- Mathlib/Algebra/Ring/CentroidHom.lean
@[simp]
theorem toEnd_one : (1 : CentroidHom α).toEnd = 1
-- Mathlib/Order/Interval/Set/Image.lean
@[simp]
lemma image_subtype_val_Ico_Iic {a b : α} (c : Ico a b) : Subtype.val '' Iic c = Icc a c
-- Mathlib/Data/List/ToFinsupp.lean
theorem toFinsupp_apply_lt (hn : n < l.length) : l.toFinsupp n = l.get ⟨n, hn⟩
-- Mathlib/Data/Finset/Pi.lean
theorem pi_const_singleton {β : Type*} (s : Finset α) (i : β) :
    (s.pi fun _ => ({i} : Finset β)) = {fun _ _ => i}
-- Mathlib/ModelTheory/FinitelyGenerated.lean
theorem CG.of_map_embedding {N : Type*} [L.Structure N] (f : M ↪[L] N) {s : L.Substructure M}
    (hs : (s.map f.toHom).CG) : s.CG
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem isOpenMap_mul_right (a : G) : IsOpenMap (· * a)
-- Mathlib/Data/Nat/Defs.lean
@[simp] lemma one_mod (n : ℕ) : 1 % (n + 2) = 1
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem range_sin_infinite : (range Real.sin).Infinite
-- Mathlib/GroupTheory/Commutator.lean
theorem commutatorElement_eq_one_iff_mul_comm : ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem type_subrel_lt (o : Ordinal.{u}) :
    type (Subrel ((· < ·) : Ordinal → Ordinal → Prop) { o' : Ordinal | o' < o })
      = Ordinal.lift.{u + 1} o
-- Mathlib/Data/Multiset/Dedup.lean
theorem count_dedup (m : Multiset α) (a : α) : m.dedup.count a = if a ∈ m then 1 else 0
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem ae_eq_comp {f : α → β} {g g' : β → δ} (hf : AEMeasurable f μ) (h : g =ᵐ[μ.map f] g') :
    g ∘ f =ᵐ[μ] g' ∘ f
-- Mathlib/Logic/Function/Basic.lean
@[simp]
theorem update_idem {α} [DecidableEq α] {β : α → Sort*} {a : α} (v w : β a) (f : ∀ a, β a) :
    update (update f a v) a w = update f a w
-- Mathlib/Data/Finset/Union.lean
@[simp] lemma singleton_disjiUnion (a : α) {h} : Finset.disjiUnion {a} t h = t a
-- Mathlib/Data/Nat/Factorization/Basic.lean
@[simp]
lemma factorizationLCMRight_zero_right : factorizationLCMRight a 0 = 1
-- Mathlib/Algebra/Quandle.lean
/-- A *Shelf* is a structure with a self-distributive binary operation.
The binary operation is regarded as a left action of the type on itself.
-/
class Shelf (α : Type u) where
  /-- The action of the `Shelf` over `α`-/
  act : α → α → α
  /-- A verification that `act` is self-distributive-/
  self_distrib : ∀ {x y z : α}, act x (act y z) = act (act x y) (act x z)
-- Mathlib/Algebra/Tropical/BigOperators.lean
theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → Tropical R) :
    untrop (∑ i ∈ s, f i) = s.inf (untrop ∘ f)
-- Mathlib/Data/Option/Basic.lean
theorem bind_eq_bind' {α β : Type u} {f : α → Option β} {x : Option α} : x >>= f = x.bind f
-- Mathlib/LinearAlgebra/Trace.lean
@[simp]
theorem trace_transpose' (f : M →ₗ[R] M) :
    trace R _ (Module.Dual.transpose (R := R) f) = trace R M f
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
@[to_additive]
theorem smul_opposite_mul {H : Subgroup G} (x g : G) (h : H.op) :
    h • (g * x) = g * h • x
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem next : ∀ {it}, ValidFor l (c :: r) it → ValidFor (c :: l) r it.next
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[simp]
theorem toNonUnitalSubalgebra_eq_top {S : NonUnitalStarSubalgebra R A} :
    S.toNonUnitalSubalgebra = ⊤ ↔ S = ⊤
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Bounded.of_lt :
    ∀ {t o₁ o₂} {x : α}, Bounded t o₁ o₂ → Bounded nil o₁ x → All (· < x) t → Bounded t o₁ x
-- Mathlib/Data/Rel.lean
theorem preimage_mono {s t : Set β} (h : s ⊆ t) : r.preimage s ⊆ r.preimage t
-- Mathlib/Order/Disjoint.lean
theorem left_le_iff (h : IsCompl x y) : x ≤ z ↔ Codisjoint z y
-- Mathlib/Data/List/Lattice.lean
@[symm]
theorem Disjoint.symm (d : Disjoint l₁ l₂) : Disjoint l₂ l₁
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
@[simp] protected theorem one_lt_two_pow_iff : 1 < 2 ^ n ↔ n ≠ 0
-- Mathlib/Order/Interval/Finset/Basic.lean
@[simp]
theorem Ioc_eq_empty_iff : Ioc a b = ∅ ↔ ¬a < b
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
theorem integral_comp_rpow_Ioi_of_pos {g : ℝ → E} {p : ℝ} (hp : 0 < p) :
    (∫ x in Ioi 0, (p * x ^ (p - 1)) • g (x ^ p)) = ∫ y in Ioi 0, g y
-- Mathlib/FieldTheory/Perfect.lean
theorem iterateFrobeniusEquiv_symm_add : (iterateFrobeniusEquiv R p (m + n)).symm =
    (iterateFrobeniusEquiv R p n).symm.trans (iterateFrobeniusEquiv R p m).symm
-- Mathlib/NumberTheory/SumTwoSquares.lean
/-- If `-1` is a square modulo coprime natural numbers `m` and `n`, then `-1` is also
a square modulo `m*n`. -/
theorem ZMod.isSquare_neg_one_mul {m n : ℕ} (hc : m.Coprime n) (hm : IsSquare (-1 : ZMod m))
    (hn : IsSquare (-1 : ZMod n)) : IsSquare (-1 : ZMod (m * n))
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem isOpen_iff : IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ball x ε ⊆ s
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
@[simp]
theorem weightedVSubVSubWeights_apply_of_ne [DecidableEq ι] {i j t : ι} (hi : t ≠ i) (hj : t ≠ j) :
    weightedVSubVSubWeights k i j t = 0
-- Mathlib/CategoryTheory/Limits/Opposites.lean
theorem has_cofiltered_limits_of_has_filtered_colimits_op [HasFilteredColimitsOfSize.{v₂, u₂} Cᵒᵖ] :
    HasCofilteredLimitsOfSize.{v₂, u₂} C
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
theorem ortho_smul_right {B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] V} {x y} {a : K₂} {ha : a ≠ 0} :
    IsOrtho B x y ↔ IsOrtho B x (a • y)
-- Mathlib/Data/Real/GoldenRatio.lean
/-- Binet's formula as a dependent equality. -/
theorem Real.coe_fib_eq : ∀ n, (Nat.fib n : ℝ) = (φ ^ n - ψ ^ n) / √5
-- Mathlib/NumberTheory/Padics/PadicNorm.lean
/-- `padicNorm p` is symmetric. -/
@[simp]
protected theorem neg (q : ℚ) : padicNorm p (-q) = padicNorm p q
-- Mathlib/Analysis/SpecialFunctions/Sqrt.lean
theorem derivWithin_sqrt (hf : DifferentiableWithinAt ℝ f s x) (hx : f x ≠ 0)
    (hxs : UniqueDiffWithinAt ℝ s x) :
    derivWithin (fun x => √(f x)) s x = derivWithin f s x / (2 * √(f x))
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem map_map (g : N →* P) (f : G →* N) : (K.map f).map g = K.map (g.comp f)
-- Mathlib/MeasureTheory/Group/Action.lean
@[to_additive (attr := simp)]
theorem measure_smul (c : G) (s : Set α) : μ (c • s) = μ s
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem le_ciSup_of_le {f : ι → α} (H : BddAbove (range f)) (c : ι) (h : a ≤ f c) : a ≤ iSup f
-- Mathlib/Algebra/Ring/BooleanRing.lean
theorem le_sup_inf_aux (a b c : α) : (a + b + a * b) * (a + c + a * c) = a + b * c + a * (b * c)
-- Mathlib/FieldTheory/MvPolynomial.lean
theorem rank_mvPolynomial : Module.rank K (MvPolynomial σ K) = Cardinal.mk (σ →₀ ℕ)
-- Mathlib/Algebra/Module/Submodule/Lattice.lean
theorem nontrivial_iff_ne_bot : Nontrivial p ↔ p ≠ ⊥
-- Mathlib/AlgebraicTopology/Nerve.lean
/-- The nerve of a category -/
@[simps]
def nerve (C : Type u) [Category.{v} C] : SSet.{max u v}
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast]
theorem intCast_imK (z : ℤ) : (z : ℍ[R]).imK = 0
-- Mathlib/Topology/Constructions.lean
theorem closedEmbedding_sigmaMk {i : ι} : ClosedEmbedding (@Sigma.mk ι σ i)
-- Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean
theorem isConformalMap_id : IsConformalMap (id R M)
-- Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean
lemma completedHurwitzZetaOdd_neg (a : UnitAddCircle) (s : ℂ) :
    completedHurwitzZetaOdd (-a) s = -completedHurwitzZetaOdd a s
-- Mathlib/Topology/Order/Lattice.lean
lemma inf_nhds [Inf L] [ContinuousInf L] (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun i => f i ⊓ g i) l (𝓝 (x ⊓ y))
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
theorem trailingDegree_eq_iff_natTrailingDegree_eq {p : R[X]} {n : ℕ} (hp : p ≠ 0) :
    p.trailingDegree = n ↔ p.natTrailingDegree = n
-- Mathlib/Combinatorics/Additive/Corner/Roth.lean
/-- The **corners theorem** for finite abelian groups.

The maximum density of a corner-free set in `G × G` goes to zero as `|G|` tends to infinity. -/
theorem corners_theorem (ε : ℝ) (hε : 0 < ε) (hG : cornersTheoremBound ε ≤ card G)
    (A : Finset (G × G)) (hAε : ε * card G ^ 2 ≤ A.card) : ¬ IsCornerFree (A : Set (G × G))
-- Mathlib/Computability/TMToPartrec.lean
theorem trStmts₁_self (q) : q ∈ trStmts₁ q
-- Mathlib/Topology/Algebra/UniformGroup.lean
/-- A group homomorphism (a bundled morphism of a type that implements `MonoidHomClass`) between
two uniform groups is uniformly continuous provided that it is continuous at one. See also
`continuous_of_continuousAt_one`. -/
@[to_additive "An additive group homomorphism (a bundled morphism of a type that implements
`AddMonoidHomClass`) between two uniform additive groups is uniformly continuous provided that it
is continuous at zero. See also `continuous_of_continuousAt_zero`."]
theorem uniformContinuous_of_continuousAt_one {hom : Type*} [UniformSpace β] [Group β]
    [UniformGroup β] [FunLike hom α β] [MonoidHomClass hom α β]
    (f : hom) (hf : ContinuousAt f 1) :
    UniformContinuous f
-- Mathlib/MeasureTheory/Integral/Average.lean
theorem integral_sub_average (μ : Measure α) [IsFiniteMeasure μ] (f : α → E) :
    ∫ x, f x - ⨍ a, f a ∂μ ∂μ = 0
-- Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean
@[to_additive (attr := mono, gcongr) nsmul_le_nsmul_right]
theorem pow_le_pow_left' [CovariantClass M M (swap (· * ·)) (· ≤ ·)] {a b : M} (hab : a ≤ b) :
    ∀ i : ℕ, a ^ i ≤ b ^ i
-- Mathlib/Data/Int/Defs.lean
@[simp] lemma sign_natCast_add_one (n : ℕ) : sign (n + 1) = 1
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
/-- If `f g : α → ℝ≥0∞` are two functions and one of them is (a.e.) measurable, then the Lebesgue
integral of `f + g` equals the sum of integrals. This lemma assumes that `g` is integrable, see also
`MeasureTheory.lintegral_add_left` and primed versions of these lemmas. -/
@[simp]
theorem lintegral_add_right (f : α → ℝ≥0∞) {g : α → ℝ≥0∞} (hg : Measurable g) :
    ∫⁻ a, f a + g a ∂μ = ∫⁻ a, f a ∂μ + ∫⁻ a, g a ∂μ
-- Mathlib/Order/Filter/Germ/Basic.lean
theorem const_eventuallyEq [NeBot l] {a b : β} : ((fun _ => a) =ᶠ[l] fun _ => b) ↔ a = b
-- Mathlib/Topology/Homotopy/HomotopyGroup.lean
@[simp]
theorem const_apply {t} : (@const N X _ x) t = x
-- Mathlib/Topology/VectorBundle/Hom.lean
theorem continuousLinearMap_symm_apply (p : B × (F₁ →SL[σ] F₂)) :
    (continuousLinearMap σ e₁ e₂).toPartialEquiv.symm p =
      ⟨p.1, .comp (e₂.symmL 𝕜₂ p.1) (p.2.comp (e₁.continuousLinearMapAt 𝕜₁ p.1))⟩
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors
    {p : R[X]} {t : R} {n : ℕ} (h : p ≠ 0)
    (hroot : ∀ m ≤ n, (derivative^[m] p).IsRoot t)
    (hnzd : (n.factorial : R) ∈ nonZeroDivisors R) :
    n < p.rootMultiplicity t
-- Mathlib/Topology/Instances/ENNReal.lean
@[instance]
theorem nhdsWithin_Ioi_one_neBot : (𝓝[>] (1 : ℝ≥0∞)).NeBot
-- Mathlib/Topology/Connected/Basic.lean
lemma preconnectedSpace_iff_univ : PreconnectedSpace α ↔ IsPreconnected (univ : Set α)
-- Mathlib/Analysis/Calculus/Deriv/Comp.lean
theorem HasStrictDerivAt.scomp (hg : HasStrictDerivAt g₁ g₁' (h x)) (hh : HasStrictDerivAt h h' x) :
    HasStrictDerivAt (g₁ ∘ h) (h' • g₁') x
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem uniqueDiffOn_Ioc (a b : ℝ) : UniqueDiffOn ℝ (Ioc a b)
-- Mathlib/CategoryTheory/Monad/Basic.lean
/-- A morphism of comonads is a natural transformation compatible with ε and δ. -/
@[ext]
structure ComonadHom (M N : Comonad C) extends NatTrans (M : C ⥤ C) N where
  app_ε : ∀ X, app X ≫ N.ε.app X = M.ε.app X := by aesop_cat
  app_δ : ∀ X, app X ≫ N.δ.app X = M.δ.app X ≫ app _ ≫ N.map (app X) := by aesop_cat
-- Mathlib/Algebra/Homology/DerivedCategory/SingleTriangle.lean
/-- The distinguished triangle in the derived category of `C` given by a
short exact short complex in `C`. -/
lemma singleTriangle_distinguished :
    hS.singleTriangle ∈ distTriang (DerivedCategory C)
-- Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
@[simp]
theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f
-- Mathlib/Data/List/Indexes.lean
theorem list_reverse_induction (p : List α → Prop) (base : p [])
    (ind : ∀ (l : List α) (e : α), p l → p (l ++ [e])) : (∀ (l : List α), p l)
-- Mathlib/Data/Fin/Basic.lean
theorem castPred_zero (h := Fin.ext_iff.not.2 last_pos.ne)  :
    castPred (0 : Fin (n + 2)) h = 0
-- Mathlib/Algebra/Group/Pi/Lemmas.lean
@[to_additive]
theorem const_ne_one : const ι a ≠ 1 ↔ a ≠ 1
-- Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean
theorem IsAffineOpen.isQuasiSeparated {X : Scheme} {U : X.Opens} (hU : IsAffineOpen U) :
    IsQuasiSeparated (U : Set X)
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma addY_neg {P : Fin 3 → R} (hP : W'.Equation P) : W'.addY P (W'.neg P) = -W'.dblZ P ^ 3
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem mem_span_pair {x y z : α} : z ∈ span ({x, y} : Set α) ↔ ∃ a b, a * x + b * y = z
-- Mathlib/CategoryTheory/Bicategory/Basic.lean
/-- Precomposition of a 1-morphism as a functor. -/
@[simps]
def precomp (c : B) (f : a ⟶ b) : (b ⟶ c) ⥤ (a ⟶ c)
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
lemma homologyMap_eq :
    homologyMap φ = h₁.homologyIso.hom ≫ γ.φH ≫ h₂.homologyIso.inv
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem subset_inter_iff {s t r : Set α} : r ⊆ s ∩ t ↔ r ⊆ s ∧ r ⊆ t
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
theorem coe_to_continuousMap (f : P →ᴬ[R] Q) : ((f : C(P, Q)) : P → Q) = f
-- Mathlib/Algebra/Homology/ShortComplex/Ab.lean
lemma exact_iff_surjective_abToCycles :
    S.Exact ↔ Function.Surjective S.abToCycles
-- Mathlib/Algebra/Order/Group/Unbundled/Abs.lean
@[to_additive] lemma inv_le_mabs (a : α) : a⁻¹ ≤ |a|ₘ
-- Mathlib/Logic/Basic.lean
theorem forall_eq_apply_imp_iff' {f : α → β} {p : β → Prop} :
    (∀ a b, b = f a → p b) ↔ ∀ a, p (f a)
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem reverse_singleton {u v : V} (h : G.Adj u v) : (cons h nil).reverse = cons (G.symm h) nil
-- Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
lemma strictMono_rpow_of_base_gt_one {b : ℝ} (hb : 1 < b) :
    StrictMono (b ^ · : ℝ → ℝ)
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1S_smul_left (T : Set α → E →L[ℝ] F) (c : ℝ) (f : α →₁ₛ[μ] E) :
    setToL1S (fun s => c • T s) f = c • setToL1S T f
-- Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean
@[elab_as_elim]
theorem compact_open_induction_on {P : X.Opens → Prop} (S : X.Opens)
    (hS : IsCompact S.1) (h₁ : P ⊥)
    (h₂ : ∀ (S : X.Opens) (_ : IsCompact S.1) (U : X.affineOpens), P S → P (S ⊔ U)) :
    P S
-- Mathlib/Data/Nat/PSub.lean
theorem psub_eq_sub {m n} (h : n ≤ m) : psub m n = some (m - n)
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
lemma zpow_ne_zero_iff {n : ℤ} (hn : n ≠ 0) : a ^ n ≠ 0 ↔ a ≠ 0
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem HasDerivWithinAt.mono_of_mem (h : HasDerivWithinAt f f' t x) (hst : t ∈ 𝓝[s] x) :
    HasDerivWithinAt f f' s x
-- Mathlib/Order/Interval/Basic.lean
@[simp, norm_cast]
theorem coe_pure (a : α) : (pure a : Set α) = {a}
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ioc_inter_Ioo_of_left_lt (h : b₁ < b₂) : Ioc a₁ b₁ ∩ Ioo a₂ b₂ = Ioc (max a₁ a₂) b₁