ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem linearIndependent_subtype_disjoint {s : Set M} :
    LinearIndependent R (fun x => x : s → M) ↔
      Disjoint (Finsupp.supported R R s) (LinearMap.ker <| Finsupp.total M M R id)
-- Mathlib/Algebra/Homology/ShortComplex/ConcreteCategory.lean
lemma exact_iff_exact_map_forget₂ [S.HasHomology] :
    S.Exact ↔ (S.map (forget₂ C Ab)).Exact
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
/-- This functor `SimplexCategory ⥤ Cat` sends `[n]` (for `n : ℕ`)
to the category attached to the ordered set `{0, 1, ..., n}` -/
@[simps! obj map]
def toCat : SimplexCategory ⥤ Cat.{0}
-- Mathlib/Topology/Sober.lean
theorem isGenericPoint_closure {x : α} : IsGenericPoint x (closure ({x} : Set α))
-- Mathlib/Data/Matroid/Basic.lean
theorem Indep.not_dep (hI : M.Indep I) : ¬ M.Dep I
-- Mathlib/Algebra/Category/Grp/Injective.lean
theorem injective_as_module_iff : Injective (⟨A⟩ : ModuleCat ℤ) ↔
    Injective (⟨A,inferInstance⟩ : AddCommGrp)
-- Mathlib/Analysis/Convex/Function.lean
theorem convexOn_const (c : β) (hs : Convex 𝕜 s) : ConvexOn 𝕜 s fun _ : E => c
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem pow_rpow_inv_natCast (x : ℝ≥0) {n : ℕ} (hn : n ≠ 0) : (x ^ n) ^ (n⁻¹ : ℝ) = x
-- Mathlib/Topology/Category/LightProfinite/Basic.lean
/-- The natural functor from `Fintype` to `LightProfinite`, endowing a finite type with the
discrete topology. -/
@[simps!]
def FintypeCat.toLightProfinite : FintypeCat ⥤ LightProfinite
-- Mathlib/Algebra/Order/Interval/Basic.lean
@[to_additive (attr := simp)]
theorem pure_mul_pure : pure a * pure b = pure (a * b)
-- Mathlib/Data/Int/SuccPred.lean
@[simp, norm_cast]
theorem natCast_covBy {a b : ℕ} : (a : ℤ) ⋖ b ↔ a ⋖ b
-- Mathlib/GroupTheory/Perm/Sign.lean
theorem signAux_eq_signAux2 {n : ℕ} :
    ∀ (l : List α) (f : Perm α) (e : α ≃ Fin n) (_h : ∀ x, f x ≠ x → x ∈ l),
      signAux ((e.symm.trans f).trans e) = signAux2 l f
