ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Quot.lean
@[simp]
theorem lift₂_mk (f : α → β → γ) (hr : ∀ a b₁ b₂, s b₁ b₂ → f a b₁ = f a b₂)
    (hs : ∀ a₁ a₂ b, r a₁ a₂ → f a₁ b = f a₂ b)
    (a : α) (b : β) : Quot.lift₂ f hr hs (Quot.mk r a) (Quot.mk s b) = f a b
-- Mathlib/Order/Basic.lean
theorem not_lt_iff_eq (h : a ≤ b) : ¬a < b ↔ a = b
-- Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean
@[simp]
theorem distortion_toSubordinate (π : Prepartition I) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    (π.toSubordinate r).distortion = π.distortion
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Prod.lean
theorem _root_.Continuous.prod_map_equivL {f : X → M₁ ≃L[𝕜] M₂} {g : X → M₃ ≃L[𝕜] M₄}
    (hf : Continuous fun x => (f x : M₁ →L[𝕜] M₂)) (hg : Continuous fun x => (g x : M₃ →L[𝕜] M₄)) :
    Continuous fun x => ((f x).prod (g x) : M₁ × M₃ →L[𝕜] M₂ × M₄)
-- Mathlib/Analysis/ODE/PicardLindelof.lean
/-- Picard-Lindelöf (Cauchy-Lipschitz) theorem. Use
`IsPicardLindelof.exists_forall_hasDerivWithinAt_Icc_eq` instead for the public API. -/
theorem exists_solution :
    ∃ f : ℝ → E, f v.t₀ = v.x₀ ∧ ∀ t ∈ Icc v.tMin v.tMax,
      HasDerivWithinAt f (v t (f t)) (Icc v.tMin v.tMax) t
-- Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
theorem rpow_div_two_eq_sqrt {x : ℝ} (r : ℝ) (hx : 0 ≤ x) : x ^ (r / 2) = √x ^ r
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem IsPreconnected.intermediate_value_Iio {s : Set X} (hs : IsPreconnected s) {l₁ l₂ : Filter X}
    [NeBot l₁] [NeBot l₂] (hl₁ : l₁ ≤ 𝓟 s) (hl₂ : l₂ ≤ 𝓟 s) {f : X → α} (hf : ContinuousOn f s)
    {v : α} (ht₁ : Tendsto f l₁ atBot) (ht₂ : Tendsto f l₂ (𝓝 v)) : Iio v ⊆ f '' s
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem gc_map_comap : GaloisConnection (Ideal.map f) (Ideal.comap f)
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
theorem eq_zero_of_ne_zero_of_mul_left_eq_zero [NoZeroDivisors M] {x y : M} (hnx : x ≠ 0)
    (hxy : x * y = 0) : y = 0
-- Mathlib/Analysis/Convex/Intrinsic.lean
@[simp]
theorem closure_diff_intrinsicFrontier (s : Set P) :
    closure s \ intrinsicFrontier 𝕜 s = intrinsicInterior 𝕜 s
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
theorem mem_map_objs_iff (hφ : Function.Injective φ.obj) (d : D) :
    d ∈ (map φ hφ S).objs ↔ ∃ c ∈ S.objs, φ.obj c = d
-- Mathlib/NumberTheory/LSeries/Dirichlet.lean
/-- The L-series of the von Mangoldt function `Λ` equals the negative logarithmic derivative
of the Riemann zeta function on its domain of convergence `re s > 1`. -/
lemma LSeries_vonMangoldt_eq_deriv_riemannZeta_div {s : ℂ} (hs : 1 < s.re) :
    L ↗Λ s = - deriv riemannZeta s / riemannZeta s
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
/-- Each function of a uniformly equicontinuous family is uniformly continuous. -/
theorem UniformEquicontinuous.uniformContinuous {F : ι → β → α} (h : UniformEquicontinuous F)
    (i : ι) : UniformContinuous (F i)
