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
AlgebraicTopology.DoldKan.HigherFacesVanish.induction
Mathlib/AlgebraicTopology/DoldKan/Faces.lean
theorem induction {Y : C} {n q : ℕ} {φ : Y ⟶ X _⦋n + 1⦌} (v : HigherFacesVanish q φ) : HigherFacesVanish (q + 1) (φ ≫ (𝟙 _ + Hσ q).f (n + 1))
case neg.inr.H.h.mk C : Type u_1 inst✝¹ : Category.{u_2, u_1} C inst✝ : Preadditive C X : SimplicialObject C Y : C q a m : ℕ φ : Y ⟶ X _⦋m + 1 + 1⦌ v : HigherFacesVanish q φ hqn : ¬m + 1 < q ha : q + a = m + 1 ham : a ≤ m ham'' : a = m val✝ : ℕ isLt✝ : val✝ < m + 1 + 1 hj₁ : m + 1 + 1 ≤ ↑⟨val✝, isLt✝⟩ + (q + 1) hj₂ : ¬a = ↑⟨val✝, isLt✝⟩ haj : a < ↑⟨val✝, isLt✝⟩ ⊢ ↑⟨a + 1, ⋯⟩ = ↑⟨val✝, isLt✝⟩.castSucc
dsimp
case neg.inr.H.h.mk C : Type u_1 inst✝¹ : Category.{u_2, u_1} C inst✝ : Preadditive C X : SimplicialObject C Y : C q a m : ℕ φ : Y ⟶ X _⦋m + 1 + 1⦌ v : HigherFacesVanish q φ hqn : ¬m + 1 < q ha : q + a = m + 1 ham : a ≤ m ham'' : a = m val✝ : ℕ isLt✝ : val✝ < m + 1 + 1 hj₁ : m + 1 + 1 ≤ ↑⟨val✝, isLt✝⟩ + (q + 1) hj₂ : ¬a = ↑⟨val✝, isLt✝⟩ haj : a < ↑⟨val✝, isLt✝⟩ ⊢ a + 1 = val✝
69ef2d77296be0d2
Std.DHashMap.Raw.get?_eq_none
Mathlib/.lake/packages/lean4/src/lean/Std/Data/DHashMap/RawLemmas.lean
theorem get?_eq_none [LawfulBEq α] (h : m.WF) {a : α} : ¬a ∈ m → m.get? a = none
α : Type u β : α → Type v m : Raw α β inst✝² : BEq α inst✝¹ : Hashable α inst✝ : LawfulBEq α h : m.WF a : α ⊢ ¬a ∈ m → m.get? a = none
simpa [mem_iff_contains] using get?_eq_none_of_contains_eq_false h
no goals
459dad1ede5c0c63
Vector.mapFinIdx_eq_append_iff
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Vector/MapIdx.lean
theorem mapFinIdx_eq_append_iff {l : Vector α (n + m)} {f : (i : Nat) → α → (h : i < n + m) → β} {l₁ : Vector β n} {l₂ : Vector β m} : l.mapFinIdx f = l₁ ++ l₂ ↔ ∃ (l₁' : Vector α n) (l₂' : Vector α m), l = l₁' ++ l₂' ∧ l₁'.mapFinIdx (fun i a h => f i a (by omega)) = l₁ ∧ l₂'.mapFinIdx (fun i a h => f (i + n) a (by omega)) = l₂
α : Type u_1 n m : Nat β : Type u_2 l : Vector α (n + m) f : (i : Nat) → α → i < n + m → β l₁ : Vector β n l₂ : Vector β m ⊢ l.mapFinIdx f = l₁ ++ l₂ ↔ ∃ l₁' l₂', l = l₁' ++ l₂' ∧ (l₁'.mapFinIdx fun i a h => f i a ⋯) = l₁ ∧ (l₂'.mapFinIdx fun i a h => f (i + n) a ⋯) = l₂
rcases l with ⟨l, h⟩
case mk α : Type u_1 n m : Nat β : Type u_2 f : (i : Nat) → α → i < n + m → β l₁ : Vector β n l₂ : Vector β m l : Array α h : l.size = n + m ⊢ { toArray := l, size_toArray := h }.mapFinIdx f = l₁ ++ l₂ ↔ ∃ l₁' l₂', { toArray := l, size_toArray := h } = l₁' ++ l₂' ∧ (l₁'.mapFinIdx fun i a h => f i a ⋯) = l₁ ∧ (l₂'.mapFinIdx fun i a h => f (i + n) a ⋯) = l₂
9b4b91865ad16511
Polynomial.roots_map_of_map_ne_zero_of_card_eq_natDegree
Mathlib/Algebra/Polynomial/Roots.lean
theorem roots_map_of_map_ne_zero_of_card_eq_natDegree [IsDomain A] [IsDomain B] {p : A[X]} (f : A →+* B) (h : p.map f ≠ 0) (hroots : p.roots.card = p.natDegree) : p.roots.map f = (p.map f).roots := eq_of_le_of_card_le (map_roots_le h) <| by simpa only [Multiset.card_map, hroots] using (p.map f).card_roots'.trans natDegree_map_le
A : Type u_1 B : Type u_2 inst✝³ : CommRing A inst✝² : CommRing B inst✝¹ : IsDomain A inst✝ : IsDomain B p : A[X] f : A →+* B h : map f p ≠ 0 hroots : p.roots.card = p.natDegree ⊢ (map f p).roots.card ≤ (Multiset.map (⇑f) p.roots).card
simpa only [Multiset.card_map, hroots] using (p.map f).card_roots'.trans natDegree_map_le
no goals
504acb872e83339b
not_specializes_iff_exists_closed
Mathlib/Topology/Inseparable.lean
theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S
X : Type u_1 inst✝ : TopologicalSpace X x y : X ⊢ (∃ s, IsClosed s ∧ x ∈ s ∧ y ∉ s) ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ y ∉ S
rfl
no goals
7ea91698b4952923
List.sublist_insertionSort'
Mathlib/Data/List/Sort.lean
theorem sublist_insertionSort' {l c : List α} (hs : c.Sorted r) (hc : c <+~ l) : c <+ insertionSort r l
case intro.intro.cons.cons₂ α : Type u r : α → α → Prop inst✝³ : DecidableRel r inst✝² : IsAntisymm α r inst✝¹ : IsTotal α r inst✝ : IsTrans α r a : α tail✝ c : List α hs : Sorted r c l₁✝ : List α hc : a :: l₁✝ ~ c h : l₁✝ <+ tail✝ ih : c.erase a <+ insertionSort r tail✝ hm : a ∈ c ⊢ c <+ insertionSort r (a :: tail✝)
have he := orderedInsert_erase _ _ hm hs
case intro.intro.cons.cons₂ α : Type u r : α → α → Prop inst✝³ : DecidableRel r inst✝² : IsAntisymm α r inst✝¹ : IsTotal α r inst✝ : IsTrans α r a : α tail✝ c : List α hs : Sorted r c l₁✝ : List α hc : a :: l₁✝ ~ c h : l₁✝ <+ tail✝ ih : c.erase a <+ insertionSort r tail✝ hm : a ∈ c he : orderedInsert r a (c.erase a) = c ⊢ c <+ insertionSort r (a :: tail✝)
870111a403d3360d
ProbabilityTheory.geometricPMFRealSum
Mathlib/Probability/Distributions/Geometric.lean
lemma geometricPMFRealSum (hp_pos : 0 < p) (hp_le_one : p ≤ 1) : HasSum (fun n ↦ geometricPMFReal p n) 1
p : ℝ hp_pos : 0 < p hp_le_one : p ≤ 1 this : HasSum (fun i => (1 - p) ^ i * p) 1 ⊢ HasSum (fun n => (1 - p) ^ n * p) 1
exact this
no goals
afaf3b0c211ee9c5
Submodule.fg_iSup
Mathlib/RingTheory/Finiteness/Basic.lean
theorem fg_iSup {ι : Sort*} [Finite ι] (N : ι → Submodule R M) (h : ∀ i, (N i).FG) : (iSup N).FG
R : Type u_1 M : Type u_2 inst✝³ : Semiring R inst✝² : AddCommMonoid M inst✝¹ : Module R M ι : Sort u_3 inst✝ : Finite ι N : ι → Submodule R M h : ∀ (i : ι), (N i).FG ⊢ (iSup N).FG
cases nonempty_fintype (PLift ι)
case intro R : Type u_1 M : Type u_2 inst✝³ : Semiring R inst✝² : AddCommMonoid M inst✝¹ : Module R M ι : Sort u_3 inst✝ : Finite ι N : ι → Submodule R M h : ∀ (i : ι), (N i).FG val✝ : Fintype (PLift ι) ⊢ (iSup N).FG
d9c53e4dab4a2c3e
Array.foldr_induction
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem foldr_induction {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive as.size init) {f : α → β → β} (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → motive i.1 (f as[i] b)) : motive 0 (as.foldr f init)
α : Type u_1 β : Type u_2 as : Array α motive : Nat → β → Prop init : β h0 : motive as.size init f : α → β → β hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → motive (↑i) (f as[i] b) i : Nat b : β hi✝ : i ≤ as.size H : motive i b hi : ¬i = 0 ⊢ motive 0 (match i, hi✝ with | 0, x => b | i.succ, h => foldrM.fold f as 0 i ⋯ (f as[i] b))
split
case h_1 α : Type u_1 β : Type u_2 as : Array α motive : Nat → β → Prop init : β h0 : motive as.size init f : α → β → β hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → motive (↑i) (f as[i] b) b : β x✝² : Nat x✝¹ : x✝² ≤ as.size x✝ : 0 ≤ as.size H : motive 0 b hi : ¬0 = 0 ⊢ motive 0 b case h_2 α : Type u_1 β : Type u_2 as : Array α motive : Nat → β → Prop init : β h0 : motive as.size init f : α → β → β hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → motive (↑i) (f as[i] b) b : β x✝¹ : Nat x✝ : x✝¹ ≤ as.size i✝ : Nat h✝ : i✝ + 1 ≤ as.size H : motive i✝.succ b hi : ¬i✝.succ = 0 ⊢ motive 0 (foldrM.fold f as 0 i✝ ⋯ (f as[i✝] b))
36c52e13ffc37b61
FirstOrder.Language.Theory.IsComplete.models_not_iff
Mathlib/ModelTheory/Satisfiability.lean
theorem models_not_iff (h : T.IsComplete) (φ : L.Sentence) : T ⊨ᵇ φ.not ↔ ¬T ⊨ᵇ φ
case inr L : Language T : L.Theory h : T.IsComplete φ : L.Sentence hφn : T ⊨ᵇ Formula.not φ ⊢ T ⊨ᵇ Formula.not φ ↔ ¬T ⊨ᵇ φ
simp only [hφn, true_iff]
case inr L : Language T : L.Theory h : T.IsComplete φ : L.Sentence hφn : T ⊨ᵇ Formula.not φ ⊢ ¬T ⊨ᵇ φ
000fa928de0bef51
HNNExtension.NormalWord.t_pow_smul_eq_unitsSMul
Mathlib/GroupTheory/HNNExtension.lean
theorem t_pow_smul_eq_unitsSMul (u : ℤˣ) (w : NormalWord d) : (t ^ (u : ℤ) : HNNExtension G A B φ) • w = unitsSMul φ u w
G : Type u_1 inst✝ : Group G A B : Subgroup G φ : ↥A ≃* ↥B d : TransversalPair G A B u : ℤˣ w : NormalWord d ⊢ t ^ ↑u • w = unitsSMul φ u w
rcases Int.units_eq_one_or u with (rfl | rfl) <;> simp [instHSMul, SMul.smul, MulAction.toEndHom, Equiv.Perm.inv_def]
no goals
5e0245b3a208b8b5
Filter.IsApproximateUnit.nhds_one
Mathlib/Topology/ApproximateUnit.lean
/-- In a topological unital magma, `𝓝 1` is an approximate unit. -/ lemma nhds_one [ContinuousMul α] : IsApproximateUnit (𝓝 (1 : α)) where tendsto_mul_left m
α : Type u_1 inst✝² : TopologicalSpace α inst✝¹ : MulOneClass α inst✝ : ContinuousMul α m : α ⊢ Tendsto (fun x => m * x) (𝓝 1) (𝓝 m)
simpa using tendsto_id (x := 𝓝 1) |>.const_mul m
no goals
8c11f27e5c645308
list_reverse'
Mathlib/Computability/Primrec.lean
theorem list_reverse' : haveI := prim H Primrec (@List.reverse β) := letI := prim H (list_foldl' H .id (const []) <| to₂ <| ((list_cons' H).comp snd fst).comp snd).of_eq (suffices ∀ l r, List.foldl (fun (s : List β) (b : β) => b :: s) r l = List.reverseAux l r from fun l => this l [] fun l => by induction l <;> simp [*, List.reverseAux])
β : Type u_2 inst✝ : Primcodable β H : Nat.Primrec fun n => encode (decode n) this : Primcodable (List β) := prim H l : List β ⊢ ∀ (r : List β), List.foldl (fun s b => b :: s) r l = l.reverseAux r
induction l <;> simp [*, List.reverseAux]
no goals
07b242f65261af1b
AddCommGrp.Colimits.Quot.map_ι
Mathlib/Algebra/Category/Grp/Colimits.lean
@[simp] lemma Quot.map_ι [DecidableEq J] {j j' : J} {f : j ⟶ j'} (x : F.obj j) : Quot.ι F j' (F.map f x) = Quot.ι F j x
J : Type u inst✝¹ : Category.{v, u} J F : J ⥤ AddCommGrp inst✝ : DecidableEq J j j' : J f : j ⟶ j' x : ↑(F.obj j) ⊢ ((QuotientAddGroup.mk' (Relations F)).comp (DFinsupp.singleAddHom (fun j => ↑(F.obj j)) j')) ((ConcreteCategory.hom (F.map f)) x) = ((QuotientAddGroup.mk' (Relations F)).comp (DFinsupp.singleAddHom (fun j => ↑(F.obj j)) j)) x
refine eq_of_sub_eq_zero ?_
J : Type u inst✝¹ : Category.{v, u} J F : J ⥤ AddCommGrp inst✝ : DecidableEq J j j' : J f : j ⟶ j' x : ↑(F.obj j) ⊢ ((QuotientAddGroup.mk' (Relations F)).comp (DFinsupp.singleAddHom (fun j => ↑(F.obj j)) j')) ((ConcreteCategory.hom (F.map f)) x) - ((QuotientAddGroup.mk' (Relations F)).comp (DFinsupp.singleAddHom (fun j => ↑(F.obj j)) j)) x = 0
14bc73f0adb070cf
TopCat.range_pullback_to_prod
Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
theorem range_pullback_to_prod {X Y Z : TopCat} (f : X ⟶ Z) (g : Y ⟶ Z) : Set.range (prod.lift (pullback.fst f g) (pullback.snd f g)) = { x | (Limits.prod.fst ≫ f) x = (Limits.prod.snd ≫ g) x }
case h.mpr X Y Z : TopCat f : X ⟶ Z g : Y ⟶ Z x : ↑(X ⨯ Y) h : (ConcreteCategory.hom f) (prod.fst.hom' x, ?m.36223).1 = (ConcreteCategory.hom g) (?m.36335, prod.snd.hom' x).2 ⊢ x ∈ Set.range ⇑(ConcreteCategory.hom (prod.lift (pullback.fst f g) (pullback.snd f g)))
use (pullbackIsoProdSubtype f g).inv ⟨⟨_, _⟩, h⟩
case h X Y Z : TopCat f : X ⟶ Z g : Y ⟶ Z x : ↑(X ⨯ Y) h : (ConcreteCategory.hom f) (prod.fst.hom' x, prod.snd.hom' x).1 = (ConcreteCategory.hom g) (prod.fst.hom' x, prod.snd.hom' x).2 ⊢ (ConcreteCategory.hom (prod.lift (pullback.fst f g) (pullback.snd f g))) ((ConcreteCategory.hom (pullbackIsoProdSubtype f g).inv) ⟨(prod.fst.hom' x, prod.snd.hom' x), h⟩) = x
4b3b4b2af80f752f
Std.Tactic.BVDecide.BVExpr.bitblast.blastShiftRightConst.go_denote_eq
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/Bitblast/BVExpr/Circuit/Lemmas/Operations/ShiftRight.lean
theorem go_denote_eq (aig : AIG α) (distance : Nat) (input : AIG.RefVec aig w) (assign : α → Bool) (curr : Nat) (hcurr : curr ≤ w) (s : AIG.RefVec aig curr) : ∀ (idx : Nat) (hidx1 : idx < w), curr ≤ idx → ⟦ (go aig input distance curr hcurr s).aig, (go aig input distance curr hcurr s).vec.get idx hidx1, assign ⟧ = if hidx : (distance + idx) < w then ⟦aig, input.get (distance + idx) (by omega), assign⟧ else false
case isTrue.inl.isTrue.isFalse α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α w : Nat aig : AIG α distance : Nat input : aig.RefVec w assign : α → Bool curr : Nat hcurr : curr ≤ w s : aig.RefVec curr idx : Nat hidx1 : idx < w hidx2 : curr ≤ idx res : RefVecEntry α w h✝² : curr < w heq : curr = idx h✝¹ : distance + curr < w hgo : go aig input distance (curr + 1) ⋯ (s.push (input.get (distance + curr) ⋯)) = res h✝ : ¬distance + idx < w ⊢ ⟦assign, { aig := res.aig, ref := res.vec.get idx hidx1 }⟧ = false
omega
no goals
5fc3536d0b25a58c
Nat.Partrec.Code.evaln_prim
Mathlib/Computability/PartrecCode.lean
theorem evaln_prim : Primrec fun a : (ℕ × Code) × ℕ => evaln a.1.1 a.1.2 a.2 := have : Primrec₂ fun (_ : Unit) (n : ℕ) => let a := ofNat (ℕ × Code) n (List.range a.1).map (evaln a.1 a.2) := Primrec.nat_strong_rec _ (hG.comp Primrec.snd).to₂ fun _ p => by simp only [G, prod_ofNat_val, ofNat_nat, List.length_map, List.length_range, Nat.pair_unpair, Option.some_inj] refine List.map_congr_left fun n => ?_ have : List.range p = List.range (Nat.pair p.unpair.1 (encode (ofNat Code p.unpair.2)))
case succ.comp.intro.some x✝ : Unit p n : ℕ this : List.range p = List.range (Nat.pair (unpair p).1 (encode (ofNat Code (unpair p).2))) k' : ℕ k : ℕ := k' + 1 nk : n ≤ k' cf cg : Code hg : ∀ {k' : ℕ} {c' : Code} {n : ℕ}, Nat.pair k' (encode c') < Nat.pair k (encode (cf.comp cg)) → Nat.Partrec.Code.lup (List.map (fun n => List.map (evaln (unpair n).1 (ofNat Code (unpair n).2)) (List.range (unpair n).1)) (List.range (Nat.pair k (encode (cf.comp cg))))) (k', c') n = evaln k' c' n lf : encode cf < encode (cf.comp cg) lg : encode cg < encode (cf.comp cg) val✝ : ℕ ⊢ ((some val✝).bind fun x => Nat.Partrec.Code.lup (List.map (fun n => List.map (evaln (unpair n).1 (ofNat Code (unpair n).2)) (List.range (unpair n).1)) (List.range (Nat.pair (k' + 1) (encode (cf.comp cg))))) (k' + 1, cf) x) = (some val✝).bind fun x => evaln (k' + 1) cf x
simp [k, hg (Nat.pair_lt_pair_right _ lf)]
no goals
5a06f75ab46fe8c4
List.sublist_flatten_iff
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/Sublist.lean
theorem sublist_flatten_iff {L : List (List α)} {l} : l <+ L.flatten ↔ ∃ L' : List (List α), l = L'.flatten ∧ ∀ i (_ : i < L'.length), L'[i] <+ L[i]?.getD []
case cons.mpr.intro.intro.nil α : Type u_1 l' : List α L : List (List α) ih : ∀ {l : List α}, l <+ L.flatten ↔ ∃ L', l = L'.flatten ∧ ∀ (i : Nat) (x : i < L'.length), L'[i] <+ L[i]?.getD [] h : ∀ (i : Nat) (x : i < [].length), [][i] <+ (l' :: L)[i]?.getD [] ⊢ ∃ l₁ l₂, [].flatten = l₁ ++ l₂ ∧ l₁ <+ l' ∧ ∃ L', l₂ = L'.flatten ∧ ∀ (i : Nat) (x : i < L'.length), L'[i] <+ L[i]?.getD []
exact ⟨[], [], by simp, by simp, [], by simp, fun i x => by cases x⟩
no goals
2d054bb50b16d9ba
List.Vector.insertIdx_comm
Mathlib/Data/Vector/Basic.lean
theorem insertIdx_comm (a b : α) (i j : Fin (n + 1)) (h : i ≤ j) : ∀ v : Vector α n, (v.insertIdx a i).insertIdx b j.succ = (v.insertIdx b j).insertIdx a (Fin.castSucc i) | ⟨l, hl⟩ => by refine Subtype.eq ?_ simp only [insertIdx_val, Fin.val_succ, Fin.castSucc, Fin.coe_castAdd] apply List.insertIdx_comm · assumption · rw [hl] exact Nat.le_of_succ_le_succ j.2
case x α : Type u_1 n : ℕ a b : α i j : Fin (n + 1) h : i ≤ j l : List α hl : l.length = n ⊢ ↑i ≤ ↑j
assumption
no goals
e169c22cbc8ad2b0
Std.Sat.AIG.mkGateCached.go_eval_eq_mkGate_eval
Mathlib/.lake/packages/lean4/src/lean/Std/Sat/AIG/CachedLemmas.lean
theorem mkGateCached.go_eval_eq_mkGate_eval {aig : AIG α} {input : GateInput aig} : ⟦go aig input, assign⟧ = ⟦aig.mkGate input, assign⟧
case h_2.h_9 α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α assign : α → Bool aig : AIG α input : aig.GateInput x✝¹⁰ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv)) heq✝ : aig.cache.get? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none x✝⁹ x✝⁸ : Decl α linv✝ rinv✝ : Bool x✝⁷ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False x✝⁶ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False x✝⁵ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.rhs.inv = true → False x✝⁴ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.rhs.inv = false → False x✝³ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False x✝² : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = true → input.rhs.inv = false → False x✝¹ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False x✝ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.lhs.inv = false → input.rhs.inv = true → False ⊢ ⟦assign, if (input.lhs.ref.gate == input.rhs.ref.gate && input.lhs.inv == false && input.rhs.inv == false) = true then { aig := { decls := aig.decls, cache := aig.cache, invariant := ⋯ }, ref := { gate := input.lhs.ref.gate, hgate := ⋯ } } else if (input.lhs.ref.gate == input.rhs.ref.gate && input.lhs.inv == !input.rhs.inv) = true then { decls := aig.decls, cache := aig.cache, invariant := ⋯ }.mkConstCached false else { aig := { decls := aig.decls.push (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv), cache := Cache.insert aig.decls aig.cache (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv), invariant := ⋯ }, ref := { gate := aig.decls.size, hgate := ⋯ } }⟧ = ⟦assign, aig.mkGate input⟧
split
case h_2.h_9.isTrue α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α assign : α → Bool aig : AIG α input : aig.GateInput x✝¹⁰ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv)) heq✝ : aig.cache.get? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none x✝⁹ x✝⁸ : Decl α linv✝ rinv✝ : Bool x✝⁷ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False x✝⁶ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False x✝⁵ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.rhs.inv = true → False x✝⁴ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.rhs.inv = false → False x✝³ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False x✝² : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = true → input.rhs.inv = false → False x✝¹ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False x✝ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.lhs.inv = false → input.rhs.inv = true → False h✝ : (input.lhs.ref.gate == input.rhs.ref.gate && input.lhs.inv == false && input.rhs.inv == false) = true ⊢ ⟦assign, { aig := { decls := aig.decls, cache := aig.cache, invariant := ⋯ }, ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }⟧ = ⟦assign, aig.mkGate input⟧ case h_2.h_9.isFalse α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α assign : α → Bool aig : AIG α input : aig.GateInput x✝¹⁰ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv)) heq✝ : aig.cache.get? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none x✝⁹ x✝⁸ : Decl α linv✝ rinv✝ : Bool x✝⁷ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False x✝⁶ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False x✝⁵ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.rhs.inv = true → False x✝⁴ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.rhs.inv = false → False x✝³ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False x✝² : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = true → input.rhs.inv = false → False x✝¹ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False x✝ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.lhs.inv = false → input.rhs.inv = true → False h✝ : ¬(input.lhs.ref.gate == input.rhs.ref.gate && input.lhs.inv == false && input.rhs.inv == false) = true ⊢ ⟦assign, if (input.lhs.ref.gate == input.rhs.ref.gate && input.lhs.inv == !input.rhs.inv) = true then { decls := aig.decls, cache := aig.cache, invariant := ⋯ }.mkConstCached false else { aig := { decls := aig.decls.push (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv), cache := Cache.insert aig.decls aig.cache (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv), invariant := ⋯ }, ref := { gate := aig.decls.size, hgate := ⋯ } }⟧ = ⟦assign, aig.mkGate input⟧
d44cc6ef1a811f57
ENNReal.toReal_add_le
Mathlib/Data/ENNReal/Real.lean
theorem toReal_add_le : (a + b).toReal ≤ a.toReal + b.toReal := if ha : a = ∞ then by simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg] else if hb : b = ∞ then by simp only [hb, add_top, top_toReal, add_zero, toReal_nonneg] else le_of_eq (toReal_add ha hb)
a b : ℝ≥0∞ ha : a = ⊤ ⊢ (a + b).toReal ≤ a.toReal + b.toReal
simp only [ha, top_add, top_toReal, zero_add, toReal_nonneg]
no goals
7639cc337e185f1a
BitVec.cons_append_append
Mathlib/.lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem cons_append_append (x : BitVec w₁) (y : BitVec w₂) (z : BitVec w₃) (a : Bool) : (cons a x) ++ y ++ z = (cons a (x ++ y ++ z)).cast (by omega)
case neg w₁ w₂ w₃ : Nat x : BitVec w₁ y : BitVec w₂ z : BitVec w₃ a : Bool i : Nat h : i < w₁ + 1 + w₂ + w₃ h₀ : ¬i < w₁ + w₂ + w₃ ⊢ (if i < w₃ then z.getLsbD i else if i - w₃ < w₂ then y.getLsbD (i - w₃) else a) = a
by_cases h₂ : i < w₃
case pos w₁ w₂ w₃ : Nat x : BitVec w₁ y : BitVec w₂ z : BitVec w₃ a : Bool i : Nat h : i < w₁ + 1 + w₂ + w₃ h₀ : ¬i < w₁ + w₂ + w₃ h₂ : i < w₃ ⊢ (if i < w₃ then z.getLsbD i else if i - w₃ < w₂ then y.getLsbD (i - w₃) else a) = a case neg w₁ w₂ w₃ : Nat x : BitVec w₁ y : BitVec w₂ z : BitVec w₃ a : Bool i : Nat h : i < w₁ + 1 + w₂ + w₃ h₀ : ¬i < w₁ + w₂ + w₃ h₂ : ¬i < w₃ ⊢ (if i < w₃ then z.getLsbD i else if i - w₃ < w₂ then y.getLsbD (i - w₃) else a) = a
eb023eee426d5364
Nat.mul_mod
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
theorem mul_mod (a b n : Nat) : a * b % n = (a % n) * (b % n) % n
a b n : Nat ⊢ a * b % n = a % n * (b % n) % n
rw (occs := [1]) [← mod_add_div a n]
a b n : Nat ⊢ (a % n + n * (a / n)) * b % n = a % n * (b % n) % n
6886db5637d70c32
isometry_subsingleton
Mathlib/Topology/MetricSpace/Isometry.lean
theorem _root_.isometry_subsingleton [Subsingleton α] : Isometry f := fun x y => by rw [Subsingleton.elim x y]; simp
α : Type u β : Type v inst✝² : PseudoEMetricSpace α inst✝¹ : PseudoEMetricSpace β f : α → β inst✝ : Subsingleton α x y : α ⊢ edist (f y) (f y) = edist y y
simp
no goals
defcf28595a70634
Stream'.Seq.map_cons
Mathlib/Data/Seq/Seq.lean
theorem map_cons (f : α → β) (a) : ∀ s, map f (cons a s) = cons (f a) (map f s) | ⟨s, al⟩ => by apply Subtype.eq; dsimp [cons, map]; rw [Stream'.map_cons]; rfl
case a α : Type u β : Type v f : α → β a : α s : Stream' (Option α) al : s.IsSeq ⊢ ↑(map f (cons a ⟨s, al⟩)) = ↑(cons (f a) (map f ⟨s, al⟩))
dsimp [cons, map]
case a α : Type u β : Type v f : α → β a : α s : Stream' (Option α) al : s.IsSeq ⊢ Stream'.map (Option.map f) (some a :: s) = some (f a) :: Stream'.map (Option.map f) s
53104f98914cff40
MeasureTheory.indicatorConstLp_eq_toSpanSingleton_compLp
Mathlib/MeasureTheory/Function/LpSpace/Basic.lean
theorem indicatorConstLp_eq_toSpanSingleton_compLp {s : Set α} [NormedSpace ℝ F] (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (x : F) : indicatorConstLp 2 hs hμs x = (ContinuousLinearMap.toSpanSingleton ℝ x).compLp (indicatorConstLp 2 hs hμs (1 : ℝ))
case h α : Type u_1 F : Type u_5 m0 : MeasurableSpace α μ : Measure α inst✝¹ : NormedAddCommGroup F s : Set α inst✝ : NormedSpace ℝ F hs : MeasurableSet s hμs : μ s ≠ ⊤ x : F ⊢ (s.indicator fun x_1 => x) =ᶠ[ae μ] ↑↑((ContinuousLinearMap.toSpanSingleton ℝ x).compLp (indicatorConstLp 2 hs hμs 1))
have h_compLp := (ContinuousLinearMap.toSpanSingleton ℝ x).coeFn_compLp (indicatorConstLp 2 hs hμs (1 : ℝ))
case h α : Type u_1 F : Type u_5 m0 : MeasurableSpace α μ : Measure α inst✝¹ : NormedAddCommGroup F s : Set α inst✝ : NormedSpace ℝ F hs : MeasurableSet s hμs : μ s ≠ ⊤ x : F h_compLp : ∀ᵐ (a : α) ∂μ, ↑↑((ContinuousLinearMap.toSpanSingleton ℝ x).compLp (indicatorConstLp 2 hs hμs 1)) a = (ContinuousLinearMap.toSpanSingleton ℝ x) (↑↑(indicatorConstLp 2 hs hμs 1) a) ⊢ (s.indicator fun x_1 => x) =ᶠ[ae μ] ↑↑((ContinuousLinearMap.toSpanSingleton ℝ x).compLp (indicatorConstLp 2 hs hμs 1))
08936ba25b43e072
MvPolynomial.weightedHomogeneousComponent_of_isWeightedHomogeneous_ne
Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
theorem weightedHomogeneousComponent_of_isWeightedHomogeneous_ne {m n : M} {p : MvPolynomial σ R} (hp : IsWeightedHomogeneous w p m) (hn : n ≠ m) : weightedHomogeneousComponent w n p = 0
case a R : Type u_1 M : Type u_2 inst✝¹ : CommSemiring R σ : Type u_3 inst✝ : AddCommMonoid M w : σ → M m n : M p : MvPolynomial σ R hp : IsWeightedHomogeneous w p m hn : n ≠ m x : σ →₀ ℕ ⊢ coeff x ((weightedHomogeneousComponent w n) p) = coeff x 0
rw [coeff_weightedHomogeneousComponent]
case a R : Type u_1 M : Type u_2 inst✝¹ : CommSemiring R σ : Type u_3 inst✝ : AddCommMonoid M w : σ → M m n : M p : MvPolynomial σ R hp : IsWeightedHomogeneous w p m hn : n ≠ m x : σ →₀ ℕ ⊢ (if (weight w) x = n then coeff x p else 0) = coeff x 0
1179645efc5cef8b
Computation.corec_eq
Mathlib/Data/Seq/Computation.lean
theorem corec_eq (f : β → α ⊕ β) (b : β) : destruct (corec f b) = rmap (corec f) (f b)
case inr.h.a α : Type u β : Type v f : β → α ⊕ β b b' : β h : f b = Sum.inr b' ⊢ ↑(tail ⟨Stream'.corec' (Corec.f f) (Sum.inr b), ⋯⟩) = ↑⟨Stream'.corec' (Corec.f f) (Sum.inr b'), ⋯⟩
dsimp [corec, tail]
case inr.h.a α : Type u β : Type v f : β → α ⊕ β b b' : β h : f b = Sum.inr b' ⊢ (Stream'.corec' (Corec.f f) (Sum.inr b)).tail = Stream'.corec' (Corec.f f) (Sum.inr b')
166f587b1a2f0c6c
Bool.or_eq_true
Mathlib/.lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem Bool.or_eq_true (a b : Bool) : ((a || b) = true) = (a = true ∨ b = true)
a b : Bool ⊢ ((a || b) = true) = (a = true ∨ b = true)
cases a <;> cases b <;> decide
no goals
d7b01d786d216268
Tactic.NormNum.int_gcd_helper
Mathlib/Tactic/NormNum/GCD.lean
theorem int_gcd_helper {x y : ℤ} {x' y' d : ℕ} (hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.gcd x' y' = d) : Int.gcd x y = d
x y : ℤ ⊢ x.gcd y = x.natAbs.gcd y.natAbs
rw [Int.gcd_def]
no goals
dd9684f50d890c94
Ordinal.bsup_comp
Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem bsup_comp {o o' : Ordinal.{max u v}} {f : ∀ a < o, Ordinal.{max u v w}} (hf : ∀ {i j} (hi) (hj), i ≤ j → f i hi ≤ f j hj) {g : ∀ a < o', Ordinal.{max u v}} (hg : blsub.{_, u} o' g = o) : (bsup.{_, w} o' fun a ha => f (g a ha) (by rw [← hg]; apply lt_blsub)) = bsup.{_, w} o f
α : Type u_1 β : Type u_2 γ : Type u_3 r : α → α → Prop s : β → β → Prop t : γ → γ → Prop o o' : Ordinal.{max u v} f : (a : Ordinal.{max u v}) → a < o → Ordinal.{max u v w} hf : ∀ {i j : Ordinal.{max u v}} (hi : i < o) (hj : j < o), i ≤ j → f i hi ≤ f j hj g : (a : Ordinal.{max u v}) → a < o' → Ordinal.{max u v} hg : o'.blsub g = o a : Ordinal.{max u v} ha : a < o' ⊢ g a ha < o'.blsub g
apply lt_blsub
no goals
2780919a3a9c7fa6
LinearIndependent.linearIndependent_of_exact_of_retraction
Mathlib/LinearAlgebra/Basis/Exact.lean
lemma LinearIndependent.linearIndependent_of_exact_of_retraction (hainj : Function.Injective a) (hsa : ∀ i, s (v (a i)) = 0) (hli : LinearIndependent R v) : LinearIndependent R (g ∘ v ∘ a)
case intro R : Type u_1 M : Type u_2 K : Type u_3 P : Type u_4 inst✝⁶ : Ring R inst✝⁵ : AddCommGroup M inst✝⁴ : AddCommGroup K inst✝³ : AddCommGroup P inst✝² : Module R M inst✝¹ : Module R K inst✝ : Module R P f : K →ₗ[R] M g : M →ₗ[R] P s : M →ₗ[R] K hfg : Function.Exact ⇑f ⇑g ι : Type u_5 κ : Type u_6 v : ι → M a : κ → ι hainj : Function.Injective a hsa : ∀ (i : κ), s (v (a i)) = 0 hli : LinearIndependent R v y : K hy : f y ∈ Submodule.span R (Set.range (v ∘ a)) hz : s (f y) = 0 hs : (s ∘ₗ f) y = LinearMap.id y ⊢ f y = 0
simp only [LinearMap.coe_comp, Function.comp_apply, LinearMap.id_coe, id_eq] at hs
case intro R : Type u_1 M : Type u_2 K : Type u_3 P : Type u_4 inst✝⁶ : Ring R inst✝⁵ : AddCommGroup M inst✝⁴ : AddCommGroup K inst✝³ : AddCommGroup P inst✝² : Module R M inst✝¹ : Module R K inst✝ : Module R P f : K →ₗ[R] M g : M →ₗ[R] P s : M →ₗ[R] K hfg : Function.Exact ⇑f ⇑g ι : Type u_5 κ : Type u_6 v : ι → M a : κ → ι hainj : Function.Injective a hsa : ∀ (i : κ), s (v (a i)) = 0 hli : LinearIndependent R v y : K hy : f y ∈ Submodule.span R (Set.range (v ∘ a)) hz : s (f y) = 0 hs : s (f y) = y ⊢ f y = 0
5ee9e42b46e28024
CochainComplex.HomComplex.Cochain.leftShift_comp
Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
lemma leftShift_comp (a n' : ℤ) (hn' : n + a = n') {m t t' : ℤ} (γ' : Cochain L M m) (h : n + m = t) (ht' : t + a = t') : (γ.comp γ' h).leftShift a t' ht' = (a * m).negOnePow • (γ.leftShift a n' hn').comp γ' (by rw [← ht', ← h, ← hn', add_assoc, add_comm a, add_assoc])
case h.e_a.e_a C : Type u inst✝¹ : Category.{v, u} C inst✝ : Preadditive C K L M : CochainComplex C ℤ n : ℤ γ : Cochain K L n a n' : ℤ hn' : n + a = n' m t t' : ℤ γ' : Cochain L M m h : n + m = t ht' : t + a = t' p q : ℤ hpq : p + t' = q h' : n' + m = t' ⊢ (a * (n' + m)).negOnePow = (a * m).negOnePow * (a * n').negOnePow
rw [add_comm n', mul_add, Int.negOnePow_add]
no goals
28ce55181ad3bbd7
MeasureTheory.hausdorffMeasure_pi_real
Mathlib/MeasureTheory/Measure/Hausdorff.lean
theorem hausdorffMeasure_pi_real {ι : Type*} [Fintype ι] : (μH[Fintype.card ι] : Measure (ι → ℝ)) = volume
ι : Type u_4 inst✝ : Fintype ι a b : ι → ℚ H : ∀ (i : ι), a i < b i I : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i) γ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ t : (n : ℕ) → γ n → Set (ι → ℝ) := fun n f => univ.pi fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n) A : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0) B : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n ⊢ ∀ᶠ (n : ℕ) in atTop, (univ.pi fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ i, t n i
refine eventually_atTop.2 ⟨1, fun n hn => ?_⟩
ι : Type u_4 inst✝ : Fintype ι a b : ι → ℚ H : ∀ (i : ι), a i < b i I : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i) γ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ t : (n : ℕ) → γ n → Set (ι → ℝ) := fun n f => univ.pi fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n) A : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0) B : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n n : ℕ hn : n ≥ 1 ⊢ (univ.pi fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ i, t n i
90212ad5e070d6f0
Nat.div_eq_of_lt
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Nat/Div/Basic.lean
theorem div_eq_of_lt (h₀ : a < b) : a / b = 0
case hnc a b : Nat h₀ : a < b ⊢ ¬(0 < b ∧ b ≤ a)
intro h₁
case hnc a b : Nat h₀ : a < b h₁ : 0 < b ∧ b ≤ a ⊢ False
3fee51e2316178d3
intervalIntegral.integral_undef
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem integral_undef (h : ¬IntervalIntegrable f μ a b) : ∫ x in a..b, f x ∂μ = 0
E : Type u_3 inst✝¹ : NormedAddCommGroup E inst✝ : NormedSpace ℝ E a b : ℝ f : ℝ → E μ : Measure ℝ h : ¬IntervalIntegrable f μ a b ⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0
rw [intervalIntegrable_iff] at h
E : Type u_3 inst✝¹ : NormedAddCommGroup E inst✝ : NormedSpace ℝ E a b : ℝ f : ℝ → E μ : Measure ℝ h : ¬IntegrableOn f (Ι a b) μ ⊢ ∫ (x : ℝ) in a..b, f x ∂μ = 0
ba2879a32248b222
Set.card_prod_singleton
Mathlib/SetTheory/Cardinal/Finite.lean
lemma card_prod_singleton (s : Set α) (b : β) : Nat.card (s ×ˢ {b}) = Nat.card s
α : Type u_1 β : Type u_2 s : Set α b : β ⊢ Nat.card ↑(s ×ˢ {b}) = Nat.card ↑s
rw [prod_singleton, Nat.card_image_of_injective (Prod.mk.inj_right b)]
no goals
2ccc6f0e633f68f7
List.eraseIdx_modify_of_lt
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/Nat/Modify.lean
theorem eraseIdx_modify_of_lt (f : α → α) (i j) (l : List α) (h : j < i) : (modify f i l).eraseIdx j = (l.eraseIdx j).modify f (i - 1)
case neg.isFalse.isFalse α : Type u_1 f : α → α i j : Nat l : List α h : j < i k : Nat h₁ : k < ((modify f i l).eraseIdx j).length h₂ : k < (modify f (i - 1) (l.eraseIdx j)).length h' : ¬i - 1 = k h✝¹ : ¬k < j h✝ : ¬i = k + 1 ⊢ l[k + 1] = l[k + 1]
rfl
no goals
87b3ea59efce4e47
Function.zero_of_even_and_odd
Mathlib/Algebra/Group/EvenFunction.lean
/-- If `f` is both even and odd, and its target is a torsion-free commutative additive group, then `f = 0`. -/ lemma zero_of_even_and_odd [Neg α] (he : f.Even) (ho : f.Odd) : f = 0
α : Type u_3 β : Type u_4 inst✝² : AddCommGroup β inst✝¹ : NoZeroSMulDivisors ℕ β f : α → β inst✝ : Neg α he : Function.Even f ho : Function.Odd f ⊢ f = 0
ext r
case h α : Type u_3 β : Type u_4 inst✝² : AddCommGroup β inst✝¹ : NoZeroSMulDivisors ℕ β f : α → β inst✝ : Neg α he : Function.Even f ho : Function.Odd f r : α ⊢ f r = 0 r
a839ade93a23de6c
ContinuousLinearMap.smulRight_one_eq_iff
Mathlib/Topology/Algebra/Module/LinearMap.lean
theorem smulRight_one_eq_iff {f f' : M₂} : smulRight (1 : R₁ →L[R₁] R₁) f = smulRight (1 : R₁ →L[R₁] R₁) f' ↔ f = f'
R₁ : Type u_1 inst✝⁵ : Semiring R₁ M₂ : Type u_6 inst✝⁴ : TopologicalSpace M₂ inst✝³ : AddCommMonoid M₂ inst✝² : Module R₁ M₂ inst✝¹ : TopologicalSpace R₁ inst✝ : ContinuousSMul R₁ M₂ f f' : M₂ ⊢ smulRight 1 f = smulRight 1 f' ↔ f = f'
simp only [ContinuousLinearMap.ext_ring_iff, smulRight_apply, one_apply, one_smul]
no goals
3689fa4c87d81eda
Subalgebra.isAlgebraic_iff
Mathlib/RingTheory/Algebraic/Defs.lean
theorem Subalgebra.isAlgebraic_iff (S : Subalgebra R A) : S.IsAlgebraic ↔ Algebra.IsAlgebraic R S
R : Type u A : Type v inst✝² : CommRing R inst✝¹ : Ring A inst✝ : Algebra R A S : Subalgebra R A ⊢ (∀ x ∈ S, _root_.IsAlgebraic R x) ↔ Algebra.IsAlgebraic R ↥S
rw [Subtype.forall', Algebra.isAlgebraic_def]
R : Type u A : Type v inst✝² : CommRing R inst✝¹ : Ring A inst✝ : Algebra R A S : Subalgebra R A ⊢ (∀ (x : ↥S), _root_.IsAlgebraic R ↑x) ↔ ∀ (x : ↥S), _root_.IsAlgebraic R x
07f4073c806448dc
hasConstantSpeedOnWith_zero_iff
Mathlib/Analysis/ConstantSpeed.lean
theorem hasConstantSpeedOnWith_zero_iff : HasConstantSpeedOnWith f s 0 ↔ ∀ᵉ (x ∈ s) (y ∈ s), edist (f x) (f y) = 0
case mpr E : Type u_2 inst✝ : PseudoEMetricSpace E f : ℝ → E s : Set ℝ h : eVariationOn f s = 0 x : ℝ x✝¹ : x ∈ s y : ℝ x✝ : y ∈ s ⊢ eVariationOn f (s ∩ Icc x y) ≤ 0
rw [← h]
case mpr E : Type u_2 inst✝ : PseudoEMetricSpace E f : ℝ → E s : Set ℝ h : eVariationOn f s = 0 x : ℝ x✝¹ : x ∈ s y : ℝ x✝ : y ∈ s ⊢ eVariationOn f (s ∩ Icc x y) ≤ eVariationOn f s
88820ed0bbab983a
PMF.integral_eq_tsum
Mathlib/Probability/ProbabilityMassFunction/Integrals.lean
theorem integral_eq_tsum (p : PMF α) (f : α → E) (hf : Integrable f p.toMeasure) : ∫ a, f a ∂(p.toMeasure) = ∑' a, (p a).toReal • f a := calc _ = ∫ a in p.support, f a ∂(p.toMeasure)
α : Type u_1 inst✝⁴ : MeasurableSpace α inst✝³ : MeasurableSingletonClass α E : Type u_2 inst✝² : NormedAddCommGroup E inst✝¹ : NormedSpace ℝ E inst✝ : CompleteSpace E p : PMF α f : α → E hf : Integrable f p.toMeasure ⊢ ∫ (a : α), f a ∂p.toMeasure = ∫ (a : α) in p.support, f a ∂p.toMeasure
rw [restrict_toMeasure_support p]
no goals
a530d74688305c42
List.flatten_eq_append_iff
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem flatten_eq_append_iff {xs : List (List α)} {ys zs : List α} : xs.flatten = ys ++ zs ↔ (∃ as bs, xs = as ++ bs ∧ ys = as.flatten ∧ zs = bs.flatten) ∨ ∃ as bs c cs ds, xs = as ++ (bs ++ c :: cs) :: ds ∧ ys = as.flatten ++ bs ∧ zs = c :: cs ++ ds.flatten
case mp.cons.inr.intro.intro.nil α : Type u_1 zs : List α xs : List (List α) ih : ∀ {ys : List α}, xs.flatten = ys ++ zs → (∃ as bs, xs = as ++ bs ∧ ys = as.flatten ∧ zs = bs.flatten) ∨ ∃ as bs c cs ds, xs = as ++ (bs ++ c :: cs) :: ds ∧ ys = as.flatten ++ bs ∧ zs = c :: cs ++ ds.flatten ys : List α h : zs = [] ++ xs.flatten ⊢ (∃ as bs, (ys ++ []) :: xs = as ++ bs ∧ ys = as.flatten ∧ [] ++ xs.flatten = bs.flatten) ∨ ∃ as bs c cs ds, (ys ++ []) :: xs = as ++ (bs ++ c :: cs) :: ds ∧ ys = as.flatten ++ bs ∧ [] ++ xs.flatten = c :: cs ++ ds.flatten
exact .inl ⟨[ys], xs, by simp⟩
no goals
af7f3e2e06ab592a
AlgebraicGeometry.ValuativeCriterion.Existence.of_specializingMap
Mathlib/AlgebraicGeometry/ValuativeCriterion.lean
lemma of_specializingMap (H : (topologically @SpecializingMap).universally f) : ValuativeCriterion.Existence f
X Y : Scheme f : X ⟶ Y R : Type u commRing✝ : CommRing R domain✝ : IsDomain R valuationRing✝ : ValuationRing R K : Type u field✝ : Field K algebra✝ : Algebra R K isFractionRing✝ : IsFractionRing R K i₁ : Spec (CommRingCat.of K) ⟶ X i₂ : Spec (CommRingCat.of R) ⟶ Y w : i₁ ≫ f = Spec.map (CommRingCat.ofHom (algebraMap R K)) ≫ i₂ this✝³ : IsDomain ↑(CommRingCat.of R) this✝² : ValuationRing ↑(CommRingCat.of R) this✝¹ : Field ↑(CommRingCat.of K) := field✝ H : topologically (@SpecializingMap) (pullback.fst i₂ f) lft : Spec (CommRingCat.of K) ⟶ pullback i₂ f := pullback.lift (Spec.map (CommRingCat.ofHom (algebraMap R K))) i₁ ⋯ x : ↑↑(pullback i₂ f).toPresheafedSpace h₁ : flip (fun x1 x2 => x1 ⤳ x2) x ((ConcreteCategory.hom lft.base) (closedPoint ↑(CommRingCat.of K))) h₂ : (ConcreteCategory.hom (pullback.fst i₂ f).base) x = closedPoint R e : CommRingCat.of R ≅ (Spec (CommRingCat.of R)).presheaf.stalk ((ConcreteCategory.hom (pullback.fst i₂ f).base) x) := (stalkClosedPointIso (CommRingCat.of R)).symm ≪≫ (Spec (CommRingCat.of R)).presheaf.stalkCongr ⋯ α : CommRingCat.of R ⟶ (pullback i₂ f).presheaf.stalk x := e.hom ≫ Scheme.Hom.stalkMap (pullback.fst i₂ f) x this✝ : IsLocalHom (CommRingCat.Hom.hom e.hom) this : IsLocalHom (CommRingCat.Hom.hom α) β : (pullback i₂ f).presheaf.stalk x ⟶ CommRingCat.of K := (pullback i₂ f).presheaf.stalkSpecializes h₁ ≫ Scheme.stalkClosedPointTo lft ⊢ (Scheme.ΓSpecIso (CommRingCat.of R)).inv ≫ (Spec (CommRingCat.of R)).presheaf.germ ⊤ (closedPoint R) True.intro ≫ (Spec (CommRingCat.of R)).presheaf.stalkSpecializes ⋯ ≫ Scheme.Hom.stalkMap (pullback.fst i₂ f) x ≫ (pullback i₂ f).presheaf.stalkSpecializes h₁ ≫ Scheme.stalkClosedPointTo lft = CommRingCat.ofHom (algebraMap R K)
simp only [TopCat.Presheaf.germ_stalkSpecializes_assoc, Scheme.stalkMap_germ_assoc]
X Y : Scheme f : X ⟶ Y R : Type u commRing✝ : CommRing R domain✝ : IsDomain R valuationRing✝ : ValuationRing R K : Type u field✝ : Field K algebra✝ : Algebra R K isFractionRing✝ : IsFractionRing R K i₁ : Spec (CommRingCat.of K) ⟶ X i₂ : Spec (CommRingCat.of R) ⟶ Y w : i₁ ≫ f = Spec.map (CommRingCat.ofHom (algebraMap R K)) ≫ i₂ this✝³ : IsDomain ↑(CommRingCat.of R) this✝² : ValuationRing ↑(CommRingCat.of R) this✝¹ : Field ↑(CommRingCat.of K) := field✝ H : topologically (@SpecializingMap) (pullback.fst i₂ f) lft : Spec (CommRingCat.of K) ⟶ pullback i₂ f := pullback.lift (Spec.map (CommRingCat.ofHom (algebraMap R K))) i₁ ⋯ x : ↑↑(pullback i₂ f).toPresheafedSpace h₁ : flip (fun x1 x2 => x1 ⤳ x2) x ((ConcreteCategory.hom lft.base) (closedPoint ↑(CommRingCat.of K))) h₂ : (ConcreteCategory.hom (pullback.fst i₂ f).base) x = closedPoint R e : CommRingCat.of R ≅ (Spec (CommRingCat.of R)).presheaf.stalk ((ConcreteCategory.hom (pullback.fst i₂ f).base) x) := (stalkClosedPointIso (CommRingCat.of R)).symm ≪≫ (Spec (CommRingCat.of R)).presheaf.stalkCongr ⋯ α : CommRingCat.of R ⟶ (pullback i₂ f).presheaf.stalk x := e.hom ≫ Scheme.Hom.stalkMap (pullback.fst i₂ f) x this✝ : IsLocalHom (CommRingCat.Hom.hom e.hom) this : IsLocalHom (CommRingCat.Hom.hom α) β : (pullback i₂ f).presheaf.stalk x ⟶ CommRingCat.of K := (pullback i₂ f).presheaf.stalkSpecializes h₁ ≫ Scheme.stalkClosedPointTo lft ⊢ (Scheme.ΓSpecIso (CommRingCat.of R)).inv ≫ Scheme.Hom.app (pullback.fst i₂ f) ⊤ ≫ (pullback i₂ f).presheaf.germ (pullback.fst i₂ f ⁻¹ᵁ ⊤) ((ConcreteCategory.hom lft.base) (closedPoint K)) ⋯ ≫ Scheme.stalkClosedPointTo lft = CommRingCat.ofHom (algebraMap R K)
3a778dfa0b125889
MeasureTheory.integral_comp_mul_right_Ioi
Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
theorem integral_comp_mul_right_Ioi (g : ℝ → E) (a : ℝ) {b : ℝ} (hb : 0 < b) : (∫ x in Ioi a, g (x * b)) = b⁻¹ • ∫ x in Ioi (a * b), g x
E : Type u_1 inst✝¹ : NormedAddCommGroup E inst✝ : NormedSpace ℝ E g : ℝ → E a b : ℝ hb : 0 < b ⊢ ∫ (x : ℝ) in Ioi a, g (x * b) = b⁻¹ • ∫ (x : ℝ) in Ioi (a * b), g x
simpa only [mul_comm] using integral_comp_mul_left_Ioi g a hb
no goals
aadbbf664ca9a87a
CliffordAlgebra.map_mul_map_of_isOrtho_of_mem_evenOdd
Mathlib/LinearAlgebra/CliffordAlgebra/Prod.lean
theorem map_mul_map_of_isOrtho_of_mem_evenOdd {i₁ i₂ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ i₁) (hm₂ : m₂ ∈ evenOdd Q₂ i₂) : map f₁ m₁ * map f₂ m₂ = (-1 : ℤˣ) ^ (i₂ * i₁) • (map f₂ m₂ * map f₁ m₁)
case mem.mk.mem_mul.intro.e_a.e_a.mem.mk.algebraMap R : Type u_1 M₁ : Type u_2 M₂ : Type u_3 N : Type u_4 inst✝⁶ : CommRing R inst✝⁵ : AddCommGroup M₁ inst✝⁴ : AddCommGroup M₂ inst✝³ : AddCommGroup N inst✝² : Module R M₁ inst✝¹ : Module R M₂ inst✝ : Module R N Q₁ : QuadraticForm R M₁ Q₂ : QuadraticForm R M₂ Qₙ : QuadraticForm R N f₁ : Q₁ →qᵢ Qₙ f₂ : Q₂ →qᵢ Qₙ hf : ∀ (x : M₁) (y : M₂), QuadraticMap.IsOrtho Qₙ (f₁ x) (f₂ y) m₁ m₁' : CliffordAlgebra Q₁ i₁n i : ℕ x₁ : CliffordAlgebra Q₁ _hx₁ : x₁ ∈ LinearMap.range (ι Q₁) ^ i v₁ : M₁ m₂' : CliffordAlgebra Q₂ i₂n : ℕ r✝ : R ⊢ (ι Qₙ) (f₁ v₁) * (map f₂) ((algebraMap R (CliffordAlgebra Q₂)) r✝) = (-1) ^ ↑0 • ((map f₂) ((algebraMap R (CliffordAlgebra Q₂)) r✝) * (ι Qₙ) (f₁ v₁))
rw [AlgHom.commutes, Nat.cast_zero, uzpow_zero, one_smul, Algebra.commutes]
no goals
5d22b1ae3fcf44bc
mem_tangentConeAt_of_pow_smul
Mathlib/Analysis/Calculus/TangentCone.lean
theorem mem_tangentConeAt_of_pow_smul {r : 𝕜} (hr₀ : r ≠ 0) (hr : ‖r‖ < 1) (hs : ∀ᶠ n : ℕ in atTop, x + r ^ n • y ∈ s) : y ∈ tangentConeAt 𝕜 s x
case refine_2 𝕜 : Type u_1 inst✝³ : NontriviallyNormedField 𝕜 E : Type u_2 inst✝² : AddCommGroup E inst✝¹ : Module 𝕜 E inst✝ : TopologicalSpace E x y : E s : Set E r : 𝕜 hr₀ : r ≠ 0 hr : ‖r‖ < 1 hs : ∀ᶠ (n : ℕ) in atTop, x + r ^ n • y ∈ s ⊢ Tendsto (fun n => (fun n => (r ^ n)⁻¹) n • (fun n => r ^ n • y) n) atTop (𝓝 y)
simp only [inv_smul_smul₀ (pow_ne_zero _ hr₀), tendsto_const_nhds]
no goals
11a02259301344c3
SmoothBumpCovering.embeddingPiTangent_injOn
Mathlib/Geometry/Manifold/WhitneyEmbedding.lean
theorem embeddingPiTangent_injOn : InjOn f.embeddingPiTangent s
ι : Type uι E : Type uE inst✝⁸ : NormedAddCommGroup E inst✝⁷ : NormedSpace ℝ E inst✝⁶ : FiniteDimensional ℝ E H : Type uH inst✝⁵ : TopologicalSpace H I : ModelWithCorners ℝ E H M : Type uM inst✝⁴ : TopologicalSpace M inst✝³ : ChartedSpace H M inst✝² : IsManifold I ∞ M inst✝¹ : T2Space M inst✝ : Fintype ι s : Set M f : SmoothBumpCovering ι I M s x : M hx : x ∈ s y : M a✝ : y ∈ s h : f.embeddingPiTangent x = f.embeddingPiTangent y ⊢ x = y
simp only [embeddingPiTangent_coe, funext_iff] at h
ι : Type uι E : Type uE inst✝⁸ : NormedAddCommGroup E inst✝⁷ : NormedSpace ℝ E inst✝⁶ : FiniteDimensional ℝ E H : Type uH inst✝⁵ : TopologicalSpace H I : ModelWithCorners ℝ E H M : Type uM inst✝⁴ : TopologicalSpace M inst✝³ : ChartedSpace H M inst✝² : IsManifold I ∞ M inst✝¹ : T2Space M inst✝ : Fintype ι s : Set M f : SmoothBumpCovering ι I M s x : M hx : x ∈ s y : M a✝ : y ∈ s h : ∀ (x_1 : ι), (↑(f.toFun x_1) x • ↑(extChartAt I (f.c x_1)) x, ↑(f.toFun x_1) x) = (↑(f.toFun x_1) y • ↑(extChartAt I (f.c x_1)) y, ↑(f.toFun x_1) y) ⊢ x = y
4e36074bfefbb5d5
Nat.digits_eq_cons_digits_div
Mathlib/Data/Nat/Digits.lean
theorem digits_eq_cons_digits_div {b n : ℕ} (h : 1 < b) (w : n ≠ 0) : digits b n = (n % b) :: digits b (n / b)
b n : ℕ h : 1 < b w : n ≠ 0 ⊢ b.digits n = n % b :: b.digits (n / b)
rcases b with (_ | _ | b)
case zero n : ℕ w : n ≠ 0 h : 1 < 0 ⊢ digits 0 n = n % 0 :: digits 0 (n / 0) case succ.zero n : ℕ w : n ≠ 0 h : 1 < 0 + 1 ⊢ (0 + 1).digits n = n % (0 + 1) :: (0 + 1).digits (n / (0 + 1)) case succ.succ n : ℕ w : n ≠ 0 b : ℕ h : 1 < b + 1 + 1 ⊢ (b + 1 + 1).digits n = n % (b + 1 + 1) :: (b + 1 + 1).digits (n / (b + 1 + 1))
7cabbb56ad772e66
PowerSeries.trunc_zero
Mathlib/RingTheory/PowerSeries/Trunc.lean
theorem trunc_zero (n) : trunc n (0 : R⟦X⟧) = 0 := Polynomial.ext fun m => by rw [coeff_trunc, LinearMap.map_zero, Polynomial.coeff_zero] split_ifs <;> rfl
R : Type u_1 inst✝ : Semiring R n m : ℕ ⊢ (if m < n then 0 else 0) = 0
split_ifs <;> rfl
no goals
0be1e1bb43ff4b12
MeasureTheory.dist_convolution_le'
Mathlib/Analysis/Convolution.lean
theorem dist_convolution_le' {x₀ : G} {R ε : ℝ} {z₀ : E'} (hε : 0 ≤ ε) (hif : Integrable f μ) (hf : support f ⊆ ball (0 : G) R) (hmg : AEStronglyMeasurable g μ) (hg : ∀ x ∈ ball x₀ R, dist (g x) z₀ ≤ ε) : dist ((f ⋆[L, μ] g : G → F) x₀) (∫ t, L (f t) z₀ ∂μ) ≤ (‖L‖ * ∫ x, ‖f x‖ ∂μ) * ε
𝕜 : Type u𝕜 G : Type uG E : Type uE E' : Type uE' F : Type uF inst✝¹³ : NormedAddCommGroup E inst✝¹² : NormedAddCommGroup E' inst✝¹¹ : NormedAddCommGroup F f : G → E g : G → E' inst✝¹⁰ : NontriviallyNormedField 𝕜 inst✝⁹ : NormedSpace 𝕜 E inst✝⁸ : NormedSpace 𝕜 E' inst✝⁷ : NormedSpace 𝕜 F L : E →L[𝕜] E' →L[𝕜] F inst✝⁶ : MeasurableSpace G μ : Measure G inst✝⁵ : NormedSpace ℝ F inst✝⁴ : SeminormedAddCommGroup G inst✝³ : BorelSpace G inst✝² : SecondCountableTopology G inst✝¹ : μ.IsAddLeftInvariant inst✝ : SFinite μ x₀ : G R ε : ℝ z₀ : E' hε : 0 ≤ ε hif : Integrable f μ hf : support f ⊆ ball 0 R hmg : AEStronglyMeasurable g μ hg : ∀ x ∈ ball x₀ R, dist (g x) z₀ ≤ ε hfg : ConvolutionExistsAt f g x₀ L μ t : G ⊢ dist ((L (f t)) (g (x₀ - t))) ((L (f t)) z₀) ≤ ‖L (f t)‖ * ε
by_cases ht : t ∈ support f
case pos 𝕜 : Type u𝕜 G : Type uG E : Type uE E' : Type uE' F : Type uF inst✝¹³ : NormedAddCommGroup E inst✝¹² : NormedAddCommGroup E' inst✝¹¹ : NormedAddCommGroup F f : G → E g : G → E' inst✝¹⁰ : NontriviallyNormedField 𝕜 inst✝⁹ : NormedSpace 𝕜 E inst✝⁸ : NormedSpace 𝕜 E' inst✝⁷ : NormedSpace 𝕜 F L : E →L[𝕜] E' →L[𝕜] F inst✝⁶ : MeasurableSpace G μ : Measure G inst✝⁵ : NormedSpace ℝ F inst✝⁴ : SeminormedAddCommGroup G inst✝³ : BorelSpace G inst✝² : SecondCountableTopology G inst✝¹ : μ.IsAddLeftInvariant inst✝ : SFinite μ x₀ : G R ε : ℝ z₀ : E' hε : 0 ≤ ε hif : Integrable f μ hf : support f ⊆ ball 0 R hmg : AEStronglyMeasurable g μ hg : ∀ x ∈ ball x₀ R, dist (g x) z₀ ≤ ε hfg : ConvolutionExistsAt f g x₀ L μ t : G ht : t ∈ support f ⊢ dist ((L (f t)) (g (x₀ - t))) ((L (f t)) z₀) ≤ ‖L (f t)‖ * ε case neg 𝕜 : Type u𝕜 G : Type uG E : Type uE E' : Type uE' F : Type uF inst✝¹³ : NormedAddCommGroup E inst✝¹² : NormedAddCommGroup E' inst✝¹¹ : NormedAddCommGroup F f : G → E g : G → E' inst✝¹⁰ : NontriviallyNormedField 𝕜 inst✝⁹ : NormedSpace 𝕜 E inst✝⁸ : NormedSpace 𝕜 E' inst✝⁷ : NormedSpace 𝕜 F L : E →L[𝕜] E' →L[𝕜] F inst✝⁶ : MeasurableSpace G μ : Measure G inst✝⁵ : NormedSpace ℝ F inst✝⁴ : SeminormedAddCommGroup G inst✝³ : BorelSpace G inst✝² : SecondCountableTopology G inst✝¹ : μ.IsAddLeftInvariant inst✝ : SFinite μ x₀ : G R ε : ℝ z₀ : E' hε : 0 ≤ ε hif : Integrable f μ hf : support f ⊆ ball 0 R hmg : AEStronglyMeasurable g μ hg : ∀ x ∈ ball x₀ R, dist (g x) z₀ ≤ ε hfg : ConvolutionExistsAt f g x₀ L μ t : G ht : t ∉ support f ⊢ dist ((L (f t)) (g (x₀ - t))) ((L (f t)) z₀) ≤ ‖L (f t)‖ * ε
fddd5e43ba4662a2
mem_openSegment_iff_div
Mathlib/Analysis/Convex/Segment.lean
theorem mem_openSegment_iff_div : x ∈ openSegment 𝕜 y z ↔ ∃ a b : 𝕜, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x
case mp 𝕜 : Type u_1 E : Type u_2 inst✝² : LinearOrderedSemifield 𝕜 inst✝¹ : AddCommGroup E inst✝ : Module 𝕜 E x y z : E ⊢ x ∈ openSegment 𝕜 y z → ∃ a b, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x
rintro ⟨a, b, ha, hb, hab, rfl⟩
case mp.intro.intro.intro.intro.intro 𝕜 : Type u_1 E : Type u_2 inst✝² : LinearOrderedSemifield 𝕜 inst✝¹ : AddCommGroup E inst✝ : Module 𝕜 E y z : E a b : 𝕜 ha : 0 < a hb : 0 < b hab : a + b = 1 ⊢ ∃ a_1 b_1, 0 < a_1 ∧ 0 < b_1 ∧ (a_1 / (a_1 + b_1)) • y + (b_1 / (a_1 + b_1)) • z = a • y + b • z
d4c727a9a9db7737
spectrum_star_mul_self_nonneg
Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Basic.lean
/-- The `ℝ`-spectrum of an element of the form `star b * b` in a C⋆-algebra is nonnegative. This is the key result used to establish `CStarAlgebra.instNonnegSpectrumClass`. -/ lemma spectrum_star_mul_self_nonneg {b : A} : ∀ x ∈ spectrum ℝ (star b * b), 0 ≤ x
case refine_1 A : Type u_2 inst✝ : CStarAlgebra A b : A a : A := star b * b a_def : a = star b * b ha : IsSelfAdjoint a c : A := b * a⁻ h_eq_negPart_a : -(star c * c) = a⁻ ^ 3 h_c_spec₀ : SpectrumRestricts (-(star c * c)) fun x => ContinuousMap.realToNNReal x ⊢ IsSelfAdjoint (2 • (↑(ℜ c) ^ 2 + ↑(ℑ c) ^ 2))
exact .smul (star_trivial _) <| ((ℜ c).prop.pow 2).add ((ℑ c).prop.pow 2)
no goals
85e3b42015fe1e79
TopologicalSpace.IsTopologicalBasis.isQuotientMap
Mathlib/Topology/Bases.lean
theorem IsTopologicalBasis.isQuotientMap {V : Set (Set X)} (hV : IsTopologicalBasis V) (h' : IsQuotientMap π) (h : IsOpenMap π) : IsTopologicalBasis (Set.image π '' V)
case h_nhds.intro.intro.intro.intro X : Type u_1 inst✝¹ : TopologicalSpace X Y : Type u_2 inst✝ : TopologicalSpace Y π : X → Y V : Set (Set X) hV : IsTopologicalBasis V h' : IsQuotientMap π h : IsOpenMap π U : Set Y U_open : IsOpen U x : X y_in_U : π x ∈ U W : Set X := π ⁻¹' U x_in_W : x ∈ W W_open : IsOpen W Z : Set X Z_in_V : Z ∈ V x_in_Z : x ∈ Z Z_in_W : Z ⊆ W πZ_in_U : π '' Z ⊆ U ⊢ ∃ v ∈ image π '' V, π x ∈ v ∧ v ⊆ U
exact ⟨π '' Z, ⟨Z, Z_in_V, rfl⟩, ⟨x, x_in_Z, rfl⟩, πZ_in_U⟩
no goals
0b2ca271bb3ece9e
StrictMonoOn.exists_slope_lt_deriv
Mathlib/Analysis/Convex/Deriv.lean
theorem StrictMonoOn.exists_slope_lt_deriv {x y : ℝ} {f : ℝ → ℝ} (hf : ContinuousOn f (Icc x y)) (hxy : x < y) (hf'_mono : StrictMonoOn (deriv f) (Ioo x y)) : ∃ a ∈ Ioo x y, (f y - f x) / (y - x) < deriv f a
case neg x y : ℝ f : ℝ → ℝ hf : ContinuousOn f (Icc x y) hxy : x < y hf'_mono : StrictMonoOn (deriv f) (Ioo x y) h : ∃ w ∈ Ioo x y, deriv f w = 0 ⊢ ∃ a ∈ Ioo x y, (f y - f x) / (y - x) < deriv f a
rcases h with ⟨w, ⟨hxw, hwy⟩, hw⟩
case neg.intro.intro.intro x y : ℝ f : ℝ → ℝ hf : ContinuousOn f (Icc x y) hxy : x < y hf'_mono : StrictMonoOn (deriv f) (Ioo x y) w : ℝ hw : deriv f w = 0 hxw : x < w hwy : w < y ⊢ ∃ a ∈ Ioo x y, (f y - f x) / (y - x) < deriv f a
23bb4dc8e787b3ef
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) hf₃ : ∀ (n : ℕ) (t : Set α), MeasurableSet t → μ (t ∩ (f n)ᶜ) ≤ ((1 / (↑n + 1)) • ν) (t ∩ (f n)ᶜ) ⊢ ∃ ε, 0 < ε ∧ ∃ E, MeasurableSet E ∧ 0 < ν E ∧ ∀ (A : Set α), MeasurableSet A → ↑ε * ν (A ∩ E) ≤ μ (A ∩ E)
let A := ⋂ n, (f 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) hf₃ : ∀ (n : ℕ) (t : Set α), MeasurableSet t → μ (t ∩ (f n)ᶜ) ≤ ((1 / (↑n + 1)) • ν) (t ∩ (f n)ᶜ) A : Set α := ⋂ n, (f n)ᶜ ⊢ ∃ ε, 0 < ε ∧ ∃ E, MeasurableSet E ∧ 0 < ν E ∧ ∀ (A : Set α), MeasurableSet A → ↑ε * ν (A ∩ E) ≤ μ (A ∩ E)
48437d57402f42cd
BoxIntegral.Box.exists_taggedPartition_isHenstock_isSubordinate_homothetic
Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean
theorem exists_taggedPartition_isHenstock_isSubordinate_homothetic (I : Box ι) (r : (ι → ℝ) → Ioi (0 : ℝ)) : ∃ π : TaggedPrepartition I, π.IsPartition ∧ π.IsHenstock ∧ π.IsSubordinate r ∧ (∀ J ∈ π, ∃ m : ℕ, ∀ i, (J :).upper i - J.lower i = (I.upper i - I.lower i) / 2 ^ m) ∧ π.distortion = I.distortion
ι : Type u_1 inst✝ : Fintype ι I : Box ι r : (ι → ℝ) → ↑(Ioi 0) J : Box ι x✝ : J ≤ I πi : (J' : Box ι) → TaggedPrepartition J' hP✝ : ∀ J' ∈ splitCenter J, (πi J').IsPartition hHen : ∀ J' ∈ splitCenter J, (πi J').IsHenstock hr : ∀ J' ∈ splitCenter J, (πi J').IsSubordinate r a✝ : ∀ J' ∈ splitCenter J, (πi J').distortion = J'.distortion n : Box ι → Box ι → ℕ hn : ∀ J' ∈ splitCenter J, ∀ J ∈ πi J', ∀ (i : ι), J.upper i - J.lower i = (J'.upper i - J'.lower i) / 2 ^ n J' J hP : ((splitCenter J).biUnionTagged πi).IsPartition J' : Box ι hJ' : J' ∈ (splitCenter J).biUnionTagged πi ⊢ ∃ n, ∀ (i : ι), J'.upper i - J'.lower i = (J.upper i - J.lower i) / 2 ^ n
rcases (splitCenter J).mem_biUnionTagged.1 hJ' with ⟨J₁, h₁, h₂⟩
case intro.intro ι : Type u_1 inst✝ : Fintype ι I : Box ι r : (ι → ℝ) → ↑(Ioi 0) J : Box ι x✝ : J ≤ I πi : (J' : Box ι) → TaggedPrepartition J' hP✝ : ∀ J' ∈ splitCenter J, (πi J').IsPartition hHen : ∀ J' ∈ splitCenter J, (πi J').IsHenstock hr : ∀ J' ∈ splitCenter J, (πi J').IsSubordinate r a✝ : ∀ J' ∈ splitCenter J, (πi J').distortion = J'.distortion n : Box ι → Box ι → ℕ hn : ∀ J' ∈ splitCenter J, ∀ J ∈ πi J', ∀ (i : ι), J.upper i - J.lower i = (J'.upper i - J'.lower i) / 2 ^ n J' J hP : ((splitCenter J).biUnionTagged πi).IsPartition J' : Box ι hJ' : J' ∈ (splitCenter J).biUnionTagged πi J₁ : Box ι h₁ : J₁ ∈ splitCenter J h₂ : J' ∈ πi J₁ ⊢ ∃ n, ∀ (i : ι), J'.upper i - J'.lower i = (J.upper i - J.lower i) / 2 ^ n
a8a3743c45a09fc2
num_dvd_of_is_root
Mathlib/RingTheory/Polynomial/RationalRoot.lean
theorem num_dvd_of_is_root {p : A[X]} {r : K} (hr : aeval r p = 0) : num A r ∣ p.coeff 0
A : Type u_1 K : Type u_2 inst✝⁵ : CommRing A inst✝⁴ : IsDomain A inst✝³ : UniqueFactorizationMonoid A inst✝² : Field K inst✝¹ : Algebra A K inst✝ : IsFractionRing A K p : A[X] r : K hr : (aeval r) p = 0 this : num A r ∣ p.coeff 0 * ↑(den A r) ^ p.natDegree ⊢ num A r ∣ p.coeff 0
haveI inst := Classical.propDecidable
A : Type u_1 K : Type u_2 inst✝⁵ : CommRing A inst✝⁴ : IsDomain A inst✝³ : UniqueFactorizationMonoid A inst✝² : Field K inst✝¹ : Algebra A K inst✝ : IsFractionRing A K p : A[X] r : K hr : (aeval r) p = 0 this : num A r ∣ p.coeff 0 * ↑(den A r) ^ p.natDegree inst : (a : Prop) → Decidable a ⊢ num A r ∣ p.coeff 0
51d60af78e32181a
PreTilt.mk_untilt_eq_coeff_zero
Mathlib/RingTheory/Perfectoid/Untilt.lean
theorem mk_untilt_eq_coeff_zero (x : PreTilt O p) : Ideal.Quotient.mk (Ideal.span {(p : O)}) (x.untilt) = coeff (ModP O p) p 0 x
O : Type u_1 inst✝³ : CommRing O p : ℕ inst✝² : Fact (Nat.Prime p) inst✝¹ : Fact ¬IsUnit ↑p inst✝ : IsAdicComplete (span {↑p}) O x : PreTilt O p ⊢ (Ideal.Quotient.mk (span {↑p})) (untilt x) = (coeff (ModP O p) p 0) x
simp only [untilt]
O : Type u_1 inst✝³ : CommRing O p : ℕ inst✝² : Fact (Nat.Prime p) inst✝¹ : Fact ¬IsUnit ↑p inst✝ : IsAdicComplete (span {↑p}) O x : PreTilt O p ⊢ (Ideal.Quotient.mk (span {↑p})) ({ toFun := untiltFun, map_one' := ⋯, map_mul' := ⋯ } x) = (coeff (ModP O p) p 0) x
818366dd1349e0d6
LinearRecurrence.geom_sol_iff_root_charPoly
Mathlib/Algebra/LinearRecurrence.lean
theorem geom_sol_iff_root_charPoly (q : α) : (E.IsSolution fun n ↦ q ^ n) ↔ E.charPoly.IsRoot q
α : Type u_1 inst✝ : CommRing α E : LinearRecurrence α q : α h : q ^ E.order - ∑ x : Fin E.order, E.coeffs x * q ^ ↑x = 0 n : ℕ x✝¹ : Fin E.order x✝ : x✝¹ ∈ univ ⊢ q ^ n * (E.coeffs x✝¹ * q ^ ↑x✝¹) = E.coeffs x✝¹ * (q ^ n * q ^ ↑x✝¹)
ring
no goals
6b3dbd9966ca9e25
BitVec.getLsbD_replicate
Mathlib/.lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem getLsbD_replicate {n w : Nat} (x : BitVec w) : (x.replicate n).getLsbD i = (decide (i < w * n) && x.getLsbD (i % w))
i n w : Nat x : BitVec w ⊢ (replicate n x).getLsbD i = (decide (i < w * n) && x.getLsbD (i % w))
induction n generalizing x
case zero i w : Nat x : BitVec w ⊢ (replicate 0 x).getLsbD i = (decide (i < w * 0) && x.getLsbD (i % w)) case succ i w n✝ : Nat a✝ : ∀ (x : BitVec w), (replicate n✝ x).getLsbD i = (decide (i < w * n✝) && x.getLsbD (i % w)) x : BitVec w ⊢ (replicate (n✝ + 1) x).getLsbD i = (decide (i < w * (n✝ + 1)) && x.getLsbD (i % w))
0585dba2d6aa536b
norm_jacobiTheta₂_term_fderiv_le
Mathlib/NumberTheory/ModularForms/JacobiTheta/TwoVariable.lean
lemma norm_jacobiTheta₂_term_fderiv_le (n : ℤ) (z τ : ℂ) : ‖jacobiTheta₂_term_fderiv n z τ‖ ≤ 3 * π * |n| ^ 2 * ‖jacobiTheta₂_term n z τ‖
n : ℤ z τ : ℂ hns : ∀ (a : ℂ) (f : ℂ × ℂ →L[ℂ] ℂ), ‖a • f‖ = ‖a‖ * ‖f‖ ⊢ 3 = 2 + 1
norm_num
no goals
5dd5ee16e07bb24c
lineMap_mono_left
Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
theorem lineMap_mono_left (ha : a ≤ a') (hr : r ≤ 1) : lineMap a b r ≤ lineMap a' b r
k : Type u_1 E : Type u_2 inst✝³ : OrderedRing k inst✝² : OrderedAddCommGroup E inst✝¹ : Module k E inst✝ : OrderedSMul k E a a' b : E r : k ha : a ≤ a' hr : r ≤ 1 ⊢ (1 - r) • a + r • b ≤ (1 - r) • a' + r • b
exact add_le_add_right (smul_le_smul_of_nonneg_left ha (sub_nonneg.2 hr)) _
no goals
aae7b6dc6f444886
Nat.Prime.sum_four_squares
Mathlib/NumberTheory/SumFourSquares.lean
theorem Prime.sum_four_squares {p : ℕ} (hp : p.Prime) : ∃ a b c d : ℕ, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = p
case refine_2 p : ℕ hp : Prime p this✝¹ : Fact (Prime p) natAbs_iff : ∀ {a b c d : ℤ} {k : ℕ}, a.natAbs ^ 2 + b.natAbs ^ 2 + c.natAbs ^ 2 + d.natAbs ^ 2 = k ↔ a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = ↑k hm✝ : ∃ m < p, 0 < m ∧ ∃ a b c d, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = m * p m : ℕ hmin : ∀ m_1 < m, ¬(m_1 < p ∧ 0 < m_1 ∧ ∃ a b c d, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = m_1 * p) hmp : m < p hm₀ : 0 < m a b c d : ℕ habcd : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = m * p hm₁ : 1 < m this✝ : NeZero m hm : ¬2 ∣ m f : ℕ → ℤ hf_lt : ∀ (x : ℕ), 2 * (f x).natAbs < m hf_mod : ∀ (x : ℕ), ↑(f x) = ↑x r : ℕ hr₀ : 0 < r hrm : r < m hr : f b ^ 2 + f a ^ 2 + f d ^ 2 + (-f c) ^ 2 = ↑(m * r) this : (f b * ↑a - f a * ↑b - f d * ↑c - -f c * ↑d) ^ 2 + (f b * ↑b + f a * ↑a + f d * ↑d - -f c * ↑c) ^ 2 + (f b * ↑c - f a * ↑d + f d * ↑a + -f c * ↑b) ^ 2 + (f b * ↑d + f a * ↑c - f d * ↑b + -f c * ↑a) ^ 2 = ↑(m * r) * ↑(m * p) ⊢ ↑(a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) = 0
simp [habcd]
no goals
c746a4c45b4b888b
FreeAlgebra.toTensor_ι
Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean
theorem toTensor_ι (m : M) : FreeAlgebra.toTensor (FreeAlgebra.ι R m) = TensorAlgebra.ι R m
R : Type u_1 inst✝² : CommSemiring R M : Type u_2 inst✝¹ : AddCommMonoid M inst✝ : Module R M m : M ⊢ toTensor (ι R m) = (TensorAlgebra.ι R) m
simp [toTensor]
no goals
5296482b11d68d7a
ZMod.cast_descFactorial
Mathlib/Data/ZMod/Factorial.lean
theorem cast_descFactorial {n p : ℕ} (h : n ≤ p) : (descFactorial (p - 1) n : ZMod p) = (-1) ^ n * n !
n p : ℕ h : n ≤ p ⊢ ∏ i ∈ range n, ↑(p - 1 - i) = ∏ a ∈ range n, -1 * ↑(a + 1)
refine prod_congr rfl ?_
n p : ℕ h : n ≤ p ⊢ ∀ x ∈ range n, ↑(p - 1 - x) = -1 * ↑(x + 1)
e51eb65f25b63875
MemHolder.holderWith
Mathlib/Topology/MetricSpace/HolderNorm.lean
lemma MemHolder.holderWith {r : ℝ≥0} {f : X → Y} (hf : MemHolder r f) : HolderWith (nnHolderNorm r f) r f
case neg X : Type u_1 Y : Type u_2 inst✝¹ : MetricSpace X inst✝ : EMetricSpace Y r : ℝ≥0 f : X → Y hf : MemHolder r f x₁ x₂ : X hx : ¬x₁ = x₂ h₁ : edist x₁ x₂ ^ ↑r ≠ 0 h₂ : edist x₁ x₂ ^ ↑r ≠ ⊤ C : ℝ≥0 hC : HolderWith C r f ⊢ edist (f x₁) (f x₂) / edist x₁ x₂ ^ ↑r ≤ ↑C
rw [ENNReal.div_le_iff h₁ h₂]
case neg X : Type u_1 Y : Type u_2 inst✝¹ : MetricSpace X inst✝ : EMetricSpace Y r : ℝ≥0 f : X → Y hf : MemHolder r f x₁ x₂ : X hx : ¬x₁ = x₂ h₁ : edist x₁ x₂ ^ ↑r ≠ 0 h₂ : edist x₁ x₂ ^ ↑r ≠ ⊤ C : ℝ≥0 hC : HolderWith C r f ⊢ edist (f x₁) (f x₂) ≤ ↑C * edist x₁ x₂ ^ ↑r
3d8fc3de0d36c256
Vector.traverse_eq_map_id
Mathlib/Data/Vector/Basic.lean
theorem traverse_eq_map_id {α β} (f : α → β) : ∀ x : Vector α n, x.traverse ((pure : _ → Id _) ∘ f) = (pure : _ → Id _) (map f x)
n : ℕ α β : Type u_6 f : α → β ⊢ ∀ (x : Vector α n), Vector.traverse (pure ∘ f) x = pure (map f x)
rintro ⟨x, rfl⟩
case mk α β : Type u_6 f : α → β x : List α ⊢ Vector.traverse (pure ∘ f) ⟨x, ⋯⟩ = pure (map f ⟨x, ⋯⟩)
cb0a8b9bac8faf9b
SetTheory.PGame.birthday_add
Mathlib/SetTheory/Game/Birthday.lean
theorem birthday_add : ∀ x y : PGame.{u}, (x + y).birthday = x.birthday ♯ y.birthday | ⟨xl, xr, xL, xR⟩, ⟨yl, yr, yL, yR⟩ => by rw [birthday_def, nadd, lsub_sum, lsub_sum] simp only [mk_add_moveLeft_inl, mk_add_moveLeft_inr, mk_add_moveRight_inl, mk_add_moveRight_inr, moveLeft_mk, moveRight_mk] conv_lhs => left; left; right; intro a; rw [birthday_add (xL a) ⟨yl, yr, yL, yR⟩] conv_lhs => left; right; right; intro b; rw [birthday_add ⟨xl, xr, xL, xR⟩ (yL b)] conv_lhs => right; left; right; intro a; rw [birthday_add (xR a) ⟨yl, yr, yL, yR⟩] conv_lhs => right; right; right; intro b; rw [birthday_add ⟨xl, xr, xL, xR⟩ (yR b)] rw [max_max_max_comm] congr <;> apply le_antisymm any_goals refine max_le_iff.2 ⟨?_, ?_⟩ all_goals refine lsub_le_iff.2 fun i ↦ ?_ rw [← Order.succ_le_iff] refine Ordinal.le_iSup (fun _ : Set.Iio _ ↦ _) ⟨_, ?_⟩ apply_rules [birthday_moveLeft_lt, birthday_moveRight_lt] all_goals rw [Ordinal.iSup_le_iff] rintro ⟨i, hi⟩ obtain ⟨j, hj⟩ | ⟨j, hj⟩ := lt_birthday_iff.1 hi <;> rw [Order.succ_le_iff] · exact lt_max_of_lt_left ((nadd_le_nadd_right hj _).trans_lt (lt_lsub _ _)) · exact lt_max_of_lt_right ((nadd_le_nadd_right hj _).trans_lt (lt_lsub _ _)) · exact lt_max_of_lt_left ((nadd_le_nadd_left hj _).trans_lt (lt_lsub _ _)) · exact lt_max_of_lt_right ((nadd_le_nadd_left hj _).trans_lt (lt_lsub _ _)) termination_by a b => (a, b)
case e_a.a.mk.inl.intro xl xr : Type u xL : xl → PGame xR : xr → PGame yl yr : Type u yL : yl → PGame yR : yr → PGame i : Ordinal.{u} hi : i ∈ Set.Iio (mk yl yr yL yR).birthday j : (mk yl yr yL yR).LeftMoves hj : i ≤ ((mk yl yr yL yR).moveLeft j).birthday ⊢ (mk xl xr xL xR).birthday ♯ ↑⟨i, hi⟩ < (lsub fun b => (mk xl xr xL xR).birthday ♯ (yL b).birthday) ⊔ lsub fun b => (mk xl xr xL xR).birthday ♯ (yR b).birthday
exact lt_max_of_lt_left ((nadd_le_nadd_left hj _).trans_lt (lt_lsub _ _))
no goals
33d4fe8b94c4ad64
dist_integral_mulExpNegMulSq_comp_le
Mathlib/Analysis/SpecialFunctions/MulExpNegMulSqIntegral.lean
theorem dist_integral_mulExpNegMulSq_comp_le (f : E →ᵇ ℝ) {A : Subalgebra ℝ C(E, ℝ)} (hA : A.SeparatesPoints) (hbound : ∀ g ∈ A, ∃ C, ∀ x y : E, dist (g x) (g y) ≤ C) (heq : ∀ g ∈ A, ∫ x, (g : E → ℝ) x ∂P = ∫ x, (g : E → ℝ) x ∂P') (hε : 0 < ε) : |∫ x, mulExpNegMulSq ε (f x) ∂P - ∫ x, mulExpNegMulSq ε (f x) ∂P'| ≤ 6 * sqrt ε
case neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro ε : ℝ E : Type u_2 inst✝⁶ : MeasurableSpace E inst✝⁵ : PseudoEMetricSpace E inst✝⁴ : BorelSpace E inst✝³ : CompleteSpace E inst✝² : SecondCountableTopology E P P' : Measure E inst✝¹ : IsFiniteMeasure P inst✝ : IsFiniteMeasure P' f : E →ᵇ ℝ A : Subalgebra ℝ C(E, ℝ) hA : A.SeparatesPoints hbound : ∀ g ∈ A, ∃ C, ∀ (x y : E), dist (g x) (g y) ≤ C heq : ∀ g ∈ A, ∫ (x : E), g x ∂P = ∫ (x : E), g x ∂P' hε : 0 < ε hPP' : ¬(P = 0 ∧ P' = 0) const : ℝ := (P Set.univ).toReal ⊔ (P' Set.univ).toReal pos_of_measure : 0 < const KP : Set E left✝¹ : KP ⊆ Set.univ hKPco : IsCompact KP hKPcl : IsClosed KP KP' : Set E left✝ : KP' ⊆ Set.univ hKP'co : IsCompact KP' hKP'cl : IsClosed KP' K : Set E := KP ∪ KP' hKco : IsCompact (KP ∪ KP') hKcl : IsClosed (KP ∪ KP') hKP : P KPᶜ < ENNReal.ofReal ε hKP' : P' KP'ᶜ < ENNReal.ofReal ε hKPbound : P (KP ∪ KP')ᶜ < ↑ε.toNNReal hKP'bound : P' (KP ∪ KP')ᶜ < ↑ε.toNNReal g : C(E, ℝ) hgA : g ∈ A hgapprox : ∀ x ∈ KP ∪ KP', ‖g x - f.toContinuousMap x‖ < √ε * const⁻¹ line1 : |∫ (x : E), ε.mulExpNegMulSq (f x) ∂P - ∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P| < √ε line3 : |∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P - ∫ (x : E), ε.mulExpNegMulSq (g x) ∂P| < √ε line5 : |∫ (x : E), ε.mulExpNegMulSq (g x) ∂P' - ∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P'| < √ε line7 : |∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P' - ∫ (x : E), ε.mulExpNegMulSq (f x) ∂P'| < √ε line2 : |∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P - ∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P| ≤ √ε line6 : |∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P' - ∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P'| ≤ √ε ⊢ |∫ (x : E), ε.mulExpNegMulSq (f x) ∂P - ∫ (x : E), ε.mulExpNegMulSq (f x) ∂P'| ≤ 6 * √ε
have line4 : |∫ x, mulExpNegMulSq ε (g x) ∂P - ∫ x, mulExpNegMulSq ε (g x) ∂P'| = 0 := by rw [abs_eq_zero, sub_eq_zero] exact integral_mulExpNegMulSq_comp_eq hε hbound heq hgA
case neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro ε : ℝ E : Type u_2 inst✝⁶ : MeasurableSpace E inst✝⁵ : PseudoEMetricSpace E inst✝⁴ : BorelSpace E inst✝³ : CompleteSpace E inst✝² : SecondCountableTopology E P P' : Measure E inst✝¹ : IsFiniteMeasure P inst✝ : IsFiniteMeasure P' f : E →ᵇ ℝ A : Subalgebra ℝ C(E, ℝ) hA : A.SeparatesPoints hbound : ∀ g ∈ A, ∃ C, ∀ (x y : E), dist (g x) (g y) ≤ C heq : ∀ g ∈ A, ∫ (x : E), g x ∂P = ∫ (x : E), g x ∂P' hε : 0 < ε hPP' : ¬(P = 0 ∧ P' = 0) const : ℝ := (P Set.univ).toReal ⊔ (P' Set.univ).toReal pos_of_measure : 0 < const KP : Set E left✝¹ : KP ⊆ Set.univ hKPco : IsCompact KP hKPcl : IsClosed KP KP' : Set E left✝ : KP' ⊆ Set.univ hKP'co : IsCompact KP' hKP'cl : IsClosed KP' K : Set E := KP ∪ KP' hKco : IsCompact (KP ∪ KP') hKcl : IsClosed (KP ∪ KP') hKP : P KPᶜ < ENNReal.ofReal ε hKP' : P' KP'ᶜ < ENNReal.ofReal ε hKPbound : P (KP ∪ KP')ᶜ < ↑ε.toNNReal hKP'bound : P' (KP ∪ KP')ᶜ < ↑ε.toNNReal g : C(E, ℝ) hgA : g ∈ A hgapprox : ∀ x ∈ KP ∪ KP', ‖g x - f.toContinuousMap x‖ < √ε * const⁻¹ line1 : |∫ (x : E), ε.mulExpNegMulSq (f x) ∂P - ∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P| < √ε line3 : |∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P - ∫ (x : E), ε.mulExpNegMulSq (g x) ∂P| < √ε line5 : |∫ (x : E), ε.mulExpNegMulSq (g x) ∂P' - ∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P'| < √ε line7 : |∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P' - ∫ (x : E), ε.mulExpNegMulSq (f x) ∂P'| < √ε line2 : |∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P - ∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P| ≤ √ε line6 : |∫ (x : E) in K, ε.mulExpNegMulSq (g x) ∂P' - ∫ (x : E) in K, ε.mulExpNegMulSq (f x) ∂P'| ≤ √ε line4 : |∫ (x : E), ε.mulExpNegMulSq (g x) ∂P - ∫ (x : E), ε.mulExpNegMulSq (g x) ∂P'| = 0 ⊢ |∫ (x : E), ε.mulExpNegMulSq (f x) ∂P - ∫ (x : E), ε.mulExpNegMulSq (f x) ∂P'| ≤ 6 * √ε
6c7688b02378f81c
CategoryTheory.Square.IsPushout.epi_f₃₄
Mathlib/CategoryTheory/Limits/Shapes/Pullback/Square.lean
lemma epi_f₃₄ [Epi sq.f₁₂] : Epi sq.f₃₄
C : Type u inst✝¹ : Category.{v, u} C sq : Square C h : sq.IsPushout inst✝ : Epi sq.f₁₂ ⊢ Epi sq.f₁₂
infer_instance
no goals
1030623dfd6a47bd
MeasurableSpace.exists_countablyGenerated_le_of_countablySeparated
Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
theorem exists_countablyGenerated_le_of_countablySeparated [m : MeasurableSpace α] [h : CountablySeparated α] : ∃ m' : MeasurableSpace α, @CountablyGenerated _ m' ∧ @SeparatesPoints _ m' ∧ m' ≤ m
α : Type u_1 m : MeasurableSpace α h : CountablySeparated α ⊢ ∃ m', CountablyGenerated α ∧ SeparatesPoints α ∧ m' ≤ m
rcases h with ⟨b, bct, hbm, hb⟩
case mk.mk.intro.intro.intro α : Type u_1 m : MeasurableSpace α b : Set (Set α) bct : b.Countable hbm : ∀ s ∈ b, MeasurableSet s hb : ∀ x ∈ univ, ∀ y ∈ univ, (∀ s ∈ b, x ∈ s ↔ y ∈ s) → x = y ⊢ ∃ m', CountablyGenerated α ∧ SeparatesPoints α ∧ m' ≤ m
103b898a8ad5e28e
TopologicalSpace.IsTopologicalBasis.isRetrocompact_iff_isCompact'
Mathlib/Topology/Constructible.lean
/-- Variant of `TopologicalSpace.IsTopologicalBasis.isRetrocompact_iff_isCompact` for a non-indexed topological basis. -/ @[stacks 0069 "Iff form of (2). Note that Stacks doesn't define quasi-separated spaces."] lemma _root_.TopologicalSpace.IsTopologicalBasis.isRetrocompact_iff_isCompact' (basis : IsTopologicalBasis B) (isCompact_basis : ∀ U ∈ B, IsCompact U) (hU : IsOpen U) : IsRetrocompact U ↔ IsCompact U
case intro.intro X : Type u_2 inst✝² : TopologicalSpace X inst✝¹ : CompactSpace X B : Set (Set X) inst✝ : QuasiSeparatedSpace X basis : IsTopologicalBasis B isCompact_basis : ∀ U ∈ B, IsCompact U s : Finset ↑B hU : IsOpen (⋃₀ (Subtype.val '' ↑s)) hU' : IsCompact (⋃₀ (Subtype.val '' ↑s)) t : Finset ↑B hV' : IsCompact (⋃₀ (Subtype.val '' ↑t)) hV : IsOpen (⋃₀ (Subtype.val '' ↑t)) ⊢ ∀ (a b : Set X) (x : a ∈ B), ⟨a, ⋯⟩ ∈ s → ∀ (x : b ∈ B), ⟨b, ⋯⟩ ∈ t → IsCompact (a ∩ b)
exact fun u v hu _ hv _ ↦ (isCompact_basis _ hu).inter_of_isOpen (isCompact_basis _ hv) (basis.isOpen hu) (basis.isOpen hv)
no goals
b008df29a824ef72
IsDedekindDomain.HeightOneSpectrum.intValuation_exists_uniformizer
Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
theorem intValuation_exists_uniformizer : ∃ π : R, v.intValuationDef π = Multiplicative.ofAdd (-1 : ℤ)
case intro.intro R : Type u_1 inst✝¹ : CommRing R inst✝ : IsDedekindDomain R v : HeightOneSpectrum R hv : Irreducible (Associates.mk v.asIdeal) hlt : v.asIdeal ^ 2 < v.asIdeal π : R mem : π ∈ v.asIdeal nmem : π ∉ v.asIdeal ^ 2 ⊢ ∃ π, v.intValuationDef π = ↑(ofAdd (-1))
have hπ : Associates.mk (Ideal.span {π}) ≠ 0 := by rw [Associates.mk_ne_zero'] intro h rw [h] at nmem exact nmem (Submodule.zero_mem (v.asIdeal ^ 2))
case intro.intro R : Type u_1 inst✝¹ : CommRing R inst✝ : IsDedekindDomain R v : HeightOneSpectrum R hv : Irreducible (Associates.mk v.asIdeal) hlt : v.asIdeal ^ 2 < v.asIdeal π : R mem : π ∈ v.asIdeal nmem : π ∉ v.asIdeal ^ 2 hπ : Associates.mk (Ideal.span {π}) ≠ 0 ⊢ ∃ π, v.intValuationDef π = ↑(ofAdd (-1))
2c1cd36bab64f29a
EuclideanGeometry.dist_inversion_center
Mathlib/Geometry/Euclidean/Inversion/Basic.lean
theorem dist_inversion_center (c x : P) (R : ℝ) : dist (inversion c R x) c = R ^ 2 / dist x c
case inr V : Type u_1 P : Type u_2 inst✝³ : NormedAddCommGroup V inst✝² : InnerProductSpace ℝ V inst✝¹ : MetricSpace P inst✝ : NormedAddTorsor V P c x : P R : ℝ hx : x ≠ c ⊢ dist (inversion c R x) c = R ^ 2 / dist x c
have : dist x c ≠ 0 := dist_ne_zero.2 hx
case inr V : Type u_1 P : Type u_2 inst✝³ : NormedAddCommGroup V inst✝² : InnerProductSpace ℝ V inst✝¹ : MetricSpace P inst✝ : NormedAddTorsor V P c x : P R : ℝ hx : x ≠ c this : dist x c ≠ 0 ⊢ dist (inversion c R x) c = R ^ 2 / dist x c
38c6af8d5e5eb07f
spectrum.zero_eq
Mathlib/Algebra/Algebra/Spectrum.lean
theorem zero_eq [Nontrivial A] : σ (0 : A) = {0}
𝕜 : Type u A : Type v inst✝³ : Field 𝕜 inst✝² : Ring A inst✝¹ : Algebra 𝕜 A inst✝ : Nontrivial A ⊢ {0}ᶜ ⊆ resolventSet 𝕜 0
intro k hk
𝕜 : Type u A : Type v inst✝³ : Field 𝕜 inst✝² : Ring A inst✝¹ : Algebra 𝕜 A inst✝ : Nontrivial A k : 𝕜 hk : k ∈ {0}ᶜ ⊢ k ∈ resolventSet 𝕜 0
a45fede128332273
List.nodupKeys_dedupKeys
Mathlib/Data/List/Sigma.lean
theorem nodupKeys_dedupKeys (l : List (Sigma β)) : NodupKeys (dedupKeys l)
α : Type u β : α → Type v inst✝ : DecidableEq α l : List (Sigma β) ⊢ (foldr (fun x => kinsert x.fst x.snd) [] l).NodupKeys
generalize hl : nil = l'
α : Type u β : α → Type v inst✝ : DecidableEq α l : List (Sigma β) l' : List (Sigma β) hl : [] = l' ⊢ (foldr (fun x => kinsert x.fst x.snd) l' l).NodupKeys
32ee2d0af20e0dd7
SemiNormedGrp₁.isZero_of_subsingleton
Mathlib/Analysis/Normed/Group/SemiNormedGrp.lean
theorem isZero_of_subsingleton (V : SemiNormedGrp₁) [Subsingleton V] : Limits.IsZero V
case refine_1.hf.a.H V : SemiNormedGrp₁ inst✝ : Subsingleton V.carrier X : SemiNormedGrp₁ f : V ⟶ X x : V.carrier this : x = 0 ⊢ ↑(Hom.hom f) x = ↑(Hom.hom default) x
simp only [this, map_zero]
no goals
043b015c5f914c60
MeasureTheory.IsProjectiveMeasureFamily.eq_zero_of_isEmpty
Mathlib/MeasureTheory/Constructions/Projective.lean
lemma eq_zero_of_isEmpty [h : IsEmpty (Π i, α i)] (hP : IsProjectiveMeasureFamily P) (I : Finset ι) : P I = 0
case intro ι : Type u_1 α : ι → Type u_2 inst✝ : (i : ι) → MeasurableSpace (α i) P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j) h : IsEmpty ((i : ι) → α i) hP : IsProjectiveMeasureFamily P I : Finset ι i : ι hi : IsEmpty (α i) ⊢ P I = 0
rw [hP (insert i I) I (I.subset_insert i)]
case intro ι : Type u_1 α : ι → Type u_2 inst✝ : (i : ι) → MeasurableSpace (α i) P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j) h : IsEmpty ((i : ι) → α i) hP : IsProjectiveMeasureFamily P I : Finset ι i : ι hi : IsEmpty (α i) ⊢ Measure.map (Finset.restrict₂ ⋯) (P (insert i I)) = 0
898c26f281fd761c
LinearIndependent.of_comp
Mathlib/LinearAlgebra/LinearIndependent/Defs.lean
theorem LinearIndependent.of_comp (f : M →ₗ[R] M') (hfv : LinearIndependent R (f ∘ v)) : LinearIndependent R v
ι : Type u' R : Type u_2 M : Type u_4 M' : Type u_5 v : ι → M inst✝⁴ : Semiring R inst✝³ : AddCommMonoid M inst✝² : AddCommMonoid M' inst✝¹ : Module R M inst✝ : Module R M' f : M →ₗ[R] M' hfv : LinearIndependent R (⇑f ∘ v) ⊢ LinearIndependent R v
rw [LinearIndependent, Finsupp.linearCombination_linear_comp, LinearMap.coe_comp] at hfv
ι : Type u' R : Type u_2 M : Type u_4 M' : Type u_5 v : ι → M inst✝⁴ : Semiring R inst✝³ : AddCommMonoid M inst✝² : AddCommMonoid M' inst✝¹ : Module R M inst✝ : Module R M' f : M →ₗ[R] M' hfv : Injective (⇑f ∘ ⇑(Finsupp.linearCombination R v)) ⊢ LinearIndependent R v
ae1e4341bbf2fa45
Matrix.zpow_add
Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zpow_add {A : M} (ha : IsUnit A.det) (m n : ℤ) : A ^ (m + n) = A ^ m * A ^ n
case hz n' : Type u_1 inst✝² : DecidableEq n' inst✝¹ : Fintype n' R : Type u_2 inst✝ : CommRing R A : M ha : IsUnit A.det m : ℤ ⊢ A ^ (m + 0) = A ^ m * A ^ 0
simp
no goals
825209b07812538f
aestronglyMeasurable_withDensity_iff
Mathlib/MeasureTheory/Function/StronglyMeasurable/Lemmas.lean
theorem aestronglyMeasurable_withDensity_iff {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : α → ℝ≥0} (hf : Measurable f) {g : α → E} : AEStronglyMeasurable g (μ.withDensity fun x => (f x : ℝ≥0∞)) ↔ AEStronglyMeasurable (fun x => (f x : ℝ) • g x) μ
case h α : Type u_1 m : MeasurableSpace α μ : Measure α E : Type u_4 inst✝¹ : NormedAddCommGroup E inst✝ : NormedSpace ℝ E f : α → ℝ≥0 hf : Measurable f g g' : α → E g'meas : StronglyMeasurable g' hg' : ∀ᵐ (x : α) ∂μ, ↑(f x) ≠ 0 → g x = g' x A : MeasurableSet {x | f x ≠ 0} a : α ha : ↑(f a) ≠ 0 → g a = g' a h'a : f a ≠ 0 this : ↑(f a) ≠ 0 ⊢ ↑(f a) • g a = ↑(f a) • g' a
rw [ha this]
no goals
7323180b64a0b378
MonoidAlgebra.mul_apply_antidiagonal
Mathlib/Algebra/MonoidAlgebra/Defs.lean
theorem mul_apply_antidiagonal [Mul G] (f g : MonoidAlgebra k G) (x : G) (s : Finset (G × G)) (hs : ∀ {p : G × G}, p ∈ s ↔ p.1 * p.2 = x) : (f * g) x = ∑ p ∈ s, f p.1 * g p.2
case pos k : Type u₁ G : Type u₂ inst✝¹ : Semiring k inst✝ : Mul G f g : MonoidAlgebra k G x : G s : Finset (G × G) hs : ∀ {p : G × G}, p ∈ s ↔ p.1 * p.2 = x F : G × G → k := fun p => if p.1 * p.2 = x then f p.1 * g p.2 else 0 p : G × G hps : p ∈ s hp : p ∈ s → f p.1 ≠ 0 → g p.2 = 0 h1 : f p.1 = 0 ⊢ f p.1 * g p.2 = 0
rw [h1, zero_mul]
no goals
9d57548495c4125c
Equiv.Perm.Disjoint.cycleOf_mul_distrib
Mathlib/GroupTheory/Perm/Cycle/Factors.lean
theorem Disjoint.cycleOf_mul_distrib [DecidableRel f.SameCycle] [DecidableRel g.SameCycle] [DecidableRel (f * g).SameCycle] [DecidableRel (g * f).SameCycle] (h : f.Disjoint g) (x : α) : (f * g).cycleOf x = f.cycleOf x * g.cycleOf x
α : Type u_2 f g : Perm α inst✝³ : DecidableRel f.SameCycle inst✝² : DecidableRel g.SameCycle inst✝¹ : DecidableRel (f * g).SameCycle inst✝ : DecidableRel (g * f).SameCycle h : f.Disjoint g x : α ⊢ (f * g).cycleOf x = f.cycleOf x * g.cycleOf x
rcases (disjoint_iff_eq_or_eq.mp h) x with hfx | hgx
case inl α : Type u_2 f g : Perm α inst✝³ : DecidableRel f.SameCycle inst✝² : DecidableRel g.SameCycle inst✝¹ : DecidableRel (f * g).SameCycle inst✝ : DecidableRel (g * f).SameCycle h : f.Disjoint g x : α hfx : f x = x ⊢ (f * g).cycleOf x = f.cycleOf x * g.cycleOf x case inr α : Type u_2 f g : Perm α inst✝³ : DecidableRel f.SameCycle inst✝² : DecidableRel g.SameCycle inst✝¹ : DecidableRel (f * g).SameCycle inst✝ : DecidableRel (g * f).SameCycle h : f.Disjoint g x : α hgx : g x = x ⊢ (f * g).cycleOf x = f.cycleOf x * g.cycleOf x
85be380522875376
CategoryTheory.Limits.hasProduct_of_equiv_of_iso
Mathlib/CategoryTheory/Limits/Shapes/Products.lean
lemma hasProduct_of_equiv_of_iso (f : α → C) (g : β → C) [HasProduct f] (e : β ≃ α) (iso : ∀ j, g j ≅ f (e j)) : HasProduct g
β : Type w α✝ : Type w₂ C : Type u inst✝¹ : Category.{v, u} C f : α✝ → C g : β → C inst✝ : HasProduct f e : β ≃ α✝ iso : (j : β) → g j ≅ f (e j) this : HasLimit ((Discrete.equivalence e).functor ⋙ Discrete.functor f) α : Discrete.functor g ≅ (Discrete.equivalence e).functor ⋙ Discrete.functor f ⊢ HasProduct g
exact hasLimitOfIso α.symm
no goals
99fd822bbe5fac16
monotoneOn_of_sub_one_le
Mathlib/Algebra/Order/SuccPred.lean
lemma monotoneOn_of_sub_one_le (hs : s.OrdConnected) : (∀ a, ¬ IsMin a → a ∈ s → a - 1 ∈ s → f (a - 1) ≤ f a) → MonotoneOn f s
α : Type u_2 β : Type u_3 inst✝⁵ : PartialOrder α inst✝⁴ : Preorder β inst✝³ : Sub α inst✝² : One α inst✝¹ : PredSubOrder α inst✝ : IsPredArchimedean α s : Set α f : α → β hs : s.OrdConnected ⊢ (∀ (a : α), ¬IsMin a → a ∈ s → a - 1 ∈ s → f (a - 1) ≤ f a) → MonotoneOn f s
simpa [Order.pred_eq_sub_one] using monotoneOn_of_pred_le hs (f := f)
no goals
5da4af8c353feb02
IsCyclic.normalizer_le_centralizer
Mathlib/GroupTheory/Transfer.lean
theorem normalizer_le_centralizer (hP : IsCyclic P) : P.normalizer ≤ centralizer (P : Set G)
case neg G : Type u_3 inst✝¹ : Group G inst✝ : Finite G P : Sylow (Nat.card G).minFac G hP : IsCyclic ↥↑P hn : ¬Nat.card G = 1 this : Fact (Nat.Prime (Nat.card G).minFac) key : Nat.card (↥(↑P).normalizer ⧸ (↑P).normalizerMonoidHom.ker) ∣ Nat.card (MulAut ↥↑P) ⊢ (↑P).normalizer ≤ centralizer ↑P
rw [normalizerMonoidHom_ker, ← index, ← relindex] at key
case neg G : Type u_3 inst✝¹ : Group G inst✝ : Finite G P : Sylow (Nat.card G).minFac G hP : IsCyclic ↥↑P hn : ¬Nat.card G = 1 this : Fact (Nat.Prime (Nat.card G).minFac) key : (centralizer ↑↑P).relindex (↑P).normalizer ∣ Nat.card (MulAut ↥↑P) ⊢ (↑P).normalizer ≤ centralizer ↑P
319753e59f979dd9
fastJacobiSymAux.eq_jacobiSym
Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean
theorem fastJacobiSymAux.eq_jacobiSym {a b : ℕ} {flip : Bool} {ha0 : a > 0} (hb2 : b % 2 = 1) (hb1 : b > 1) : fastJacobiSymAux a b flip ha0 = if flip then -J(a | b) else J(a | b)
case ind.isFalse.isFalse.isFalse.isTrue a : ℕ IH : ∀ m < a, ∀ {b : ℕ} {flip : Bool} {ha0 : m > 0}, b % 2 = 1 → b > 1 → fastJacobiSymAux m b flip ha0 = if flip = true then -J(↑m | b) else J(↑m | b) b : ℕ flip : Bool ha0 : a > 0 hb2 : b % 2 = 1 hb1 : b > 1 ha4 : ¬a % 4 = 0 ha2 : ¬a % 2 = 0 ha1 : ¬a = 1 hba : b % a = 0 ⊢ 0 = if flip = true then -J(↑a | b) else J(↑a | b)
suffices J(a | b) = 0 by simp [this]
case ind.isFalse.isFalse.isFalse.isTrue a : ℕ IH : ∀ m < a, ∀ {b : ℕ} {flip : Bool} {ha0 : m > 0}, b % 2 = 1 → b > 1 → fastJacobiSymAux m b flip ha0 = if flip = true then -J(↑m | b) else J(↑m | b) b : ℕ flip : Bool ha0 : a > 0 hb2 : b % 2 = 1 hb1 : b > 1 ha4 : ¬a % 4 = 0 ha2 : ¬a % 2 = 0 ha1 : ¬a = 1 hba : b % a = 0 ⊢ J(↑a | b) = 0
eb8492f9d280dbdb
Polynomial.irreducible_iff_lt_natDegree_lt
Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem irreducible_iff_lt_natDegree_lt {p : R[X]} (hp0 : p ≠ 0) (hpu : ¬ IsUnit p) : Irreducible p ↔ ∀ q, Monic q → natDegree q ∈ Finset.Ioc 0 (natDegree p / 2) → ¬ q ∣ p
R : Type u inst✝ : Field R p : R[X] hp0 : p ≠ 0 hpu : ¬IsUnit p ⊢ p * C p.leadingCoeff⁻¹ ≠ 1
contrapose! hpu
R : Type u inst✝ : Field R p : R[X] hp0 : p ≠ 0 hpu : p * C p.leadingCoeff⁻¹ = 1 ⊢ IsUnit p
2c75e02ddb99f96c
List.Sublist.lookup_eq_none
Mathlib/.lake/packages/lean4/src/lean/Init/Data/List/Find.lean
theorem Sublist.lookup_eq_none {l₁ l₂ : List (α × β)} (h : l₁ <+ l₂) : l₂.lookup k = none → l₁.lookup k = none
α : Type u_2 inst✝¹ : BEq α inst✝ : LawfulBEq α β : Type u_1 k : α l₁ l₂ : List (α × β) h : l₁ <+ l₂ ⊢ findSome? (fun p => if (k == p.fst) = true then some p.snd else none) l₂ = none → findSome? (fun p => if (k == p.fst) = true then some p.snd else none) l₁ = none
exact h.findSome?_eq_none
no goals
f5e6da48595de346
convexJoin_right_comm
Mathlib/Analysis/Convex/Join.lean
theorem convexJoin_right_comm (s t u : Set E) : convexJoin 𝕜 (convexJoin 𝕜 s t) u = convexJoin 𝕜 (convexJoin 𝕜 s u) t
𝕜 : Type u_2 E : Type u_3 inst✝² : LinearOrderedField 𝕜 inst✝¹ : AddCommGroup E inst✝ : Module 𝕜 E s t u : Set E ⊢ convexJoin 𝕜 (convexJoin 𝕜 s t) u = convexJoin 𝕜 (convexJoin 𝕜 s u) t
simp_rw [convexJoin_assoc, convexJoin_comm]
no goals
ee37511d3262b5dd
CategoryTheory.IsVanKampenColimit.of_iso
Mathlib/CategoryTheory/Limits/VanKampen.lean
theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKampenColimit c) (e : c ≅ c') : IsVanKampenColimit c'
J : Type v' inst✝¹ : Category.{u', v'} J C : Type u inst✝ : Category.{v, u} C F : J ⥤ C c c' : Cocone F H : IsVanKampenColimit c e : c ≅ c' ⊢ IsVanKampenColimit c'
intro F' c'' α f h hα
J : Type v' inst✝¹ : Category.{u', v'} J C : Type u inst✝ : Category.{v, u} C F : J ⥤ C c c' : Cocone F H : IsVanKampenColimit c e : c ≅ c' F' : J ⥤ C c'' : Cocone F' α : F' ⟶ F f : c''.pt ⟶ c'.pt h : α ≫ c'.ι = c''.ι ≫ (Functor.const J).map f hα : NatTrans.Equifibered α ⊢ Nonempty (IsColimit c'') ↔ ∀ (j : J), IsPullback (c''.ι.app j) (α.app j) f (c'.ι.app j)
256639f190b732be
Polynomial.Monic.not_irreducible_iff_exists_add_mul_eq_coeff
Mathlib/Algebra/Polynomial/Monic.lean
lemma Monic.not_irreducible_iff_exists_add_mul_eq_coeff (hm : p.Monic) (hnd : p.natDegree = 2) : ¬Irreducible p ↔ ∃ c₁ c₂, p.coeff 0 = c₁ * c₂ ∧ p.coeff 1 = c₁ + c₂
case inr.mp.intro.intro.intro.intro.intro R : Type u inst✝¹ : CommSemiring R inst✝ : NoZeroDivisors R h✝ : Nontrivial R a b : R[X] ha : a.Monic hb : b.Monic hdb : b.natDegree ∈ Ioc 0 (2 / 2) hm : (a * b).Monic hnd : (a * b).natDegree = 2 ⊢ ∃ c₁ c₂, (a * b).coeff 0 = c₁ * c₂ ∧ (a * b).coeff 1 = c₁ + c₂
simp only [zero_lt_two, Nat.div_self, Nat.Ioc_succ_singleton, zero_add, mem_singleton] at hdb
case inr.mp.intro.intro.intro.intro.intro R : Type u inst✝¹ : CommSemiring R inst✝ : NoZeroDivisors R h✝ : Nontrivial R a b : R[X] ha : a.Monic hb : b.Monic hm : (a * b).Monic hnd : (a * b).natDegree = 2 hdb : b.natDegree = 1 ⊢ ∃ c₁ c₂, (a * b).coeff 0 = c₁ * c₂ ∧ (a * b).coeff 1 = c₁ + c₂
4179f7de5fe1c617
Opens.pretopology_ofGrothendieck
Mathlib/CategoryTheory/Sites/Spaces.lean
theorem pretopology_ofGrothendieck : Pretopology.ofGrothendieck _ (Opens.grothendieckTopology T) = Opens.pretopology T
case a T : Type u inst✝ : TopologicalSpace T X : Opens T R : Presieve X hR : R ∈ (Pretopology.ofGrothendieck (Opens T) (grothendieckTopology T)).coverings X x : T hx : x ∈ X ⊢ ∃ U f, R f ∧ x ∈ U
rcases hR x hx with ⟨U, f, ⟨V, g₁, g₂, hg₂, _⟩, hU⟩
case a.intro.intro.intro.intro.intro.intro.intro T : Type u inst✝ : TopologicalSpace T X : Opens T R : Presieve X hR : R ∈ (Pretopology.ofGrothendieck (Opens T) (grothendieckTopology T)).coverings X x : T hx : x ∈ X U : Opens T f : U ⟶ X hU : x ∈ U V : Opens T g₁ : U ⟶ V g₂ : V ⟶ X hg₂ : R g₂ right✝ : g₁ ≫ g₂ = f ⊢ ∃ U f, R f ∧ x ∈ U
b501eae4e0ee380f
Polynomial.cyclotomic_pos
Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
theorem cyclotomic_pos {n : ℕ} (hn : 2 < n) {R} [LinearOrderedCommRing R] (x : R) : 0 < eval x (cyclotomic n R)
case h.inl.h R : Type u_1 inst✝ : LinearOrderedCommRing R x : R n : ℕ ih : ∀ m < n, 2 < m → 0 < eval x (cyclotomic m R) hn : 2 < n hn' : 0 < n hn'' : 1 < n this : eval x (cyclotomic n R) * eval x (∏ x ∈ n.properDivisors.erase 1, cyclotomic x R) = ∑ i ∈ range n, x ^ i h : 0 < ∑ i ∈ range n, x ^ i ⊢ 0 < eval x (cyclotomic n R) * ?h.inl.b
rwa [this]
no goals
0959ed2b08a19c09
Polynomial.isJacobsonRing_polynomial_of_isJacobsonRing
Mathlib/RingTheory/Jacobson/Ring.lean
theorem isJacobsonRing_polynomial_of_isJacobsonRing (hR : IsJacobsonRing R) : IsJacobsonRing R[X]
R : Type u_1 inst✝ : CommRing R hR : IsJacobsonRing R I : Ideal R[X] hI : I.IsPrime R' : Subring (R[X] ⧸ I) := ((Ideal.Quotient.mk I).comp C).range i : R →+* ↥R' := ((Ideal.Quotient.mk I).comp C).rangeRestrict hi : Function.Surjective ⇑i ⊢ I.jacobson = I
have hi' : RingHom.ker (mapRingHom i) ≤ I := by intro f hf apply polynomial_mem_ideal_of_coeff_mem_ideal I f intro n replace hf := congrArg (fun g : Polynomial ((Ideal.Quotient.mk I).comp C).range => g.coeff n) hf change (Polynomial.map ((Ideal.Quotient.mk I).comp C).rangeRestrict f).coeff n = 0 at hf rw [coeff_map, Subtype.ext_iff] at hf rwa [mem_comap, ← Quotient.eq_zero_iff_mem, ← RingHom.comp_apply]
R : Type u_1 inst✝ : CommRing R hR : IsJacobsonRing R I : Ideal R[X] hI : I.IsPrime R' : Subring (R[X] ⧸ I) := ((Ideal.Quotient.mk I).comp C).range i : R →+* ↥R' := ((Ideal.Quotient.mk I).comp C).rangeRestrict hi : Function.Surjective ⇑i hi' : RingHom.ker (mapRingHom i) ≤ I ⊢ I.jacobson = I
60e32d0d54e0756e
bsupr_limsup_dimH
Mathlib/Topology/MetricSpace/HausdorffDimension.lean
theorem bsupr_limsup_dimH (s : Set X) : ⨆ x ∈ s, limsup dimH (𝓝[s] x).smallSets = dimH s
case refine_2 X : Type u_2 inst✝¹ : EMetricSpace X inst✝ : SecondCountableTopology X s : Set X r : ℝ≥0∞ hr : r < dimH s ⊢ r ≤ ⨆ x ∈ s, limsup dimH (𝓝[s] x).smallSets
rcases exists_mem_nhdsWithin_lt_dimH_of_lt_dimH hr with ⟨x, hxs, hxr⟩
case refine_2.intro.intro X : Type u_2 inst✝¹ : EMetricSpace X inst✝ : SecondCountableTopology X s : Set X r : ℝ≥0∞ hr : r < dimH s x : X hxs : x ∈ s hxr : ∀ t ∈ 𝓝[s] x, r < dimH t ⊢ r ≤ ⨆ x ∈ s, limsup dimH (𝓝[s] x).smallSets
ce953fa85a665a27
Ordinal.iSup_nadd_of_monotone
Mathlib/SetTheory/Ordinal/NaturalOps.lean
theorem iSup_nadd_of_monotone {a b} (f : Ordinal.{u} → Ordinal.{u}) (h : Monotone f) : ⨆ x : Iio (a ♯ b), f x = max (⨆ a' : Iio a, f (a'.1 ♯ b)) (⨆ b' : Iio b, f (a ♯ b'.1))
case mk.inl.intro.intro a b : Ordinal.{u} f : Ordinal.{u} → Ordinal.{u} h : Monotone f i : Ordinal.{u} hi✝ : i ∈ Iio (a ♯ b) x : Ordinal.{u} hx : x < a hi : i ≤ x ♯ b ⊢ f ↑⟨i, hi✝⟩ ≤ (⨆ a', f (↑a' ♯ b)) ⊔ ⨆ b', f (a ♯ ↑b')
exact le_max_of_le_left ((h hi).trans <| Ordinal.le_iSup (fun x : Iio a ↦ _) ⟨x, hx⟩)
no goals
7c2661beebea9618
Fin.heq_fun_iff
Mathlib/Data/Fin/Basic.lean
theorem heq_fun_iff {α : Sort*} {k l : ℕ} (h : k = l) {f : Fin k → α} {g : Fin l → α} : HEq f g ↔ ∀ i : Fin k, f i = g ⟨(i : ℕ), h ▸ i.2⟩
α : Sort u_1 k l : ℕ h : k = l f : Fin k → α g : Fin l → α ⊢ HEq f g ↔ ∀ (i : Fin k), f i = g ⟨↑i, ⋯⟩
subst h
α : Sort u_1 k : ℕ f g : Fin k → α ⊢ HEq f g ↔ ∀ (i : Fin k), f i = g ⟨↑i, ⋯⟩
46fa2fb1b0d128c9