-- Mathlib/Order/Interval/Basic.lean
@[norm_cast] -- @[simp, norm_cast] -- Porting note: not in simpNF
theorem coe_subset_coe : (s : Set α) ⊆ t ↔ (s : NonemptyInterval α) ≤ t
-- Mathlib/Topology/Order/Hom/Esakia.lean
@[simp]
theorem toOrderHom_eq_coe (f : PseudoEpimorphism α β) : ⇑f.toOrderHom = f
-- Mathlib/Topology/Compactness/Compact.lean
/-- The preimage of a compact set under an inducing map is a compact set. -/
theorem Inducing.isCompact_preimage {f : X → Y} (hf : Inducing f) (hf' : IsClosed (range f))
    {K : Set Y} (hK : IsCompact K) : IsCompact (f ⁻¹' K)
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
@[continuity]
protected theorem continuous (f : P →ᴬ[R] Q) : Continuous f
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem IsRoot.def : IsRoot p a ↔ p.eval a = 0
-- Mathlib/Algebra/Order/Field/Basic.lean
@[simp]
theorem half_le_self_iff : a / 2 ≤ a ↔ 0 ≤ a
-- Mathlib/Algebra/Star/SelfAdjoint.lean
@[aesop safe apply]
theorem inv {x : R} (hx : IsSelfAdjoint x) : IsSelfAdjoint x⁻¹
-- Mathlib/GroupTheory/Coset.lean
@[to_additive normal_of_eq_addCosets]
theorem normal_of_eq_cosets (h : ∀ g : α, g • (s : Set α) = op g • s) : s.Normal
-- Mathlib/Combinatorics/Quiver/Covering.lean
/-- A prefunctor is a covering of quivers if it defines bijections on all stars and costars. -/
protected structure Prefunctor.IsCovering : Prop where
  star_bijective : ∀ u, Bijective (φ.star u)
  costar_bijective : ∀ u, Bijective (φ.costar u)
-- Mathlib/RingTheory/SimpleModule.lean
theorem eq_bot_or_exists_simple_le (N : Submodule R M) : N = ⊥ ∨ ∃ m ≤ N, IsSimpleModule R m
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
theorem degreeOf_mul_C_le (p : MvPolynomial σ R) (i : σ) (c : R) :
    (p * C c).degreeOf i ≤ p.degreeOf i
-- Mathlib/Analysis/Convex/Cone/Basic.lean
@[simp]
theorem coe_bot : ↑(⊥ : ConvexCone 𝕜 E) = (∅ : Set E)
-- Mathlib/RingTheory/MvPolynomial/Basic.lean
theorem mem_restrictDegree_iff_sup [DecidableEq σ] (p : MvPolynomial σ R) (n : ℕ) :
    p ∈ restrictDegree σ R n ↔ ∀ i, p.degrees.count i ≤ n
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
theorem pow_of_dvd (h : IsPrimitiveRoot ζ k) {p : ℕ} (hp : p ≠ 0) (hdiv : p ∣ k) :
    IsPrimitiveRoot (ζ ^ p) (k / p)
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
/-- Use `eLpNorm_smul_measure_of_ne_top` instead. -/
private theorem eLpNorm_smul_measure_of_ne_zero_of_ne_top {p : ℝ≥0∞} (hp_ne_zero : p ≠ 0)
    (hp_ne_top : p ≠ ∞) {f : α → F} (c : ℝ≥0∞) :
    eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ
-- Mathlib/Algebra/Associated/Basic.lean
theorem ne_zero : p ≠ 0
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
@[simp]
lemma rightShift_add (a n' : ℤ) (hn' : n' + a = n) :
    (γ₁ + γ₂).rightShift a n' hn' = γ₁.rightShift a n' hn' + γ₂.rightShift a n' hn'
-- Mathlib/NumberTheory/ModularForms/SlashActions.lean
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/
-- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex
theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ)
-- Mathlib/GroupTheory/CoprodI.lean
@[simp]
theorem prod_singleton {i} (x : M i) (hne_one : x ≠ 1) : (singleton x hne_one).prod = of x
-- Mathlib/RingTheory/AdicCompletion/Basic.lean
@[elab_as_elim]
theorem induction_on {C : Hausdorffification I M → Prop} (x : Hausdorffification I M)
    (ih : ∀ x, C (of I M x)) : C x
-- Mathlib/Algebra/GroupWithZero/Basic.lean
theorem mul_right_eq_self₀ : a * b = a ↔ b = 1 ∨ a = 0
-- Mathlib/Data/Set/Countable.lean
lemma enumerateCountable_mem {s : Set α} (h : s.Countable) {default : α} (h_mem : default ∈ s)
    (n : ℕ) :
    enumerateCountable h default n ∈ s
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem sup_eq_union : (Sup.sup : Finset α → Finset α → Finset α) = Union.union
-- Mathlib/AlgebraicGeometry/Cover/Open.lean
/-- An open cover of `X` consists of a family of open immersions into `X`,
and for each `x : X` an open immersion (indexed by `f x`) that covers `x`.

This is merely a coverage in the Zariski pretopology, and it would be optimal
if we could reuse the existing API about pretopologies, However, the definitions of sieves and
grothendieck topologies uses `Prop`s, so that the actual open sets and immersions are hard to
obtain. Also, since such a coverage in the pretopology usually contains a proper class of
immersions, it is quite hard to glue them, reason about finite covers, etc.
-/
structure OpenCover (X : Scheme.{u}) where
  /-- index set of an open cover of a scheme `X` -/
  J : Type v
  /-- the subschemes of an open cover -/
  obj : J → Scheme
  /-- the embedding of subschemes to `X` -/
  map : ∀ j : J, obj j ⟶ X
  /-- given a point of `x : X`, `f x` is the index of the subscheme which contains `x`  -/
  f : X → J
  /-- the subschemes covers `X` -/
  covers : ∀ x, x ∈ Set.range (map (f x)).1.base
  /-- the embedding of subschemes are open immersions -/
  IsOpen : ∀ x, IsOpenImmersion (map x) := by infer_instance
-- Mathlib/Algebra/Module/Submodule/Ker.lean
@[simp] theorem injective_restrict_iff_disjoint {p : Submodule R M} {f : M →ₗ[R] M}
    (hf : ∀ x ∈ p, f x ∈ p) :
    Injective (f.restrict hf) ↔ Disjoint p (ker f)
-- Mathlib/MeasureTheory/Function/LpSpace.lean
@[simp]
theorem coeFn_mk {f : α →ₘ[μ] E} (hf : eLpNorm f p μ < ∞) : ((⟨f, hf⟩ : Lp E p μ) : α → E) = f
-- Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean
theorem toCircle_add (x : AddCircle T) (y : AddCircle T) :
    @toCircle T (x + y) = toCircle x * toCircle y
-- Mathlib/RingTheory/Noetherian.lean
/-- If the first and final modules in an exact sequence are Noetherian,
  then the middle module is also Noetherian. -/
theorem isNoetherian_of_range_eq_ker [IsNoetherian R P]
    (f : M →ₗ[R] N) (g : N →ₗ[R] P) (h : LinearMap.range f = LinearMap.ker g) :
    IsNoetherian R N
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
theorem iterate_pos_lt_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :
    f^[n] x < x + n * m ↔ f x < x + m
-- Mathlib/RingTheory/RootsOfUnity/Minpoly.lean
/-- Let `P` be the minimal polynomial of a root of unity `μ` and `Q` be the minimal polynomial of
`μ ^ p`, where `p` is a prime that does not divide `n`. Then `P` divides `Q` modulo `p`. -/
theorem minpoly_dvd_mod_p {p : ℕ} [Fact p.Prime] (hdiv : ¬p ∣ n) :
    map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣
      map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p))