-- Mathlib/Analysis/Normed/Group/Quotient.lean
theorem lift_mk {N : Type*} [SeminormedAddCommGroup N] (S : AddSubgroup M)
    (f : NormedAddGroupHom M N) (hf : ∀ s ∈ S, f s = 0) (m : M) :
    lift S f hf (S.normedMk m) = f m
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
@[simp]
theorem mul_pos_iff_of_pos_left [PosMulStrictMono α] [PosMulReflectLT α] (h : 0 < a) :
    0 < a * b ↔ 0 < b
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem sSup_eq_sup {ι : Type u} (f : ι → Ordinal.{max u v}) : sSup (Set.range f) = sup.{_, v} f
-- Mathlib/Logic/Equiv/Option.lean
@[simp]
theorem coe_optionSubtype_apply_apply
    [DecidableEq β] (x : β)
    (e : { e : Option α ≃ β // e none = x })
    (a : α) : ↑(optionSubtype x e a) = (e : Option α ≃ β) a
-- Mathlib/CategoryTheory/Linear/LinearFunctor.lean
@[simp]
theorem map_smul {X Y : C} (r : R) (f : X ⟶ Y) : F.map (r • f) = r • F.map f
-- Mathlib/Algebra/Polynomial/RingDivision.lean
theorem Monic.irreducible_of_degree_eq_one (hp1 : degree p = 1) (hm : Monic p) : Irreducible p
-- Mathlib/Data/Analysis/Topology.lean
@[simp]
theorem ofEquiv_val (E : σ ≃ τ) (F : Ctop α σ) (a : τ) : F.ofEquiv E a = F (E.symm a)
-- Mathlib/Data/Fin/Basic.lean
/-- Assume `k = l`. If two functions defined on `Fin k` and `Fin l` are equal on each element,
then they coincide (in the heq sense). -/
protected theorem heq_fun_iff {α : Sort*} {k l : ℕ} (h : k = l) {f : Fin k → α} {g : Fin l → α} :
    HEq f g ↔ ∀ i : Fin k, f i = g ⟨(i : ℕ), h ▸ i.2⟩
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem powerlt_aleph0 {c : Cardinal} (h : ℵ₀ ≤ c) : c ^< ℵ₀ = c
-- Mathlib/Analysis/InnerProductSpace/l2Space.lean
/-- Given a family of Hilbert spaces `G : ι → Type*`, a Hilbert sum of `G` consists of a Hilbert
space `E` and an orthogonal family `V : Π i, G i →ₗᵢ[𝕜] E` such that the induced isometry
`Φ : lp G 2 → E` is surjective.

Keeping in mind that `lp G 2` is "the" external Hilbert sum of `G : ι → Type*`, this is analogous
to `DirectSum.IsInternal`, except that we don't express it in terms of actual submodules. -/
structure IsHilbertSum : Prop where
  ofSurjective ::
  /-- The orthogonal family constituting the summands in the Hilbert sum. -/
  protected OrthogonalFamily : OrthogonalFamily 𝕜 G V
  /-- The isometry `lp G 2 → E` induced by the orthogonal family is surjective. -/
  protected surjective_isometry : Function.Surjective OrthogonalFamily.linearIsometry
-- Mathlib/Data/Matrix/Kronecker.lean
theorem smul_kronecker [Monoid R] [Monoid α] [MulAction R α] [IsScalarTower R α α] (r : R)
    (A : Matrix l m α) (B : Matrix n p α) : (r • A) ⊗ₖ B = r • A ⊗ₖ B
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
lemma vanishingIdeal_mem_minimalPrimes {s : Set (PrimeSpectrum R)} :
    vanishingIdeal s ∈ minimalPrimes R ↔ closure s ∈ irreducibleComponents (PrimeSpectrum R)
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp)]
theorem image_one [DecidableEq β] {f : α → β} : image f 1 = {f 1}
-- Mathlib/Analysis/Convex/Segment.lean
theorem segment_subset (x y : E × F) : segment 𝕜 x y ⊆ segment 𝕜 x.1 y.1 ×ˢ segment 𝕜 x.2 y.2
-- Mathlib/Combinatorics/SimpleGraph/Triangle/Tripartite.lean
lemma in₂₁_iff' :
    (graph t).Adj (in₂ c) (in₁ b) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.2.2 = c ∧ x.2.1 = b
