name
stringlengths
3
112
file
stringlengths
21
116
statement
stringlengths
17
8.64k
state
stringlengths
7
205k
tactic
stringlengths
3
4.55k
result
stringlengths
7
205k
id
stringlengths
16
16
Cardinal.isLimit_ord
Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem isLimit_ord {c} (co : ℵ₀ ≤ c) : (ord c).IsLimit
c : Cardinal.{u_1} co : ℵ₀ ≤ c ⊢ c.ord ≠ 0 ∧ ∀ a < c.ord, succ a < c.ord
refine ⟨fun h => aleph0_ne_zero ?_, fun a => lt_imp_lt_of_le_imp_le fun h => ?_⟩
case refine_1 c : Cardinal.{u_1} co : ℵ₀ ≤ c h : c.ord = 0 ⊢ ℵ₀ = 0 case refine_2 c : Cardinal.{u_1} co : ℵ₀ ≤ c a : Ordinal.{u_1} h : c.ord ≤ succ a ⊢ c.ord ≤ a
773817014109415e
PowerSeries.coeff_order
Mathlib/RingTheory/PowerSeries/Order.lean
theorem coeff_order (h : order φ < ⊤) : coeff R (φ.order.lift h) φ ≠ 0
R : Type u_1 inst✝ : Semiring R φ : R⟦X⟧ h : φ.order < ⊤ ⊢ (coeff R ((↑(Nat.find ⋯)).lift ⋯)) φ ≠ 0
generalize_proofs h
R : Type u_1 inst✝ : Semiring R φ : R⟦X⟧ h✝ : φ.order < ⊤ h : ∃ n, (coeff R n) φ ≠ 0 pf✝ : ↑(Nat.find h) < ⊤ ⊢ (coeff R ((↑(Nat.find h)).lift pf✝)) φ ≠ 0
7fe93089d1b4594a
AlgebraicGeometry.SheafedSpace.ext
Mathlib/Geometry/RingedSpace/SheafedSpace.lean
theorem ext {X Y : SheafedSpace C} (α β : X ⟶ Y) (w : α.base = β.base) (h : α.c ≫ whiskerRight (eqToHom (by rw [w])) _ = β.c) : α = β := PresheafedSpace.ext α β w h
C : Type u inst✝ : Category.{v, u} C X Y : SheafedSpace C α β : X ⟶ Y w : α.base = β.base ⊢ (Opens.map α.base).op = (Opens.map β.base).op
rw [w]
no goals
4c513d7a22af437f
List.idxOf_lt_length
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/Find.lean
theorem idxOf_lt_length [BEq α] [LawfulBEq α] {l : List α} (h : a ∈ l) : l.idxOf a < l.length
case nil α : Type u_1 a : α inst✝¹ : BEq α inst✝ : LawfulBEq α h : a ∈ [] ⊢ idxOf a [] < [].length
simp at h
no goals
c1e63f121277a338
List.all_bne'
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem all_bne' [BEq α] [PartialEquivBEq α] {l : List α} : (l.all fun x => x != a) = !l.contains a
α : Type u_1 a : α inst✝¹ : BEq α inst✝ : PartialEquivBEq α l : List α ⊢ (l.all fun x => x != a) = !l.contains a
simp only [bne_comm, all_bne]
no goals
c8adabf92f1d9413
CategoryTheory.Limits.CompleteLattice.finite_product_eq_finset_inf
Mathlib/CategoryTheory/Limits/Lattice.lean
theorem finite_product_eq_finset_inf [SemilatticeInf α] [OrderTop α] {ι : Type u} [Fintype ι] (f : ι → α) : ∏ᶜ f = Fintype.elems.inf f
α : Type u inst✝² : SemilatticeInf α inst✝¹ : OrderTop α ι : Type u inst✝ : Fintype ι f : ι → α ⊢ ∏ᶜ f = ?m.21816
exact (IsLimit.conePointUniqueUpToIso (limit.isLimit _) (finiteLimitCone (Discrete.functor f)).isLimit).to_eq
no goals
0cf76a73db4f7d10
CategoryTheory.Functor.IsDenseSubsite.isIso_ranCounit_app_of_isDenseSubsite
Mathlib/CategoryTheory/Sites/DenseSubsite/SheafEquiv.lean
lemma isIso_ranCounit_app_of_isDenseSubsite (Y : Sheaf J A) (U X) : IsIso ((yoneda.map ((G.op.ranCounit.app Y.val).app (op U))).app (op X))
case refine_2.mk.mk.unit.op.mk.mk.unit.op.mk.up.up.refl.refl.intro.intro.h C : Type u_1 D : Type u_2 inst✝⁴ : Category.{u_3, u_1} C inst✝³ : Category.{u_4, u_2} D G : C ⥤ D J : GrothendieckTopology C K : GrothendieckTopology D A : Type w inst✝² : Category.{w', w} A inst✝¹ : ∀ (X : Dᵒᵖ), Limits.HasLimitsOfShape (StructuredArrow X G.op) A inst✝ : IsDenseSubsite J K G Y : Sheaf J A U : C X : A f : (yoneda.obj (((𝟭 (Cᵒᵖ ⥤ A)).obj Y.val).obj (op U))).obj (op X) l : (X Y Z : C) → (f : X ⟶ Y) → (g : G.obj Y ⟶ G.obj Z) → (G.imageSieve g).arrows f → (X ⟶ Z) hl : ∀ (X Y Z : C) (f : X ⟶ Y) (g : G.obj Y ⟶ G.obj Z) (hf : (G.imageSieve g).arrows f), G.map (l X Y Z f g hf) = G.map f ≫ g W₁ W₂ : C g : G.obj W₁ ⟶ G.obj U i : W₂ ⟶ W₁ hi : 𝟙 (op (G.obj U)) ≫ g.op ≫ (G.map i.op.unop).op = g.op ≫ (G.map i.op.unop).op I : GrothendieckTopology.Cover.Arrow ⟨G.imageSieve (G.map i ≫ g), ⋯⟩ ⊢ ⋯.amalgamate ⟨G.imageSieve (G.map i ≫ g), ⋯⟩ (fun I => f ≫ Y.val.map (l I.Y W₂ U I.f (G.map i ≫ g) ⋯).op) ⋯ ≫ Y.val.map I.f.op = (⋯.amalgamate ⟨G.imageSieve g, ⋯⟩ (fun I => f ≫ Y.val.map (l I.Y W₁ U I.f g ⋯).op) ⋯ ≫ Y.val.map i.op) ≫ Y.val.map I.f.op
simp only [Presheaf.IsSheaf.amalgamate_map, Category.assoc, ← Functor.map_comp, ← op_comp]
case refine_2.mk.mk.unit.op.mk.mk.unit.op.mk.up.up.refl.refl.intro.intro.h C : Type u_1 D : Type u_2 inst✝⁴ : Category.{u_3, u_1} C inst✝³ : Category.{u_4, u_2} D G : C ⥤ D J : GrothendieckTopology C K : GrothendieckTopology D A : Type w inst✝² : Category.{w', w} A inst✝¹ : ∀ (X : Dᵒᵖ), Limits.HasLimitsOfShape (StructuredArrow X G.op) A inst✝ : IsDenseSubsite J K G Y : Sheaf J A U : C X : A f : (yoneda.obj (((𝟭 (Cᵒᵖ ⥤ A)).obj Y.val).obj (op U))).obj (op X) l : (X Y Z : C) → (f : X ⟶ Y) → (g : G.obj Y ⟶ G.obj Z) → (G.imageSieve g).arrows f → (X ⟶ Z) hl : ∀ (X Y Z : C) (f : X ⟶ Y) (g : G.obj Y ⟶ G.obj Z) (hf : (G.imageSieve g).arrows f), G.map (l X Y Z f g hf) = G.map f ≫ g W₁ W₂ : C g : G.obj W₁ ⟶ G.obj U i : W₂ ⟶ W₁ hi : 𝟙 (op (G.obj U)) ≫ g.op ≫ (G.map i.op.unop).op = g.op ≫ (G.map i.op.unop).op I : GrothendieckTopology.Cover.Arrow ⟨G.imageSieve (G.map i ≫ g), ⋯⟩ ⊢ f ≫ Y.val.map (l I.Y W₂ U I.f (G.map i ≫ g) ⋯).op = ⋯.amalgamate ⟨G.imageSieve g, ⋯⟩ (fun I => f ≫ Y.val.map (l I.Y W₁ U I.f g ⋯).op) ⋯ ≫ Y.val.map (I.f ≫ i).op
b6d9495444a0fb1a
Subsemigroup.mem_corner_iff
Mathlib/RingTheory/Idempotents.lean
lemma mem_corner_iff {r : R} : r ∈ corner e ↔ e * r = r ∧ r * e = r := ⟨by rintro ⟨r, rfl⟩; simp_rw [← mul_assoc, idem.eq, mul_assoc, idem.eq, true_and], (⟨r, by simp_rw [·]⟩)⟩
R : Type u_1 e : R inst✝ : Semigroup R idem : IsIdempotentElem e r : R ⊢ r ∈ corner e → e * r = r ∧ r * e = r
rintro ⟨r, rfl⟩
case intro R : Type u_1 e : R inst✝ : Semigroup R idem : IsIdempotentElem e r : R ⊢ e * (fun x => e * x * e) r = (fun x => e * x * e) r ∧ (fun x => e * x * e) r * e = (fun x => e * x * e) r
40d8cc8652673f6b
Algebra.rank_adjoin_le
Mathlib/LinearAlgebra/FreeAlgebra.lean
theorem Algebra.rank_adjoin_le {R : Type u} {S : Type v} [CommRing R] [Ring S] [Algebra R S] (s : Set S) : Module.rank R (adjoin R s) ≤ max #s ℵ₀
R : Type u S : Type v inst✝² : CommRing R inst✝¹ : Ring S inst✝ : Algebra R S s : Set S ⊢ Module.rank R ↥((FreeAlgebra.lift R) Subtype.val).range ≤ #↑s ⊔ ℵ₀
cases subsingleton_or_nontrivial R
case inl R : Type u S : Type v inst✝² : CommRing R inst✝¹ : Ring S inst✝ : Algebra R S s : Set S h✝ : Subsingleton R ⊢ Module.rank R ↥((FreeAlgebra.lift R) Subtype.val).range ≤ #↑s ⊔ ℵ₀ case inr R : Type u S : Type v inst✝² : CommRing R inst✝¹ : Ring S inst✝ : Algebra R S s : Set S h✝ : Nontrivial R ⊢ Module.rank R ↥((FreeAlgebra.lift R) Subtype.val).range ≤ #↑s ⊔ ℵ₀
066ae3e2b283e6be
Std.Tactic.BVDecide.BVExpr.bitblast.blastRotateRight.go_get_aux
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/Bitblast/BVExpr/Circuit/Lemmas/Operations/RotateRight.lean
theorem go_get_aux (aig : AIG α) (distance : Nat) (input : AIG.RefVec aig w) (curr : Nat) (hcurr : curr ≤ w) (s : AIG.RefVec aig curr) : ∀ (idx : Nat) (hidx : idx < curr), (go input distance curr hcurr s).get idx (by omega) = s.get idx hidx
case isFalse α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α w : Nat aig : AIG α distance : Nat input : aig.RefVec w curr : Nat hcurr : curr ≤ w s : aig.RefVec curr idx : Nat hidx : idx < curr h✝ : ¬curr < w ⊢ (⋯ ▸ s).refs[idx] = s.refs[idx]
have : curr = w := by omega
case isFalse α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α w : Nat aig : AIG α distance : Nat input : aig.RefVec w curr : Nat hcurr : curr ≤ w s : aig.RefVec curr idx : Nat hidx : idx < curr h✝ : ¬curr < w this : curr = w ⊢ (⋯ ▸ s).refs[idx] = s.refs[idx]
0a0a2c9223c97a01
MeasureTheory.SignedMeasure.bddBelow_measureOfNegatives
Mathlib/MeasureTheory/Decomposition/SignedHahn.lean
theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives
α : Type u_1 inst✝ : MeasurableSpace α s : SignedMeasure α h : ∀ (x : ℝ), ∃ x_1 ∈ s.measureOfNegatives, x_1 < x f : ℕ → ℝ hf : ∀ (n : ℕ), f n ∈ s.measureOfNegatives ∧ f n < -↑n B : ℕ → Set α hmeas : ∀ (n : ℕ), MeasurableSet (B n) hr : ∀ (n : ℕ), s ≤[B n] 0 h_lt : ∀ (n : ℕ), ↑s (B n) < -↑n A : Set α := ⋃ n, B n hA : A = ⋃ n, B n n : ℕ ⊢ MeasurableSet ((⋃ i, B i) \ B n)
exact (MeasurableSet.iUnion hmeas).diff (hmeas n)
no goals
317f19e924fb7de4
generateFrom_pi_eq
Mathlib/MeasureTheory/MeasurableSpace/Pi.lean
theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountablySpanning (C i)) : (@MeasurableSpace.pi _ _ fun i => generateFrom (C i)) = generateFrom (pi univ '' pi univ C)
case intro.a.h.intro.intro.h.ht ι : Type u_1 α : ι → Type u_2 inst✝ : Finite ι C : (i : ι) → Set (Set (α i)) val✝ : Encodable ι i : ι s : Set (α i) hs : s ∈ C i t : (i : ι) → ℕ → Set (α i) h1t : ∀ (i : ι) (n : ℕ), t i n ∈ C i h2t : ∀ (i : ι), ⋃ n, t i n = univ this : univ.pi (update (fun i' => iUnion (t i')) i (⋃ x, s)) = univ.pi fun k => ⋃ j, update (fun i' => t i' j) i s k n : ι → ℕ ⊢ (univ.pi fun a => update (fun i' => t i' (n a)) i s a) ∈ univ.pi '' univ.pi C
apply mem_image_of_mem
case intro.a.h.intro.intro.h.ht.h ι : Type u_1 α : ι → Type u_2 inst✝ : Finite ι C : (i : ι) → Set (Set (α i)) val✝ : Encodable ι i : ι s : Set (α i) hs : s ∈ C i t : (i : ι) → ℕ → Set (α i) h1t : ∀ (i : ι) (n : ℕ), t i n ∈ C i h2t : ∀ (i : ι), ⋃ n, t i n = univ this : univ.pi (update (fun i' => iUnion (t i')) i (⋃ x, s)) = univ.pi fun k => ⋃ j, update (fun i' => t i' j) i s k n : ι → ℕ ⊢ (fun a => update (fun i' => t i' (n a)) i s a) ∈ univ.pi C
4de98dbd4b17079d
Set.surj_on_of_inj_on_of_ncard_le
Mathlib/Data/Set/Card.lean
theorem surj_on_of_inj_on_of_ncard_le {t : Set β} (f : ∀ a ∈ s, β) (hf : ∀ a ha, f a ha ∈ t) (hinj : ∀ a₁ a₂ ha₁ ha₂, f a₁ ha₁ = f a₂ ha₂ → a₁ = a₂) (hst : t.ncard ≤ s.ncard) (ht : t.Finite
α : Type u_1 β : Type u_2 s : Set α t : Set β f : (a : α) → a ∈ s → β hf : ∀ (a : α) (ha : a ∈ s), f a ha ∈ t hinj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), f a₁ ha₁ = f a₂ ha₂ → a₁ = a₂ hst : t.ncard ≤ s.ncard ht : autoParam t.Finite _auto✝ b : β hb : b ∈ t ⊢ ∃ a, ∃ (ha : a ∈ s), b = f a ha
set f' : s → t := fun x ↦ ⟨f x.1 x.2, hf _ _⟩
α : Type u_1 β : Type u_2 s : Set α t : Set β f : (a : α) → a ∈ s → β hf : ∀ (a : α) (ha : a ∈ s), f a ha ∈ t hinj : ∀ (a₁ a₂ : α) (ha₁ : a₁ ∈ s) (ha₂ : a₂ ∈ s), f a₁ ha₁ = f a₂ ha₂ → a₁ = a₂ hst : t.ncard ≤ s.ncard ht : autoParam t.Finite _auto✝ b : β hb : b ∈ t f' : ↑s → ↑t := fun x => ⟨f ↑x ⋯, ⋯⟩ ⊢ ∃ a, ∃ (ha : a ∈ s), b = f a ha
76d3226011959d3f
MeasureTheory.AEEqFun.integrable_coeFn
Mathlib/MeasureTheory/Function/L1Space/AEEqFun.lean
theorem integrable_coeFn {f : α →ₘ[μ] β} : MeasureTheory.Integrable f μ ↔ Integrable f
α : Type u_1 β : Type u_2 m : MeasurableSpace α μ : Measure α inst✝ : NormedAddCommGroup β f : α →ₘ[μ] β ⊢ MeasureTheory.Integrable (↑f) μ ↔ f.Integrable
rw [← integrable_mk, mk_coeFn]
no goals
1c69fc7ff81a6fbf
Finset.eraseNone_empty
Mathlib/Data/Finset/Option.lean
theorem eraseNone_empty : eraseNone (∅ : Finset (Option α)) = ∅
case h α : Type u_1 a✝ : α ⊢ a✝ ∈ eraseNone ∅ ↔ a✝ ∈ ∅
simp
no goals
d39cca28820fed6c
Finset.lt_sup_iff
Mathlib/Data/Finset/Lattice/Fold.lean
theorem lt_sup_iff : a < s.sup f ↔ ∃ b ∈ s, a < f b
case mp.cons α : Type u_2 ι : Type u_5 inst✝¹ : LinearOrder α inst✝ : OrderBot α s : Finset ι f : ι → α a : α c : ι t : Finset ι hc : c ∉ t ih : a < t.sup f → ∃ b ∈ t, a < f b ⊢ a < f c ∨ a < t.sup f → ∃ b ∈ cons c t hc, a < f b
exact fun | Or.inl h => ⟨c, mem_cons.2 (Or.inl rfl), h⟩ | Or.inr h => let ⟨b, hb, hlt⟩ := ih h; ⟨b, mem_cons.2 (Or.inr hb), hlt⟩
no goals
3b8e91386aee8891
subsingleton_of_disjoint_isClopen
Mathlib/Topology/Connected/Clopen.lean
/-- In a preconnected space, any disjoint family of non-empty clopen subsets has at most one element. -/ lemma subsingleton_of_disjoint_isClopen (h_clopen : ∀ i, IsClopen (s i)) : Subsingleton ι
α : Type u ι : Type u_1 inst✝¹ : TopologicalSpace α inst✝ : PreconnectedSpace α s : ι → Set α h_disj : Pairwise (Disjoint on s) h_clopen : ∀ (i : ι), IsClopen (s i) h_nonempty : ∀ (i : ι), s i ≠ ∅ i j : ι h_ne : i ≠ j ⊢ s i ∩ s j = ∅
simpa only [← bot_eq_empty, eq_bot_iff, ← inf_eq_inter, ← disjoint_iff_inf_le] using h_disj h_ne
no goals
6e05e6622254f214
isPiSystem_Ixx_mem
Mathlib/MeasureTheory/PiSystem.lean
theorem isPiSystem_Ixx_mem {Ixx : α → α → Set α} {p : α → α → Prop} (Hne : ∀ {a b}, (Ixx a b).Nonempty → p a b) (Hi : ∀ {a₁ b₁ a₂ b₂}, Ixx a₁ b₁ ∩ Ixx a₂ b₂ = Ixx (max a₁ a₂) (min b₁ b₂)) (s t : Set α) : IsPiSystem { S | ∃ᵉ (l ∈ s) (u ∈ t), p l u ∧ Ixx l u = S }
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro α : Type u_1 inst✝ : LinearOrder α Ixx : α → α → Set α p : α → α → Prop Hne : ∀ {a b : α}, (Ixx a b).Nonempty → p a b Hi : ∀ {a₁ b₁ a₂ b₂ : α}, Ixx a₁ b₁ ∩ Ixx a₂ b₂ = Ixx (a₁ ⊔ a₂) (b₁ ⊓ b₂) s t : Set α l₁ : α hls₁ : l₁ ∈ s u₁ : α hut₁ : u₁ ∈ t left✝¹ : p l₁ u₁ l₂ : α hls₂ : l₂ ∈ s u₂ : α hut₂ : u₂ ∈ t left✝ : p l₂ u₂ ⊢ (Ixx (l₁ ⊔ l₂) (u₁ ⊓ u₂)).Nonempty → Ixx (l₁ ⊔ l₂) (u₁ ⊓ u₂) ∈ {S | ∃ l ∈ s, ∃ u ∈ t, p l u ∧ Ixx l u = S}
exact fun H => ⟨l₁ ⊔ l₂, sup_ind l₁ l₂ hls₁ hls₂, u₁ ⊓ u₂, inf_ind u₁ u₂ hut₁ hut₂, Hne H, rfl⟩
no goals
0e739901d70a41c4
SimpleGraph.Walk.isTrail_copy
Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem isTrail_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') : (p.copy hu hv).IsTrail ↔ p.IsTrail
V : Type u G : SimpleGraph V u' v' : V p : G.Walk u' v' ⊢ (p.copy ⋯ ⋯).IsTrail ↔ p.IsTrail
rfl
no goals
c149622d9f35802b
Profinite.NobelingProof.factors_prod_eq_basis
Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem factors_prod_eq_basis (x : π C (· ∈ s)) : (factors C s x).prod = spanFinBasis C s x
case h I : Type u C : Set (I → Bool) inst✝ : LinearOrder I s : Finset I x y : ↑(π C fun x => x ∈ s) ⊢ (factors C s x).prod y = if y = x then 1 else 0
split_ifs with h <;> [exact factors_prod_eq_basis_of_eq _ _ h; exact factors_prod_eq_basis_of_ne _ _ h]
no goals
65f40261e4411106
AlgebraicGeometry.IsLocalAtTarget.mk'
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
/-- `P` is local at the target if 1. `P` respects isomorphisms. 2. If `P` holds for `f : X ⟶ Y`, then `P` holds for `f ∣_ U` for any `U`. 3. If `P` holds for `f ∣_ U` for an open cover `U` of `Y`, then `P` holds for `f`. -/ protected lemma mk' {P : MorphismProperty Scheme} [P.RespectsIso] (restrict : ∀ {X Y : Scheme} (f : X ⟶ Y) (U : Y.Opens), P f → P (f ∣_ U)) (of_sSup_eq_top : ∀ {X Y : Scheme.{u}} (f : X ⟶ Y) {ι : Type u} (U : ι → Y.Opens), iSup U = ⊤ → (∀ i, P (f ∣_ U i)) → P f) : IsLocalAtTarget P
case refine_2 P : MorphismProperty Scheme inst✝ : P.RespectsIso restrict : ∀ {X Y : Scheme} (f : X ⟶ Y) (U : Y.Opens), P f → P (f ∣_ U) of_sSup_eq_top : ∀ {X Y : Scheme} (f : X ⟶ Y) {ι : Type u} (U : ι → Y.Opens), iSup U = ⊤ → (∀ (i : ι), P (f ∣_ U i)) → P f X Y : Scheme f : X ⟶ Y 𝒰 : Y.OpenCover H : ∀ (i : 𝒰.1), P (Scheme.Cover.pullbackHom 𝒰 f i) ⊢ ∀ (i : 𝒰.J), P (f ∣_ Scheme.Hom.opensRange (𝒰.map i))
exact fun i ↦ (P.arrow_mk_iso_iff (morphismRestrictOpensRange f _)).mpr (H i)
no goals
30afa796e957c3d7
List.takeWhile_replicate_eq_filter
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/TakeDrop.lean
theorem takeWhile_replicate_eq_filter (p : α → Bool) : (replicate n a).takeWhile p = (replicate n a).filter p
case succ α : Type u_1 a : α p : α → Bool n : Nat ih : takeWhile p (replicate n a) = filter p (replicate n a) ⊢ (if p a = true then a :: takeWhile p (replicate n a) else []) = filter p (a :: replicate n a)
split <;> simp_all
no goals
533cedca634a7318
CategoryTheory.Limits.preservesCoproduct_of_preservesBiproduct
Mathlib/CategoryTheory/Preadditive/Biproducts.lean
/-- A functor between preadditive categories that preserves (zero morphisms and) finite biproducts preserves finite coproducts. -/ lemma preservesCoproduct_of_preservesBiproduct {f : J → C} [PreservesBiproduct f F] : PreservesColimit (Discrete.functor f) F where preserves {c} hc := ⟨IsColimit.ofIsoColimit ((IsColimit.precomposeHomEquiv (Discrete.compNatIsoDiscrete _ _) _).symm (isBilimitOfPreserves F (biconeIsBilimitOfColimitCoconeOfIsColimit hc)).isColimit) <| Cocones.ext (Iso.refl _) (by rintro ⟨⟩; simp)⟩
case mk C : Type u inst✝⁶ : Category.{v, u} C inst✝⁵ : Preadditive C D : Type u' inst✝⁴ : Category.{v', u'} D inst✝³ : Preadditive D F : C ⥤ D inst✝² : F.PreservesZeroMorphisms J : Type inst✝¹ : Fintype J f : J → C inst✝ : PreservesBiproduct f F c : Cocone (Discrete.functor f) hc : IsColimit c as✝ : J ⊢ ((Cocones.precompose (Discrete.compNatIsoDiscrete f F).hom).obj (F.mapBicone (Bicone.ofColimitCocone hc)).toCocone).ι.app { as := as✝ } ≫ (Iso.refl ((Cocones.precompose (Discrete.compNatIsoDiscrete f F).hom).obj (F.mapBicone (Bicone.ofColimitCocone hc)).toCocone).pt).hom = (F.mapCocone c).ι.app { as := as✝ }
simp
no goals
d50343e40c78ea22
MeasureTheory.contDiffOn_convolution_right_with_param
Mathlib/Analysis/Convolution.lean
theorem contDiffOn_convolution_right_with_param {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F) {g : P → G → E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k) (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0) (hf : LocallyIntegrable f μ) (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) : ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ)
case refine_3 𝕜 : Type u𝕜 G : Type uG E : Type uE E' : Type uE' F : Type uF P : Type uP inst✝¹³ : NormedAddCommGroup E inst✝¹² : NormedAddCommGroup E' inst✝¹¹ : NormedAddCommGroup F inst✝¹⁰ : RCLike 𝕜 inst✝⁹ : NormedSpace 𝕜 E inst✝⁸ : NormedSpace 𝕜 E' inst✝⁷ : NormedSpace ℝ F inst✝⁶ : NormedSpace 𝕜 F inst✝⁵ : MeasurableSpace G inst✝⁴ : NormedAddCommGroup G inst✝³ : BorelSpace G inst✝² : NormedSpace 𝕜 G inst✝¹ : NormedAddCommGroup P inst✝ : NormedSpace 𝕜 P μ : Measure G f : G → E n : ℕ∞ L : E →L[𝕜] E' →L[𝕜] F g : P → G → E' s : Set P k : Set G hs : IsOpen s hk : IsCompact k hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0 hf : LocallyIntegrable f μ hg : ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) eG : Type (max uG uE' uF uP) := ULift.{max uE' uF uP, uG} G this✝¹ : MeasurableSpace eG := borel eG this✝ : BorelSpace eG eE' : Type (max uE' uG uF uP) := ULift.{max uG uF uP, uE'} E' eF : Type (max uF uG uE' uP) := ULift.{max uG uE' uP, uF} F eP : Type (max uP uG uE' uF) := ULift.{max uG uE' uF, uP} P isoG : eG ≃L[𝕜] G := ContinuousLinearEquiv.ulift isoE' : eE' ≃L[𝕜] E' := ContinuousLinearEquiv.ulift isoF : eF ≃L[𝕜] F := ContinuousLinearEquiv.ulift isoP : eP ≃L[𝕜] P := ContinuousLinearEquiv.ulift ef : eG → E := f ∘ ⇑isoG eμ : Measure eG := Measure.map (⇑isoG.symm) μ eg : eP → eG → eE' := fun ep ex => isoE'.symm (g (isoP ep) (isoG ex)) eL : E →L[𝕜] eE' →L[𝕜] eF := (↑(isoE'.arrowCongr isoF).symm).comp L R : eP × eG → eF := fun q => (ef ⋆[eL, eμ] eg q.1) q.2 hek : IsCompact (⇑isoG ⁻¹' k) hes : IsOpen (⇑isoP ⁻¹' s) ⊢ MapsTo (⇑(isoP.prod isoG)) ((⇑isoP ⁻¹' s) ×ˢ univ) (s ×ˢ univ)
rintro ⟨p, x⟩ ⟨hp, -⟩
case refine_3.mk.intro 𝕜 : Type u𝕜 G : Type uG E : Type uE E' : Type uE' F : Type uF P : Type uP inst✝¹³ : NormedAddCommGroup E inst✝¹² : NormedAddCommGroup E' inst✝¹¹ : NormedAddCommGroup F inst✝¹⁰ : RCLike 𝕜 inst✝⁹ : NormedSpace 𝕜 E inst✝⁸ : NormedSpace 𝕜 E' inst✝⁷ : NormedSpace ℝ F inst✝⁶ : NormedSpace 𝕜 F inst✝⁵ : MeasurableSpace G inst✝⁴ : NormedAddCommGroup G inst✝³ : BorelSpace G inst✝² : NormedSpace 𝕜 G inst✝¹ : NormedAddCommGroup P inst✝ : NormedSpace 𝕜 P μ : Measure G f : G → E n : ℕ∞ L : E →L[𝕜] E' →L[𝕜] F g : P → G → E' s : Set P k : Set G hs : IsOpen s hk : IsCompact k hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0 hf : LocallyIntegrable f μ hg : ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) eG : Type (max uG uE' uF uP) := ULift.{max uE' uF uP, uG} G this✝¹ : MeasurableSpace eG := borel eG this✝ : BorelSpace eG eE' : Type (max uE' uG uF uP) := ULift.{max uG uF uP, uE'} E' eF : Type (max uF uG uE' uP) := ULift.{max uG uE' uP, uF} F eP : Type (max uP uG uE' uF) := ULift.{max uG uE' uF, uP} P isoG : eG ≃L[𝕜] G := ContinuousLinearEquiv.ulift isoE' : eE' ≃L[𝕜] E' := ContinuousLinearEquiv.ulift isoF : eF ≃L[𝕜] F := ContinuousLinearEquiv.ulift isoP : eP ≃L[𝕜] P := ContinuousLinearEquiv.ulift ef : eG → E := f ∘ ⇑isoG eμ : Measure eG := Measure.map (⇑isoG.symm) μ eg : eP → eG → eE' := fun ep ex => isoE'.symm (g (isoP ep) (isoG ex)) eL : E →L[𝕜] eE' →L[𝕜] eF := (↑(isoE'.arrowCongr isoF).symm).comp L R : eP × eG → eF := fun q => (ef ⋆[eL, eμ] eg q.1) q.2 hek : IsCompact (⇑isoG ⁻¹' k) hes : IsOpen (⇑isoP ⁻¹' s) p : eP x : eG hp : (p, x).1 ∈ ⇑isoP ⁻¹' s ⊢ (isoP.prod isoG) (p, x) ∈ s ×ˢ univ
36b6ddfb418542d6
balancedCore_mem_nhds_zero
Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean
theorem balancedCore_mem_nhds_zero (hU : U ∈ 𝓝 (0 : E)) : balancedCore 𝕜 U ∈ 𝓝 (0 : E)
𝕜 : Type u_1 E : Type u_2 inst✝⁵ : NormedDivisionRing 𝕜 inst✝⁴ : AddCommGroup E inst✝³ : Module 𝕜 E inst✝² : TopologicalSpace E inst✝¹ : ContinuousSMul 𝕜 E U : Set E inst✝ : (𝓝[≠] 0).NeBot hU : U ∈ 𝓝 0 h : Tendsto (fun x => x.1 • x.2) (𝓝 (0, 0)) (𝓝 0) ⊢ ∃ r V, 0 < r ∧ V ∈ 𝓝 0 ∧ ∀ (c : 𝕜) (y : E), ‖c‖ < r → y ∈ V → c • y ∈ U
simpa only [← Prod.exists', ← Prod.forall', ← and_imp, ← and_assoc, exists_prop] using h.basis_left (NormedAddCommGroup.nhds_zero_basis_norm_lt.prod_nhds (𝓝 _).basis_sets) U hU
no goals
41fd7e8c049413fb
UniqueMDiffWithinAt.prod
Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem UniqueMDiffWithinAt.prod {x : M} {y : M'} {s t} (hs : UniqueMDiffWithinAt I s x) (ht : UniqueMDiffWithinAt I' t y) : UniqueMDiffWithinAt (I.prod I') (s ×ˢ t) (x, y)
𝕜 : Type u_1 inst✝¹⁰ : NontriviallyNormedField 𝕜 E : Type u_2 inst✝⁹ : NormedAddCommGroup E inst✝⁸ : NormedSpace 𝕜 E H : Type u_3 inst✝⁷ : TopologicalSpace H I : ModelWithCorners 𝕜 E H M : Type u_4 inst✝⁶ : TopologicalSpace M inst✝⁵ : ChartedSpace H M E' : Type u_5 inst✝⁴ : NormedAddCommGroup E' inst✝³ : NormedSpace 𝕜 E' H' : Type u_6 inst✝² : TopologicalSpace H' I' : ModelWithCorners 𝕜 E' H' M' : Type u_7 inst✝¹ : TopologicalSpace M' inst✝ : ChartedSpace H' M' x : M y : M' s : Set M t : Set M' hs : UniqueMDiffWithinAt I s x ht : UniqueMDiffWithinAt I' t y ⊢ (↑(extChartAt I x).symm ⁻¹' s) ×ˢ (↑(extChartAt I' y).symm ⁻¹' t) ∩ range ↑I ×ˢ range ↑I' ⊆ ↑(extChartAt (I.prod I') (x, y)).symm ⁻¹' s ×ˢ t ∩ range ↑I ×ˢ range ↑I'
rfl
no goals
865152dd59758c82
Nat.Simproc.bneEqOfEqEq
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Nat/Simproc.lean
theorem bneEqOfEqEq {a b c d : Nat} (p : (a = b) = (c = d)) : (a != b) = (c != d)
a b c d : Nat p : (a = b) = (c = d) ⊢ (a != b) = (c != d)
simp only [bne, beqEqOfEqEq p]
no goals
21af0ea01b64ac6d
Matrix.equiv_block_det
Mathlib/LinearAlgebra/Matrix/Block.lean
theorem equiv_block_det (M : Matrix m m R) {p q : m → Prop} [DecidablePred p] [DecidablePred q] (e : ∀ x, q x ↔ p x) : (toSquareBlockProp M p).det = (toSquareBlockProp M q).det
m : Type u_3 R : Type v inst✝⁴ : CommRing R inst✝³ : DecidableEq m inst✝² : Fintype m M : Matrix m m R p q : m → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q e : ∀ (x : m), q x ↔ p x ⊢ (M.toSquareBlockProp p).det = (M.toSquareBlockProp q).det
convert Matrix.det_reindex_self (Equiv.subtypeEquivRight e) (toSquareBlockProp M q)
no goals
0e83cce1f9317c6f
MeasureTheory.IntegrableOn.continuousOn_smul
Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
theorem IntegrableOn.continuousOn_smul [T2Space X] [SecondCountableTopologyEither X 𝕜] {g : X → E} (hg : IntegrableOn g K μ) {f : X → 𝕜} (hf : ContinuousOn f K) (hK : IsCompact K) : IntegrableOn (fun x => f x • g x) K μ
X : Type u_1 E : Type u_3 inst✝⁷ : MeasurableSpace X inst✝⁶ : TopologicalSpace X inst✝⁵ : NormedAddCommGroup E μ : Measure X inst✝⁴ : OpensMeasurableSpace X K : Set X 𝕜 : Type u_6 inst✝³ : NormedField 𝕜 inst✝² : NormedSpace 𝕜 E inst✝¹ : T2Space X inst✝ : SecondCountableTopologyEither X 𝕜 g : X → E hg : IntegrableOn g K μ f : X → 𝕜 hf : ContinuousOn f K hK : IsCompact K ⊢ Integrable (fun a => ‖f a‖ * ‖g a‖) (μ.restrict K)
refine IntegrableOn.continuousOn_mul ?_ hg.norm hK
X : Type u_1 E : Type u_3 inst✝⁷ : MeasurableSpace X inst✝⁶ : TopologicalSpace X inst✝⁵ : NormedAddCommGroup E μ : Measure X inst✝⁴ : OpensMeasurableSpace X K : Set X 𝕜 : Type u_6 inst✝³ : NormedField 𝕜 inst✝² : NormedSpace 𝕜 E inst✝¹ : T2Space X inst✝ : SecondCountableTopologyEither X 𝕜 g : X → E hg : IntegrableOn g K μ f : X → 𝕜 hf : ContinuousOn f K hK : IsCompact K ⊢ ContinuousOn (fun a => ‖f a‖) K
3afd5d5007094fdf
mulIndicator_cthickening_eventually_eq_mulIndicator_closure
Mathlib/Topology/MetricSpace/ThickenedIndicator.lean
/-- Pointwise, the multiplicative indicators of closed δ-thickenings of a set eventually coincide with the multiplicative indicator of the set as δ tends to zero. -/ @[to_additive "Pointwise, the indicators of closed δ-thickenings of a set eventually coincide with the indicator of the set as δ tends to zero."] lemma mulIndicator_cthickening_eventually_eq_mulIndicator_closure (f : α → β) (E : Set α) (x : α) : ∀ᶠ δ in 𝓝 (0 : ℝ), (Metric.cthickening δ E).mulIndicator f x = (closure E).mulIndicator f x
case pos α : Type u_1 inst✝¹ : PseudoEMetricSpace α β : Type u_2 inst✝ : One β f : α → β E : Set α x : α x_mem_closure : x ∈ closure E ⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, (cthickening δ E).mulIndicator f x = (closure E).mulIndicator f x
filter_upwards [univ_mem] with δ _
case h α : Type u_1 inst✝¹ : PseudoEMetricSpace α β : Type u_2 inst✝ : One β f : α → β E : Set α x : α x_mem_closure : x ∈ closure E δ : ℝ a✝ : δ ∈ univ ⊢ (cthickening δ E).mulIndicator f x = (closure E).mulIndicator f x
792cf9ab75d9f8b1
BitVec.toInt_abs_eq_natAbs
Mathlib/.lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem toInt_abs_eq_natAbs {x : BitVec w} : x.abs.toInt = if x = intMin w then (intMin w).toInt else x.toInt.natAbs
w : Nat x : BitVec w hx : ¬x = intMin w h : x.msb = true ⊢ 2 ^ w ≤ 2 * x.toNat
have := msb_eq_true_iff_two_mul_ge.mp h
w : Nat x : BitVec w hx : ¬x = intMin w h : x.msb = true this : 2 * x.toNat ≥ 2 ^ w ⊢ 2 ^ w ≤ 2 * x.toNat
49362e766b77f6e6
Module.finrank_eq_zero_iff_isTorsion
Mathlib/LinearAlgebra/Dimension/Torsion/Finite.lean
theorem Module.finrank_eq_zero_iff_isTorsion [StrongRankCondition R] [Module.Finite R M] : finrank R M = 0 ↔ Module.IsTorsion R M
R : Type u_1 M : Type u_2 inst✝⁵ : CommRing R inst✝⁴ : IsDomain R inst✝³ : AddCommGroup M inst✝² : Module R M inst✝¹ : StrongRankCondition R inst✝ : Module.Finite R M ⊢ finrank R M = 0 ↔ ↑(finrank R M) = 0
norm_cast
no goals
70058e56fa5cb2f9
IsCyclotomicExtension.Rat.nrComplexPlaces_eq_totient_div_two
Mathlib/NumberTheory/Cyclotomic/Embeddings.lean
theorem nrComplexPlaces_eq_totient_div_two [h : IsCyclotomicExtension {n} ℚ K] : haveI := IsCyclotomicExtension.numberField {n} ℚ K nrComplexPlaces K = φ n / 2
case pos.intro n : ℕ+ K : Type u inst✝¹ : Field K inst✝ : CharZero K h : IsCyclotomicExtension {n} ℚ K this : NumberField K hn : 2 < n k : ℕ hk : φ ↑n = k + k key : nrRealPlaces K + 2 * nrComplexPlaces K = Module.finrank ℚ K ⊢ nrComplexPlaces K = φ ↑n / 2
rw [nrRealPlaces_eq_zero K hn, zero_add, IsCyclotomicExtension.finrank (n := n) K (cyclotomic.irreducible_rat n.pos), hk, ← two_mul, Nat.mul_right_inj (by norm_num)] at key
case pos.intro n : ℕ+ K : Type u inst✝¹ : Field K inst✝ : CharZero K h : IsCyclotomicExtension {n} ℚ K this : NumberField K hn : 2 < n k : ℕ hk : φ ↑n = k + k key : nrComplexPlaces K = k ⊢ nrComplexPlaces K = φ ↑n / 2
729816392c1bf851
ContinuousLinearMap.antilipschitz_of_forall_le_inner_map
Mathlib/Analysis/InnerProductSpace/Positive.lean
lemma antilipschitz_of_forall_le_inner_map {H : Type*} [NormedAddCommGroup H] [InnerProductSpace 𝕜 H] (f : H →L[𝕜] H) {c : ℝ≥0} (hc : 0 < c) (h : ∀ x, ‖x‖ ^ 2 * c ≤ ‖⟪f x, x⟫_𝕜‖) : AntilipschitzWith c⁻¹ f
case neg 𝕜 : Type u_1 inst✝² : RCLike 𝕜 H : Type u_4 inst✝¹ : NormedAddCommGroup H inst✝ : InnerProductSpace 𝕜 H f : H →L[𝕜] H c : ℝ≥0 hc : 0 < c x : H h : ∀ (x : H), ‖x‖ * (‖x‖ * ↑c) ≤ ‖⟪f x, x⟫_𝕜‖ hx0 : ¬x = 0 ⊢ (OrderIso.mulLeft₀ ‖x‖ ⋯) (‖x‖ * ↑c) ≤ (OrderIso.mulLeft₀ ‖x‖ ⋯) ‖f x‖
exact (h x).trans <| (norm_inner_le_norm _ _).trans <| (mul_comm _ _).le
no goals
71e62e4965774a31
CategoryTheory.Localization.Monoidal.triangle
Mathlib/CategoryTheory/Localization/Monoidal.lean
lemma triangle (X Y : LocalizedMonoidal L W ε) : (α_ X (𝟙_ _) Y).hom ≫ X ◁ (λ_ Y).hom = (ρ_ X).hom ▷ Y
case intro.intro C : Type u_1 D : Type u_2 inst✝⁴ : Category.{u_3, u_1} C inst✝³ : Category.{u_4, u_2} D L : C ⥤ D W : MorphismProperty C inst✝² : MonoidalCategory C inst✝¹ : W.IsMonoidal inst✝ : L.IsLocalization W unit : D ε : L.obj (𝟙_ C) ≅ unit X Y : LocalizedMonoidal L W ε X' : C e₁ : L'.obj X' ≅ X ⊢ (α_ X (𝟙_ (LocalizedMonoidal L W ε)) Y).hom ≫ X ◁ (λ_ Y).hom = (ρ_ X).hom ▷ Y
obtain ⟨Y', ⟨e₂⟩⟩ : ∃ X₂, Nonempty ((L').obj X₂ ≅ Y) := ⟨_, ⟨(L').objObjPreimageIso Y⟩⟩
case intro.intro.intro.intro C : Type u_1 D : Type u_2 inst✝⁴ : Category.{u_3, u_1} C inst✝³ : Category.{u_4, u_2} D L : C ⥤ D W : MorphismProperty C inst✝² : MonoidalCategory C inst✝¹ : W.IsMonoidal inst✝ : L.IsLocalization W unit : D ε : L.obj (𝟙_ C) ≅ unit X Y : LocalizedMonoidal L W ε X' : C e₁ : L'.obj X' ≅ X Y' : C e₂ : L'.obj Y' ≅ Y ⊢ (α_ X (𝟙_ (LocalizedMonoidal L W ε)) Y).hom ≫ X ◁ (λ_ Y).hom = (ρ_ X).hom ▷ Y
6cbfa340cf91a11d
Polynomial.self_mul_modByMonic
Mathlib/Algebra/Polynomial/Div.lean
/-- See `Polynomial.mul_self_modByMonic` for the other multiplication order. That version, unlike this one, requires commutativity. -/ @[simp] lemma self_mul_modByMonic (hq : q.Monic) : (q * p) %ₘ q = 0
R : Type u inst✝ : Ring R p q : R[X] hq : q.Monic ⊢ q ∣ q * p
exact dvd_mul_right q p
no goals
ad96480d0f80bfaf
Finset.le_truncatedSup
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean
lemma le_truncatedSup : a ≤ truncatedSup s a
case pos.intro.intro α : Type u_1 inst✝² : SemilatticeSup α s : Finset α a : α inst✝¹ : DecidableRel fun x1 x2 => x1 ≤ x2 inst✝ : OrderTop α ℬ : α hb : ℬ ∈ ↑s h : a ≤ ℬ ⊢ a ≤ (filter (fun b => a ≤ b) s).sup' ⋯ id
exact h.trans <| le_sup' id <| mem_filter.2 ⟨hb, h⟩
no goals
c8788e690d1221eb
binomial_sum_eq
Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean
private lemma binomial_sum_eq (h : n < m) : ∑ i ∈ range (n + 1), (n.choose i * (m - n) / ((m - i) * m.choose i) : ℚ) = 1
m n : ℕ h : n < m f : ℕ → ℚ := fun i => ↑(n.choose i) * (↑(m.choose i))⁻¹ hf : f = fun i => ↑(n.choose i) * (↑(m.choose i))⁻¹ i : ℕ h₁✝ : i < n + 1 h₁ : i ≤ n h₂ : i < m h₃ : i ≤ m hi₄ : ↑i + 1 ≠ 0 this : ↑(m.choose (i + 1)) * (↑i + 1) = ↑(m.choose i) * ↑(m - i) ⊢ ↑(n.choose i) * (↑(m.choose i))⁻¹ - ↑(n.choose (i + 1)) * (↑(m.choose (i + 1)))⁻¹ = ↑(n.choose i) * (↑m - ↑n) / ((↑m - ↑i) * ↑(m.choose i))
rw [(eq_mul_inv_iff_mul_eq₀ hi₄).mpr this]
m n : ℕ h : n < m f : ℕ → ℚ := fun i => ↑(n.choose i) * (↑(m.choose i))⁻¹ hf : f = fun i => ↑(n.choose i) * (↑(m.choose i))⁻¹ i : ℕ h₁✝ : i < n + 1 h₁ : i ≤ n h₂ : i < m h₃ : i ≤ m hi₄ : ↑i + 1 ≠ 0 this : ↑(m.choose (i + 1)) * (↑i + 1) = ↑(m.choose i) * ↑(m - i) ⊢ ↑(n.choose i) * (↑(m.choose i))⁻¹ - ↑(n.choose (i + 1)) * (↑(m.choose i) * ↑(m - i) * (↑i + 1)⁻¹)⁻¹ = ↑(n.choose i) * (↑m - ↑n) / ((↑m - ↑i) * ↑(m.choose i))
fac86174f38b637e
Lists'.subset_nil
Mathlib/SetTheory/Lists.lean
theorem subset_nil {l : Lists' α true} : l ⊆ Lists'.nil → l = Lists'.nil
α : Type u_1 l : Lists' α true ⊢ l ⊆ nil → l = nil
rw [← of_toList l]
α : Type u_1 l : Lists' α true ⊢ ofList l.toList ⊆ nil → ofList l.toList = nil
e126eef8141d3618
Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.unsat_of_encounteredBoth
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/LRAT/Internal/Formula/RupAddSound.lean
theorem unsat_of_encounteredBoth {n : Nat} (c : DefaultClause n) (assignment : Array Assignment) : reduce c assignment = encounteredBoth → Unsatisfiable (PosFin n) assignment
n : Nat c : DefaultClause n assignment : Array Assignment hb : reducedToEmpty = encounteredBoth → Unsatisfiable (PosFin n) assignment res : ReduceResult (PosFin n) ih : res = encounteredBoth → Unsatisfiable (PosFin n) assignment l : Literal (PosFin n) x✝ : l ∈ c.clause h : reduce_fold_fn assignment res l = encounteredBoth ⊢ Unsatisfiable (PosFin n) assignment
rw [reduce_fold_fn.eq_def] at h
n : Nat c : DefaultClause n assignment : Array Assignment hb : reducedToEmpty = encounteredBoth → Unsatisfiable (PosFin n) assignment res : ReduceResult (PosFin n) ih : res = encounteredBoth → Unsatisfiable (PosFin n) assignment l : Literal (PosFin n) x✝ : l ∈ c.clause h : (match res with | encounteredBoth => encounteredBoth | reducedToEmpty => match assignment[l.fst.val]! with | pos => if l.snd = true then reducedToUnit l else reducedToEmpty | neg => if (!l.snd) = true then reducedToUnit l else reducedToEmpty | both => encounteredBoth | unassigned => reducedToUnit l | reducedToUnit l' => match assignment[l.fst.val]! with | pos => if l.snd = true then reducedToNonunit else reducedToUnit l' | neg => if (!l.snd) = true then reducedToNonunit else reducedToUnit l' | both => encounteredBoth | unassigned => reducedToNonunit | reducedToNonunit => reducedToNonunit) = encounteredBoth ⊢ Unsatisfiable (PosFin n) assignment
a1d564233a90b7cf
HurwitzZeta.oddKernel_functional_equation
Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean
lemma oddKernel_functional_equation (a : UnitAddCircle) (x : ℝ) : oddKernel a x = 1 / x ^ (3 / 2 : ℝ) * sinKernel a (1 / x)
x : ℝ hx : 0 < x a : ℝ h1 : -1 / (I * ↑(1 / x)) = I * ↑x h2 : -I * (I * ↑(1 / x)) = 1 / ↑x h3 : ↑x ^ (3 / 2) ≠ 0 ⊢ (↑x).arg ≠ π
rw [arg_ofReal_of_nonneg hx.le]
x : ℝ hx : 0 < x a : ℝ h1 : -1 / (I * ↑(1 / x)) = I * ↑x h2 : -I * (I * ↑(1 / x)) = 1 / ↑x h3 : ↑x ^ (3 / 2) ≠ 0 ⊢ 0 ≠ π
abcc5baeafa4b46c
List.dedup_map_of_injective
Mathlib/Data/List/Dedup.lean
theorem dedup_map_of_injective [DecidableEq β] {f : α → β} (hf : Function.Injective f) (xs : List α) : (xs.map f).dedup = xs.dedup.map f
case nil α : Type u_1 β : Type u_2 inst✝¹ : DecidableEq α inst✝ : DecidableEq β f : α → β hf : Function.Injective f ⊢ (map f []).dedup = map f [].dedup
simp
no goals
74f40e5383066b94
Prod.lex_def
Mathlib/.lake/packages/lean4/src/lean/Init/WF.lean
theorem lex_def {r : α → α → Prop} {s : β → β → Prop} {p q : α × β} : Prod.Lex r s p q ↔ r p.1 q.1 ∨ p.1 = q.1 ∧ s p.2 q.2 := ⟨fun h => by cases h <;> simp [*], fun h => match p, q, h with | _, _, Or.inl h => Lex.left _ _ h | (_, _), (_, _), Or.inr ⟨e, h⟩ => by subst e; exact Lex.right _ h⟩
α : Type u β : Type v r : α → α → Prop s : β → β → Prop p q : α × β h✝ : r p.fst q.fst ∨ p.fst = q.fst ∧ s p.snd q.snd fst✝¹ : α snd✝¹ : β fst✝ : α snd✝ : β e : { fst := fst✝¹, snd := snd✝¹ }.fst = { fst := fst✝, snd := snd✝ }.fst h : s { fst := fst✝¹, snd := snd✝¹ }.snd { fst := fst✝, snd := snd✝ }.snd ⊢ Prod.Lex r s { fst := fst✝¹, snd := snd✝¹ } { fst := fst✝, snd := snd✝ }
subst e
α : Type u β : Type v r : α → α → Prop s : β → β → Prop p q : α × β h✝ : r p.fst q.fst ∨ p.fst = q.fst ∧ s p.snd q.snd fst✝ : α snd✝¹ snd✝ : β h : s { fst := fst✝, snd := snd✝¹ }.snd { fst := { fst := fst✝, snd := snd✝¹ }.fst, snd := snd✝ }.snd ⊢ Prod.Lex r s { fst := fst✝, snd := snd✝¹ } { fst := { fst := fst✝, snd := snd✝¹ }.fst, snd := snd✝ }
2e7c9bb8ce1d8ac3
MeasureTheory.condExp_ae_eq_condExpL1CLM
Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
theorem condExp_ae_eq_condExpL1CLM (hm : m ≤ m₀) [SigmaFinite (μ.trim hm)] (hf : Integrable f μ) : μ[f|m] =ᵐ[μ] condExpL1CLM E hm μ (hf.toL1 f)
α : Type u_1 E : Type u_3 m m₀ : MeasurableSpace α μ : Measure α f : α → E inst✝³ : NormedAddCommGroup E inst✝² : NormedSpace ℝ E inst✝¹ : CompleteSpace E hm : m ≤ m₀ inst✝ : SigmaFinite (μ.trim hm) hf : Integrable f μ ⊢ μ[f|m] =ᶠ[ae μ] ↑↑((condExpL1CLM E hm μ) (Integrable.toL1 f hf))
refine (condExp_ae_eq_condExpL1 hm f).trans (Eventually.of_forall fun x => ?_)
α : Type u_1 E : Type u_3 m m₀ : MeasurableSpace α μ : Measure α f : α → E inst✝³ : NormedAddCommGroup E inst✝² : NormedSpace ℝ E inst✝¹ : CompleteSpace E hm : m ≤ m₀ inst✝ : SigmaFinite (μ.trim hm) hf : Integrable f μ x : α ⊢ ↑↑(condExpL1 hm μ f) x = ↑↑((condExpL1CLM E hm μ) (Integrable.toL1 f hf)) x
2587c1a2068ccc35
Equiv.Perm.IsCycle.commute_iff'
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem IsCycle.commute_iff' {g c : Perm α} (hc : c.IsCycle) : Commute g c ↔ ∃ hc' : ∀ x : α, x ∈ c.support ↔ g x ∈ c.support, subtypePerm g hc' ∈ Subgroup.zpowers c.subtypePermOfSupport
case h.H.mk.a.intro α : Type u_2 inst✝¹ : Fintype α inst✝ : DecidableEq α g c : Perm α hc : c.IsCycle hgc : Commute g c hgc' : ∀ (x : α), x ∈ c.support ↔ g x ∈ c.support a : α ha : a ∈ c.support i : ℤ hi : (c ^ i) a = g a j : ℤ hx : (c ^ j) a ∈ c.support ⊢ (c ^ i) ((c ^ j) a) = g ((c ^ j) a)
simp only [← mul_apply, Commute.eq (Commute.zpow_right hgc j)]
case h.H.mk.a.intro α : Type u_2 inst✝¹ : Fintype α inst✝ : DecidableEq α g c : Perm α hc : c.IsCycle hgc : Commute g c hgc' : ∀ (x : α), x ∈ c.support ↔ g x ∈ c.support a : α ha : a ∈ c.support i : ℤ hi : (c ^ i) a = g a j : ℤ hx : (c ^ j) a ∈ c.support ⊢ (c ^ i * c ^ j) a = (c ^ j * g) a
6546f2c70e2936c9
Array.getElem?_size
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem getElem?_size {a : Array α} : a[a.size]? = none
α : Type u_1 a : Array α ⊢ a[a.size]? = none
simp only [getElem?_def, Nat.lt_irrefl, dite_false]
no goals
86cca0a3386197c2
Complex.HadamardThreeLines.diffContOnCl_invInterpStrip
Mathlib/Analysis/Complex/Hadamard.lean
/-- The function `invInterpStrip` is `diffContOnCl`. -/ lemma diffContOnCl_invInterpStrip {ε : ℝ} (hε : ε > 0) : DiffContOnCl ℂ (fun z ↦ invInterpStrip f z ε) (verticalStrip 0 1)
case h.hb.h E : Type u_1 inst✝ : NormedAddCommGroup E f : ℂ → E ε : ℝ hε : ε > 0 ⊢ ε + sSupNormIm f 1 ≠ 0
exact (ne_of_gt (sSupNormIm_eps_pos f hε 1))
no goals
9ba71e12742f43a8
MeasureTheory.Measure.measure_preimage_isMulLeftInvariant_eq_smul_of_hasCompactSupport
Mathlib/MeasureTheory/Measure/Haar/Unique.lean
/-- Two left invariant measures give the same mass to level sets of continuous compactly supported functions, up to the scalar `haarScalarFactor μ' μ`. Auxiliary lemma in the proof of the more general `measure_isMulInvariant_eq_smul_of_isCompact_closure`, which works for any set with compact closure. -/ @[to_additive measure_preimage_isAddLeftInvariant_eq_smul_of_hasCompactSupport "Two left invariant measures give the same mass to level sets of continuous compactly supported functions, up to the scalar `addHaarScalarFactor μ' μ`. Auxiliary lemma in the proof of the more general `measure_isAddInvariant_eq_smul_of_isCompact_closure`, which works for any set with compact closure."] lemma measure_preimage_isMulLeftInvariant_eq_smul_of_hasCompactSupport (μ' μ : Measure G) [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ'] {f : G → ℝ} (hf : Continuous f) (h'f : HasCompactSupport f) : μ' (f ⁻¹' {1}) = haarScalarFactor μ' μ • μ (f ⁻¹' {1})
case h_lim.h G : Type u_1 inst✝⁷ : TopologicalSpace G inst✝⁶ : Group G inst✝⁵ : IsTopologicalGroup G inst✝⁴ : MeasurableSpace G inst✝³ : BorelSpace G μ' μ : Measure G inst✝² : μ.IsHaarMeasure inst✝¹ : IsFiniteMeasureOnCompacts μ' inst✝ : μ'.IsMulLeftInvariant f : G → ℝ hf : Continuous f h'f : HasCompactSupport f u : ℕ → ℝ u_mem : ∀ (n : ℕ), u n ∈ Ioo 0 1 u_lim : Tendsto u atTop (𝓝 0) v : ℕ → ℝ → ℝ := fun n x => ↑((thickenedIndicator ⋯ {1}) x) vf_cont : ∀ (n : ℕ), Continuous (v n ∘ f) ν : Measure G hν : IsFiniteMeasureOnCompacts ν x : G ⊢ Tendsto (fun n => v n (f x)) atTop (𝓝 ({1}.indicator (fun x => 1) (f x)))
have T := tendsto_pi_nhds.1 (thickenedIndicator_tendsto_indicator_closure (fun n ↦ (u_mem n).1) u_lim ({1} : Set ℝ)) (f x)
case h_lim.h G : Type u_1 inst✝⁷ : TopologicalSpace G inst✝⁶ : Group G inst✝⁵ : IsTopologicalGroup G inst✝⁴ : MeasurableSpace G inst✝³ : BorelSpace G μ' μ : Measure G inst✝² : μ.IsHaarMeasure inst✝¹ : IsFiniteMeasureOnCompacts μ' inst✝ : μ'.IsMulLeftInvariant f : G → ℝ hf : Continuous f h'f : HasCompactSupport f u : ℕ → ℝ u_mem : ∀ (n : ℕ), u n ∈ Ioo 0 1 u_lim : Tendsto u atTop (𝓝 0) v : ℕ → ℝ → ℝ := fun n x => ↑((thickenedIndicator ⋯ {1}) x) vf_cont : ∀ (n : ℕ), Continuous (v n ∘ f) ν : Measure G hν : IsFiniteMeasureOnCompacts ν x : G T : Tendsto (fun i => (thickenedIndicator ⋯ {1}) (f x)) atTop (𝓝 ((closure {1}).indicator (fun x => 1) (f x))) ⊢ Tendsto (fun n => v n (f x)) atTop (𝓝 ({1}.indicator (fun x => 1) (f x)))
16895233429fcfcd
Int.Matrix.exists_ne_zero_int_vec_norm_le
Mathlib/NumberTheory/SiegelsLemma.lean
theorem exists_ne_zero_int_vec_norm_le (hn : Fintype.card α < Fintype.card β) (hm : 0 < Fintype.card α) : ∃ t : β → ℤ, t ≠ 0 ∧ A *ᵥ t = 0 ∧ ‖t‖ ≤ (n * max 1 ‖A‖) ^ ((m : ℝ) / (n - m))
case intro.intro.intro.intro.intro α : Type u_1 β : Type u_2 inst✝¹ : Fintype α inst✝ : Fintype β A : Matrix α β ℤ hn : m < n hm : 0 < m x : β → ℤ hxT : x ∈ T y : β → ℤ hyT : y ∈ T hneq : x ≠ y hfeq : A *ᵥ x = A *ᵥ y ⊢ ‖x - y‖ ≤ (↑n * (1 ⊔ ‖A‖)) ^ e
have n_mul_norm_A_pow_e_nonneg : 0 ≤ (n * max 1 ‖A‖) ^ e := by positivity
case intro.intro.intro.intro.intro α : Type u_1 β : Type u_2 inst✝¹ : Fintype α inst✝ : Fintype β A : Matrix α β ℤ hn : m < n hm : 0 < m x : β → ℤ hxT : x ∈ T y : β → ℤ hyT : y ∈ T hneq : x ≠ y hfeq : A *ᵥ x = A *ᵥ y n_mul_norm_A_pow_e_nonneg : 0 ≤ (↑n * (1 ⊔ ‖A‖)) ^ e ⊢ ‖x - y‖ ≤ (↑n * (1 ⊔ ‖A‖)) ^ e
028ca7465c0ecd0f
Submonoid.mem_closure_range_iff
Mathlib/Algebra/Group/Submonoid/Finsupp.lean
theorem mem_closure_range_iff : x ∈ closure (Set.range f) ↔ ∃ a : ι →₀ ℕ, x = a.prod (f · ^ ·)
case intro M : Type u_1 inst✝ : CommMonoid M ι : Type u_2 f : ι → M a : ι →₀ ℕ ⊢ (a.prod fun x1 x2 => f x1 ^ x2) ∈ closure (Set.range f)
exact prod_mem _ fun i hi ↦ pow_mem (subset_closure (Set.mem_range_self i)) _
no goals
0b3c4edeef55010d
Rack.left_cancel
Mathlib/Algebra/Quandle.lean
theorem left_cancel (x : R) {y y' : R} : x ◃ y = x ◃ y' ↔ y = y'
R : Type u_1 inst✝ : Rack R x y y' : R ⊢ x ◃ y = x ◃ y' ↔ y = y'
constructor
case mp R : Type u_1 inst✝ : Rack R x y y' : R ⊢ x ◃ y = x ◃ y' → y = y' case mpr R : Type u_1 inst✝ : Rack R x y y' : R ⊢ y = y' → x ◃ y = x ◃ y'
6ca14f819936106b
Matrix.finite_real_spectrum
Mathlib/LinearAlgebra/Matrix/HermitianFunctionalCalculus.lean
lemma finite_real_spectrum : (spectrum ℝ A).Finite
n : Type u_1 𝕜 : Type u_2 inst✝² : RCLike 𝕜 inst✝¹ : Fintype n inst✝ : DecidableEq n A : Matrix n n 𝕜 ⊢ (spectrum ℝ A).Finite
rw [← spectrum.preimage_algebraMap 𝕜]
n : Type u_1 𝕜 : Type u_2 inst✝² : RCLike 𝕜 inst✝¹ : Fintype n inst✝ : DecidableEq n A : Matrix n n 𝕜 ⊢ (⇑(algebraMap ℝ 𝕜) ⁻¹' spectrum 𝕜 A).Finite
f8a964fd21b2b35e
Finset.image₂_insert_left
Mathlib/Data/Finset/NAry.lean
theorem image₂_insert_left [DecidableEq α] : image₂ f (insert a s) t = (t.image fun b => f a b) ∪ image₂ f s t := coe_injective <| by push_cast exact image2_insert_left
α : Type u_1 β : Type u_3 γ : Type u_5 inst✝¹ : DecidableEq γ f : α → β → γ s : Finset α t : Finset β a : α inst✝ : DecidableEq α ⊢ ↑(image₂ f (insert a s) t) = ↑(image (fun b => f a b) t ∪ image₂ f s t)
push_cast
α : Type u_1 β : Type u_3 γ : Type u_5 inst✝¹ : DecidableEq γ f : α → β → γ s : Finset α t : Finset β a : α inst✝ : DecidableEq α ⊢ image2 f (insert a ↑s) ↑t = (fun b => f a b) '' ↑t ∪ image2 f ↑s ↑t
944d494b423a3279
Real.rpow_logb_of_neg
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
theorem rpow_logb_of_neg (hx : x < 0) : b ^ logb b x = -x
b x : ℝ b_pos : 0 < b b_ne_one : b ≠ 1 hx : x < 0 ⊢ |x| = -x
exact abs_of_neg hx
no goals
c88f07d3d4e8d065
zero_mem_tangentCone
Mathlib/Analysis/Calculus/TangentCone.lean
theorem zero_mem_tangentCone {s : Set E} {x : E} (hx : (𝓝[s \ {x}] x).NeBot) : 0 ∈ tangentConeAt 𝕜 s x
𝕜 : Type u_1 inst✝² : NontriviallyNormedField 𝕜 E : Type u_2 inst✝¹ : NormedAddCommGroup E inst✝ : NormedSpace 𝕜 E s : Set E x : E hx : (𝓝[s \ {x}] x).NeBot u : ℕ → ℝ u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → E hv : ∀ (n : ℕ), v n ∈ s \ {x} ∩ Metric.ball x (u n * u n) d : ℕ → E := fun n => v n - x M : ∀ (n : ℕ), x + d n ∈ s \ {x} r : 𝕜 hr : 1 < ‖r‖ c : ℕ → 𝕜 c_ne : ∀ (n : ℕ), c n ≠ 0 c_le : ∀ (n : ℕ), ‖c n • d n‖ < u n le_c : ∀ (n : ℕ), u n / ‖r‖ ≤ ‖c n • d n‖ hc : ∀ (n : ℕ), ‖c n‖⁻¹ ≤ (u n)⁻¹ * ‖r‖ * ‖d n‖ ⊢ Tendsto (fun n => ‖c n‖⁻¹) atTop (𝓝[>] 0)
simp only [nhdsWithin, tendsto_inf, tendsto_principal, mem_Ioi, norm_pos_iff, ne_eq, eventually_atTop, ge_iff_le]
𝕜 : Type u_1 inst✝² : NontriviallyNormedField 𝕜 E : Type u_2 inst✝¹ : NormedAddCommGroup E inst✝ : NormedSpace 𝕜 E s : Set E x : E hx : (𝓝[s \ {x}] x).NeBot u : ℕ → ℝ u_pos : ∀ (n : ℕ), 0 < u n u_lim : Tendsto u atTop (𝓝 0) v : ℕ → E hv : ∀ (n : ℕ), v n ∈ s \ {x} ∩ Metric.ball x (u n * u n) d : ℕ → E := fun n => v n - x M : ∀ (n : ℕ), x + d n ∈ s \ {x} r : 𝕜 hr : 1 < ‖r‖ c : ℕ → 𝕜 c_ne : ∀ (n : ℕ), c n ≠ 0 c_le : ∀ (n : ℕ), ‖c n • d n‖ < u n le_c : ∀ (n : ℕ), u n / ‖r‖ ≤ ‖c n • d n‖ hc : ∀ (n : ℕ), ‖c n‖⁻¹ ≤ (u n)⁻¹ * ‖r‖ * ‖d n‖ ⊢ Tendsto (fun n => ‖c n‖⁻¹) atTop (𝓝 0) ∧ ∃ a, ∀ (b : ℕ), a ≤ b → 0 < ‖c b‖⁻¹
15a846dd0ca352f4
ContextFreeRule.Rewrites.append_left
Mathlib/Computability/ContextFreeGrammar.lean
/-- Add extra prefix to context-free rewriting. -/ lemma Rewrites.append_left (hvw : r.Rewrites u v) (p : List (Symbol T N)) : r.Rewrites (p ++ u) (p ++ v)
case intro.intro T : Type u_1 N : Type u_2 r : ContextFreeRule T N u v p x y : List (Symbol T N) hxy : u = x ++ [Symbol.nonterminal r.input] ++ y ∧ v = x ++ r.output ++ y ⊢ ∃ p_1 q, p ++ u = p_1 ++ [Symbol.nonterminal r.input] ++ q ∧ p ++ v = p_1 ++ r.output ++ q
use p ++ x, y
case h T : Type u_1 N : Type u_2 r : ContextFreeRule T N u v p x y : List (Symbol T N) hxy : u = x ++ [Symbol.nonterminal r.input] ++ y ∧ v = x ++ r.output ++ y ⊢ p ++ u = p ++ x ++ [Symbol.nonterminal r.input] ++ y ∧ p ++ v = p ++ x ++ r.output ++ y
897ba01247a5d1f9
Submodule.top_orthogonal_eq_bot
Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
theorem top_orthogonal_eq_bot : (⊤ : Submodule 𝕜 E)ᗮ = ⊥
𝕜 : Type u_1 E : Type u_2 inst✝² : RCLike 𝕜 inst✝¹ : NormedAddCommGroup E inst✝ : InnerProductSpace 𝕜 E ⊢ ∀ u ∈ ⊤, inner u 0 = 0
simp
no goals
50e74963dd23dcc0
Int.lt_neg_add_of_add_lt
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem lt_neg_add_of_add_lt {a b c : Int} (h : a + b < c) : b < -a + c
a b c : Int h✝ : a + b < c h : -a + (a + b) < -a + c ⊢ b < -a + c
rwa [Int.neg_add_cancel_left] at h
no goals
f36e4b18e6175a03
CompositionSeries.Equivalent.snoc
Mathlib/Order/JordanHolder.lean
theorem snoc {s₁ s₂ : CompositionSeries X} {x₁ x₂ : X} {hsat₁ : IsMaximal s₁.last x₁} {hsat₂ : IsMaximal s₂.last x₂} (hequiv : Equivalent s₁ s₂) (hlast : Iso (s₁.last, x₁) (s₂.last, x₂)) : Equivalent (s₁.snoc x₁ hsat₁) (s₂.snoc x₂ hsat₂) := let e : Fin s₁.length.succ ≃ Fin s₂.length.succ := calc Fin (s₁.length + 1) ≃ Option (Fin s₁.length) := finSuccEquivLast _ ≃ Option (Fin s₂.length) := Functor.mapEquiv Option hequiv.choose _ ≃ Fin (s₂.length + 1) := finSuccEquivLast.symm ⟨e, fun i => by refine Fin.lastCases ?_ ?_ i · simpa [e, apply_last] using hlast · intro i simpa [e, Fin.succ_castSucc] using hequiv.choose_spec i⟩
X : Type u inst✝¹ : Lattice X inst✝ : JordanHolderLattice X s₁ s₂ : CompositionSeries X x₁ x₂ : X hsat₁ : IsMaximal (last s₁) x₁ hsat₂ : IsMaximal (last s₂) x₂ hequiv : s₁.Equivalent s₂ hlast : Iso (last s₁, x₁) (last s₂, x₂) e : Fin s₁.length.succ ≃ Fin s₂.length.succ := Trans.trans (Trans.trans finSuccEquivLast (Functor.mapEquiv Option (Exists.choose hequiv))) finSuccEquivLast.symm i : Fin (snoc s₁ x₁ hsat₁).length ⊢ Iso ((snoc s₁ x₁ hsat₁).toFun i.castSucc, (snoc s₁ x₁ hsat₁).toFun i.succ) ((snoc s₂ x₂ hsat₂).toFun (e i).castSucc, (snoc s₂ x₂ hsat₂).toFun (e i).succ)
refine Fin.lastCases ?_ ?_ i
case refine_1 X : Type u inst✝¹ : Lattice X inst✝ : JordanHolderLattice X s₁ s₂ : CompositionSeries X x₁ x₂ : X hsat₁ : IsMaximal (last s₁) x₁ hsat₂ : IsMaximal (last s₂) x₂ hequiv : s₁.Equivalent s₂ hlast : Iso (last s₁, x₁) (last s₂, x₂) e : Fin s₁.length.succ ≃ Fin s₂.length.succ := Trans.trans (Trans.trans finSuccEquivLast (Functor.mapEquiv Option (Exists.choose hequiv))) finSuccEquivLast.symm i : Fin (snoc s₁ x₁ hsat₁).length ⊢ Iso ((snoc s₁ x₁ hsat₁).toFun (Fin.last (s₁.length + (RelSeries.singleton IsMaximal x₁).length)).castSucc, (snoc s₁ x₁ hsat₁).toFun (Fin.last (s₁.length + (RelSeries.singleton IsMaximal x₁).length)).succ) ((snoc s₂ x₂ hsat₂).toFun (e (Fin.last (s₁.length + (RelSeries.singleton IsMaximal x₁).length))).castSucc, (snoc s₂ x₂ hsat₂).toFun (e (Fin.last (s₁.length + (RelSeries.singleton IsMaximal x₁).length))).succ) case refine_2 X : Type u inst✝¹ : Lattice X inst✝ : JordanHolderLattice X s₁ s₂ : CompositionSeries X x₁ x₂ : X hsat₁ : IsMaximal (last s₁) x₁ hsat₂ : IsMaximal (last s₂) x₂ hequiv : s₁.Equivalent s₂ hlast : Iso (last s₁, x₁) (last s₂, x₂) e : Fin s₁.length.succ ≃ Fin s₂.length.succ := Trans.trans (Trans.trans finSuccEquivLast (Functor.mapEquiv Option (Exists.choose hequiv))) finSuccEquivLast.symm i : Fin (snoc s₁ x₁ hsat₁).length ⊢ ∀ (i : Fin (s₁.length + (RelSeries.singleton IsMaximal x₁).length)), Iso ((snoc s₁ x₁ hsat₁).toFun i.castSucc.castSucc, (snoc s₁ x₁ hsat₁).toFun i.castSucc.succ) ((snoc s₂ x₂ hsat₂).toFun (e i.castSucc).castSucc, (snoc s₂ x₂ hsat₂).toFun (e i.castSucc).succ)
5d1cf789582cbd93
Nat.Partrec.Code.rec_computable
Mathlib/Computability/PartrecCode.lean
theorem rec_computable {α σ} [Primcodable α] [Primcodable σ] {c : α → Code} (hc : Computable c) {z : α → σ} (hz : Computable z) {s : α → σ} (hs : Computable s) {l : α → σ} (hl : Computable l) {r : α → σ} (hr : Computable r) {pr : α → Code × Code × σ × σ → σ} (hpr : Computable₂ pr) {co : α → Code × Code × σ × σ → σ} (hco : Computable₂ co) {pc : α → Code × Code × σ × σ → σ} (hpc : Computable₂ pc) {rf : α → Code × σ → σ} (hrf : Computable₂ rf) : let PR (a) cf cg hf hg := pr a (cf, cg, hf, hg) let CO (a) cf cg hf hg := co a (cf, cg, hf, hg) let PC (a) cf cg hf hg := pc a (cf, cg, hf, hg) let RF (a) cf hf := rf a (cf, hf) let F (a : α) (c : Code) : σ := Nat.Partrec.Code.recOn c (z a) (s a) (l a) (r a) (PR a) (CO a) (PC a) (RF a) Computable fun a => F a (c a)
case succ.succ.succ.succ α : Type u_1 σ : Type u_2 inst✝¹ : Primcodable α inst✝ : Primcodable σ c : α → Code hc : Computable c z : α → σ hz : Computable z s : α → σ hs : Computable s l : α → σ hl : Computable l r : α → σ hr : Computable r pr : α → Code × Code × σ × σ → σ hpr : Computable₂ pr co : α → Code × Code × σ × σ → σ hco : Computable₂ co pc : α → Code × Code × σ × σ → σ hpc : Computable₂ pc rf : α → Code × σ → σ hrf : Computable₂ rf PR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg) CO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg) PC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg) RF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf) F : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a) G₁ : (α × List σ) × ℕ × ℕ → Option σ := fun p => (p.1.2.get? p.2.2).bind fun s => (p.1.2.get? (unpair p.2.2).1).bind fun s₁ => Option.map (fun s₂ => bif p.2.1.bodd then bif p.2.1.div2.bodd then rf p.1.1 (ofNat Code p.2.2, s) else pc p.1.1 (ofNat Code (unpair p.2.2).1, ofNat Code (unpair p.2.2).2, s₁, s₂) else bif p.2.1.div2.bodd then co p.1.1 (ofNat Code (unpair p.2.2).1, ofNat Code (unpair p.2.2).2, s₁, s₂) else pr p.1.1 (ofNat Code (unpair p.2.2).1, ofNat Code (unpair p.2.2).2, s₁, s₂)) (p.1.2.get? (unpair p.2.2).2) this✝ : Computable G₁ G : α → List σ → Option σ := fun a IH => Nat.casesOn IH.length (some (z a)) fun n => Nat.casesOn n (some (s a)) fun n => Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, n.div2.div2) this : Computable₂ G a : α n : ℕ ⊢ Nat.rec (some (z a)) (fun n_1 n_ih => Nat.rec (some (s a)) (fun n_2 n_ih => Nat.rec (some (l a)) (fun n_3 n_ih => Nat.rec (some (r a)) (fun n_4 n_ih => G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 1 + 1 + 1 + 1))), n_4, n_4.div2.div2)) n_3) n_2) n_1) (n + 1 + 1 + 1 + 1) = some (F a (ofNat Code (n + 1 + 1 + 1 + 1)))
let m := n.div2.div2
case succ.succ.succ.succ α : Type u_1 σ : Type u_2 inst✝¹ : Primcodable α inst✝ : Primcodable σ c : α → Code hc : Computable c z : α → σ hz : Computable z s : α → σ hs : Computable s l : α → σ hl : Computable l r : α → σ hr : Computable r pr : α → Code × Code × σ × σ → σ hpr : Computable₂ pr co : α → Code × Code × σ × σ → σ hco : Computable₂ co pc : α → Code × Code × σ × σ → σ hpc : Computable₂ pc rf : α → Code × σ → σ hrf : Computable₂ rf PR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg) CO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg) PC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg) RF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf) F : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a) G₁ : (α × List σ) × ℕ × ℕ → Option σ := fun p => (p.1.2.get? p.2.2).bind fun s => (p.1.2.get? (unpair p.2.2).1).bind fun s₁ => Option.map (fun s₂ => bif p.2.1.bodd then bif p.2.1.div2.bodd then rf p.1.1 (ofNat Code p.2.2, s) else pc p.1.1 (ofNat Code (unpair p.2.2).1, ofNat Code (unpair p.2.2).2, s₁, s₂) else bif p.2.1.div2.bodd then co p.1.1 (ofNat Code (unpair p.2.2).1, ofNat Code (unpair p.2.2).2, s₁, s₂) else pr p.1.1 (ofNat Code (unpair p.2.2).1, ofNat Code (unpair p.2.2).2, s₁, s₂)) (p.1.2.get? (unpair p.2.2).2) this✝ : Computable G₁ G : α → List σ → Option σ := fun a IH => Nat.casesOn IH.length (some (z a)) fun n => Nat.casesOn n (some (s a)) fun n => Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, n.div2.div2) this : Computable₂ G a : α n : ℕ m : ℕ := n.div2.div2 ⊢ Nat.rec (some (z a)) (fun n_1 n_ih => Nat.rec (some (s a)) (fun n_2 n_ih => Nat.rec (some (l a)) (fun n_3 n_ih => Nat.rec (some (r a)) (fun n_4 n_ih => G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 1 + 1 + 1 + 1))), n_4, n_4.div2.div2)) n_3) n_2) n_1) (n + 1 + 1 + 1 + 1) = some (F a (ofNat Code (n + 1 + 1 + 1 + 1)))
547d9fab085be660
HasFDerivAt.le_of_lip'
Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem HasFDerivAt.le_of_lip' {f : E → F} {f' : E →L[𝕜] F} {x₀ : E} (hf : HasFDerivAt f f' x₀) {C : ℝ} (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) : ‖f'‖ ≤ C
case h 𝕜 : Type u_1 inst✝⁴ : NontriviallyNormedField 𝕜 E : Type u_2 inst✝³ : NormedAddCommGroup E inst✝² : NormedSpace 𝕜 E F : Type u_3 inst✝¹ : NormedAddCommGroup F inst✝ : NormedSpace 𝕜 F f : E → F f' : E →L[𝕜] F x₀ : E hf : HasFDerivAt f f' x₀ C : ℝ hC₀ : 0 ≤ C hlip : ∀ᶠ (a : E) in 𝓝 0, ‖f (x₀ + a) - f x₀‖ ≤ C * ‖x₀ + a - x₀‖ ε : ℝ ε0 : 0 < ε y : E hy : ‖f (x₀ + y) - f x₀ - f' y‖ ≤ ε * ‖y‖ hyC : ‖f (x₀ + y) - f x₀‖ ≤ C * ‖x₀ + y - x₀‖ ⊢ ‖f' y‖ ≤ (C + ε) * ‖y‖
rw [add_sub_cancel_left] at hyC
case h 𝕜 : Type u_1 inst✝⁴ : NontriviallyNormedField 𝕜 E : Type u_2 inst✝³ : NormedAddCommGroup E inst✝² : NormedSpace 𝕜 E F : Type u_3 inst✝¹ : NormedAddCommGroup F inst✝ : NormedSpace 𝕜 F f : E → F f' : E →L[𝕜] F x₀ : E hf : HasFDerivAt f f' x₀ C : ℝ hC₀ : 0 ≤ C hlip : ∀ᶠ (a : E) in 𝓝 0, ‖f (x₀ + a) - f x₀‖ ≤ C * ‖x₀ + a - x₀‖ ε : ℝ ε0 : 0 < ε y : E hy : ‖f (x₀ + y) - f x₀ - f' y‖ ≤ ε * ‖y‖ hyC : ‖f (x₀ + y) - f x₀‖ ≤ C * ‖y‖ ⊢ ‖f' y‖ ≤ (C + ε) * ‖y‖
8c833a4fe1e5790f
ClusterPt.of_le_nhds
Mathlib/Topology/Basic.lean
theorem ClusterPt.of_le_nhds {f : Filter X} (H : f ≤ 𝓝 x) [NeBot f] : ClusterPt x f
X : Type u x : X inst✝¹ : TopologicalSpace X f : Filter X H : f ≤ 𝓝 x inst✝ : f.NeBot ⊢ ClusterPt x f
rwa [ClusterPt, inf_eq_right.mpr H]
no goals
5575878643910dbe
Equiv.Perm.card_of_cycleType_eq_zero_iff
Mathlib/GroupTheory/Perm/Centralizer.lean
theorem card_of_cycleType_eq_zero_iff {m : Multiset ℕ} : ({g | g.cycleType = m} : Finset (Perm α)).card = 0 ↔ ¬ ((m.sum ≤ Fintype.card α ∧ ∀ a ∈ m, 2 ≤ a))
α : Type u_1 inst✝¹ : DecidableEq α inst✝ : Fintype α m : Multiset ℕ ⊢ (∀ ⦃x : Perm α⦄, x ∈ Finset.univ → ¬x.cycleType = m) ↔ ∀ (x : Perm α), ¬x.cycleType = m
aesop
no goals
c191a0004a70e575
Matroid.Indep.exists_insert_of_not_isBasis
Mathlib/Data/Matroid/Restrict.lean
theorem Indep.exists_insert_of_not_isBasis (hI : M.Indep I) (hIX : I ⊆ X) (hI' : ¬M.IsBasis I X) (hJ : M.IsBasis J X) : ∃ e ∈ J \ I, M.Indep (insert e I)
α : Type u_1 M : Matroid α I X J : Set α hI : M.Indep I hIX : I ⊆ X hI' : ¬M.IsBasis I X hJ : M.IsBasis J X ⊢ ∃ e ∈ J \ I, M.Indep (insert e I)
rw [← isBase_restrict_iff] at hI'
α : Type u_1 M : Matroid α I X J : Set α hI : M.Indep I hIX : I ⊆ X hI' : ¬(M ↾ X).IsBase I hJ : M.IsBasis J X ⊢ ∃ e ∈ J \ I, M.Indep (insert e I)
42901ff656738d31
MonovaryOn.sum_smul_comp_perm_eq_sum_smul_iff
Mathlib/Algebra/Order/Rearrangement.lean
theorem MonovaryOn.sum_smul_comp_perm_eq_sum_smul_iff (hfg : MonovaryOn f g s) (hσ : {x | σ x ≠ x} ⊆ s) : ∑ i ∈ s, f i • g (σ i) = ∑ i ∈ s, f i • g i ↔ MonovaryOn f (g ∘ σ) s
ι : Type u_1 α : Type u_2 β : Type u_3 inst✝⁴ : LinearOrderedSemiring α inst✝³ : ExistsAddOfLE α inst✝² : LinearOrderedCancelAddCommMonoid β inst✝¹ : Module α β inst✝ : PosSMulStrictMono α β s : Finset ι σ : Perm ι f : ι → α g : ι → β hfg : MonovaryOn f g ↑s hσ : {x | σ x ≠ x} ⊆ ↑s ⊢ ∑ i ∈ s, f i • g (σ i) = ∑ i ∈ s, f i • g i ↔ MonovaryOn f (g ∘ ⇑σ) ↑s
refine ⟨not_imp_not.1 fun h ↦ ?_, fun h ↦ (hfg.sum_smul_comp_perm_le_sum_smul hσ).antisymm ?_⟩
case refine_1 ι : Type u_1 α : Type u_2 β : Type u_3 inst✝⁴ : LinearOrderedSemiring α inst✝³ : ExistsAddOfLE α inst✝² : LinearOrderedCancelAddCommMonoid β inst✝¹ : Module α β inst✝ : PosSMulStrictMono α β s : Finset ι σ : Perm ι f : ι → α g : ι → β hfg : MonovaryOn f g ↑s hσ : {x | σ x ≠ x} ⊆ ↑s h : ¬MonovaryOn f (g ∘ ⇑σ) ↑s ⊢ ¬∑ i ∈ s, f i • g (σ i) = ∑ i ∈ s, f i • g i case refine_2 ι : Type u_1 α : Type u_2 β : Type u_3 inst✝⁴ : LinearOrderedSemiring α inst✝³ : ExistsAddOfLE α inst✝² : LinearOrderedCancelAddCommMonoid β inst✝¹ : Module α β inst✝ : PosSMulStrictMono α β s : Finset ι σ : Perm ι f : ι → α g : ι → β hfg : MonovaryOn f g ↑s hσ : {x | σ x ≠ x} ⊆ ↑s h : MonovaryOn f (g ∘ ⇑σ) ↑s ⊢ ∑ i ∈ s, f i • g i ≤ ∑ i ∈ s, f i • g (σ i)
96d1434317a67463
CategoryTheory.Limits.isIndObject_colimit
Mathlib/CategoryTheory/Limits/Indization/FilteredColimits.lean
theorem isIndObject_colimit (I : Type v) [SmallCategory I] [IsFiltered I] (F : I ⥤ Cᵒᵖ ⥤ Type v) (hF : ∀ i, IsIndObject (F.obj i)) : IsIndObject (colimit F)
case intro.intro.intro C : Type u inst✝² : Category.{v, u} C I : Type v inst✝¹ : SmallCategory I inst✝ : IsFiltered I F : I ⥤ Cᵒᵖ ⥤ Type v hF : ∀ (i : I), IsIndObject (F.obj i) this : IsFiltered (CostructuredArrow yoneda (colimit F)) s : (i : I) → Set (CostructuredArrow yoneda (F.obj i)) hs : ∀ (i : I), Small.{v, max u v} ↑(s i) j : (i : I) → CostructuredArrow yoneda (F.obj i) → CostructuredArrow yoneda (F.obj i) hjs : ∀ (i : I) (i_1 : CostructuredArrow yoneda (F.obj i)), j i i_1 ∈ s i hj : ∀ (i : I) (i_1 : CostructuredArrow yoneda (F.obj i)), Nonempty (i_1 ⟶ j i i_1) A : CostructuredArrow yoneda (colimit F) i : I y : (F.obj i).obj (Opposite.op A.left) hy : yonedaEquiv A.hom = (colimit.ι F i).app (Opposite.op A.left) y y' : CostructuredArrow yoneda (F.obj i) := mk (yonedaEquiv.symm y) x : y' ⟶ j i y' ⊢ ∃ j ∈ ⋃ i, (map (colimit.ι F i)).obj '' s i, Nonempty (A ⟶ j)
refine ⟨(map (colimit.ι F i)).obj (j i y'), ?_, ⟨?_⟩⟩
case intro.intro.intro.refine_1 C : Type u inst✝² : Category.{v, u} C I : Type v inst✝¹ : SmallCategory I inst✝ : IsFiltered I F : I ⥤ Cᵒᵖ ⥤ Type v hF : ∀ (i : I), IsIndObject (F.obj i) this : IsFiltered (CostructuredArrow yoneda (colimit F)) s : (i : I) → Set (CostructuredArrow yoneda (F.obj i)) hs : ∀ (i : I), Small.{v, max u v} ↑(s i) j : (i : I) → CostructuredArrow yoneda (F.obj i) → CostructuredArrow yoneda (F.obj i) hjs : ∀ (i : I) (i_1 : CostructuredArrow yoneda (F.obj i)), j i i_1 ∈ s i hj : ∀ (i : I) (i_1 : CostructuredArrow yoneda (F.obj i)), Nonempty (i_1 ⟶ j i i_1) A : CostructuredArrow yoneda (colimit F) i : I y : (F.obj i).obj (Opposite.op A.left) hy : yonedaEquiv A.hom = (colimit.ι F i).app (Opposite.op A.left) y y' : CostructuredArrow yoneda (F.obj i) := mk (yonedaEquiv.symm y) x : y' ⟶ j i y' ⊢ (map (colimit.ι F i)).obj (j i y') ∈ ⋃ i, (map (colimit.ι F i)).obj '' s i case intro.intro.intro.refine_2 C : Type u inst✝² : Category.{v, u} C I : Type v inst✝¹ : SmallCategory I inst✝ : IsFiltered I F : I ⥤ Cᵒᵖ ⥤ Type v hF : ∀ (i : I), IsIndObject (F.obj i) this : IsFiltered (CostructuredArrow yoneda (colimit F)) s : (i : I) → Set (CostructuredArrow yoneda (F.obj i)) hs : ∀ (i : I), Small.{v, max u v} ↑(s i) j : (i : I) → CostructuredArrow yoneda (F.obj i) → CostructuredArrow yoneda (F.obj i) hjs : ∀ (i : I) (i_1 : CostructuredArrow yoneda (F.obj i)), j i i_1 ∈ s i hj : ∀ (i : I) (i_1 : CostructuredArrow yoneda (F.obj i)), Nonempty (i_1 ⟶ j i i_1) A : CostructuredArrow yoneda (colimit F) i : I y : (F.obj i).obj (Opposite.op A.left) hy : yonedaEquiv A.hom = (colimit.ι F i).app (Opposite.op A.left) y y' : CostructuredArrow yoneda (F.obj i) := mk (yonedaEquiv.symm y) x : y' ⟶ j i y' ⊢ A ⟶ (map (colimit.ι F i)).obj (j i y')
85e6fbbc162d2dd5
AlgebraicGeometry.hasOfPostcompProperty_isOpenImmersion_of_morphismRestrict
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
lemma hasOfPostcompProperty_isOpenImmersion_of_morphismRestrict (P : MorphismProperty Scheme) [P.RespectsIso] (H : ∀ {X Y : Scheme.{u}} (f : X ⟶ Y) (U : Y.Opens), P f → P (f ∣_ U)) : P.HasOfPostcompProperty @IsOpenImmersion where of_postcomp {X Y Z} f g hg hfg
P : MorphismProperty Scheme inst✝ : P.RespectsIso H : ∀ {X Y : Scheme} (f : X ⟶ Y) (U : Y.Opens), P f → P (f ∣_ U) X Y Z : Scheme f : X ⟶ Y g : Y ⟶ Z hg : IsOpenImmersion g hfg : P (f ≫ g) this : (f ≫ g) ⁻¹ᵁ Scheme.Hom.opensRange g = ⊤ ⊢ P f
have : f = X.topIso.inv ≫ (X.isoOfEq this).inv ≫ (f ≫ g) ∣_ g.opensRange ≫ (IsOpenImmersion.isoOfRangeEq g.opensRange.ι g (by simp)).hom := by simp [← cancel_mono g]
P : MorphismProperty Scheme inst✝ : P.RespectsIso H : ∀ {X Y : Scheme} (f : X ⟶ Y) (U : Y.Opens), P f → P (f ∣_ U) X Y Z : Scheme f : X ⟶ Y g : Y ⟶ Z hg : IsOpenImmersion g hfg : P (f ≫ g) this✝ : (f ≫ g) ⁻¹ᵁ Scheme.Hom.opensRange g = ⊤ this : f = X.topIso.inv ≫ (X.isoOfEq this✝).inv ≫ (f ≫ g) ∣_ Scheme.Hom.opensRange g ≫ (IsOpenImmersion.isoOfRangeEq (Scheme.Hom.opensRange g).ι g ⋯).hom ⊢ P f
723c11951b6c9a09
PrimeSpectrum.isClosed_range_comap_of_surjective
Mathlib/RingTheory/Spectrum/Prime/Topology.lean
theorem isClosed_range_comap_of_surjective (hf : Surjective f) : IsClosed (Set.range (comap f))
R : Type u S : Type v inst✝¹ : CommRing R inst✝ : CommRing S f : R →+* S hf : Surjective ⇑f ⊢ IsClosed (Set.range ⇑(comap f))
rw [range_comap_of_surjective _ f hf]
R : Type u S : Type v inst✝¹ : CommRing R inst✝ : CommRing S f : R →+* S hf : Surjective ⇑f ⊢ IsClosed (zeroLocus ↑(ker f))
83f23d22d8e88fc6
ZMod.eq_unit_mul_divisor
Mathlib/Data/ZMod/Units.lean
/-- Any element of `ZMod N` has the form `u * d` where `u` is a unit and `d` is a divisor of `N`. -/ lemma eq_unit_mul_divisor {N : ℕ} (a : ZMod N) : ∃ d : ℕ, d ∣ N ∧ ∃ (u : ZMod N), IsUnit u ∧ a = u * d
case inr N : ℕ a : ZMod N hN : N ≠ 0 this : NeZero N d : ℕ := a.val.gcd N hd : d ≠ 0 ⊢ ∃ d, d ∣ N ∧ ∃ u, IsUnit u ∧ a = u * ↑d
obtain ⟨a₀, (ha₀ : _ = d * _)⟩ := a.val.gcd_dvd_left N
case inr.intro N : ℕ a : ZMod N hN : N ≠ 0 this : NeZero N d : ℕ := a.val.gcd N hd : d ≠ 0 a₀ : ℕ ha₀ : a.val = d * a₀ ⊢ ∃ d, d ∣ N ∧ ∃ u, IsUnit u ∧ a = u * ↑d
07b51bbfca25d769
ExistsContDiffBumpBase.y_smooth
Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean
theorem y_smooth : ContDiffOn ℝ ∞ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ : Set E))
case refine_3.hf.hf.h0 E : Type u_1 inst✝⁴ : NormedAddCommGroup E inst✝³ : NormedSpace ℝ E inst✝² : FiniteDimensional ℝ E inst✝¹ : MeasurableSpace E inst✝ : BorelSpace E hs : IsOpen (Ioo 0 1) hk : IsCompact (closedBall 0 1) x : ℝ × E hx : x ∈ Ioo 0 1 ×ˢ univ ⊢ x.1 ≠ 0
exact ne_of_gt hx.1.1
no goals
5d103a5b75b6c303
List.nodupKeys_flatten
Mathlib/Data/List/Sigma.lean
theorem nodupKeys_flatten {L : List (List (Sigma β))} : NodupKeys (flatten L) ↔ (∀ l ∈ L, NodupKeys l) ∧ Pairwise Disjoint (L.map keys)
case a α : Type u β : α → Type v L : List (List (Sigma β)) ⊢ Pairwise (fun l₁ l₂ => ∀ x ∈ l₁, ∀ y ∈ l₂, x.fst ≠ y.fst) L = Pairwise (fun a b => a.keys.Disjoint b.keys) L
congr with (l₁ l₂)
case a.e_R.h.h.a α : Type u β : α → Type v L : List (List (Sigma β)) l₁ l₂ : List (Sigma β) ⊢ (∀ x ∈ l₁, ∀ y ∈ l₂, x.fst ≠ y.fst) ↔ l₁.keys.Disjoint l₂.keys
31fb5fa0ff497931
AffineSubspace.direction_sup
Mathlib/LinearAlgebra/AffineSpace/AffineSubspace/Basic.lean
theorem direction_sup {s₁ s₂ : AffineSubspace k P} {p₁ p₂ : P} (hp₁ : p₁ ∈ s₁) (hp₂ : p₂ ∈ s₂) : (s₁ ⊔ s₂).direction = s₁.direction ⊔ s₂.direction ⊔ k ∙ p₂ -ᵥ p₁
case refine_1 k : Type u_1 V : Type u_2 P : Type u_3 inst✝³ : Ring k inst✝² : AddCommGroup V inst✝¹ : Module k V inst✝ : AffineSpace V P s₁ s₂ : AffineSubspace k P p₁ p₂ : P hp₁ : p₁ ∈ s₁ hp₂ : p₂ ∈ s₂ ⊢ (affineSpan k (↑s₁ ∪ ↑s₂)).direction ≤ s₁.direction ⊔ s₂.direction ⊔ Submodule.span k {p₂ -ᵥ p₁}
rw [← mem_coe] at hp₁
case refine_1 k : Type u_1 V : Type u_2 P : Type u_3 inst✝³ : Ring k inst✝² : AddCommGroup V inst✝¹ : Module k V inst✝ : AffineSpace V P s₁ s₂ : AffineSubspace k P p₁ p₂ : P hp₁ : p₁ ∈ ↑s₁ hp₂ : p₂ ∈ s₂ ⊢ (affineSpan k (↑s₁ ∪ ↑s₂)).direction ≤ s₁.direction ⊔ s₂.direction ⊔ Submodule.span k {p₂ -ᵥ p₁}
64c047987a3af743
CategoryTheory.MorphismProperty.isSmall_iff_eq_ofHoms
Mathlib/CategoryTheory/MorphismProperty/IsSmall.lean
lemma isSmall_iff_eq_ofHoms : IsSmall.{w} W ↔ ∃ (ι : Type w) (A B : ι → C) (f : ∀ i, A i ⟶ B i), W = ofHoms f
case mp.h.mp C : Type u inst✝ : Category.{v, u} C W : MorphismProperty C a✝ : IsSmall.{w, v, u} W A B : C f : A ⟶ B ⊢ W f → ∃ i, Arrow.mk f = Arrow.mk (↑((equivShrink ↑W.toSet).symm i)).hom
intro hf
case mp.h.mp C : Type u inst✝ : Category.{v, u} C W : MorphismProperty C a✝ : IsSmall.{w, v, u} W A B : C f : A ⟶ B hf : W f ⊢ ∃ i, Arrow.mk f = Arrow.mk (↑((equivShrink ↑W.toSet).symm i)).hom
933196d1e4981df1
IsPGroup.iff_card
Mathlib/GroupTheory/PGroup.lean
theorem iff_card [Fact p.Prime] [Finite G] : IsPGroup p G ↔ ∃ n : ℕ, Nat.card G = p ^ n
p : ℕ G : Type u_1 inst✝² : Group G inst✝¹ : Fact (Nat.Prime p) inst✝ : Finite G hG : Nat.card G ≠ 0 h : IsPGroup p G this : ∀ q ∈ (Nat.card G).primeFactorsList, q = p ⊢ ∃ n, Nat.card G = p ^ n
use (Nat.card G).primeFactorsList.length
case h p : ℕ G : Type u_1 inst✝² : Group G inst✝¹ : Fact (Nat.Prime p) inst✝ : Finite G hG : Nat.card G ≠ 0 h : IsPGroup p G this : ∀ q ∈ (Nat.card G).primeFactorsList, q = p ⊢ Nat.card G = p ^ (Nat.card G).primeFactorsList.length
cdf7a3b03afadbaa
Equiv.Perm.Disjoint.mul_right
Mathlib/GroupTheory/Perm/Support.lean
theorem Disjoint.mul_right (H1 : Disjoint f g) (H2 : Disjoint f h) : Disjoint f (g * h)
α : Type u_1 f g h : Perm α H1 : f.Disjoint g H2 : f.Disjoint h ⊢ (g * h).Disjoint f
exact H1.symm.mul_left H2.symm
no goals
464a7c3f7e4f9bba
ack_three
Mathlib/Computability/Ackermann.lean
theorem ack_three (n : ℕ) : ack 3 n = 2 ^ (n + 3) - 3
case zero ⊢ ack 3 0 = 2 ^ (0 + 3) - 3
simp
no goals
1f5390829330cb69
Finset.pairwise_cons'
Mathlib/Data/Finset/Insert.lean
theorem pairwise_cons' {a : α} (ha : a ∉ s) (r : β → β → Prop) (f : α → β) : Pairwise (r on fun a : s.cons a ha => f a) ↔ Pairwise (r on fun a : s => f a) ∧ ∀ b ∈ s, r (f a) (f b) ∧ r (f b) (f a)
α : Type u_1 β : Type u_2 s : Finset α a : α ha : a ∉ s r : β → β → Prop f : α → β x✝ : (↑s).Pairwise (r on f) h : ∀ b ∈ s, a ≠ b → (r on f) a b ∧ (r on f) b a b : α hb : b ∈ s ⊢ a ≠ b
rintro rfl
α : Type u_1 β : Type u_2 s : Finset α a : α ha : a ∉ s r : β → β → Prop f : α → β x✝ : (↑s).Pairwise (r on f) h : ∀ b ∈ s, a ≠ b → (r on f) a b ∧ (r on f) b a hb : a ∈ s ⊢ False
6d0426eabddcf9f3
Batteries.UnionFind.find_root_1
Mathlib/.lake/packages/batteries/Batteries/Data/UnionFind/Basic.lean
theorem find_root_1 (self : UnionFind) (x : Fin self.size) (i : Nat) : (self.find x).1.rootD i = self.rootD i
self : UnionFind x : Fin self.size i : Nat a✝ : ∀ (y : Nat), (invImage (fun x_1 => (self.find x).fst.rankMax - (self.find x).fst.rank x_1) instWellFoundedRelationOfSizeOf).1 y i → (self.find x).fst.rootD y = self.rootD y h : ¬(self.find x).fst.parent i = i this : (self.find x).fst.rankMax - (self.find x).fst.rank ((self.find x).fst.parent i) < (self.find x).fst.rankMax - (self.find x).fst.rank i ⊢ (self.find x).fst.rankMax - (self.find x).fst.rank ((self.find x).fst.parent i) < (self.find x).fst.rankMax - (self.find x).fst.rank i
exact this
no goals
918247537b8b2e79
Topology.IsUpperSet.isSheaf_of_isRightKanExtension
Mathlib/Topology/Sheaves/Alexandrov.lean
theorem Topology.IsUpperSet.isSheaf_of_isRightKanExtension (P : (Opens X)ᵒᵖ ⥤ C) (η : Alexandrov.principals X ⋙ P ⟶ F) [P.IsRightKanExtension η] : Presheaf.IsSheaf (Opens.grothendieckTopology X) P
X : Type v inst✝⁵ : TopologicalSpace X inst✝⁴ : Preorder X inst✝³ : Topology.IsUpperSet X C : Type u inst✝² : Category.{v, u} C inst✝¹ : HasLimits C F : X ⥤ C P : (Opens X)ᵒᵖ ⥤ C η : principals X ⋙ P ⟶ F inst✝ : P.IsRightKanExtension η γ : principals X ⋙ principalsKanExtension F ⟶ F := (principals X).pointwiseRightKanExtensionCounit F x✝ : (principalsKanExtension F).IsRightKanExtension γ := inferInstance ⊢ (principalsKanExtension F).IsRightKanExtension ?m.88333
assumption
no goals
484b46eb3ee8177c
CategoryTheory.Idempotents.isIdempotentComplete_iff_opposite
Mathlib/CategoryTheory/Idempotents/Basic.lean
theorem isIdempotentComplete_iff_opposite : IsIdempotentComplete Cᵒᵖ ↔ IsIdempotentComplete C
case mp C : Type u_1 inst✝ : Category.{u_2, u_1} C ⊢ IsIdempotentComplete Cᵒᵖ → IsIdempotentComplete C
exact isIdempotentComplete_of_isIdempotentComplete_opposite
no goals
07d7dccbe5b0a4dd
lsum_comp_mapRange_toSpanSingleton
Mathlib/LinearAlgebra/DFinsupp.lean
theorem lsum_comp_mapRange_toSpanSingleton [∀ m : R, Decidable (m ≠ 0)] (p : ι → Submodule R N) {v : ι → N} (hv : ∀ i : ι, v i ∈ p i) : (lsum ℕ (M := fun i ↦ ↥(p i)) fun i => (p i).subtype : _ →ₗ[R] _).comp ((mapRange.linearMap fun i => LinearMap.toSpanSingleton R (↥(p i)) ⟨v i, hv i⟩ : _ →ₗ[R] _).comp (finsuppLequivDFinsupp R : (ι →₀ R) ≃ₗ[R] _).toLinearMap) = Finsupp.linearCombination R v
case h.h ι : Type u_1 R : Type u_2 N : Type u_5 inst✝⁴ : DecidableEq ι inst✝³ : Semiring R inst✝² : AddCommMonoid N inst✝¹ : Module R N inst✝ : (m : R) → Decidable (m ≠ 0) p : ι → Submodule R N v : ι → N hv : ∀ (i : ι), v i ∈ p i a✝ : ι ⊢ ((((lsum ℕ) fun i => (p i).subtype) ∘ₗ (mapRange.linearMap fun i => LinearMap.toSpanSingleton R ↥(p i) ⟨v i, ⋯⟩) ∘ₗ ↑(finsuppLequivDFinsupp R)) ∘ₗ Finsupp.lsingle a✝) 1 = (Finsupp.linearCombination R v ∘ₗ Finsupp.lsingle a✝) 1
simp
no goals
dcbda0f830791619
List.mk_mem_zipIdx_iff_le_and_getElem?_sub
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/Nat/Range.lean
theorem mk_mem_zipIdx_iff_le_and_getElem?_sub {k i : Nat} {x : α} {l : List α} : (x, i) ∈ zipIdx l k ↔ k ≤ i ∧ l[i - k]? = some x
α : Type u_1 k i : Nat x : α l : List α h : k ≤ i ⊢ (x, i) ∈ l.zipIdx k ↔ k ≤ i ∧ l[i - k]? = some x
rcases Nat.exists_eq_add_of_le h with ⟨i, rfl⟩
case intro α : Type u_1 k : Nat x : α l : List α i : Nat h : k ≤ k + i ⊢ (x, k + i) ∈ l.zipIdx k ↔ k ≤ k + i ∧ l[k + i - k]? = some x
24ce2639b2cbb140
AlgebraicGeometry.Scheme.IdealSheafData.map_ideal
Mathlib/AlgebraicGeometry/IdealSheaf.lean
lemma map_ideal {U V : X.affineOpens} (h : U ≤ V) : (I.ideal V).map (X.presheaf.map (homOfLE h).op).hom = I.ideal U
case intro.intro.intro X : Scheme I : X.IdealSheafData U V : ↑X.affineOpens h : U ≤ V x : ↑↑X.toPresheafedSpace hxU : x ∈ ↑U f : ↑Γ(X, ↑U) g : ↑Γ(X, ↑V) hfg : X.basicOpen f = X.basicOpen g hxf : x ∈ X.basicOpen f this : Ideal.map (CommRingCat.Hom.hom (X.presheaf.map (homOfLE ⋯).op)) (I.ideal U) = Ideal.map (CommRingCat.Hom.hom (X.presheaf.map (homOfLE ⋯).op)) (I.ideal V) ⊢ Ideal.map (CommRingCat.Hom.hom (X.presheaf.germ (↑U) x hxU)) (Ideal.map (CommRingCat.Hom.hom (X.presheaf.map (homOfLE h).op)) (I.ideal V)) = Ideal.map (CommRingCat.Hom.hom (X.presheaf.germ (↑U) x hxU)) (I.ideal U)
apply_fun Ideal.map (X.presheaf.germ (X.basicOpen g) x (hfg ▸ hxf)).hom at this
case intro.intro.intro X : Scheme I : X.IdealSheafData U V : ↑X.affineOpens h : U ≤ V x : ↑↑X.toPresheafedSpace hxU : x ∈ ↑U f : ↑Γ(X, ↑U) g : ↑Γ(X, ↑V) hfg : X.basicOpen f = X.basicOpen g hxf : x ∈ X.basicOpen f this : Ideal.map (CommRingCat.Hom.hom (X.presheaf.germ (X.basicOpen g) x ⋯)) (Ideal.map (CommRingCat.Hom.hom (X.presheaf.map (homOfLE ⋯).op)) (I.ideal U)) = Ideal.map (CommRingCat.Hom.hom (X.presheaf.germ (X.basicOpen g) x ⋯)) (Ideal.map (CommRingCat.Hom.hom (X.presheaf.map (homOfLE ⋯).op)) (I.ideal V)) ⊢ Ideal.map (CommRingCat.Hom.hom (X.presheaf.germ (↑U) x hxU)) (Ideal.map (CommRingCat.Hom.hom (X.presheaf.map (homOfLE h).op)) (I.ideal V)) = Ideal.map (CommRingCat.Hom.hom (X.presheaf.germ (↑U) x hxU)) (I.ideal U)
f0a1a44e10a9d050
integral_comp_abs
Mathlib/MeasureTheory/Measure/Lebesgue/Integral.lean
theorem integral_comp_abs {f : ℝ → ℝ} : ∫ x, f |x| = 2 * ∫ x in Ioi (0 : ℝ), f x
case h.e'_5 f : ℝ → ℝ eq : ∫ (x : ℝ) in Ioi 0, f |x| = ∫ (x : ℝ) in Ioi 0, f x hf : IntegrableOn (fun x => f |x|) (Ioi 0) volume int_Iic : IntegrableOn (fun x => f |x|) (Iic 0) volume x✝ : ℝ hx : x✝ ∈ Iic 0 ⊢ f |x✝| = f (-x✝)
rw [abs_eq_neg_self.mpr (by exact hx)]
no goals
dd1c4d1811d64c1a
MeasureTheory.lintegral_pow_le_pow_lintegral_fderiv
Mathlib/Analysis/FunctionalSpaces/SobolevInequality.lean
theorem lintegral_pow_le_pow_lintegral_fderiv {u : E → F} (hu : ContDiff ℝ 1 u) (h2u : HasCompactSupport u) {p : ℝ} (hp : Real.IsConjExponent (finrank ℝ E) p) : ∫⁻ x, ‖u x‖ₑ ^ p ∂μ ≤ lintegralPowLePowLIntegralFDerivConst μ p * (∫⁻ x, ‖fderiv ℝ u x‖ₑ ∂μ) ^ p
F : Type u_3 inst✝⁷ : NormedAddCommGroup F inst✝⁶ : NormedSpace ℝ F E : Type u_4 inst✝⁵ : NormedAddCommGroup E inst✝⁴ : NormedSpace ℝ E inst✝³ : MeasurableSpace E inst✝² : BorelSpace E inst✝¹ : FiniteDimensional ℝ E μ : Measure E inst✝ : μ.IsAddHaarMeasure u : E → F hu : ContDiff ℝ 1 u h2u : HasCompactSupport u p : ℝ hp✝ : (↑(finrank ℝ E)).IsConjExponent p C : ℝ≥0 := lintegralPowLePowLIntegralFDerivConst μ p ι : Type := Fin (finrank ℝ E) hιcard : #ι = finrank ℝ E this✝ : finrank ℝ E = finrank ℝ (ι → ℝ) e : E ≃L[ℝ] ι → ℝ := ContinuousLinearEquiv.ofFinrankEq this✝ this : (Measure.map (⇑e.symm) volume).IsAddHaarMeasure hp : (↑#ι).IsConjExponent p h0p : 0 ≤ p c : ℝ≥0 := μ.addHaarScalarFactor (Measure.map (⇑e.symm) volume) hc : 0 < c h2c : μ = c • Measure.map (⇑e.symm) volume h3c : ↑c ≠ 0 ⊢ ∫⁻ (x : E), ‖u x‖ₑ ^ p ∂μ ≤ ↑C * (∫⁻ (x : E), ‖fderiv ℝ u x‖ₑ ∂μ) ^ p
have h0C : C = (c * ‖(e.symm : (ι → ℝ) →L[ℝ] E)‖₊ ^ p) * (c ^ p)⁻¹ := by simp_rw [c, ι, C, e, lintegralPowLePowLIntegralFDerivConst]
F : Type u_3 inst✝⁷ : NormedAddCommGroup F inst✝⁶ : NormedSpace ℝ F E : Type u_4 inst✝⁵ : NormedAddCommGroup E inst✝⁴ : NormedSpace ℝ E inst✝³ : MeasurableSpace E inst✝² : BorelSpace E inst✝¹ : FiniteDimensional ℝ E μ : Measure E inst✝ : μ.IsAddHaarMeasure u : E → F hu : ContDiff ℝ 1 u h2u : HasCompactSupport u p : ℝ hp✝ : (↑(finrank ℝ E)).IsConjExponent p C : ℝ≥0 := lintegralPowLePowLIntegralFDerivConst μ p ι : Type := Fin (finrank ℝ E) hιcard : #ι = finrank ℝ E this✝ : finrank ℝ E = finrank ℝ (ι → ℝ) e : E ≃L[ℝ] ι → ℝ := ContinuousLinearEquiv.ofFinrankEq this✝ this : (Measure.map (⇑e.symm) volume).IsAddHaarMeasure hp : (↑#ι).IsConjExponent p h0p : 0 ≤ p c : ℝ≥0 := μ.addHaarScalarFactor (Measure.map (⇑e.symm) volume) hc : 0 < c h2c : μ = c • Measure.map (⇑e.symm) volume h3c : ↑c ≠ 0 h0C : C = c * ‖↑e.symm‖₊ ^ p * (c ^ p)⁻¹ ⊢ ∫⁻ (x : E), ‖u x‖ₑ ^ p ∂μ ≤ ↑C * (∫⁻ (x : E), ‖fderiv ℝ u x‖ₑ ∂μ) ^ p
7e7c86c82b1c72d8
Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.ratAdd_result
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/LRAT/Internal/Formula/RatAddResult.lean
theorem ratAdd_result {n : Nat} (f : DefaultFormula n) (c : DefaultClause n) (p : Literal (PosFin n)) (rupHints : Array Nat) (ratHints : Array (Nat × Array Nat)) (f' : DefaultFormula n) (f_readyForRatAdd : ReadyForRatAdd f) (_pc : p ∈ Clause.toList c) (ratAddSuccess : performRatAdd f c p rupHints ratHints = (f', true)) : f' = insert f c
case isTrue n : Nat f : DefaultFormula n c : DefaultClause n p : Literal (PosFin n) rupHints : Array Nat ratHints : Array (Nat × Array Nat) f' : DefaultFormula n f_readyForRatAdd : f.ReadyForRatAdd _pc : p ∈ Clause.toList c h✝ : f.ratHintsExhaustive p ratHints = true ratAddSuccess : (if (f.insertRupUnits c.negate).snd = true then ((f.insertRupUnits c.negate).fst, false) else if ((f.insertRupUnits c.negate).fst.performRupCheck rupHints).2.2.snd = true then (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, false) else if ((f.insertRupUnits c.negate).fst.performRupCheck rupHints).2.2.fst = true then (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, false) else if (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).snd = false then ((Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).fst, false) else ({ clauses := (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.clauses, rupUnits := (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.rupUnits, ratUnits := (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.ratUnits, assignments := restoreAssignments (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.assignments ((f.insertRupUnits c.negate).fst.performRupCheck rupHints).2.fst }.clearRupUnits.insert c, true)) = (f', true) ⊢ f' = f.insert c
split at ratAddSuccess
case isTrue.isTrue n : Nat f : DefaultFormula n c : DefaultClause n p : Literal (PosFin n) rupHints : Array Nat ratHints : Array (Nat × Array Nat) f' : DefaultFormula n f_readyForRatAdd : f.ReadyForRatAdd _pc : p ∈ Clause.toList c h✝¹ : f.ratHintsExhaustive p ratHints = true h✝ : (f.insertRupUnits c.negate).snd = true ratAddSuccess : ((f.insertRupUnits c.negate).fst, false) = (f', true) ⊢ f' = f.insert c case isTrue.isFalse n : Nat f : DefaultFormula n c : DefaultClause n p : Literal (PosFin n) rupHints : Array Nat ratHints : Array (Nat × Array Nat) f' : DefaultFormula n f_readyForRatAdd : f.ReadyForRatAdd _pc : p ∈ Clause.toList c h✝¹ : f.ratHintsExhaustive p ratHints = true h✝ : ¬(f.insertRupUnits c.negate).snd = true ratAddSuccess : (if ((f.insertRupUnits c.negate).fst.performRupCheck rupHints).2.2.snd = true then (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, false) else if ((f.insertRupUnits c.negate).fst.performRupCheck rupHints).2.2.fst = true then (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, false) else if (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).snd = false then ((Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).fst, false) else ({ clauses := (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.clauses, rupUnits := (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.rupUnits, ratUnits := (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.ratUnits, assignments := restoreAssignments (Array.foldl (fun x ratHint => if x.snd = true then x.fst.performRatCheck p.negate ratHint else (x.fst, false)) (((f.insertRupUnits c.negate).fst.performRupCheck rupHints).fst, true) ratHints).1.assignments ((f.insertRupUnits c.negate).fst.performRupCheck rupHints).2.fst }.clearRupUnits.insert c, true)) = (f', true) ⊢ f' = f.insert c
957699a29d24aa93
MvPolynomial.eval₂_comp_right
Mathlib/Algebra/MvPolynomial/Eval.lean
theorem eval₂_comp_right {S₂} [CommSemiring S₂] (k : S₁ →+* S₂) (f : R →+* S₁) (g : σ → S₁) (p) : k (eval₂ f g p) = eval₂ k (k ∘ g) (map f p)
R : Type u S₁ : Type v σ : Type u_1 inst✝² : CommSemiring R inst✝¹ : CommSemiring S₁ S₂ : Type u_2 inst✝ : CommSemiring S₂ k : S₁ →+* S₂ f : R →+* S₁ g : σ → S₁ p : MvPolynomial σ R ⊢ k (eval₂ f g p) = eval₂ k (⇑k ∘ g) ((map f) p)
apply MvPolynomial.induction_on p
case h_C R : Type u S₁ : Type v σ : Type u_1 inst✝² : CommSemiring R inst✝¹ : CommSemiring S₁ S₂ : Type u_2 inst✝ : CommSemiring S₂ k : S₁ →+* S₂ f : R →+* S₁ g : σ → S₁ p : MvPolynomial σ R ⊢ ∀ (a : R), k (eval₂ f g (C a)) = eval₂ k (⇑k ∘ g) ((map f) (C a)) case h_add R : Type u S₁ : Type v σ : Type u_1 inst✝² : CommSemiring R inst✝¹ : CommSemiring S₁ S₂ : Type u_2 inst✝ : CommSemiring S₂ k : S₁ →+* S₂ f : R →+* S₁ g : σ → S₁ p : MvPolynomial σ R ⊢ ∀ (p q : MvPolynomial σ R), k (eval₂ f g p) = eval₂ k (⇑k ∘ g) ((map f) p) → k (eval₂ f g q) = eval₂ k (⇑k ∘ g) ((map f) q) → k (eval₂ f g (p + q)) = eval₂ k (⇑k ∘ g) ((map f) (p + q)) case h_X R : Type u S₁ : Type v σ : Type u_1 inst✝² : CommSemiring R inst✝¹ : CommSemiring S₁ S₂ : Type u_2 inst✝ : CommSemiring S₂ k : S₁ →+* S₂ f : R →+* S₁ g : σ → S₁ p : MvPolynomial σ R ⊢ ∀ (p : MvPolynomial σ R) (n : σ), k (eval₂ f g p) = eval₂ k (⇑k ∘ g) ((map f) p) → k (eval₂ f g (p * X n)) = eval₂ k (⇑k ∘ g) ((map f) (p * X n))
8cc38ece9b3c3561
Equiv.Perm.support_extend_domain
Mathlib/GroupTheory/Perm/Support.lean
theorem support_extend_domain (f : α ≃ Subtype p) {g : Perm α} : support (g.extendDomain f) = g.support.map f.asEmbedding
case pos α : Type u_1 inst✝⁴ : DecidableEq α inst✝³ : Fintype α β : Type u_2 inst✝² : DecidableEq β inst✝¹ : Fintype β p : β → Prop inst✝ : DecidablePred p f : α ≃ Subtype p g : Perm α b : β pb : p b ⊢ ¬↑(f (g (f.symm ⟨b, pb⟩))) = b ↔ ∃ a, ¬g a = a ∧ f.asEmbedding a = b
constructor
case pos.mp α : Type u_1 inst✝⁴ : DecidableEq α inst✝³ : Fintype α β : Type u_2 inst✝² : DecidableEq β inst✝¹ : Fintype β p : β → Prop inst✝ : DecidablePred p f : α ≃ Subtype p g : Perm α b : β pb : p b ⊢ ¬↑(f (g (f.symm ⟨b, pb⟩))) = b → ∃ a, ¬g a = a ∧ f.asEmbedding a = b case pos.mpr α : Type u_1 inst✝⁴ : DecidableEq α inst✝³ : Fintype α β : Type u_2 inst✝² : DecidableEq β inst✝¹ : Fintype β p : β → Prop inst✝ : DecidablePred p f : α ≃ Subtype p g : Perm α b : β pb : p b ⊢ (∃ a, ¬g a = a ∧ f.asEmbedding a = b) → ¬↑(f (g (f.symm ⟨b, pb⟩))) = b
18d8756ce068490b
CategoryTheory.MonoidalCategory.prodMonoidal_leftUnitor_inv_snd
Mathlib/CategoryTheory/Monoidal/Category.lean
theorem prodMonoidal_leftUnitor_inv_snd (X : C₁ × C₂) : ((λ_ X).inv : X ⟶ 𝟙_ _ ⊗ X).2 = (λ_ X.2).inv
case mk C₁ : Type u₁ inst✝³ : Category.{v₁, u₁} C₁ inst✝² : MonoidalCategory C₁ C₂ : Type u₂ inst✝¹ : Category.{v₂, u₂} C₂ inst✝ : MonoidalCategory C₂ fst✝ : C₁ snd✝ : C₂ ⊢ (λ_ (fst✝, snd✝)).inv.2 = (λ_ (fst✝, snd✝).2).inv
rfl
no goals
8fc8e42680da267c
Int.negOnePow_eq_one_iff
Mathlib/Algebra/Ring/NegOnePow.lean
lemma negOnePow_eq_one_iff (n : ℤ) : n.negOnePow = 1 ↔ Even n
n : ℤ ⊢ n.negOnePow = 1 ↔ Even n
constructor
case mp n : ℤ ⊢ n.negOnePow = 1 → Even n case mpr n : ℤ ⊢ Even n → n.negOnePow = 1
d95e871e9aca7f4a
Nat.gcd_zero_right
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
theorem gcd_zero_right (n : Nat) : gcd n 0 = n
case succ n : Nat ⊢ (n + 1).gcd 0 = n + 1
rw [gcd_succ]
case succ n : Nat ⊢ (0 % n.succ).gcd n.succ = n + 1
361efd80289f16ab
Dynamics.IsDynCoverOf.iterate_le_pow
Mathlib/Dynamics/TopologicalEntropy/CoverEntropy.lean
/-- From a dynamical cover `s` with entourage `U` and time `m`, we construct covers with entourage `U ○ U` and any multiple `m * n` of `m` with controlled cardinality. This lemma is the first step in a submultiplicative-like property of `coverMincard`, with consequences such as explicit bounds for the topological entropy (`coverEntropyInfEntourage_le_card_div`) and an equality between two notions of topological entropy (`coverEntropyInf_eq_coverEntropySup_of_inv`). -/ lemma IsDynCoverOf.iterate_le_pow {T : X → X} {F : Set X} (F_inv : MapsTo T F F) {U : Set (X × X)} (U_symm : SymmetricRel U) {m : ℕ} (n : ℕ) {s : Finset X} (h : IsDynCoverOf T F U m s) : ∃ t : Finset X, IsDynCoverOf T F (U ○ U) (m * n) t ∧ t.card ≤ s.card ^ n
case h X : Type u_1 T : X → X F : Set X F_inv : MapsTo T F F U : Set (X × X) U_symm : SymmetricRel U n : ℕ s : Finset X x✝ : Nonempty X s_nemp : (↑s).Nonempty x : X x_F : x ∈ F h : IsDynCoverOf T F U 0 ↑s ⊢ IsDynCoverOf T F (U ○ U) 0 {x} ∧ 1 ≤ s.card ^ n
exact And.intro (isDynCoverOf_zero T F (U ○ U) (singleton_nonempty x)) <| one_le_pow_of_one_le' (Nat.one_le_of_lt (Finset.Nonempty.card_pos s_nemp)) n
no goals
de3b71772507431f
Finmap.ext_lookup
Mathlib/Data/Finmap.lean
theorem ext_lookup {s₁ s₂ : Finmap β} : (∀ x, s₁.lookup x = s₂.lookup x) → s₁ = s₂ := induction_on₂ s₁ s₂ fun s₁ s₂ h => by simp only [AList.lookup, lookup_toFinmap] at h rw [AList.toFinmap_eq] apply lookup_ext s₁.nodupKeys s₂.nodupKeys intro x y rw [h]
α : Type u β : α → Type v inst✝ : DecidableEq α s₁✝ s₂✝ : Finmap β s₁ s₂ : AList β h : ∀ (x : α), dlookup x s₁.entries = dlookup x s₂.entries ⊢ s₁.entries ~ s₂.entries
apply lookup_ext s₁.nodupKeys s₂.nodupKeys
α : Type u β : α → Type v inst✝ : DecidableEq α s₁✝ s₂✝ : Finmap β s₁ s₂ : AList β h : ∀ (x : α), dlookup x s₁.entries = dlookup x s₂.entries ⊢ ∀ (x : α) (y : β x), y ∈ dlookup x s₁.entries ↔ y ∈ dlookup x s₂.entries
85e1fdcd0e824010
second_derivative_symmetric_of_eventually
Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean
theorem second_derivative_symmetric_of_eventually [IsRCLikeNormedField 𝕜] {f' : E → E →L[𝕜] F} {x : E} {f'' : E →L[𝕜] E →L[𝕜] F} (hf : ∀ᶠ y in 𝓝 x, HasFDerivAt f (f' y) y) (hx : HasFDerivAt f' f'' x) (v w : E) : f'' v w = f'' w v
𝕜 : Type u_1 inst✝⁵ : NontriviallyNormedField 𝕜 E : Type u_2 F : Type u_3 inst✝⁴ : NormedAddCommGroup E inst✝³ : NormedSpace 𝕜 E inst✝² : NormedAddCommGroup F inst✝¹ : NormedSpace 𝕜 F f : E → F inst✝ : IsRCLikeNormedField 𝕜 f' : E → E →L[𝕜] F x : E f'' : E →L[𝕜] E →L[𝕜] F hf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y hx : HasFDerivAt f' f'' x v w : E x✝⁴ : RCLike 𝕜 := IsRCLikeNormedField.rclike 𝕜 x✝³ : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 E x✝² : NormedSpace ℝ F := NormedSpace.restrictScalars ℝ 𝕜 F x✝¹ : LinearMap.CompatibleSMul E F ℝ 𝕜 := LinearMap.IsScalarTower.compatibleSMul x✝ : LinearMap.CompatibleSMul E (E →L[𝕜] F) ℝ 𝕜 := LinearMap.IsScalarTower.compatibleSMul f'R : E → E →L[ℝ] F := fun x => ContinuousLinearMap.restrictScalars ℝ (f' x) hfR : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f'R y) y f''Rl : E →ₗ[ℝ] E →ₗ[ℝ] F := { toFun := fun x => { toFun := fun y => (f'' x) y, map_add' := ⋯, map_smul' := ⋯ }, map_add' := ⋯, map_smul' := ⋯ } ⊢ E →L[ℝ] E →L[ℝ] F
refine LinearMap.mkContinuous₂ f''Rl (‖f''‖) (fun x y ↦ ?_)
𝕜 : Type u_1 inst✝⁵ : NontriviallyNormedField 𝕜 E : Type u_2 F : Type u_3 inst✝⁴ : NormedAddCommGroup E inst✝³ : NormedSpace 𝕜 E inst✝² : NormedAddCommGroup F inst✝¹ : NormedSpace 𝕜 F f : E → F inst✝ : IsRCLikeNormedField 𝕜 f' : E → E →L[𝕜] F x✝⁵ : E f'' : E →L[𝕜] E →L[𝕜] F hf : ∀ᶠ (y : E) in 𝓝 x✝⁵, HasFDerivAt f (f' y) y hx : HasFDerivAt f' f'' x✝⁵ v w : E x✝⁴ : RCLike 𝕜 := IsRCLikeNormedField.rclike 𝕜 x✝³ : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 E x✝² : NormedSpace ℝ F := NormedSpace.restrictScalars ℝ 𝕜 F x✝¹ : LinearMap.CompatibleSMul E F ℝ 𝕜 := LinearMap.IsScalarTower.compatibleSMul x✝ : LinearMap.CompatibleSMul E (E →L[𝕜] F) ℝ 𝕜 := LinearMap.IsScalarTower.compatibleSMul f'R : E → E →L[ℝ] F := fun x => ContinuousLinearMap.restrictScalars ℝ (f' x) hfR : ∀ᶠ (y : E) in 𝓝 x✝⁵, HasFDerivAt f (f'R y) y f''Rl : E →ₗ[ℝ] E →ₗ[ℝ] F := { toFun := fun x => { toFun := fun y => (f'' x) y, map_add' := ⋯, map_smul' := ⋯ }, map_add' := ⋯, map_smul' := ⋯ } x y : E ⊢ ‖(f''Rl x) y‖ ≤ ‖f''‖ * ‖x‖ * ‖y‖
903ee5e72da42549
tendsto_integral_peak_smul_of_integrable_of_tendsto
Mathlib/MeasureTheory/Integral/PeakFunction.lean
theorem tendsto_integral_peak_smul_of_integrable_of_tendsto {t : Set α} (ht : MeasurableSet t) (h'ts : t ∈ 𝓝 x₀) (h't : μ t ≠ ∞) (hnφ : ∀ᶠ i in l, ∀ x, 0 ≤ φ i x) (hlφ : ∀ u : Set α, IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l uᶜ) (hiφ : Tendsto (fun i ↦ ∫ x in t, φ i x ∂μ) l (𝓝 1)) (h'iφ : ∀ᶠ i in l, AEStronglyMeasurable (φ i) μ) (hmg : Integrable g μ) (hcg : Tendsto g (𝓝 x₀) (𝓝 a)) : Tendsto (fun i : ι ↦ ∫ x, φ i x • g x ∂μ) l (𝓝 a)
α : Type u_1 E : Type u_2 ι : Type u_3 hm : MeasurableSpace α μ : Measure α inst✝⁴ : TopologicalSpace α inst✝³ : BorelSpace α inst✝² : NormedAddCommGroup E inst✝¹ : NormedSpace ℝ E g : α → E l : Filter ι x₀ : α φ : ι → α → ℝ a : E inst✝ : CompleteSpace E t : Set α ht : MeasurableSet t h'ts : t ∈ 𝓝 x₀ h't : μ t ≠ ⊤ hnφ : ∀ᶠ (i : ι) in l, ∀ (x : α), 0 ≤ φ i x hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l uᶜ hiφ : Tendsto (fun i => ∫ (x : α) in t, φ i x ∂μ) l (𝓝 1) h'iφ : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (φ i) μ hmg : Integrable g μ hcg : Tendsto g (𝓝 x₀) (𝓝 a) this : Tendsto (fun i => ∫ (x : α) in univ, φ i x • g x ∂μ) l (𝓝 a) ⊢ Tendsto (fun i => ∫ (x : α), φ i x • g x ∂μ) l (𝓝 a)
simpa
no goals
95790c5debc72743
MeasureTheory.Measure.exists_positive_of_not_mutuallySingular
Mathlib/MeasureTheory/Decomposition/Lebesgue.lean
theorem exists_positive_of_not_mutuallySingular (μ ν : Measure α) [IsFiniteMeasure μ] [IsFiniteMeasure ν] (h : ¬ μ ⟂ₘ ν) : ∃ ε : ℝ≥0, 0 < ε ∧ ∃ E : Set α, MeasurableSet E ∧ 0 < ν E ∧ ∀ A, MeasurableSet A → ε * ν (A ∩ E) ≤ μ (A ∩ E)
α : Type u_1 m : MeasurableSpace α μ ν : Measure α inst✝¹ : IsFiniteMeasure μ inst✝ : IsFiniteMeasure ν h : ¬μ ⟂ₘ ν f : ℕ → Set α hf₁ : ∀ (n : ℕ), MeasurableSet (f n) hf₂ : ∀ (n : ℕ) (t : Set α), MeasurableSet t → ((1 / (↑n + 1)) • ν) (t ∩ f n) ≤ μ (t ∩ f n) A : Set α := ⋂ n, (f n)ᶜ hAmeas : MeasurableSet A n : ℕ t : Set α ht : MeasurableSet t hf₃ : μ (t ∩ A ∩ (f n)ᶜ) ≤ ((1 / (↑n + 1)) • ν) (t ∩ A ∩ (f n)ᶜ) ⊢ μ (t ∩ A) ≤ ((1 / (↑n + 1)) • ν) (t ∩ A)
have : A ∩ (f n)ᶜ = A := inter_eq_left.mpr (iInter_subset _ n)
α : Type u_1 m : MeasurableSpace α μ ν : Measure α inst✝¹ : IsFiniteMeasure μ inst✝ : IsFiniteMeasure ν h : ¬μ ⟂ₘ ν f : ℕ → Set α hf₁ : ∀ (n : ℕ), MeasurableSet (f n) hf₂ : ∀ (n : ℕ) (t : Set α), MeasurableSet t → ((1 / (↑n + 1)) • ν) (t ∩ f n) ≤ μ (t ∩ f n) A : Set α := ⋂ n, (f n)ᶜ hAmeas : MeasurableSet A n : ℕ t : Set α ht : MeasurableSet t hf₃ : μ (t ∩ A ∩ (f n)ᶜ) ≤ ((1 / (↑n + 1)) • ν) (t ∩ A ∩ (f n)ᶜ) this : A ∩ (f n)ᶜ = A ⊢ μ (t ∩ A) ≤ ((1 / (↑n + 1)) • ν) (t ∩ A)
48437d57402f42cd
Complex.HadamardThreeLines.bound_exp_eq
Mathlib/Analysis/Complex/Hadamard.lean
/-- Another technical lemma needed in the proof. -/ private lemma bound_exp_eq {l u : ℝ} (hul : l < u) (z : ℂ) : (z / (↑u - ↑l)).re - ((l : ℂ) / (↑u - ↑l)).re = (z.re - l) / (u - l)
l u : ℝ hul : l < u z : ℂ ⊢ u - l ≠ 0
norm_cast
l u : ℝ hul : l < u z : ℂ ⊢ ¬u - l = 0
ac5fdb07ee3511d8
RingHom.finiteType_ofLocalizationSpan
Mathlib/RingTheory/RingHom/FiniteType.lean
theorem finiteType_ofLocalizationSpan : RingHom.OfLocalizationSpan @RingHom.FiniteType
R S : Type u_1 inst✝¹ : CommRing R inst✝ : CommRing S f : R →+* S s : Finset R hs : Ideal.span ↑s = ⊤ H : ∀ (r : { x // x ∈ s }), (Localization.awayMap f ↑r).FiniteType this : Algebra R S := f.toAlgebra ⊢ f.FiniteType
letI := fun r : s => (Localization.awayMap f r).toAlgebra
R S : Type u_1 inst✝¹ : CommRing R inst✝ : CommRing S f : R →+* S s : Finset R hs : Ideal.span ↑s = ⊤ H : ∀ (r : { x // x ∈ s }), (Localization.awayMap f ↑r).FiniteType this✝ : Algebra R S := f.toAlgebra this : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (f ↑r)) := fun r => (Localization.awayMap f ↑r).toAlgebra ⊢ f.FiniteType
99d09e8c0e75eabf
YoungDiagram.coe_bot
Mathlib/Combinatorics/Young/YoungDiagram.lean
theorem coe_bot : (⊥ : YoungDiagram) = (∅ : Set (ℕ × ℕ))
case h x✝ : ℕ × ℕ ⊢ x✝ ∈ ↑⊥ ↔ x✝ ∈ ∅
simp
no goals
ee750cadbd158324
fermatLastTheoremWith'_polynomial
Mathlib/NumberTheory/FLT/Polynomial.lean
theorem fermatLastTheoremWith'_polynomial {n : ℕ} (hn : 3 ≤ n) (chn : (n : k) ≠ 0) : FermatLastTheoremWith' k[X] n
k : Type u_1 inst✝ : Field k n : ℕ hn : 3 ≤ n chn : ↑n ≠ 0 a b c : k[X] ha : a ≠ 0 hb : b ≠ 0 hc : c ≠ 0 a' b' : k[X] d : k[X] := gcd a b heq : d ^ n * (a' ^ n + b' ^ n) = c ^ n eq_a : a = d * a' eq_b : b = d * b' hd : d ≠ 0 ⊢ 0 < n
omega
no goals
0b2f8f9d4d152b49