-- Mathlib/Algebra/Regular/SMul.lean
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
theorem not_zero [nM : Nontrivial M] : ¬IsSMulRegular M (0 : R)
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
theorem restrict_apply_measure (μ : FiniteMeasure Ω) (A : Set Ω) {s : Set Ω}
    (s_mble : MeasurableSet s) : (μ.restrict A : Measure Ω) s = (μ : Measure Ω) (s ∩ A)
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem mem_range {α : Type u} {f : α → ZFSet.{max u v}} {x : ZFSet.{max u v}} :
    x ∈ range.{u, v} f ↔ x ∈ Set.range f
-- Mathlib/Algebra/Quandle.lean
/-- The homomorphism `toEnvelGroup.map f` is the unique map that fits into the commutative
triangle in `toEnvelGroup.univ`.
-/
theorem toEnvelGroup.univ_uniq (R : Type*) [Rack R] (G : Type*) [Group G]
    (f : R →◃ Quandle.Conj G) (g : EnvelGroup R →* G)
    (h : f = (Quandle.Conj.map g).comp (toEnvelGroup R)) : g = toEnvelGroup.map f
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem measure_biUnion_finset₀ {s : Finset ι} {f : ι → Set α}
    (hd : Set.Pairwise (↑s) (AEDisjoint μ on f)) (hm : ∀ b ∈ s, NullMeasurableSet (f b) μ) :
    μ (⋃ b ∈ s, f b) = ∑ p ∈ s, μ (f p)
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
/-- The star algebra equivalence between the linear endomorphisms of finite-dimensional inner
product space and square matrices induced by the choice of an orthonormal basis. -/
@[simps]
def LinearMap.toMatrixOrthonormal : (E →ₗ[𝕜] E) ≃⋆ₐ[𝕜] Matrix n n 𝕜
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem constantCoeff_C (r : R) : constantCoeff (C r : MvPolynomial σ R) = r
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
private theorem quotient_mul_add_remainder_eq_aux (p q : R[X]) : q * div p q + mod p q = p
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
theorem lintegral_withDensity_le_lintegral_mul (μ : Measure α) {f : α → ℝ≥0∞}
    (f_meas : Measurable f) (g : α → ℝ≥0∞) : (∫⁻ a, g a ∂μ.withDensity f) ≤ ∫⁻ a, (f * g) a ∂μ
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem cast_to_nat [AddMonoidWithOne α] : ∀ n : PosNum, ((n : ℕ) : α) = n
-- Mathlib/Algebra/Polynomial/BigOperators.lean
theorem degree_list_prod_le (l : List S[X]) : degree l.prod ≤ (l.map degree).sum
-- Mathlib/Data/List/MinMax.lean
theorem maximum_mem {l : List α} {m : α} : (maximum l : WithTop α) = m → m ∈ l
-- Mathlib/Algebra/Regular/Basic.lean
/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
@[to_additive (attr := simp) "An element is add-left-regular if and only if adding to it on the left
an add-left-regular element is add-left-regular."]
theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
    IsLeftRegular (a * b) ↔ IsLeftRegular b
-- Mathlib/Topology/ContinuousFunction/Basic.lean
/-- Deprecated. Use `DFunLike.congr_arg` instead. -/
protected theorem congr_arg (f : C(α, β)) {x y : α} (h : x = y) : f x = f y
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
protected lemma id_comp {n : ℤ} (z₂ : Cochain F G n) :
    (Cochain.ofHom (𝟙 F)).comp z₂ (zero_add n) = z₂
-- Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean
lemma nonsingular_zero' [NoZeroDivisors R] {Y : R} (hy : Y ≠ 0) : W.Nonsingular ![0, Y, 0]
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem integral_eq_norm_posPart_sub (f : α →₁[μ] ℝ) :
    integral f = ‖Lp.posPart f‖ - ‖Lp.negPart f‖
-- Mathlib/Geometry/RingedSpace/SheafedSpace.lean
@[simp]
theorem comp_c_app {X Y Z : SheafedSpace C} (α : X ⟶ Y) (β : Y ⟶ Z) (U) :
    (α ≫ β).c.app U = β.c.app U ≫ α.c.app (op ((Opens.map β.base).obj (unop U)))
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[reassoc]
theorem condition (t : PushoutCocone f g) : f ≫ inl t = g ≫ inr t
-- Mathlib/CategoryTheory/Sites/DenseSubsite.lean
@[reassoc]
theorem naturality {X Y : C} (i : G.obj X ⟶ G.obj Y) :
    α.app _ ≫ ℱ'.1.map i.op = ℱ.map i.op ≫ α.app _
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem IsCycle.pow_iff [Finite β] {f : Perm β} (hf : IsCycle f) {n : ℕ} :
    IsCycle (f ^ n) ↔ n.Coprime (orderOf f)
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem WithTop.sSup_eq [SupSet α] {s : Set (WithTop α)} (hs : ⊤ ∉ s)
    (hs' : BddAbove ((↑) ⁻¹' s : Set α)) : sSup s = ↑(sSup ((↑) ⁻¹' s) : α)
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
@[simp]
theorem mem_iUnion : x ∈ π.iUnion ↔ ∃ J ∈ π, x ∈ J
-- Mathlib/LinearAlgebra/Basis/VectorSpace.lean
theorem range_extend (hs : LinearIndependent K ((↑) : s → V)) :
    range (Basis.extend hs) = hs.extend (subset_univ _)
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
@[simp]
theorem mk_hom_eq_self (f : S ⟶ T.obj Y) : (mk f).hom = f
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
/-- The square with `0 : 0 ⟶ 0` on the right left `𝟙 X` on the right is a pushout square. -/
@[simp]
theorem zero_left (X : C) : IsPushout (0 : 0 ⟶ X) (0 : (0 : C) ⟶ 0) (𝟙 X) (0 : 0 ⟶ X)
-- Mathlib/Algebra/Category/ModuleCat/Presheaf.lean
@[simp]
lemma toPresheafOfModules_presheaf_map_apply {X Y : Cᵒᵖ} (f : X ⟶ Y) (x : M.obj X) :
    M.toPresheafOfModules.presheaf.map f x = M.map f x
-- Mathlib/Algebra/Ring/Idempotents.lean
@[simp]
theorem iff_eq_zero_or_one {p : G₀} : IsIdempotentElem p ↔ p = 0 ∨ p = 1
-- Mathlib/Data/Multiset/Basic.lean
theorem count_eq_card_filter_eq [DecidableEq α] (s : Multiset α) (a : α) :
    s.count a = card (s.filter (a = ·))
-- Mathlib/Computability/Primrec.lean
theorem add : Nat.Primrec (unpaired (· + ·))
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp]
theorem lmapDomain_apply (f : α → α') (l : α →₀ M) :
    (lmapDomain M R f : (α →₀ M) →ₗ[R] α' →₀ M) l = mapDomain f l
-- Mathlib/Data/Fintype/Basic.lean
theorem Fin.univ_map_def {n : ℕ} (f : Fin n ↪ α) :
    Finset.univ.map f = ⟨List.ofFn f, List.nodup_ofFn.mpr f.injective⟩
-- Mathlib/CategoryTheory/Sites/OneHypercover.lean
lemma sieve₁'_eq_sieve₁ : E.sieve₁' i₁ i₂ = E.sieve₁ (pullback.fst _ _) (pullback.snd _ _)
-- Mathlib/Data/ENat/Basic.lean
theorem top_pow {n : ℕ} (n_pos : 0 < n) : (⊤ : ℕ∞) ^ n = ⊤
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Valid'.balance {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)
    (H : ∃ l' r', BalancedSz l' r' ∧
          (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')) :
    Valid' o₁ (@balance α l x r) o₂
-- Mathlib/Topology/Algebra/InfiniteSum/Order.lean
@[to_additive (attr := mono)]
theorem hasProd_strict_mono (hf : HasProd f a₁) (hg : HasProd g a₂) (h : f < g) : a₁ < a₂
-- Mathlib/Algebra/Algebra/Field.lean
@[norm_cast]
theorem lift_map_eq_zero_iff (a : R) : (↑a : A) = 0 ↔ a = 0
-- Mathlib/Order/Concept.lean
@[simp]
theorem swap_swap (c : Concept α β r) : c.swap.swap = c
-- Mathlib/Algebra/Polynomial/BigOperators.lean
theorem natDegree_multiset_prod_of_monic (h : ∀ f ∈ t, Monic f) :
    t.prod.natDegree = (t.map natDegree).sum
-- Mathlib/Algebra/CharP/MixedCharZero.lean
/--
A ring of characteristic zero is not a `ℚ`-algebra iff it has mixed characteristic for some `p`.
-/
theorem isEmpty_algebraRat_iff_mixedCharZero [CharZero R] :
    IsEmpty (Algebra ℚ R) ↔ ∃ p > 0, MixedCharZero R p
-- Mathlib/Algebra/Group/Pi/Basic.lean
@[to_additive]
theorem mulSingle_op₂ {g₁ g₂ : I → Type*} [∀ i, One (g₁ i)] [∀ i, One (g₂ i)]
    (op : ∀ i, g₁ i → g₂ i → f i) (h : ∀ i, op i 1 1 = 1) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
    mulSingle i (op i x₁ x₂) = fun j => op j (mulSingle i x₁ j) (mulSingle i x₂ j)
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp]
theorem mem_inf {p p' : Subring R} {x : R} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'
-- Mathlib/Algebra/Polynomial/Bivariate.lean
lemma map_mapRingHom_eval_map_eval (r : R) :
    ((p.map <| mapRingHom f).eval <| q.map f).eval (f r) = f ((p.eval q).eval r)
-- Mathlib/Order/Filter/CardinalInter.lean
theorem eventually_cardinal_ball {S : Set ι} (hS : #S < c)
    {p : α → ∀ i ∈ S, Prop} :
    (∀ᶠ x in l, ∀ i hi, p x i hi) ↔ ∀ i hi, ∀ᶠ x in l, p x i hi
-- Mathlib/Order/Lattice.lean
theorem map_sup [SemilatticeInf β] {f : α → β} (hf : Antitone f) (x y : α) :
    f (x ⊔ y) = f x ⊓ f y
-- Mathlib/Order/Interval/Set/SurjOn.lean
theorem surjOn_Ico_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f)
    (a b : α) : SurjOn f (Ico a b) (Ico (f a) (f b))
-- Mathlib/Algebra/Associated/Basic.lean
theorem prime_mul_iff [CancelCommMonoidWithZero α] {x y : α} :
    Prime (x * y) ↔ (Prime x ∧ IsUnit y) ∨ (IsUnit x ∧ Prime y)
-- Mathlib/RingTheory/Valuation/ValuationSubring.lean
theorem le_ofPrime (A : ValuationSubring K) (P : Ideal A) [P.IsPrime] : A ≤ ofPrime A P
-- Mathlib/Topology/Order/OrderClosed.lean
theorem not_tendsto_nhds_of_tendsto_atBot (hf : Tendsto f l atBot) (a : α) : ¬Tendsto f l (𝓝 a)
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
/-- The determinant of a 2×2 block matrix with the upper-right block equal to zero is the product of
the determinants of the diagonal blocks. For the generalization to any number of blocks, see
`Matrix.det_of_lower_triangular`. -/
@[simp]
theorem det_fromBlocks_zero₁₂ (A : Matrix m m R) (C : Matrix n m R) (D : Matrix n n R) :
    (Matrix.fromBlocks A 0 C D).det = A.det * D.det
-- Mathlib/MeasureTheory/Measure/HasOuterApproxClosed.lean
lemma apprSeq_apply_eq_one (n : ℕ) {x : X} (hxF : x ∈ F) :
    hF.apprSeq n x = 1
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem succ_sub_succ (n m : Nat) : succ n - succ m = n - m
-- Mathlib/Combinatorics/Quiver/Path.lean
theorem comp_injective_left (q : Path b c) : Injective fun p : Path a b => p.comp q
-- Mathlib/CategoryTheory/Monoidal/Free/Coherence.lean
@[simp]
theorem inclusion_map {X Y : N C} (f : X ⟶ Y) :
    inclusion.map f = eqToHom (congr_arg _ (Discrete.ext _ _ (Discrete.eq_of_hom f)))
-- Mathlib/Data/PFunctor/Multivariate/W.lean
theorem wPathDestLeft_wPathCasesOn {α : TypeVec n} {a : P.A} {f : P.last.B a → P.last.W}
    (g' : P.drop.B a ⟹ α) (g : ∀ j : P.last.B a, P.WPath (f j) ⟹ α) :
    P.wPathDestLeft (P.wPathCasesOn g' g) = g'
-- Mathlib/FieldTheory/Separable.lean
theorem separable_gcd_right {F : Type*} [Field F] {g : F[X]} (f : F[X]) (hg : g.Separable) :
    (EuclideanDomain.gcd f g).Separable
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
/-- The homology map data associated to the zero morphism between two short complexes. -/
@[simps]
def zero (h₁ : S₁.HomologyData) (h₂ : S₂.HomologyData) :
    HomologyMapData 0 h₁ h₂
-- Mathlib/Data/DFinsupp/Lex.lean
theorem toLex_monotone : Monotone (@toLex (Π₀ i, α i))
-- Mathlib/Logic/Equiv/Set.lean
@[simp]
theorem image_preimage {α β} (e : α ≃ β) (s : Set β) : e '' (e ⁻¹' s) = s
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If a function `f` is continuous on a convex set `D ⊆ ℝ` and `f''` is strictly positive on the
interior, then `f` is strictly convex on `D`.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly positive, except at at most one point. -/
theorem strictConvexOn_of_deriv2_pos {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf'' : ∀ x ∈ interior D, 0 < (deriv^[2] f) x) :
    StrictConvexOn ℝ D f
-- Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
theorem opNorm_le_iff {C : ℝ} (hC : 0 ≤ C) : ‖f‖ ≤ C ↔ ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem mk_toWord : ∀ {x : FreeGroup α}, mk (toWord x) = x
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem mem_map_of_mem (f : G →* N) {K : Subgroup G} {x : G} (hx : x ∈ K) : f x ∈ K.map f
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[simp]
theorem mk_ι_app_right {W : C} (inl : Y ⟶ W) (inr : Z ⟶ W) (eq : f ≫ inl = g ≫ inr) :
    (mk inl inr eq).ι.app WalkingSpan.right = inr
-- Mathlib/Algebra/ModEq.lean
theorem zsmul_add_modEq (z : ℤ) : z • p + a ≡ a [PMOD p]
-- Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
@[reassoc]
lemma mapHomologyIso'_inv_naturality [S₁.HasHomology] [S₂.HasHomology]
    [(S₁.map F).HasHomology] [(S₂.map F).HasHomology]
    [F.PreservesRightHomologyOf S₁] [F.PreservesRightHomologyOf S₂] :
    F.map (homologyMap φ) ≫ (S₂.mapHomologyIso' F).inv = (S₁.mapHomologyIso' F).inv ≫
      @homologyMap _ _ _ (S₁.map F) (S₂.map F) (F.mapShortComplex.map φ) _ _
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem characteristic_iff_comap_le : H.Characteristic ↔ ∀ ϕ : G ≃* G, H.comap ϕ.toMonoidHom ≤ H
-- Mathlib/Analysis/Convex/Segment.lean
theorem insert_endpoints_openSegment (x y : E) :
    insert x (insert y (openSegment 𝕜 x y)) = [x -[𝕜] y]
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- Given three points in strict order on the same line, and a fourth point, the angles at the
fourth point between the first and second or second and third points have the same sign. -/
theorem _root_.Sbtw.oangle_sign_eq {p₁ p₂ p₃ : P} (p₄ : P) (h : Sbtw ℝ p₁ p₂ p₃) :
    (∡ p₁ p₄ p₂).sign = (∡ p₂ p₄ p₃).sign
-- Mathlib/Data/Set/SMulAntidiagonal.lean
@[to_additive]
theorem smulAntidiagonal_mono_right (h : t₁ ⊆ t₂) :
    smulAntidiagonal s t₁ a ⊆ smulAntidiagonal s t₂ a
-- Mathlib/Order/Filter/Prod.lean
theorem comap_prod (f : α → β × γ) (b : Filter β) (c : Filter γ) :
    comap f (b ×ˢ c) = comap (Prod.fst ∘ f) b ⊓ comap (Prod.snd ∘ f) c
-- Mathlib/Algebra/Tropical/Basic.lean
theorem injective_trop : Function.Injective (trop : R → Tropical R)
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
/-- The carrier of `H ⊔ N` is just `↑H * ↑N` (pointwise set product) when `N` is normal. -/
@[to_additive "The carrier of `H ⊔ N` is just `↑H + ↑N` (pointwise set addition)
when `N` is normal."]
theorem mul_normal (H N : Subgroup G) [hN : N.Normal] : (↑(H ⊔ N) : Set G) = H * N
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
theorem epi_image_of_epi {X Y : C} (f : X ⟶ Y) [HasImage f] [E : Epi f] : Epi (image.ι f)
-- Mathlib/Topology/Constructions.lean
theorem nhds_ofMul (x : X) : 𝓝 (ofMul x) = map ofMul (𝓝 x)
-- Mathlib/CategoryTheory/Sites/IsSheafFor.lean
/-- The restriction of a compatible family is compatible. -/
theorem FamilyOfElements.Compatible.restrict {R₁ R₂ : Presieve X} (h : R₁ ≤ R₂)
    {x : FamilyOfElements P R₂} : x.Compatible → (x.restrict h).Compatible
-- Mathlib/Order/Interval/Basic.lean
/-- `{a}` as an interval. -/
@[simps]
def pure (a : α) : NonemptyInterval α
-- Mathlib/Algebra/Field/Subfield.lean
theorem comap_inf (s t : Subfield L) (f : K →+* L) : (s ⊓ t).comap f = s.comap f ⊓ t.comap f
-- Mathlib/Topology/ContinuousFunction/Polynomial.lean
/-- A polynomial as a continuous function,
with domain restricted to some subset of the semiring of coefficients.

(This is particularly useful when restricting to compact sets, e.g. `[0,1]`.)
-/
@[simps]
def toContinuousMapOn (p : R[X]) (X : Set R) : C(X, R)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem le_of_add_right_le {n m k : Nat} (h : n + k ≤ m) : n ≤ m
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem head?_eq_head : ∀ l h, @head? α l = some (head l h)
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem projRestricts_comp_projRestrict (h : ∀ i, J i → K i) :
    ProjRestricts C h ∘ ProjRestrict C K = ProjRestrict C J
-- Mathlib/Data/Sigma/Lex.lean
theorem lex_iff : Lex r s a b ↔ r a.1 b.1 ∨ ∃ h : a.1 = b.1, s b.1 (h.rec a.2) b.2
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem integrable_mul_const_iff {c : 𝕜} (hc : IsUnit c) (f : α → 𝕜) :
    Integrable (fun x => f x * c) μ ↔ Integrable f μ
-- Mathlib/Topology/Algebra/Order/Compact.lean
/-- The **extreme value theorem**: if a continuous function `f` is larger than a value in its range
away from compact sets, then it has a global minimum. -/
theorem Continuous.exists_forall_le' [ClosedIicTopology α] {f : β → α} (hf : Continuous f)
    (x₀ : β) (h : ∀ᶠ x in cocompact β, f x₀ ≤ f x) : ∃ x : β, ∀ y : β, f x ≤ f y
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_sub_const_Ico : (fun x => x - a) ⁻¹' Ico b c = Ico (b + a) (c + a)