-- Mathlib/Order/LiminfLimsup.lean
theorem frequently_lt_of_lt_limsSup {f : Filter α} [ConditionallyCompleteLinearOrder α] {a : α}
    (hf : f.IsCobounded (· ≤ ·) := by isBoundedDefault)
    (h : a < limsSup f) : ∃ᶠ n in f, a < n
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem nfpBFamily_eq_self {a} (h : ∀ i hi, f i hi a = a) : nfpBFamily.{u, v} o f a = a
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
/-- Converse to the mean value inequality: if `f` is `C`-lipschitz then
its derivative at `x₀` has norm bounded by `C`.
Version using `deriv`. -/
theorem norm_deriv_le_of_lipschitz {f : 𝕜 → F} {x₀ : 𝕜}
    {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖deriv f x₀‖ ≤ C
-- Mathlib/GroupTheory/Perm/List.lean
@[deprecated formPerm_pow_apply_get (since := "2024-04-23")]
theorem formPerm_pow_apply_nthLe (l : List α) (h : Nodup l) (n k : ℕ) (hk : k < l.length) :
    (formPerm l ^ n) (l.nthLe k hk) =
      l.nthLe ((k + n) % l.length) (Nat.mod_lt _ (k.zero_le.trans_lt hk))
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem take_append_drop : ∀ (n : Nat) (l : List α), take n l ++ drop n l = l
-- Mathlib/Algebra/Polynomial/Coeff.lean
@[norm_cast] -- @[simp] -- Porting note (#10618): simp can prove this
theorem natCast_inj {m n : ℕ} {R : Type*} [Semiring R] [CharZero R] :
    (↑m : R[X]) = ↑n ↔ m = n
-- Mathlib/LinearAlgebra/Determinant.lean
/-- The determinant of a basis constructed by `isUnitSMul` is the product of the given units. -/
@[simp]
theorem Basis.det_isUnitSMul {w : ι → R} (hw : ∀ i, IsUnit (w i)) :
    e.det (e.isUnitSMul hw) = ∏ i, w i
-- Mathlib/Topology/Algebra/Algebra.lean
protected theorem map_sum {ι : Type*} (f : A →A[R] B) (s : Finset ι) (g : ι → A) :
    f (∑ i in s, g i) = ∑ i in s, f (g i)
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
@[simp]
theorem BinaryBicone.inrCokernelCofork_π : (BinaryBicone.inrCokernelCofork c).π = c.fst
-- Mathlib/Topology/Order/OrderClosed.lean
theorem Dense.Iio_eq_biUnion [DenselyOrdered α] {s : Set α} (hs : Dense s) (x : α) :
    Iio x = ⋃ y ∈ s ∩ Iio x, Iio y
-- Mathlib/Algebra/GeomSum.lean
theorem geom_sum_inv [DivisionRing α] {x : α} (hx1 : x ≠ 1) (hx0 : x ≠ 0) (n : ℕ) :
    ∑ i ∈ range n, x⁻¹ ^ i = (x - 1)⁻¹ * (x - x⁻¹ ^ n * x)
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atTop_add_nonneg_right' (hf : Tendsto f l atTop) (hg : ∀ᶠ x in l, 0 ≤ g x) :
    Tendsto (fun x => f x + g x) l atTop
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
@[simp]
theorem continuous_proj :
    Continuous (Proj J : (I → Bool) → (I → Bool))
-- Mathlib/FieldTheory/Normal.lean
theorem Normal.of_isSplittingField (p : F[X]) [hFEp : IsSplittingField F E p] : Normal F E
-- Mathlib/CategoryTheory/Sites/Equivalence.lean
/-- The functor in the equivalence of sheaf categories. -/
@[simps!]
def sheafCongr.functor : Sheaf J A ⥤ Sheaf K A
-- Mathlib/Analysis/RCLike/Basic.lean
/-- The natural isomorphism between `𝕜` satisfying `RCLike 𝕜` and `ℝ` when `RCLike.I = 0`. -/
@[simps]
def realRingEquiv (h : I = (0 : K)) : K ≃+* ℝ
-- Mathlib/GroupTheory/Exponent.lean
@[to_additive (attr := simp)]
theorem _root_.MulOpposite.exponent : exponent (MulOpposite G) = exponent G
-- Mathlib/Order/Interval/Set/OrdConnected.lean
theorem ordConnected_iff_uIcc_subset_left (hx : x ∈ s) :
    OrdConnected s ↔ ∀ ⦃y⦄, y ∈ s → [[x, y]] ⊆ s
-- Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean
lemma toCircle_intCast (j : ℤ) :
    toCircle (j : ZMod N) = exp (2 * π * I * j / N)
-- Mathlib/Algebra/Order/Module/Defs.lean
/-- Binary **rearrangement inequality**. -/
lemma smul_add_smul_le_smul_add_smul' [PosSMulMono α β]
    {b₁ b₂ : α} {a d : β} (hba : b₂ ≤ b₁) (hdc : d ≤ a) : b₁ • d + b₂ • a ≤ b₁ • a + b₂ • d
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem inter_mul_union_subset : s ∩ t * (s ∪ t) ⊆ s * t
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp, norm_cast] lemma coe_zero : ⇑(0 : Π₀ i, β i) = 0
-- Mathlib/Algebra/Regular/Pow.lean
/-- An element `a` is right-regular if and only if a positive power of `a` is right-regular. -/
theorem IsRightRegular.pow_iff {n : ℕ} (n0 : 0 < n) :
    IsRightRegular (a ^ n) ↔ IsRightRegular a
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem ceil_ofNat (n : ℕ) [n.AtLeastTwo] : ⌈no_index (OfNat.ofNat n : α)⌉₊ = n
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
@[mono]
theorem fromEdgeSet_mono {s t : Set (Sym2 V)} (h : s ⊆ t) : fromEdgeSet s ≤ fromEdgeSet t
-- Mathlib/FieldTheory/Minpoly/Field.lean
theorem ne_zero_of_finite (e : B) [FiniteDimensional A B] : minpoly A e ≠ 0
-- Mathlib/Analysis/Calculus/Deriv/Slope.lean
theorem hasDerivWithinAt_iff_tendsto_slope' (hs : x ∉ s) :
    HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s] x) (𝓝 f')
-- Mathlib/Data/Part.lean
@[to_additive]
theorem inv_mem_inv [Inv α] (a : Part α) (ma : α) (ha : ma ∈ a) : ma⁻¹ ∈ a⁻¹
-- Mathlib/Data/ZMod/Basic.lean
@[simp]
lemma zmod_val_inv_nsmul_nsmul (hn : (Nat.card α).Coprime n) (a : α) :
    (n⁻¹ : ZMod (Nat.card α)).val • n • a = a
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
lemma isIso_i (hg : S.g = 0) : IsIso h.i
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Square.lean
lemma isPushout_iff :
    sq.IsPushout ↔ Nonempty (IsColimit sq.pushoutCocone)
-- Mathlib/Analysis/SpecialFunctions/Integrals.lean
@[simp]
theorem integral_log (h : (0 : ℝ) ∉ [[a, b]]) :
    ∫ x in a..b, log x = b * log b - a * log a - b + a
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
theorem restrict_coeSubgraph {G' : G.Subgraph} (G'' : G'.coe.Subgraph) :
    Subgraph.restrict (Subgraph.coeSubgraph G'') = G''
-- Mathlib/LinearAlgebra/FreeProduct/Basic.lean
/--`lof R A i 1 = 1` for all `i`.-/
theorem lof_map_one (i : I) : lof R A i 1 = 1
-- Mathlib/Algebra/Periodic.lean
/-- If a function `f` is `Periodic` with positive period `c`, then for all `x` there exists some
  `y ∈ Ioc a (a + c)` such that `f x = f y`. -/
theorem Periodic.exists_mem_Ioc [LinearOrderedAddCommGroup α] [Archimedean α] (h : Periodic f c)
    (hc : 0 < c) (x a) : ∃ y ∈ Ioc a (a + c), f x = f y
-- Mathlib/Data/ENNReal/Basic.lean
@[simp]
theorem toReal_ofReal {r : ℝ} (h : 0 ≤ r) : (ENNReal.ofReal r).toReal = r
-- Mathlib/Data/Set/Lattice.lean
@[gcongr]
theorem iUnion_mono'' {s t : ι → Set α} (h : ∀ i, s i ⊆ t i) : iUnion s ⊆ iUnion t
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem of_add_of_diff {A B : Set α} (hA : MeasurableSet A) (hB : MeasurableSet B) (h : A ⊆ B) :
    v A + v (B \ A) = v B
-- Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean
theorem contDiffOn_log {n : ℕ∞} : ContDiffOn ℝ n log {0}ᶜ
-- Mathlib/Data/NNRat/Defs.lean
theorem coe_ne_zero : (q : ℚ) ≠ 0 ↔ q ≠ 0
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
/-- Let `E` be a topological vector space (over a `NontriviallyNormedField`) whose topology is
generated by some family of seminorms `p`, and let `q` be a seminorm on `E`. If `q` is continuous,
then it is uniformly controlled by *finitely many* seminorms of `p`, that is there
is some finset `s` of the index set and some `C > 0` such that `q ≤ C • s.sup p`. -/
lemma bound_of_continuous [Nonempty ι] [t : TopologicalSpace E] (hp : WithSeminorms p)
    (q : Seminorm 𝕜 E) (hq : Continuous q) :
    ∃ s : Finset ι, ∃ C : ℝ≥0, C ≠ 0 ∧ q ≤ C • s.sup p
-- Mathlib/Algebra/Order/Group/Int.lean
theorem natCast_strictMono : StrictMono (· : ℕ → ℤ)
-- Mathlib/Data/Finset/Image.lean
@[simp 1100]
theorem mem_map' (f : α ↪ β) {a} {s : Finset α} : f a ∈ s.map f ↔ a ∈ s
-- Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
@[simp]
theorem intCast_complex_norm (x : ℤ[i]) : (x.norm : ℂ) = Complex.normSq (x : ℂ)
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp]
theorem center.coe_inv (a : center K) : ((a⁻¹ : center K) : K) = (a : K)⁻¹
-- Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
@[simp]
theorem coeFn_comp_toFiniteMeasure_eq_coeFn (ν : ProbabilityMeasure Ω) :
    (ν.toFiniteMeasure : Set Ω → ℝ≥0) = (ν : Set Ω → ℝ≥0)
-- Mathlib/Algebra/Polynomial/DenomsClearable.lean
theorem DenomsClearable.add {N : ℕ} {f g : R[X]} :
    DenomsClearable a b N f i → DenomsClearable a b N g i → DenomsClearable a b N (f + g) i
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem lt_pred_of_succ_lt : succ n < m → n < pred m
-- Mathlib/Order/Bounds/Basic.lean
theorem upperBounds_Iic : upperBounds (Iic a) = Ici a
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem eval₂Hom_zero' (f : R →+* S₂) : eval₂Hom f (fun _ => 0 : σ → S₂) = f.comp constantCoeff
-- Mathlib/Order/GaloisConnection.lean
theorem isGLB_of_l_image [Preorder α] [Preorder β] (gi : GaloisCoinsertion l u) {s : Set α} {a : β}
    (hs : IsGLB (l '' s) a) : IsGLB s (u a)
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
theorem top_isNormal : IsNormal (⊤ : Subgroupoid C)
-- Mathlib/Order/SuccPred/Basic.lean
theorem Ico_pred_right_eq_insert (h : a ≤ b) : Ioc (pred a) b = insert a (Ioc a b)
-- Mathlib/Algebra/Group/Opposite.lean
@[simp]
theorem op_pow {β} [Pow α β] (a : α) (b : β) : op (a ^ b) = op a ^ b
-- Mathlib/RingTheory/Ideal/Basic.lean
@[simp]
theorem span_univ : span (Set.univ : Set α) = ⊤
-- Mathlib/RingTheory/Henselian.lean
/-- A ring `R` is *Henselian* at an ideal `I` if the following condition holds:
for every polynomial `f` over `R`, with a *simple* root `a₀` over the quotient ring `R/I`,
there exists a lift `a : R` of `a₀` that is a root of `f`.

(Here, saying that a root `b` of a polynomial `g` is *simple* means that `g.derivative.eval b` is a
unit. Warning: if `R/I` is not a field then it is not enough to assume that `g` has a factorization
into monic linear factors in which `X - b` shows up only once; for example `1` is not a simple root
of `X^2-1` over `ℤ/4ℤ`.) -/
class HenselianRing (R : Type*) [CommRing R] (I : Ideal R) : Prop where
  jac : I ≤ Ideal.jacobson ⊥
  is_henselian :
    ∀ (f : R[X]) (_ : f.Monic) (a₀ : R) (_ : f.eval a₀ ∈ I)
      (_ : IsUnit (Ideal.Quotient.mk I (f.derivative.eval a₀))), ∃ a : R, f.IsRoot a ∧ a - a₀ ∈ I
-- Mathlib/LinearAlgebra/LinearPMap.lean
@[simp]
theorem mkSpanSingleton'_apply_self (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) (h) :
    mkSpanSingleton' x y H ⟨x, h⟩ = y
-- Mathlib/Algebra/Divisibility/Units.lean
/-- Elements of the unit group of a monoid represented as elements of the monoid
    divide any element of the monoid. -/
theorem coe_dvd : ↑u ∣ a
-- Mathlib/Data/Real/Irrational.lean
@[simp]
theorem irrational_div_int_iff : Irrational (x / m) ↔ m ≠ 0 ∧ Irrational x
-- Mathlib/Algebra/Group/Subsemigroup/Membership.lean
@[to_additive]
theorem coe_sSup_of_directed_on {S : Set (Subsemigroup M)} (hS : DirectedOn (· ≤ ·) S) :
    (↑(sSup S) : Set M) = ⋃ s ∈ S, ↑s
-- Mathlib/Algebra/Group/Hom/Defs.lean
/-- `ZeroHom M N` is the type of functions `M → N` that preserve zero.

When possible, instead of parametrizing results over `(f : ZeroHom M N)`,
you should parametrize over `(F : Type*) [ZeroHomClass F M N] (f : F)`.

When you extend this structure, make sure to also extend `ZeroHomClass`.
-/
structure ZeroHom (M : Type*) (N : Type*) [Zero M] [Zero N] where
  /-- The underlying function -/
  protected toFun : M → N
  /-- The proposition that the function preserves 0 -/
  protected map_zero' : toFun 0 = 0
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp) prod_apply]
theorem prod_apply (f : M →ₙ* N) (g : M →ₙ* P) (x) : f.prod g x = (f x, g x)
-- Mathlib/Order/MinMax.lean
@[simp]
theorem max_lt_iff : max a b < c ↔ a < c ∧ b < c
-- Mathlib/Analysis/Analytic/Meromorphic.lean
lemma id {U : Set 𝕜} : MeromorphicOn id U
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem Nonempty.of_smul_right : (s • t).Nonempty → t.Nonempty
-- Mathlib/Data/Quot.lean
theorem Quotient.forall {α : Sort*} {s : Setoid α} {p : Quotient s → Prop} :
    (∀ a, p a) ↔ ∀ a : α, p ⟦a⟧
-- Mathlib/CategoryTheory/Monoidal/Internal/Limits.lean
/-- Implementation of `Mon_.hasLimits`:
the proposed cone over a functor `F : J ⥤ Mon_ C` is a limit cone.
-/
@[simps]
def limitConeIsLimit (F : J ⥤ Mon_ C) : IsLimit (limitCone F)
-- Mathlib/Algebra/Opposites.lean
@[to_additive (attr := simp)]
theorem op_inj {x y : α} : op x = op y ↔ x = y
-- Mathlib/LinearAlgebra/Trace.lean
/-- The trace of a linear map correspond to the contraction pairing under the isomorphism
 `End(M) ≃ M* ⊗ M`-/
theorem trace_eq_contract_of_basis' [Fintype ι] [DecidableEq ι] (b : Basis ι R M) :
    LinearMap.trace R M = contractLeft R M ∘ₗ (dualTensorHomEquivOfBasis b).symm.toLinearMap
-- Mathlib/SetTheory/Cardinal/ENat.lean
lemma toENatAux_zero : toENatAux 0 = 0
-- Mathlib/Topology/ContinuousFunction/Compact.lean
@[simp]
theorem addEquivBoundedOfCompact_apply [AddMonoid β] [LipschitzAdd β] :
    ⇑(addEquivBoundedOfCompact α β) = mkOfCompact
-- Mathlib/LinearAlgebra/Dual.lean
theorem mem_of_mem_span {H : Set ι} {x : M} (hmem : x ∈ Submodule.span R (e '' H)) :
    ∀ i : ι, ε i x ≠ 0 → i ∈ H
-- Mathlib/Analysis/Asymptotics/Theta.lean
@[trans]
theorem IsTheta.trans_eventuallyEq {f : α → E} {g₁ g₂ : α → F} (h : f =Θ[l] g₁) (hg : g₁ =ᶠ[l] g₂) :
    f =Θ[l] g₂
-- Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
theorem aemeasurable_derivWithin_Ici [MeasurableSpace F] [BorelSpace F] (μ : Measure ℝ) :
    AEMeasurable (fun x => derivWithin f (Ici x) x) μ
-- Mathlib/RingTheory/RootsOfUnity/Minpoly.lean
/-- The reduction modulo `p` of the minimal polynomial of a root of unity `μ` is separable. -/
theorem separable_minpoly_mod {p : ℕ} [Fact p.Prime] (hdiv : ¬p ∣ n) :
    Separable (map (Int.castRingHom (ZMod p)) (minpoly ℤ μ))
-- Mathlib/Data/Finset/NAry.lean
@[simp]
theorem image₂_empty_left : image₂ f ∅ t = ∅
-- Mathlib/Topology/Algebra/FilterBasis.lean
/-- A `ModuleFilterBasis` on a module is a `FilterBasis` satisfying some additional axioms.
  Example : if `M` is a topological module then the neighbourhoods of zero are a
  `ModuleFilterBasis`. Conversely given a `ModuleFilterBasis` one can define a topology
  compatible with the module structure on `M`. -/
structure ModuleFilterBasis (R M : Type*) [CommRing R] [TopologicalSpace R] [AddCommGroup M]
  [Module R M] extends AddGroupFilterBasis M where
  smul' : ∀ {U}, U ∈ sets → ∃ V ∈ 𝓝 (0 : R), ∃ W ∈ sets, V • W ⊆ U
  smul_left' : ∀ (x₀ : R) {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x₀ • x) ⁻¹' U
  smul_right' : ∀ (m₀ : M) {U}, U ∈ sets → ∀ᶠ x in 𝓝 (0 : R), x • m₀ ∈ U
-- Mathlib/Algebra/Star/Subalgebra.lean
/-- The star operation on `Subalgebra` commutes with `Algebra.adjoin`. -/
theorem star_adjoin_comm (s : Set A) : star (Algebra.adjoin R s) = Algebra.adjoin R (star s)
-- Mathlib/Data/Complex/Exponential.lean
theorem exp_bound' {x : ℝ} (h1 : 0 ≤ x) (h2 : x ≤ 1) {n : ℕ} (hn : 0 < n) :
    Real.exp x ≤ (∑ m ∈ Finset.range n, x ^ m / m.factorial) +
      x ^ n * (n + 1) / (n.factorial * n)
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
theorem withDensity_apply_eq_zero' {f : α → ℝ≥0∞} {s : Set α} (hf : AEMeasurable f μ) :
    μ.withDensity f s = 0 ↔ μ ({ x | f x ≠ 0 } ∩ s) = 0
-- Mathlib/Algebra/Lie/Nilpotent.lean
theorem eventually_iInf_lowerCentralSeries_eq [IsArtinian R M] :
    ∀ᶠ l in Filter.atTop, ⨅ k, lowerCentralSeries R L M k = lowerCentralSeries R L M l
-- Mathlib/Order/SuccPred/Basic.lean
theorem succ_strictMono : StrictMono (succ : α → α)
-- Mathlib/Tactic/CategoryTheory/MonoidalComp.lean
@[simp] lemma monoidalComp_refl {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    f ⊗≫ g = f ≫ g
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem exists_or_eq_self_of_replaceF (p) (l : List α) :
    l.replaceF p = l ∨ ∃ a a' l₁ l₂,
      (∀ b ∈ l₁, p b = none) ∧ p a = some a' ∧ l = l₁ ++ a :: l₂ ∧ l.replaceF p = l₁ ++ a' :: l₂
-- Mathlib/Data/Multiset/Basic.lean
theorem card_erase_lt_of_mem {a : α} {s : Multiset α} : a ∈ s → card (s.erase a) < card s
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem MulPosReflectLE.toMulPosStrictMono [MulPosReflectLE α] : MulPosStrictMono α
-- Mathlib/Analysis/InnerProductSpace/OfNorm.lean
private theorem add_left_aux3 (y z : E) :
    ‖2 • z + y‖ * ‖2 • z + y‖ = 2 * (‖y + z‖ * ‖y + z‖ + ‖z‖ * ‖z‖) - ‖y‖ * ‖y‖
-- Mathlib/Order/RelSeries.lean
lemma rel_of_lt [IsTrans α r] (x : RelSeries r) {i j : Fin (x.length + 1)} (h : i < j) :
    r (x i) (x j)
-- Mathlib/Analysis/ODE/PicardLindelof.lean
theorem range_toContinuousMap :
    range toContinuousMap =
      {f : C(Icc v.tMin v.tMax, E) | f v.t₀ = v.x₀ ∧ LipschitzWith v.C f}
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions/Preadditive.lean
@[reassoc (attr := simp)]
lemma comp_add' (f : L.obj X ⟶ L.obj Y) (g₁ g₂ : L.obj Y ⟶ L.obj Z) :
    f ≫ add' W g₁ g₂ = add' W (f ≫ g₁) (f ≫ g₂)
-- Mathlib/RingTheory/Ideal/Operations.lean
@[simp]
theorem smul_comap_le_comap_smul (f : M →ₗ[R] M') (S : Submodule R M') (I : Ideal R) :
    I • S.comap f ≤ (I • S).comap f
-- Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
theorem separatingLeft_toLinearMap₂'_iff_det_ne_zero {M : Matrix ι ι R₁} :
    (Matrix.toLinearMap₂' R₁ M).SeparatingLeft (R := R₁) ↔ M.det ≠ 0
-- Mathlib/Data/Finset/Basic.lean
theorem filter_union_filter_of_codisjoint (s : Finset α) (h : Codisjoint p q) :
    s.filter p ∪ s.filter q = s
-- Mathlib/Data/NNReal/Basic.lean
@[simp, norm_cast]
theorem coe_max (x y : ℝ≥0) : ((max x y : ℝ≥0) : ℝ) = max (x : ℝ) (y : ℝ)
-- Mathlib/NumberTheory/FLT/Basic.lean
lemma fermatLastTheoremFor_iff_rat {n : ℕ} : FermatLastTheoremFor n ↔ FermatLastTheoremWith ℚ n
-- Mathlib/Data/Num/Lemmas.lean
@[simp]
theorem one_le_cast [LinearOrderedSemiring α] (n : PosNum) : (1 : α) ≤ n
-- Mathlib/Deprecated/Group.lean
/-- Predicate for monoid homomorphisms (deprecated -- use the bundled `MonoidHom` version). -/
@[to_additive]
structure IsMonoidHom [MulOneClass α] [MulOneClass β] (f : α → β) extends IsMulHom f : Prop where
  /-- The proposition that `f` preserves the multiplicative identity. -/
  map_one : f 1 = 1
-- Mathlib/Data/Finset/Basic.lean
theorem subset_empty {s : Finset α} : s ⊆ ∅ ↔ s = ∅
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem csInf_le_csInf' {s t : Set α} (h₁ : t.Nonempty) (h₂ : t ⊆ s) : sInf s ≤ sInf t
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
@[simp]
theorem eLpNorm'_norm {f : α → F} :
    eLpNorm' (fun a => ‖f a‖) q μ = eLpNorm' f q μ
-- Mathlib/Probability/Moments.lean
@[simp]
theorem mgf_zero_measure : mgf X (0 : Measure Ω) t = 0