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
Module.End.injOn_genEigenspace
Mathlib/LinearAlgebra/Eigenspace/Basic.lean
lemma injOn_genEigenspace [NoZeroSMulDivisors R M] (f : End R M) (k : ℕ∞) : InjOn (f.genEigenspace · k) {μ | f.genEigenspace μ k ≠ ⊥}
R : Type v M : Type w inst✝³ : CommRing R inst✝² : AddCommGroup M inst✝¹ : Module R M inst✝ : NoZeroSMulDivisors R M f : End R M k : ℕ∞ ⊢ InjOn (fun x => (f.genEigenspace x) k) {μ | (f.genEigenspace μ) k ≠ ⊥}
rintro μ₁ _ μ₂ hμ₂ hμ₁₂
R : Type v M : Type w inst✝³ : CommRing R inst✝² : AddCommGroup M inst✝¹ : Module R M inst✝ : NoZeroSMulDivisors R M f : End R M k : ℕ∞ μ₁ : R a✝ : μ₁ ∈ {μ | (f.genEigenspace μ) k ≠ ⊥} μ₂ : R hμ₂ : μ₂ ∈ {μ | (f.genEigenspace μ) k ≠ ⊥} hμ₁₂ : (fun x => (f.genEigenspace x) k) μ₁ = (fun x => (f.genEigenspace x) k) μ₂ ⊢ μ₁ = μ₂
a0c686e86c7fd170
Set.unbounded_lt_iff
Mathlib/Order/Bounded.lean
theorem unbounded_lt_iff [LinearOrder α] : Unbounded (· < ·) s ↔ ∀ a, ∃ b ∈ s, a ≤ b
α : Type u_1 s : Set α inst✝ : LinearOrder α ⊢ Unbounded (fun x1 x2 => x1 < x2) s ↔ ∀ (a : α), ∃ b ∈ s, a ≤ b
simp only [Unbounded, not_lt]
no goals
b1b0ca051c937751
Std.DHashMap.Raw.Const.size_le_size_insertMany_list
Mathlib/.lake/packages/lean4/src/lean/Std/Data/DHashMap/RawLemmas.lean
theorem size_le_size_insertMany_list [EquivBEq α] [LawfulHashable α] (h : m.WF) {l : List (α × β)} : m.size ≤ (insertMany m l).size
α : Type u inst✝³ : BEq α inst✝² : Hashable α β : Type v m : Raw α fun x => β inst✝¹ : EquivBEq α inst✝ : LawfulHashable α h : m.WF l : List (α × β) ⊢ m.size ≤ (insertMany m l).size
simp_to_raw using Raw₀.Const.size_le_size_insertMany_list ⟨m, _⟩
no goals
a2a816818387ca7a
Std.DHashMap.Internal.List.getValueCast?_insertList_of_mem
Mathlib/.lake/packages/lean4/src/lean/Std/Data/DHashMap/Internal/List/Associative.lean
theorem getValueCast?_insertList_of_mem [BEq α] [LawfulBEq α] {l toInsert : List ((a : α) × β a)} {k k' : α} (k_beq : k == k') {v : β k} (distinct_l : DistinctKeys l) (distinct_toInsert : toInsert.Pairwise (fun a b => (a.1 == b.1) = false)) (mem : ⟨k, v⟩ ∈ toInsert) : getValueCast? k' (insertList l toInsert) = some (cast (by congr; exact LawfulBEq.eq_of_beq k_beq) v)
α : Type u β : α → Type v inst✝¹ : BEq α inst✝ : LawfulBEq α l toInsert : List ((a : α) × β a) k k' : α k_beq : (k == k') = true v : β k distinct_l : DistinctKeys l distinct_toInsert : DistinctKeys toInsert mem : ⟨k, v⟩ ∈ toInsert this : getEntry? k' (insertList l toInsert) = getEntry? k' toInsert ⊢ (Std.DHashMap.Internal.List.Option.dmap (getEntry? k' (insertList l toInsert)) fun p h => cast ⋯ p.snd) = some (cast ⋯ v)
rw [getEntry?_of_mem distinct_toInsert k_beq mem] at this
α : Type u β : α → Type v inst✝¹ : BEq α inst✝ : LawfulBEq α l toInsert : List ((a : α) × β a) k k' : α k_beq : (k == k') = true v : β k distinct_l : DistinctKeys l distinct_toInsert : DistinctKeys toInsert mem : ⟨k, v⟩ ∈ toInsert this : getEntry? k' (insertList l toInsert) = some ⟨k, v⟩ ⊢ (Std.DHashMap.Internal.List.Option.dmap (getEntry? k' (insertList l toInsert)) fun p h => cast ⋯ p.snd) = some (cast ⋯ v)
82c18001be4198ba
rootsOfUnity.integer_power_of_ringEquiv
Mathlib/NumberTheory/Cyclotomic/CyclotomicCharacter.lean
theorem rootsOfUnity.integer_power_of_ringEquiv (g : L ≃+* L) : ∃ m : ℤ, ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ m : Lˣ)
case intro L : Type u inst✝² : CommRing L inst✝¹ : IsDomain L n : ℕ inst✝ : NeZero n g : L ≃+* L m : ℤ hm : ∀ (g_1 : ↥(rootsOfUnity n L)), ((↑g).restrictRootsOfUnity n).toMonoidHom g_1 = g_1 ^ m ⊢ ∃ m, ∀ (t : ↥(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ m)
exact ⟨m, fun t ↦ Units.ext_iff.1 <| SetCoe.ext_iff.2 <| hm t⟩
no goals
6b741b3c54da15ad
Std.DHashMap.Internal.List.Const.modifyKey_eq_alterKey
Mathlib/.lake/packages/lean4/src/lean/Std/Data/DHashMap/Internal/List/Associative.lean
theorem modifyKey_eq_alterKey (k : α) (f : β → β) (l : List ((_ : α) × β)) : modifyKey k f l = alterKey k (·.map f) l
α : Type u β : Type v inst✝ : BEq α k : α f : β → β l : List ((_ : α) × β) ⊢ modifyKey k f l = alterKey k (fun x => Option.map f x) l
rw [modifyKey, alterKey, Option.map.eq_def]
α : Type u β : Type v inst✝ : BEq α k : α f : β → β l : List ((_ : α) × β) ⊢ (match getValue? k l with | none => l | some v => replaceEntry k (f v) l) = match match getValue? k l with | some x => some (f x) | none => none with | none => eraseKey k l | some v => insertEntry k v l
4c12c679cb341031
MeasureTheory.Measure.prod_prod
Mathlib/MeasureTheory/Measure/Prod.lean
theorem prod_prod (s : Set α) (t : Set β) : μ.prod ν (s ×ˢ t) = μ s * ν t
case a α : Type u_1 β : Type u_2 inst✝² : MeasurableSpace α inst✝¹ : MeasurableSpace β μ : Measure α ν : Measure β inst✝ : SFinite ν s : Set α t : Set β S : Set α := toMeasurable μ s T : Set β := toMeasurable ν t hSTm : MeasurableSet (S ×ˢ T) ⊢ (μ.prod ν) (s ×ˢ t) ≤ μ s * ν t
calc μ.prod ν (s ×ˢ t) ≤ μ.prod ν (S ×ˢ T) := by gcongr <;> apply subset_toMeasurable _ = μ S * ν T := by rw [prod_apply hSTm] simp_rw [S, mk_preimage_prod_right_eq_if, measure_if, lintegral_indicator (measurableSet_toMeasurable _ _), lintegral_const, restrict_apply_univ, mul_comm] _ = μ s * ν t := by rw [measure_toMeasurable, measure_toMeasurable]
no goals
3a4325941a637749
CategoryTheory.Limits.coprod.pentagon
Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
theorem coprod.pentagon (W X Y Z : C) : coprod.map (coprod.associator W X Y).hom (𝟙 Z) ≫ (coprod.associator W (X ⨿ Y) Z).hom ≫ coprod.map (𝟙 W) (coprod.associator X Y Z).hom = (coprod.associator (W ⨿ X) Y Z).hom ≫ (coprod.associator W X (Y ⨿ Z)).hom
C : Type u inst✝¹ : Category.{v, u} C inst✝ : HasBinaryCoproducts C W X Y Z : C ⊢ map (associator W X Y).hom (𝟙 Z) ≫ (associator W (X ⨿ Y) Z).hom ≫ map (𝟙 W) (associator X Y Z).hom = (associator (W ⨿ X) Y Z).hom ≫ (associator W X (Y ⨿ Z)).hom
simp
no goals
025eb35b3fee2ad8
CategoryTheory.GrothendieckTopology.coversTop_iff_of_isTerminal
Mathlib/CategoryTheory/Sites/CoversTop.lean
lemma coversTop_iff_of_isTerminal (X : C) (hX : IsTerminal X) {I : Type*} (Y : I → C) : J.CoversTop Y ↔ Sieve.ofObjects Y X ∈ J X
case mpr C : Type u inst✝ : Category.{v, u} C J : GrothendieckTopology C X : C hX : IsTerminal X I : Type u_1 Y : I → C h : Sieve.ofObjects Y X ∈ J X W : C ⊢ Sieve.ofObjects Y W ∈ J W
apply J.superset_covering _ (J.pullback_stable (hX.from W) h)
C : Type u inst✝ : Category.{v, u} C J : GrothendieckTopology C X : C hX : IsTerminal X I : Type u_1 Y : I → C h : Sieve.ofObjects Y X ∈ J X W : C ⊢ Sieve.pullback (hX.from W) (Sieve.ofObjects Y X) ≤ Sieve.ofObjects Y W
2ecd555335ab9063
Finsupp.indicator_eq_sum_attach_single
Mathlib/Algebra/BigOperators/Finsupp.lean
lemma indicator_eq_sum_attach_single [AddCommMonoid M] {s : Finset α} (f : ∀ a ∈ s, M) : indicator s f = ∑ x ∈ s.attach, single ↑x (f x x.2)
α : Type u_1 M : Type u_8 inst✝ : AddCommMonoid M s : Finset α f : (a : α) → a ∈ s → M x✝¹ : { x // x ∈ s } x✝ : x✝¹ ∈ s.attach ⊢ single (↑x✝¹) ((indicator s f) ↑x✝¹) = single (↑x✝¹) (f ↑x✝¹ ⋯)
rw [indicator_of_mem]
no goals
4a42177640682c3f
tendsto_nhdsWithin_iff_subtype
Mathlib/Topology/ContinuousOn.lean
theorem tendsto_nhdsWithin_iff_subtype {s : Set α} {a : α} (h : a ∈ s) (f : α → β) (l : Filter β) : Tendsto f (𝓝[s] a) l ↔ Tendsto (s.restrict f) (𝓝 ⟨a, h⟩) l
α : Type u_1 β : Type u_2 inst✝ : TopologicalSpace α s : Set α a : α h : a ∈ s f : α → β l : Filter β ⊢ Tendsto (f ∘ Subtype.val) (𝓝 ⟨a, h⟩) l ↔ Tendsto (s.restrict f) (𝓝 ⟨a, h⟩) l
rfl
no goals
c34ed15966db3f6f
LSeries.term_convolution'
Mathlib/NumberTheory/LSeries/Convolution.lean
/-- We give an expression of the `LSeries.term` of the convolution of two functions in terms of an a priori infinite sum over all pairs `(k, m)` with `k * m = n` (the set we sum over is infinite when `n = 0`). This is the version needed for the proof that `L (f ⍟ g) = L f * L g`. -/ lemma term_convolution' (f g : ℕ → ℂ) (s : ℂ) : term (f ⍟ g) s = fun n ↦ ∑' (b : (fun p : ℕ × ℕ ↦ p.1 * p.2) ⁻¹' {n}), term f s b.val.1 * term g s b.val.2
f g : ℕ → ℂ s : ℂ hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0} ⊢ ∀ (p : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑p).1 * term g s (↑p).2 = 0
rintro ⟨⟨_, _⟩, hp⟩
case mk.mk f g : ℕ → ℂ s : ℂ hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0} fst✝ snd✝ : ℕ hp : (fst✝, snd✝) ∈ (fun p => p.1 * p.2) ⁻¹' {0} ⊢ term f s (↑⟨(fst✝, snd✝), hp⟩).1 * term g s (↑⟨(fst✝, snd✝), hp⟩).2 = 0
0320871b3b1f5c99
MeasureTheory.eLpNormEssSup_indicator_const_eq
Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
lemma eLpNormEssSup_indicator_const_eq (s : Set α) (c : G) (hμs : μ s ≠ 0) : eLpNormEssSup (s.indicator fun _ : α => c) μ = ‖c‖ₑ
α : Type u_1 G : Type u_5 m0 : MeasurableSpace α μ : Measure α inst✝ : NormedAddCommGroup G s : Set α c : G hμs : μ s ≠ 0 h : eLpNormEssSup (s.indicator fun x => c) μ < ‖c‖ₑ h' : μ {a | ‖c‖ₑ ≤ ‖s.indicator (fun x => c) a‖ₑ} = 0 x : α hx_mem : x ∈ s ⊢ x ∈ {a | ‖c‖ₑ ≤ ‖s.indicator (fun x => c) a‖ₑ}
rw [Set.mem_setOf_eq, Set.indicator_of_mem hx_mem, enorm_eq_nnnorm]
no goals
4bfba53b43399385
DFinsupp.card_Ioc
Mathlib/Data/DFinsupp/Interval.lean
lemma card_Ioc : #(Ioc f g) = (∏ i ∈ f.support ∪ g.support, #(Icc (f i) (g i))) - 1
ι : Type u_1 α : ι → Type u_2 inst✝⁴ : DecidableEq ι inst✝³ : (i : ι) → DecidableEq (α i) inst✝² : (i : ι) → PartialOrder (α i) inst✝¹ : (i : ι) → Zero (α i) inst✝ : (i : ι) → LocallyFiniteOrder (α i) f g : Π₀ (i : ι), α i ⊢ #(Ioc f g) = ∏ i ∈ f.support ∪ g.support, #(Icc (f i) (g i)) - 1
rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
no goals
1f338799efd87f48
Lean.Omega.IntList.dot_of_left_zero
Mathlib/.lake/packages/lean4/src/lean/Init/Omega/IntList.lean
theorem dot_of_left_zero (w : ∀ x, x ∈ xs → x = 0) : dot xs ys = 0
case cons.cons x : Int xs : List Int ih : ∀ {ys : IntList}, (∀ (x : Int), x ∈ xs → x = 0) → dot xs ys = 0 w : ∀ (x_1 : Int), x_1 ∈ x :: xs → x_1 = 0 y : Int ys : List Int ⊢ dot (x :: xs) (y :: ys) = 0
rw [dot_cons₂, w x (by simp), ih]
case cons.cons x : Int xs : List Int ih : ∀ {ys : IntList}, (∀ (x : Int), x ∈ xs → x = 0) → dot xs ys = 0 w : ∀ (x_1 : Int), x_1 ∈ x :: xs → x_1 = 0 y : Int ys : List Int ⊢ 0 * y + 0 = 0 case cons.cons x : Int xs : List Int ih : ∀ {ys : IntList}, (∀ (x : Int), x ∈ xs → x = 0) → dot xs ys = 0 w : ∀ (x_1 : Int), x_1 ∈ x :: xs → x_1 = 0 y : Int ys : List Int ⊢ ∀ (x : Int), x ∈ xs → x = 0
fa16c8cd41b04385
IsUnifLocDoublingMeasure.closedBall_mem_vitaliFamily_of_dist_le_mul
Mathlib/MeasureTheory/Covering/DensityTheorem.lean
theorem closedBall_mem_vitaliFamily_of_dist_le_mul {K : ℝ} {x y : α} {r : ℝ} (h : dist x y ≤ K * r) (rpos : 0 < r) : closedBall y r ∈ (vitaliFamily μ K).setsAt x
case pos.h.inl.left α : Type u_1 inst✝⁵ : PseudoMetricSpace α inst✝⁴ : MeasurableSpace α μ : Measure α inst✝³ : IsUnifLocDoublingMeasure μ inst✝² : SecondCountableTopology α inst✝¹ : BorelSpace α inst✝ : IsLocallyFiniteMeasure μ K : ℝ x y : α r : ℝ h : dist x y ≤ K * r rpos : 0 < r R : ℝ := scalingScaleOf μ ((4 * K + 3) ⊔ 3) H : closedBall y r ⊆ closedBall x (R / 4) hr : r ≤ R ⊢ closedBall y r ⊆ closedBall x ((K + 1) * r)
apply closedBall_subset_closedBall'
case pos.h.inl.left.h α : Type u_1 inst✝⁵ : PseudoMetricSpace α inst✝⁴ : MeasurableSpace α μ : Measure α inst✝³ : IsUnifLocDoublingMeasure μ inst✝² : SecondCountableTopology α inst✝¹ : BorelSpace α inst✝ : IsLocallyFiniteMeasure μ K : ℝ x y : α r : ℝ h : dist x y ≤ K * r rpos : 0 < r R : ℝ := scalingScaleOf μ ((4 * K + 3) ⊔ 3) H : closedBall y r ⊆ closedBall x (R / 4) hr : r ≤ R ⊢ r + dist y x ≤ (K + 1) * r
60c120fcf237fc0d
ProbabilityTheory.measure_condCDF_univ
Mathlib/Probability/Kernel/Disintegration/CondCDF.lean
theorem measure_condCDF_univ (ρ : Measure (α × ℝ)) (a : α) : (condCDF ρ a).measure univ = 1
α : Type u_1 mα : MeasurableSpace α ρ : Measure (α × ℝ) a : α ⊢ (condCDF ρ a).measure univ = 1
rw [← ENNReal.ofReal_one, ← sub_zero (1 : ℝ)]
α : Type u_1 mα : MeasurableSpace α ρ : Measure (α × ℝ) a : α ⊢ (condCDF ρ a).measure univ = ENNReal.ofReal (1 - 0)
1b16a5159393d6ca
LinearMap.range_eq_map
Mathlib/Algebra/Module/Submodule/Range.lean
theorem range_eq_map [RingHomSurjective τ₁₂] (f : F) : range f = map f ⊤
R : Type u_1 R₂ : Type u_2 M : Type u_5 M₂ : Type u_6 inst✝⁸ : Semiring R inst✝⁷ : Semiring R₂ inst✝⁶ : AddCommMonoid M inst✝⁵ : AddCommMonoid M₂ inst✝⁴ : Module R M inst✝³ : Module R₂ M₂ τ₁₂ : R →+* R₂ F : Type u_10 inst✝² : FunLike F M M₂ inst✝¹ : SemilinearMapClass F τ₁₂ M M₂ inst✝ : RingHomSurjective τ₁₂ f : F ⊢ range f = map f ⊤
ext
case h R : Type u_1 R₂ : Type u_2 M : Type u_5 M₂ : Type u_6 inst✝⁸ : Semiring R inst✝⁷ : Semiring R₂ inst✝⁶ : AddCommMonoid M inst✝⁵ : AddCommMonoid M₂ inst✝⁴ : Module R M inst✝³ : Module R₂ M₂ τ₁₂ : R →+* R₂ F : Type u_10 inst✝² : FunLike F M M₂ inst✝¹ : SemilinearMapClass F τ₁₂ M M₂ inst✝ : RingHomSurjective τ₁₂ f : F x✝ : M₂ ⊢ x✝ ∈ range f ↔ x✝ ∈ map f ⊤
57c153fc58aa9513
ContinuousLinearMap.iteratedFDerivWithin_comp_left
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem ContinuousLinearMap.iteratedFDerivWithin_comp_left {f : E → F} (g : F →L[𝕜] G) (hf : ContDiffWithinAt 𝕜 n f s x) (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) {i : ℕ} (hi : i ≤ n) : iteratedFDerivWithin 𝕜 i (g ∘ f) s x = g.compContinuousMultilinearMap (iteratedFDerivWithin 𝕜 i f s x)
𝕜 : Type u_1 inst✝⁶ : NontriviallyNormedField 𝕜 E : Type uE inst✝⁵ : NormedAddCommGroup E inst✝⁴ : NormedSpace 𝕜 E F : Type uF inst✝³ : NormedAddCommGroup F inst✝² : NormedSpace 𝕜 F G : Type uG inst✝¹ : NormedAddCommGroup G inst✝ : NormedSpace 𝕜 G s : Set E x : E n : WithTop ℕ∞ f : E → F g : F →L[𝕜] G hf : ContDiffWithinAt 𝕜 n f s x hs : UniqueDiffOn 𝕜 s hx : x ∈ s i : ℕ hi : ↑i ≤ n ⊢ ↑i = ∞ → n = ω
simp
no goals
832a54e17c3023f1
differentiableWithinAt_localInvariantProp
Mathlib/Geometry/Manifold/MFDeriv/Defs.lean
theorem differentiableWithinAt_localInvariantProp : (contDiffGroupoid 1 I).LocalInvariantProp (contDiffGroupoid 1 I') (DifferentiableWithinAtProp I I') := { is_local
𝕜 : 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 E' : Type u_5 inst✝² : NormedAddCommGroup E' inst✝¹ : NormedSpace 𝕜 E' H' : Type u_6 inst✝ : TopologicalSpace H' I' : ModelWithCorners 𝕜 E' H' s : Set H x : H u : Set H f : H → H' u_open : IsOpen u xu : x ∈ u this : ↑I.symm ⁻¹' (s ∩ u) ∩ range ↑I = ↑I.symm ⁻¹' s ∩ range ↑I ∩ ↑I.symm ⁻¹' u ⊢ u ∈ 𝓝 x
exact u_open.mem_nhds xu
no goals
3d1405d37db22f10
BoxIntegral.norm_integral_le_of_norm_le
Mathlib/Analysis/BoxIntegral/Basic.lean
theorem norm_integral_le_of_norm_le {g : ℝⁿ → ℝ} (hle : ∀ x ∈ Box.Icc I, ‖f x‖ ≤ g x) (μ : Measure ℝⁿ) [IsLocallyFiniteMeasure μ] (hg : Integrable I l g μ.toBoxAdditive.toSMul) : ‖(integral I l f μ.toBoxAdditive.toSMul : E)‖ ≤ integral I l g μ.toBoxAdditive.toSMul
case neg ι : Type u E : Type v inst✝³ : NormedAddCommGroup E inst✝² : NormedSpace ℝ E I : Box ι inst✝¹ : Fintype ι l : IntegrationParams f : (ι → ℝ) → E g : (ι → ℝ) → ℝ hle : ∀ x ∈ Box.Icc I, ‖f x‖ ≤ g x μ : Measure (ι → ℝ) inst✝ : IsLocallyFiniteMeasure μ hg : Integrable I l g μ.toBoxAdditive.toSMul hfi : ¬Integrable I l f μ.toBoxAdditive.toSMul ⊢ ‖integral I l f μ.toBoxAdditive.toSMul‖ ≤ integral I l g μ.toBoxAdditive.toSMul
rw [integral, dif_neg hfi, norm_zero]
case neg ι : Type u E : Type v inst✝³ : NormedAddCommGroup E inst✝² : NormedSpace ℝ E I : Box ι inst✝¹ : Fintype ι l : IntegrationParams f : (ι → ℝ) → E g : (ι → ℝ) → ℝ hle : ∀ x ∈ Box.Icc I, ‖f x‖ ≤ g x μ : Measure (ι → ℝ) inst✝ : IsLocallyFiniteMeasure μ hg : Integrable I l g μ.toBoxAdditive.toSMul hfi : ¬Integrable I l f μ.toBoxAdditive.toSMul ⊢ 0 ≤ integral I l g μ.toBoxAdditive.toSMul
fabc40b1fa159acd
Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.sat_of_insertRat
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/LRAT/Internal/Formula/RatAddSound.lean
theorem sat_of_insertRat {n : Nat} (f : DefaultFormula n) (hf : f.ratUnits = #[] ∧ AssignmentsInvariant f) (c : DefaultClause n) (p : PosFin n → Bool) (pf : p ⊨ f) : (insertRatUnits f (negate c)).2 = true → p ⊨ c
case intro.inr.inl.intro.intro.intro.intro.intro.intro n : Nat f : DefaultFormula n hf : f.ratUnits = #[] ∧ f.AssignmentsInvariant c : DefaultClause n p : PosFin n → Bool pf : p ⊨ f insertUnit_fold_success : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).2.snd = true i : PosFin n hboth : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).snd.fst[i.val] = both i_in_bounds : i.val < f.assignments.size h0 : InsertUnitInvariant f.assignments ⋯ f.ratUnits f.assignments ⋯ insertUnit_fold_satisfies_invariant : let update_res := List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate; let_fun update_res_size := ⋯; InsertUnitInvariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size j : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size b : Bool i_gt_zero : ↑⟨i.val, ⋯⟩ > 0 h1 : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b) h2 : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = addAssignment b f.assignments[↑⟨i.val, ⋯⟩] h3 : ¬hasAssignment b f.assignments[↑⟨i.val, ⋯⟩] = true h4 : ∀ (k : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size), k ≠ j → (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[k].fst.val ≠ ↑⟨i.val, ⋯⟩ ib_in_insertUnit_fold✝ : (i, b) ∈ (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.toList ib_in_insertUnit_fold : (i, b) ∈ c.negate ∨ (i, b) ∈ f.ratUnits.toList ⊢ (i, false) ∈ Clause.toList c ∧ decide (p i = false) = true ∨ (i, true) ∈ Clause.toList c ∧ p i = true
simp only [negate, Literal.negate, List.mem_map, Prod.mk.injEq, Prod.exists, Bool.exists_bool, Bool.not_false, Bool.not_true, hf.1, Array.toList_toArray, List.find?, List.not_mem_nil, or_false] at ib_in_insertUnit_fold
case intro.inr.inl.intro.intro.intro.intro.intro.intro n : Nat f : DefaultFormula n hf : f.ratUnits = #[] ∧ f.AssignmentsInvariant c : DefaultClause n p : PosFin n → Bool pf : p ⊨ f insertUnit_fold_success : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).2.snd = true i : PosFin n hboth : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).snd.fst[i.val] = both i_in_bounds : i.val < f.assignments.size h0 : InsertUnitInvariant f.assignments ⋯ f.ratUnits f.assignments ⋯ insertUnit_fold_satisfies_invariant : let update_res := List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate; let_fun update_res_size := ⋯; InsertUnitInvariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size j : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size b : Bool i_gt_zero : ↑⟨i.val, ⋯⟩ > 0 h1 : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b) h2 : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = addAssignment b f.assignments[↑⟨i.val, ⋯⟩] h3 : ¬hasAssignment b f.assignments[↑⟨i.val, ⋯⟩] = true h4 : ∀ (k : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size), k ≠ j → (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[k].fst.val ≠ ↑⟨i.val, ⋯⟩ ib_in_insertUnit_fold✝ : (i, b) ∈ (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.toList ib_in_insertUnit_fold : ∃ a, (a, false) ∈ c.clause ∧ a = i ∧ true = b ∨ (a, true) ∈ c.clause ∧ a = i ∧ false = b ⊢ (i, false) ∈ Clause.toList c ∧ decide (p i = false) = true ∨ (i, true) ∈ Clause.toList c ∧ p i = true
c0b439908684a182
discrim_eq_zero_iff
Mathlib/Algebra/QuadraticDiscriminant.lean
theorem discrim_eq_zero_iff (ha : a ≠ 0) : discrim a b c = 0 ↔ (∃! x, a * (x * x) + b * x + c = 0)
K : Type u_1 inst✝¹ : Field K inst✝ : NeZero 2 a b c : K ha : a ≠ 0 hd : discrim a b c = 0 ⊢ ∃! x, a * (x * x) + b * x + c = 0
simp_rw [quadratic_eq_zero_iff_of_discrim_eq_zero ha hd, existsUnique_eq]
no goals
b032d9789f00b01a
imaginaryPart_smul
Mathlib/Data/Complex/Module.lean
theorem imaginaryPart_smul (z : ℂ) (a : A) : ℑ (z • a) = z.re • ℑ a + z.im • ℜ a
A : Type u_1 inst✝³ : AddCommGroup A inst✝² : Module ℂ A inst✝¹ : StarAddMonoid A inst✝ : StarModule ℂ A z : ℂ a : A ⊢ ?m.175621
congrm (ℑ ($((re_add_im z).symm) • a))
no goals
72cc35a2c5277b8f
Matrix.sum_cramer_apply
Mathlib/LinearAlgebra/Matrix/Adjugate.lean
theorem sum_cramer_apply {β} (s : Finset β) (f : n → β → α) (i : n) : (∑ x ∈ s, cramer A (fun j => f j x) i) = cramer A (fun j : n => ∑ x ∈ s, f j x) i := calc (∑ x ∈ s, cramer A (fun j => f j x) i) = (∑ x ∈ s, cramer A fun j => f j x) i := (Finset.sum_apply i s _).symm _ = cramer A (fun j : n => ∑ x ∈ s, f j x) i
n : Type v α : Type w inst✝² : DecidableEq n inst✝¹ : Fintype n inst✝ : CommRing α A : Matrix n n α β : Type u_1 s : Finset β f : n → β → α i : n ⊢ (∑ x ∈ s, A.cramer fun j => f j x) i = A.cramer (fun j => ∑ x ∈ s, f j x) i
rw [sum_cramer, cramer_apply, cramer_apply]
n : Type v α : Type w inst✝² : DecidableEq n inst✝¹ : Fintype n inst✝ : CommRing α A : Matrix n n α β : Type u_1 s : Finset β f : n → β → α i : n ⊢ (A.updateCol i (∑ x ∈ s, fun j => f j x)).det = (A.updateCol i fun j => ∑ x ∈ s, f j x).det
a0c8c2461d8700d4
Rat.fract_inv_num_lt_num_of_pos
Mathlib/Data/Rat/Floor.lean
theorem fract_inv_num_lt_num_of_pos {q : ℚ} (q_pos : 0 < q) : (fract q⁻¹).num < q.num
q : ℚ q_pos : 0 < q q_num_pos : 0 < q.num q_num_abs_eq_q_num : ↑q.num.natAbs = q.num q_inv : ℚ := ↑q.den / ↑q.num q_inv_def : q_inv = ↑q.den / ↑q.num q_inv_eq : q⁻¹ = q_inv this✝ : q⁻¹.num < (⌊q⁻¹⌋ + 1) * ↑q⁻¹.den this : q⁻¹.num < ⌊q⁻¹⌋ * ↑q⁻¹.den + ↑q⁻¹.den ⊢ q⁻¹.num - ⌊q⁻¹⌋ * ↑q⁻¹.den < ↑q⁻¹.den
rwa [← sub_lt_iff_lt_add'] at this
no goals
d2870a8c7e295972
List.Nodup.isCycleOn_formPerm
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem Nodup.isCycleOn_formPerm (h : l.Nodup) : l.formPerm.IsCycleOn { a | a ∈ l }
α : Type u_2 inst✝ : DecidableEq α l : List α h : l.Nodup a : α ha : idxOf a l < l.length b : α hb : idxOf b l < l.length ⊢ l.formPerm.SameCycle a b
rw [← List.getElem_idxOf ha, ← List.getElem_idxOf hb]
α : Type u_2 inst✝ : DecidableEq α l : List α h : l.Nodup a : α ha : idxOf a l < l.length b : α hb : idxOf b l < l.length ⊢ l.formPerm.SameCycle l[idxOf a l] l[idxOf b l]
d4fd1a414e146e95
Matrix.isAddUnit_detp_smul_mul_adjp
Mathlib/LinearAlgebra/Matrix/SemiringInverse.lean
theorem isAddUnit_detp_smul_mul_adjp (hAB : A * B = 1) : IsAddUnit (detp 1 A • (B * adjp (-1) B) + detp (-1) A • (B * adjp 1 B))
case intro.intro.hr n : Type u_1 R : Type u_3 inst✝² : Fintype n inst✝¹ : DecidableEq n inst✝ : CommSemiring R A B : Matrix n n R hAB : A * B = 1 s t : ℤˣ i j k : n hk : k ∈ univ σ : Perm n hσ : sign σ = t ∧ σ j = k τ : Perm n hτ : sign τ = s h : ¬σ * τ = 1 l : n hl1 : l ≠ (σ * τ) l hl2 : l ∈ {τ⁻¹ j}ᶜ h0 : ∀ (k : n), k ∈ {τ⁻¹ j}ᶜ ↔ τ k ∈ {j}ᶜ ⊢ IsAddUnit ((∏ i ∈ {τ⁻¹ j}ᶜ, A i (τ i)) * ∏ k ∈ {j}ᶜ, B k (σ k))
rw [← prod_equiv τ h0 fun _ _ ↦ rfl, ← prod_mul_distrib, ← mul_prod_erase _ _ hl2, ← smul_eq_mul]
case intro.intro.hr n : Type u_1 R : Type u_3 inst✝² : Fintype n inst✝¹ : DecidableEq n inst✝ : CommSemiring R A B : Matrix n n R hAB : A * B = 1 s t : ℤˣ i j k : n hk : k ∈ univ σ : Perm n hσ : sign σ = t ∧ σ j = k τ : Perm n hτ : sign τ = s h : ¬σ * τ = 1 l : n hl1 : l ≠ (σ * τ) l hl2 : l ∈ {τ⁻¹ j}ᶜ h0 : ∀ (k : n), k ∈ {τ⁻¹ j}ᶜ ↔ τ k ∈ {j}ᶜ ⊢ IsAddUnit ((A l (τ l) * B (τ l) (σ (τ l))) • ∏ x ∈ {τ⁻¹ j}ᶜ.erase l, A x (τ x) * B (τ x) (σ (τ x)))
cfc0571f345e1ba6
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 ≠ ∅ ⊢ ¬Nontrivial ι
by_contra contra
α : 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 ≠ ∅ contra : Nontrivial ι ⊢ False
6e05e6622254f214
Filter.HasBasis.exists_antitone_subbasis
Mathlib/Order/Filter/CountablyGenerated.lean
theorem HasBasis.exists_antitone_subbasis {f : Filter α} [h : f.IsCountablyGenerated] {p : ι' → Prop} {s : ι' → Set α} (hs : f.HasBasis p s) : ∃ x : ℕ → ι', (∀ i, p (x i)) ∧ f.HasAntitoneBasis fun i => s (x i)
case intro α : Type u_1 ι' : Sort u_5 f : Filter α h : f.IsCountablyGenerated p : ι' → Prop s : ι' → Set α hs : f.HasBasis p s x' : ℕ → Set α hx' : f = ⨅ i, 𝓟 (x' i) this : ∀ (i : ℕ), x' i ∈ f x : ℕ → { i // p i } := fun n => Nat.recOn n (hs.index (x' 0) ⋯) fun n xn => hs.index (x' (n + 1) ∩ s ↑xn) ⋯ x_anti : Antitone fun i => s ↑(x i) x_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i ⊢ ∃ x, (∀ (i : ℕ), p (x i)) ∧ f.HasAntitoneBasis fun i => s (x i)
refine ⟨fun i => (x i).1, fun i => (x i).2, ?_⟩
case intro α : Type u_1 ι' : Sort u_5 f : Filter α h : f.IsCountablyGenerated p : ι' → Prop s : ι' → Set α hs : f.HasBasis p s x' : ℕ → Set α hx' : f = ⨅ i, 𝓟 (x' i) this : ∀ (i : ℕ), x' i ∈ f x : ℕ → { i // p i } := fun n => Nat.recOn n (hs.index (x' 0) ⋯) fun n xn => hs.index (x' (n + 1) ∩ s ↑xn) ⋯ x_anti : Antitone fun i => s ↑(x i) x_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i ⊢ f.HasAntitoneBasis fun i => s ((fun i => ↑(x i)) i)
25d2caa8c01b800f
Finset.sup_div₀
Mathlib/Algebra/Order/GroupWithZero/Finset.lean
lemma sup_div₀ [LinearOrderedCommGroupWithZero G₀] [OrderBot G₀] {a : G₀} (ha : 0 < a) (s : Finset ι) (f : ι → G₀) : s.sup f / a = s.sup fun i ↦ f i / a
case inr ι : Type u_1 G₀ : Type u_3 inst✝¹ : LinearOrderedCommGroupWithZero G₀ inst✝ : OrderBot G₀ a : G₀ ha : 0 < a s : Finset ι f : ι → G₀ hs : s.Nonempty ⊢ s.sup f / a = s.sup fun i => f i / a
rw [← Finset.sup'_eq_sup hs, ← Finset.sup'_eq_sup hs, sup'_div₀ (ha := ha)]
no goals
f14336314318b796
MvQPF.liftP_iff
Mathlib/Data/QPF/Multivariate/Basic.lean
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) : LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j)
case mp.intro.mk n : ℕ F : TypeVec.{u} n → Type u_1 q : MvQPF F α : TypeVec.{u} n p : ⦃i : Fin2 n⦄ → α i → Prop x : F α y : F fun i => Subtype p hy : (fun i => Subtype.val) <$$> y = x a : (P F).A f : (P F).B a ⟹ fun i => Subtype p h : repr y = ⟨a, f⟩ ⊢ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : (P F).B a i), p (f i j)
use a, fun i j => (f i j).val
case h n : ℕ F : TypeVec.{u} n → Type u_1 q : MvQPF F α : TypeVec.{u} n p : ⦃i : Fin2 n⦄ → α i → Prop x : F α y : F fun i => Subtype p hy : (fun i => Subtype.val) <$$> y = x a : (P F).A f : (P F).B a ⟹ fun i => Subtype p h : repr y = ⟨a, f⟩ ⊢ x = abs ⟨a, fun i j => ↑(f i j)⟩ ∧ ∀ (i : Fin2 n) (j : (P F).B a i), p ((fun i j => ↑(f i j)) i j)
63f9b99313f568d9
finrank_top
Mathlib/LinearAlgebra/Dimension/Finrank.lean
theorem finrank_top : finrank R (⊤ : Submodule R M) = finrank R M
R : Type u M : Type v inst✝² : Semiring R inst✝¹ : AddCommMonoid M inst✝ : Module R M ⊢ toNat (Module.rank R ↥⊤) = toNat (Module.rank R M)
simp [rank_top]
no goals
26d886d5066f9570
Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.restoreAssignments_performRupCheck
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/LRAT/Internal/Formula/RupAddResult.lean
theorem restoreAssignments_performRupCheck {n : Nat} (f : DefaultFormula n) (f_assignments_size : f.assignments.size = n) (rupHints : Array Nat) : restoreAssignments (performRupCheck f rupHints).1.assignments (performRupCheck f rupHints).2.1 = f.assignments
case intro.h₂.inl.intro n : Nat f : DefaultFormula n f_assignments_size : f.assignments.size = n rupHints : Array Nat f' : DefaultFormula n := (f.performRupCheck rupHints).fst f'_def : f' = (f.performRupCheck rupHints).fst f'_assignments_size : f'.assignments.size = n derivedLits : CNF.Clause (PosFin n) derivedLits_satisfies_invariant : f.DerivedLitsInvariant f_assignments_size (f.performRupCheck rupHints).fst.assignments f'_assignments_size derivedLits derivedLits_arr : Array (Literal (PosFin n)) := { toList := derivedLits } derivedLits_arr_def : derivedLits_arr = { toList := derivedLits } derivedLits_arr_nodup : ∀ (i j : Fin derivedLits_arr.size), i ≠ j → derivedLits_arr[i] ≠ derivedLits_arr[j] motive : Nat → Array Assignment → Prop := f.ClearInsertInductionMotive f_assignments_size derivedLits_arr h_base : f.ClearInsertInductionMotive f_assignments_size derivedLits_arr 0 f'.assignments h_inductive : ∀ (idx : Fin derivedLits_arr.size) (assignments : Array Assignment), motive (↑idx) assignments → f.ClearInsertInductionMotive f_assignments_size derivedLits_arr (↑idx + 1) (clearUnit assignments derivedLits_arr[idx]) h_size : (Array.foldl clearUnit f'.assignments derivedLits_arr).size = n i : Nat hi1 : i < (Array.foldl clearUnit f'.assignments { toList := derivedLits }).size hi2✝ : i < f.assignments.size hi2 : i < n h1 : (Array.foldl clearUnit f'.assignments derivedLits_arr)[↑⟨i, hi2⟩] = f.assignments[↑⟨i, hi2⟩] right✝ : ∀ (j : Fin derivedLits_arr.size), ↑j ≥ derivedLits_arr.size → derivedLits_arr[j].fst.val ≠ ↑⟨i, hi2⟩ ⊢ (Array.foldl clearUnit f'.assignments { toList := derivedLits })[i] = f.assignments[i]
simp only [← derivedLits_arr_def]
case intro.h₂.inl.intro n : Nat f : DefaultFormula n f_assignments_size : f.assignments.size = n rupHints : Array Nat f' : DefaultFormula n := (f.performRupCheck rupHints).fst f'_def : f' = (f.performRupCheck rupHints).fst f'_assignments_size : f'.assignments.size = n derivedLits : CNF.Clause (PosFin n) derivedLits_satisfies_invariant : f.DerivedLitsInvariant f_assignments_size (f.performRupCheck rupHints).fst.assignments f'_assignments_size derivedLits derivedLits_arr : Array (Literal (PosFin n)) := { toList := derivedLits } derivedLits_arr_def : derivedLits_arr = { toList := derivedLits } derivedLits_arr_nodup : ∀ (i j : Fin derivedLits_arr.size), i ≠ j → derivedLits_arr[i] ≠ derivedLits_arr[j] motive : Nat → Array Assignment → Prop := f.ClearInsertInductionMotive f_assignments_size derivedLits_arr h_base : f.ClearInsertInductionMotive f_assignments_size derivedLits_arr 0 f'.assignments h_inductive : ∀ (idx : Fin derivedLits_arr.size) (assignments : Array Assignment), motive (↑idx) assignments → f.ClearInsertInductionMotive f_assignments_size derivedLits_arr (↑idx + 1) (clearUnit assignments derivedLits_arr[idx]) h_size : (Array.foldl clearUnit f'.assignments derivedLits_arr).size = n i : Nat hi1 : i < (Array.foldl clearUnit f'.assignments { toList := derivedLits }).size hi2✝ : i < f.assignments.size hi2 : i < n h1 : (Array.foldl clearUnit f'.assignments derivedLits_arr)[↑⟨i, hi2⟩] = f.assignments[↑⟨i, hi2⟩] right✝ : ∀ (j : Fin derivedLits_arr.size), ↑j ≥ derivedLits_arr.size → derivedLits_arr[j].fst.val ≠ ↑⟨i, hi2⟩ ⊢ (Array.foldl clearUnit f'.assignments derivedLits_arr)[i] = f.assignments[i]
39cd436ee84b1d45
one_lt_mabs
Mathlib/Algebra/Order/Group/Unbundled/Abs.lean
@[to_additive (attr := simp) abs_pos] lemma one_lt_mabs : 1 < |a|ₘ ↔ a ≠ 1
case inr.inr α : Type u_1 inst✝² : Group α inst✝¹ : LinearOrder α inst✝ : MulLeftMono α a : α ha : 1 < a ⊢ 1 < mabs a ↔ a ≠ 1
simp [mabs_of_one_lt ha, ha, ha.ne']
no goals
246ff238fd37060c
IsPredArchimedean.pred_findAtom
Mathlib/Order/SuccPred/Tree.lean
@[simp] lemma pred_findAtom (r : α) : Order.pred (findAtom r) = ⊥
α : Type u_1 inst✝⁴ : PartialOrder α inst✝³ : PredOrder α inst✝² : IsPredArchimedean α inst✝¹ : OrderBot α inst✝ : DecidableEq α r : α ⊢ Order.pred (Order.pred^[Nat.find ⋯ - 1] r) = ⊥
generalize h : Nat.find (bot_le (a := r)).exists_pred_iterate = n
α : Type u_1 inst✝⁴ : PartialOrder α inst✝³ : PredOrder α inst✝² : IsPredArchimedean α inst✝¹ : OrderBot α inst✝ : DecidableEq α r : α n : ℕ h : Nat.find ⋯ = n ⊢ Order.pred (Order.pred^[n - 1] r) = ⊥
292f95ee3094926c
PythagoreanTriple.even_odd_of_coprime
Mathlib/NumberTheory/PythagoreanTriples.lean
theorem even_odd_of_coprime (hc : Int.gcd x y = 1) : x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0
case inr.inr.intro.intro.intro z x0 y0 : ℤ hx : (x0 * 2 + 1) % 2 = 1 hy : (y0 * 2 + 1) % 2 = 1 h : PythagoreanTriple (x0 * 2 + 1) (y0 * 2 + 1) z hc : (x0 * 2 + 1).gcd (y0 * 2 + 1) = 1 ⊢ 2 % 4 % 4 = 2
decide
no goals
48f64ea05953c676
Finsupp.antidiagonal_single
Mathlib/Data/Finsupp/Antidiagonal.lean
theorem antidiagonal_single (a : α) (n : ℕ) : antidiagonal (single a n) = (antidiagonal n).map (Function.Embedding.prodMap ⟨_, single_injective a⟩ ⟨_, single_injective a⟩)
case h.mk α : Type u inst✝ : DecidableEq α a : α n : ℕ x y : α →₀ ℕ ⊢ x + y = single a n ↔ ∃ a_1 b, a_1 + b = n ∧ single a a_1 = x ∧ single a b = y
constructor
case h.mk.mp α : Type u inst✝ : DecidableEq α a : α n : ℕ x y : α →₀ ℕ ⊢ x + y = single a n → ∃ a_2 b, a_2 + b = n ∧ single a a_2 = x ∧ single a b = y case h.mk.mpr α : Type u inst✝ : DecidableEq α a : α n : ℕ x y : α →₀ ℕ ⊢ (∃ a_1 b, a_1 + b = n ∧ single a a_1 = x ∧ single a b = y) → x + y = single a n
7873ab140ae48427
RingHom.finitePresentation_isStableUnderBaseChange
Mathlib/RingTheory/RingHom/FinitePresentation.lean
theorem finitePresentation_isStableUnderBaseChange : IsStableUnderBaseChange @FinitePresentation
case h₂ ⊢ ∀ ⦃R S T : Type u_1⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S] [inst_4 : Algebra R T], (algebraMap R T).FinitePresentation → Algebra.TensorProduct.includeLeftRingHom.FinitePresentation
introv h
case h₂ R S T : Type u_1 inst✝⁴ : CommRing R inst✝³ : CommRing S inst✝² : CommRing T inst✝¹ : Algebra R S inst✝ : Algebra R T h : (algebraMap R T).FinitePresentation ⊢ Algebra.TensorProduct.includeLeftRingHom.FinitePresentation
ecddf4004478cb5e
SimpleGraph.Subgraph.Connected.adj_union
Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean
lemma Connected.adj_union {H K : G.Subgraph} (Hconn : H.Connected) (Kconn : K.Connected) {u v : V} (uH : u ∈ H.verts) (vK : v ∈ K.verts) (huv : G.Adj u v) : ((⊤ : G.Subgraph).induce {u, v} ⊔ H ⊔ K).Connected
case refine_1 V : Type u G : SimpleGraph V H K : G.Subgraph Hconn : H.Connected Kconn : K.Connected u v : V uH : u ∈ H.verts vK : v ∈ K.verts huv : G.Adj u v ⊢ (⊤.induce {u, v} ⊓ H).verts.Nonempty
exact ⟨u, by simp [uH]⟩
no goals
92d126dba17e5301
Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.sat_of_insertRat
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/LRAT/Internal/Formula/RatAddSound.lean
theorem sat_of_insertRat {n : Nat} (f : DefaultFormula n) (hf : f.ratUnits = #[] ∧ AssignmentsInvariant f) (c : DefaultClause n) (p : PosFin n → Bool) (pf : p ⊨ f) : (insertRatUnits f (negate c)).2 = true → p ⊨ c
case intro.inr.inl.intro.intro.intro.intro.intro.intro.intro.inr.intro.intro.h n : Nat f : DefaultFormula n hf : f.ratUnits = #[] ∧ f.AssignmentsInvariant c : DefaultClause n p : PosFin n → Bool pf : p ⊨ f insertUnit_fold_success : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).2.snd = true i : PosFin n hboth : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).snd.fst[i.val] = both i_in_bounds : i.val < f.assignments.size h0 : InsertUnitInvariant f.assignments ⋯ f.ratUnits f.assignments ⋯ insertUnit_fold_satisfies_invariant : let update_res := List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate; let_fun update_res_size := ⋯; InsertUnitInvariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size j : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size b : Bool i_gt_zero : ↑⟨i.val, ⋯⟩ > 0 h1 : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b) h2 : both = addAssignment b f.assignments[↑⟨i.val, ⋯⟩] h3 : ¬hasAssignment b f.assignments[↑⟨i.val, ⋯⟩] = true h4 : ∀ (k : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size), k ≠ j → (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[k].fst.val ≠ ↑⟨i.val, ⋯⟩ ib_in_insertUnit_fold : (i, b) ∈ (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.toList i' : PosFin n i_true_in_c : (i', true) ∈ c.clause i'_eq_i : i' = i b_eq_false : false = b ⊢ (i, true) ∈ Clause.toList c ∧ p i = true
rw [i'_eq_i] at i_true_in_c
case intro.inr.inl.intro.intro.intro.intro.intro.intro.intro.inr.intro.intro.h n : Nat f : DefaultFormula n hf : f.ratUnits = #[] ∧ f.AssignmentsInvariant c : DefaultClause n p : PosFin n → Bool pf : p ⊨ f insertUnit_fold_success : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).2.snd = true i : PosFin n hboth : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).snd.fst[i.val] = both i_in_bounds : i.val < f.assignments.size h0 : InsertUnitInvariant f.assignments ⋯ f.ratUnits f.assignments ⋯ insertUnit_fold_satisfies_invariant : let update_res := List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate; let_fun update_res_size := ⋯; InsertUnitInvariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size j : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size b : Bool i_gt_zero : ↑⟨i.val, ⋯⟩ > 0 h1 : (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b) h2 : both = addAssignment b f.assignments[↑⟨i.val, ⋯⟩] h3 : ¬hasAssignment b f.assignments[↑⟨i.val, ⋯⟩] = true h4 : ∀ (k : Fin (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.size), k ≠ j → (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst[k].fst.val ≠ ↑⟨i.val, ⋯⟩ ib_in_insertUnit_fold : (i, b) ∈ (List.foldl insertUnit (f.ratUnits, f.assignments, false) c.negate).fst.toList i' : PosFin n i_true_in_c : (i, true) ∈ c.clause i'_eq_i : i' = i b_eq_false : false = b ⊢ (i, true) ∈ Clause.toList c ∧ p i = true
c0b439908684a182
IsUltrametricDist.ball_eq_of_mem
Mathlib/Topology/MetricSpace/Ultra/Basic.lean
lemma ball_eq_of_mem {x y : X} {r : ℝ} (h : y ∈ ball x r) : ball x r = ball y r
case h X : Type u_1 inst✝¹ : PseudoMetricSpace X inst✝ : IsUltrametricDist X x y : X r : ℝ h : y ∈ ball x r a : X ⊢ a ∈ ball x r ↔ a ∈ ball y r
simp_rw [mem_ball] at h ⊢
case h X : Type u_1 inst✝¹ : PseudoMetricSpace X inst✝ : IsUltrametricDist X x y : X r : ℝ a : X h : dist y x < r ⊢ dist a x < r ↔ dist a y < r
e1447400c896ac2c
AffineSubspace.setOf_sOppSide_eq_image2
Mathlib/Analysis/Convex/Side.lean
theorem setOf_sOppSide_eq_image2 {s : AffineSubspace R P} {x p : P} (hx : x ∉ s) (hp : p ∈ s) : { y | s.SOppSide x y } = Set.image2 (fun (t : R) q => t • (x -ᵥ p) +ᵥ q) (Set.Iio 0) s
case h.mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro R : Type u_1 V : Type u_2 P : Type u_4 inst✝³ : LinearOrderedField R inst✝² : AddCommGroup V inst✝¹ : Module R V inst✝ : AddTorsor V P s : AffineSubspace R P x p : P hx : x ∉ s hp : p ∈ s y : P hy : y ∉ s p₂ : P hp₂ : p₂ ∈ s r₁ r₂ : R hr₁ : 0 < r₁ hr₂ : 0 < r₂ h : r₁ • (x -ᵥ p) = r₂ • (p₂ -ᵥ y) ⊢ (-r₁ / r₂) • (x -ᵥ p) +ᵥ p₂ = y
rw [div_eq_inv_mul, ← smul_smul, neg_smul, h, smul_neg, smul_smul, inv_mul_cancel₀ hr₂.ne.symm, one_smul, neg_vsub_eq_vsub_rev, vsub_vadd]
no goals
839d674f40d68f94
Complex.tendsto_tsum_powerSeries_nhdsWithin_stolzSet
Mathlib/Analysis/Complex/AbelLimit.lean
theorem tendsto_tsum_powerSeries_nhdsWithin_stolzSet (h : Tendsto (fun n ↦ ∑ i ∈ range n, f i) atTop (𝓝 l)) {M : ℝ} : Tendsto (fun z ↦ ∑' n, f n * z ^ n) (𝓝[stolzSet M] 1) (𝓝 l)
f : ℕ → ℂ l : ℂ h : Tendsto (fun n => ∑ i ∈ range n, f i) atTop (𝓝 l) M : ℝ hM : 1 < M s : ℕ → ℂ := fun n => ∑ i ∈ range n, f i g : ℂ → ℂ := fun z => ∑' (n : ℕ), f n * z ^ n ε : ℝ εpos : ε > 0 B₁ : ℕ hB₁ : ∀ n ≥ B₁, ‖∑ i ∈ range n, f i - l‖ < ε / 4 / M F : ℝ := ∑ i ∈ range B₁, ‖l - s (i + 1)‖ z : ℂ zn : ‖z‖ < 1 zm : ‖1 - z‖ < M * (1 - ‖z‖) zd : ‖z - 1‖ < ε / 4 / (F + 1) B₂ : ℕ hB₂ : ‖l - ∑' (n : ℕ), f n * z ^ n - (1 - z) * ∑ i ∈ range (B₁ ⊔ B₂), (l - ∑ j ∈ range (i + 1), f j) * z ^ i‖ < ε / 2 this : ‖(1 - z) * ∑ i ∈ range (B₁ ⊔ B₂), (l - s (i + 1)) * z ^ i‖ < ε / 2 ⊢ ‖∑' (n : ℕ), f n * z ^ n - l‖ < ε
calc _ = ‖l - g z‖ := by rw [norm_sub_rev] _ = ‖l - g z - (1 - z) * ∑ i ∈ range (max B₁ B₂), (l - s (i + 1)) * z ^ i + (1 - z) * ∑ i ∈ range (max B₁ B₂), (l - s (i + 1)) * z ^ i‖ := by rw [sub_add_cancel _] _ ≤ ‖l - g z - (1 - z) * ∑ i ∈ range (max B₁ B₂), (l - s (i + 1)) * z ^ i‖ + ‖(1 - z) * ∑ i ∈ range (max B₁ B₂), (l - s (i + 1)) * z ^ i‖ := norm_add_le _ _ _ < ε / 2 + ε / 2 := add_lt_add hB₂ this _ = _ := add_halves ε
no goals
e1f8d437480849f9
mul_div_assoc
Mathlib/Algebra/Group/Defs.lean
theorem mul_div_assoc (a b c : G) : a * b / c = a * (b / c)
G : Type u_1 inst✝ : DivInvMonoid G a b c : G ⊢ a * b / c = a * (b / c)
rw [div_eq_mul_inv, div_eq_mul_inv, mul_assoc _ _ _]
no goals
a1c0e0e7ec74d8be
IncidenceAlgebra.mu_prod_mu
Mathlib/Combinatorics/Enumerative/IncidenceAlgebra.lean
/-- The Möbius function on a product order. Based on lemma 2.1.13 of Incidence Algebras by Spiegel and O'Donnell. -/ @[simp] lemma mu_prod_mu : (mu 𝕜).prod (mu 𝕜) = (mu 𝕜 : IncidenceAlgebra 𝕜 (α × β))
𝕜 : Type u_2 α : Type u_5 β : Type u_6 inst✝⁸ : Ring 𝕜 inst✝⁷ : PartialOrder α inst✝⁶ : PartialOrder β inst✝⁵ : LocallyFiniteOrder α inst✝⁴ : LocallyFiniteOrder β inst✝³ : DecidableEq α inst✝² : DecidableEq β inst✝¹ : DecidableRel fun x1 x2 => x1 ≤ x2 inst✝ : DecidableRel fun x1 x2 => x1 ≤ x2 x✝⁵ x✝⁴ x✝³ : α x✝² x✝¹ x✝ : β ⊢ (mu 𝕜) x✝² x✝¹ * (zeta 𝕜) x✝⁴ x✝³ = (zeta 𝕜) x✝⁴ x✝³ * (mu 𝕜) x✝² x✝¹
simp
no goals
75516926b8530a97
unitInterval.eq_one_or_eq_zero_of_le_mul
Mathlib/Topology/UnitInterval.lean
lemma eq_one_or_eq_zero_of_le_mul {i j : I} (h : i ≤ j * i) : i = 0 ∨ j = 1
i j : ↑I h : 0 < ↑i ∧ ↑j < 1 ⊢ ↑j * ↑i < ↑i
simpa using mul_lt_mul_of_pos_right h.right h.left
no goals
93bd4eed0e6ac1e2
DistLat.inv_hom_apply
Mathlib/Order/Category/DistLat.lean
lemma inv_hom_apply {X Y : DistLat} (e : X ≅ Y) (x : X) : e.inv (e.hom x) = x
X Y : DistLat e : X ≅ Y x : ↑X ⊢ (ConcreteCategory.hom e.inv) ((ConcreteCategory.hom e.hom) x) = x
simp
no goals
ccb6d78e0847694f
Filter.IsCobounded.frequently_ge
Mathlib/Order/LiminfLimsup.lean
/-- For nontrivial filters in linear orders, coboundedness for `≤` implies frequent boundedness from below. -/ lemma IsCobounded.frequently_ge [LinearOrder α] [NeBot f] (cobdd : IsCobounded (· ≤ ·) f) : ∃ l, ∃ᶠ x in f, l ≤ x
case intro.inl α : Type u_1 f : Filter α inst✝¹ : LinearOrder α inst✝ : f.NeBot t : α ht : ∀ (a : α), (∀ᶠ (x : α) in f, (fun x1 x2 => x1 ≤ x2) x a) → (fun x1 x2 => x1 ≤ x2) t a tbot : IsBot t ⊢ ∃ l, ∃ᶠ (x : α) in f, l ≤ x
exact ⟨t, .of_forall fun r ↦ tbot r⟩
no goals
ecc5bf07ddfe8868
MvPolynomial.support_esymm''
Mathlib/RingTheory/MvPolynomial/Symmetric/Defs.lean
theorem support_esymm'' [DecidableEq σ] [Nontrivial R] (n : ℕ) : (esymm σ R n).support = (powersetCard n (univ : Finset σ)).biUnion fun t => (Finsupp.single (∑ i ∈ t, Finsupp.single i 1) (1 : R)).support
σ : Type u_5 R : Type u_6 inst✝³ : CommSemiring R inst✝² : Fintype σ inst✝¹ : DecidableEq σ inst✝ : Nontrivial R n : ℕ s t : Finset σ hst : s ≠ t h : ∑ i ∈ t, Finsupp.single i 1 = ∑ i ∈ s, Finsupp.single i 1 this : (t.biUnion fun i => (Finsupp.single i 1).support) = s.biUnion fun i => (Finsupp.single i 1).support hsingle : ∀ (s : Finset σ), ∀ x ∈ s, (Finsupp.single x 1).support = {x} hs : (s.biUnion fun a => (Finsupp.single a 1).support) = s.biUnion singleton ⊢ False
have ht := biUnion_congr (of_eq_true (eq_self t)) (hsingle t)
σ : Type u_5 R : Type u_6 inst✝³ : CommSemiring R inst✝² : Fintype σ inst✝¹ : DecidableEq σ inst✝ : Nontrivial R n : ℕ s t : Finset σ hst : s ≠ t h : ∑ i ∈ t, Finsupp.single i 1 = ∑ i ∈ s, Finsupp.single i 1 this : (t.biUnion fun i => (Finsupp.single i 1).support) = s.biUnion fun i => (Finsupp.single i 1).support hsingle : ∀ (s : Finset σ), ∀ x ∈ s, (Finsupp.single x 1).support = {x} hs : (s.biUnion fun a => (Finsupp.single a 1).support) = s.biUnion singleton ht : (t.biUnion fun a => (Finsupp.single a 1).support) = t.biUnion singleton ⊢ False
91d19fd65d77a5f5
BitVec.not_neg
Mathlib/.lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem not_neg (x : BitVec w) : ~~~(-x) = x + -1#w
case neg w : Nat x : BitVec (w + 1) hx : ¬x.toNat = 0 ⊢ (2 ^ (w + 1) - x.toNat) % 2 ^ (w + 1) = 2 ^ (w + 1) - 1 - (x.toNat + (2 ^ (w + 1) - 1 % 2 ^ (w + 1))) % 2 ^ (w + 1)
rw [show (_ - 1 % _) = _ by rw [Nat.mod_eq_of_lt (by omega)], show _ + (_ - 1) = (x.toNat - 1) + 2^(w + 1) by omega, Nat.add_mod_right, show (x.toNat - 1) % _ = _ by rw [Nat.mod_eq_of_lt (by omega)], show (_ - x.toNat) % _ = _ by rw [Nat.mod_eq_of_lt (by omega)]]
case neg w : Nat x : BitVec (w + 1) hx : ¬x.toNat = 0 ⊢ 2 ^ (w + 1) - x.toNat = 2 ^ (w + 1) - 1 - (x.toNat - 1)
d3765816d380f089
PerfectClosure.mk_eq_iff
Mathlib/FieldTheory/PerfectClosure.lean
theorem mk_eq_iff (x y : ℕ × K) : mk K p x = mk K p y ↔ ∃ z, (frobenius K p)^[y.1 + z] x.2 = (frobenius K p)^[x.1 + z] y.2
case mp K : Type u inst✝² : CommRing K p : ℕ inst✝¹ : Fact (Nat.Prime p) inst✝ : CharP K p x y : ℕ × K ⊢ mk K p x = mk K p y → ∃ z, (⇑(frobenius K p))^[y.1 + z] x.2 = (⇑(frobenius K p))^[x.1 + z] y.2
intro H
case mp K : Type u inst✝² : CommRing K p : ℕ inst✝¹ : Fact (Nat.Prime p) inst✝ : CharP K p x y : ℕ × K H : mk K p x = mk K p y ⊢ ∃ z, (⇑(frobenius K p))^[y.1 + z] x.2 = (⇑(frobenius K p))^[x.1 + z] y.2
50fcb88ed45b5508
alternatingGroup.nontrivial_of_three_le_card
Mathlib/GroupTheory/SpecificGroups/Alternating.lean
theorem nontrivial_of_three_le_card (h3 : 3 ≤ card α) : Nontrivial (alternatingGroup α)
α : Type u_1 inst✝¹ : Fintype α inst✝ : DecidableEq α h3 : 3 ≤ card α ⊢ 1 < 2
decide
no goals
ab07403d8f3d56b2
Language.map_kstar
Mathlib/Computability/Language.lean
theorem map_kstar (f : α → β) (l : Language α) : map f l∗ = (map f l)∗
α : Type u_1 β : Type u_2 f : α → β l : Language α ⊢ (map f) (⨆ i, l ^ i) = ⨆ i, (map f) l ^ i
simp_rw [← map_pow]
α : Type u_1 β : Type u_2 f : α → β l : Language α ⊢ (map f) (⨆ i, l ^ i) = ⨆ i, (map f) (l ^ i)
03c14b98312e4bfa
Std.Tactic.BVDecide.BVExpr.bitblast.go_decl_eq
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/Bitblast/BVExpr/Circuit/Impl/Expr.lean
theorem bitblast.go_decl_eq (aig : AIG BVBit) (expr : BVExpr w) : ∀ (idx : Nat) (h1) (h2), (go aig expr).val.aig.decls[idx]'h2 = aig.decls[idx]'h1
case append.h2 w idx l✝ r✝ : Nat lhs : BVExpr l✝ rhs : BVExpr r✝ lih : ∀ (aig : AIG BVBit) (h1 : idx < aig.decls.size) (h2 : idx < (go aig lhs).val.aig.decls.size), (go aig lhs).val.aig.decls[idx] = aig.decls[idx] rih : ∀ (aig : AIG BVBit) (h1 : idx < aig.decls.size) (h2 : idx < (go aig rhs).val.aig.decls.size), (go aig rhs).val.aig.decls[idx] = aig.decls[idx] aig : AIG BVBit h1 : idx < aig.decls.size h2 : idx < (go aig (lhs.append rhs)).val.aig.decls.size this✝¹ this✝ : aig.decls.size ≤ (go aig lhs).val.aig.decls.size this : (go aig lhs).val.aig.decls.size ≤ (go (go aig lhs).val.aig rhs).val.aig.decls.size ⊢ aig.decls.size ≤ (go (go aig lhs).1.aig rhs).val.aig.decls.size
apply Nat.le_trans <;> assumption
no goals
f92988d5a1595b39
CochainComplex.HomComplex.Cochain.comp_assoc
Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
/-- The associativity of the composition of cochains. -/ lemma comp_assoc {n₁ n₂ n₃ n₁₂ n₂₃ n₁₂₃ : ℤ} (z₁ : Cochain F G n₁) (z₂ : Cochain G K n₂) (z₃ : Cochain K L n₃) (h₁₂ : n₁ + n₂ = n₁₂) (h₂₃ : n₂ + n₃ = n₂₃) (h₁₂₃ : n₁ + n₂ + n₃ = n₁₂₃) : (z₁.comp z₂ h₁₂).comp z₃ (show n₁₂ + n₃ = n₁₂₃ by rw [← h₁₂, h₁₂₃]) = z₁.comp (z₂.comp z₃ h₂₃) (by rw [← h₂₃, ← h₁₂₃, add_assoc])
case h C : Type u inst✝¹ : Category.{v, u} C inst✝ : Preadditive C F G K L : CochainComplex C ℤ n₁ n₂ n₃ : ℤ z₁ : Cochain F G n₁ z₂ : Cochain G K n₂ z₃ : Cochain K L n₃ p q : ℤ hpq : p + (n₁ + n₂ + n₃) = q ⊢ ((z₁.comp z₂ ⋯).comp z₃ ⋯).v p q hpq = (z₁.comp (z₂.comp z₃ ⋯) ⋯).v p q hpq
rw [comp_v _ _ rfl p (p + n₁ + n₂) q (add_assoc _ _ _).symm (by omega), comp_v z₁ z₂ rfl p (p + n₁) (p + n₁ + n₂) (by omega) (by omega), comp_v z₁ (z₂.comp z₃ rfl) (add_assoc n₁ n₂ n₃).symm p (p + n₁) q (by omega) (by omega), comp_v z₂ z₃ rfl (p + n₁) (p + n₁ + n₂) q (by omega) (by omega), assoc]
no goals
57cd4e02b56f42c2
Finsupp.linearCombination_onFinset
Mathlib/LinearAlgebra/Finsupp/LinearCombination.lean
theorem linearCombination_onFinset {s : Finset α} {f : α → R} (g : α → M) (hf : ∀ a, f a ≠ 0 → a ∈ s) : linearCombination R g (Finsupp.onFinset s f hf) = Finset.sum s fun x : α => f x • g x
α : Type u_1 M : Type u_2 R : Type u_5 inst✝² : Semiring R inst✝¹ : AddCommMonoid M inst✝ : Module R M s : Finset α f : α → R g : α → M hf : ∀ (a : α), f a ≠ 0 → a ∈ s x : α a✝ : x ∈ s h : f x • g x ≠ 0 ⊢ f x ≠ 0
contrapose! h
α : Type u_1 M : Type u_2 R : Type u_5 inst✝² : Semiring R inst✝¹ : AddCommMonoid M inst✝ : Module R M s : Finset α f : α → R g : α → M hf : ∀ (a : α), f a ≠ 0 → a ∈ s x : α a✝ : x ∈ s h : f x = 0 ⊢ f x • g x = 0
072dad5e571c8914
CategoryTheory.isCoseparating_iff_mono
Mathlib/CategoryTheory/Generator/Basic.lean
theorem isCoseparating_iff_mono (𝒢 : Set C) [∀ A : C, HasProduct fun f : ΣG : 𝒢, A ⟶ (G : C) => (f.1 : C)] : IsCoseparating 𝒢 ↔ ∀ A : C, Mono (Pi.lift (@Sigma.snd 𝒢 fun G => A ⟶ (G : C)))
case refine_2 C : Type u₁ inst✝¹ : Category.{v₁, u₁} C 𝒢 : Set C inst✝ : ∀ (A : C), HasProduct fun f => ↑f.fst h : ∀ (A : C), Mono (Pi.lift Sigma.snd) X Y : C f g : X ⟶ Y hh : ∀ G ∈ 𝒢, ∀ (h : Y ⟶ G), f ≫ h = g ≫ h ⊢ f = g
haveI := h Y
case refine_2 C : Type u₁ inst✝¹ : Category.{v₁, u₁} C 𝒢 : Set C inst✝ : ∀ (A : C), HasProduct fun f => ↑f.fst h : ∀ (A : C), Mono (Pi.lift Sigma.snd) X Y : C f g : X ⟶ Y hh : ∀ G ∈ 𝒢, ∀ (h : Y ⟶ G), f ≫ h = g ≫ h this : Mono (Pi.lift Sigma.snd) ⊢ f = g
ae856e477809f8db
Std.Tactic.BVDecide.BVExpr.bitblast.denote_blastUdiv
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/Bitblast/BVExpr/Circuit/Lemmas/Operations/Udiv.lean
theorem denote_blastUdiv (aig : AIG α) (lhs rhs : BitVec w) (assign : α → Bool) (input : BinaryRefVec aig w) (hleft : ∀ (idx : Nat) (hidx : idx < w), ⟦aig, input.lhs.get idx hidx, assign⟧ = lhs.getLsbD idx) (hright : ∀ (idx : Nat) (hidx : idx < w), ⟦aig, input.rhs.get idx hidx, assign⟧ = rhs.getLsbD idx) : ∀ (idx : Nat) (hidx : idx < w), ⟦(blastUdiv aig input).aig, (blastUdiv aig input).vec.get idx hidx, assign⟧ = (lhs / rhs).getLsbD idx
α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α w : Nat aig : AIG α lhs rhs : BitVec w assign : α → Bool input : aig.BinaryRefVec w hleft : ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := input.lhs.get idx hidx }⟧ = lhs.getLsbD idx hright : ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := input.rhs.get idx hidx }⟧ = rhs.getLsbD idx idx : Nat hidx : idx < w hdiscr✝ : ¬⟦assign, { aig := (blastUdiv.go (BVPred.mkEq (((blastConst aig 0#w).aig.mkConstCached false).aig.mkConstCached true).aig { lhs := (((input.cast ⋯).cast ⋯).cast ⋯).rhs, rhs := ((blastConst aig 0#w).vec.cast ⋯).cast ⋯ }).aig w { gate := ((blastConst aig 0#w).aig.mkConstCached false).ref.gate, hgate := ⋯ } { gate := (((blastConst aig 0#w).aig.mkConstCached false).aig.mkConstCached true).ref.gate, hgate := ⋯ } ((((input.cast ⋯).cast ⋯).cast ⋯).lhs.cast ⋯) ((((input.cast ⋯).cast ⋯).cast ⋯).rhs.cast ⋯) w 0 ((((blastConst aig 0#w).vec.cast ⋯).cast ⋯).cast ⋯) ((((blastConst aig 0#w).vec.cast ⋯).cast ⋯).cast ⋯)).aig, ref := { gate := (BVPred.mkEq (((blastConst aig 0#w).aig.mkConstCached false).aig.mkConstCached true).aig { lhs := (((input.cast ⋯).cast ⋯).cast ⋯).rhs, rhs := ((blastConst aig 0#w).vec.cast ⋯).cast ⋯ }).ref.gate, hgate := ⋯ } }⟧ = true hdiscr : ¬(rhs == 0#w) = true ⊢ 0#w < rhs
rw [Normalize.BitVec.zero_lt_iff_zero_neq]
α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α w : Nat aig : AIG α lhs rhs : BitVec w assign : α → Bool input : aig.BinaryRefVec w hleft : ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := input.lhs.get idx hidx }⟧ = lhs.getLsbD idx hright : ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := input.rhs.get idx hidx }⟧ = rhs.getLsbD idx idx : Nat hidx : idx < w hdiscr✝ : ¬⟦assign, { aig := (blastUdiv.go (BVPred.mkEq (((blastConst aig 0#w).aig.mkConstCached false).aig.mkConstCached true).aig { lhs := (((input.cast ⋯).cast ⋯).cast ⋯).rhs, rhs := ((blastConst aig 0#w).vec.cast ⋯).cast ⋯ }).aig w { gate := ((blastConst aig 0#w).aig.mkConstCached false).ref.gate, hgate := ⋯ } { gate := (((blastConst aig 0#w).aig.mkConstCached false).aig.mkConstCached true).ref.gate, hgate := ⋯ } ((((input.cast ⋯).cast ⋯).cast ⋯).lhs.cast ⋯) ((((input.cast ⋯).cast ⋯).cast ⋯).rhs.cast ⋯) w 0 ((((blastConst aig 0#w).vec.cast ⋯).cast ⋯).cast ⋯) ((((blastConst aig 0#w).vec.cast ⋯).cast ⋯).cast ⋯)).aig, ref := { gate := (BVPred.mkEq (((blastConst aig 0#w).aig.mkConstCached false).aig.mkConstCached true).aig { lhs := (((input.cast ⋯).cast ⋯).cast ⋯).rhs, rhs := ((blastConst aig 0#w).vec.cast ⋯).cast ⋯ }).ref.gate, hgate := ⋯ } }⟧ = true hdiscr : ¬(rhs == 0#w) = true ⊢ rhs ≠ 0#w
1e06923b53c4a62f
WithBot.succ_mono
Mathlib/Order/SuccPred/WithBot.lean
lemma succ_mono : Monotone (succ : WithBot α → α) | ⊥, _, _ => by simp | (a : α), ⊥, hab => by simp at hab | (a : α), (b : α), hab => Order.succ_le_succ (by simpa using hab)
α : Type u_1 inst✝² : Preorder α inst✝¹ : OrderBot α inst✝ : SuccOrder α x✝¹ : WithBot α x✝ : ⊥ ≤ x✝¹ ⊢ ⊥.succ ≤ x✝¹.succ
simp
no goals
ef72efd54259d7ea
MeasureTheory.Measure.addHaar_image_homothety
Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean
theorem addHaar_image_homothety (x : E) (r : ℝ) (s : Set E) : μ (AffineMap.homothety x r '' s) = ENNReal.ofReal (abs (r ^ finrank ℝ E)) * μ s := calc μ (AffineMap.homothety x r '' s) = μ ((fun y => y + x) '' (r • (fun y => y + -x) '' s))
E : Type u_1 inst✝⁵ : NormedAddCommGroup E inst✝⁴ : NormedSpace ℝ E inst✝³ : MeasurableSpace E inst✝² : BorelSpace E inst✝¹ : FiniteDimensional ℝ E μ : Measure E inst✝ : μ.IsAddHaarMeasure x : E r : ℝ s : Set E ⊢ μ (⇑(AffineMap.homothety x r) '' s) = μ ((fun x_1 => r • (x_1 - x) + x) '' s)
rfl
no goals
b87771ad3884117d
IntermediateField.Lifts.nonempty_algHom_of_exist_lifts_finset
Mathlib/FieldTheory/Extension.lean
theorem nonempty_algHom_of_exist_lifts_finset [alg : Algebra.IsAlgebraic F E] (h : ∀ S : Finset E, ∃ σ : Lifts F E K, (S : Set E) ⊆ σ.carrier) : Nonempty (E →ₐ[F] K)
case intro.intro F : Type u_1 E : Type u_2 K : Type u_3 inst✝⁴ : Field F inst✝³ : Field E inst✝² : Field K inst✝¹ : Algebra F E inst✝ : Algebra F K alg : Algebra.IsAlgebraic F E h : ∀ (S : Finset E), ∃ σ, ↑S ⊆ ↑σ.carrier this✝ : ⊥.IsExtendible ϕ : Lifts F E K hϕ : Maximal (fun x => x ∈ {ϕ | ϕ.IsExtendible}) ϕ this : ϕ.carrier ≠ ⊤ α : E hα : α ∉ ϕ.carrier ⊢ False
let _ : Algebra ϕ.carrier K := ϕ.emb.toAlgebra
case intro.intro F : Type u_1 E : Type u_2 K : Type u_3 inst✝⁴ : Field F inst✝³ : Field E inst✝² : Field K inst✝¹ : Algebra F E inst✝ : Algebra F K alg : Algebra.IsAlgebraic F E h : ∀ (S : Finset E), ∃ σ, ↑S ⊆ ↑σ.carrier this✝ : ⊥.IsExtendible ϕ : Lifts F E K hϕ : Maximal (fun x => x ∈ {ϕ | ϕ.IsExtendible}) ϕ this : ϕ.carrier ≠ ⊤ α : E hα : α ∉ ϕ.carrier x✝ : Algebra (↥ϕ.carrier) K := ϕ.emb.toAlgebra ⊢ False
18d2833b17837530
ProbabilityTheory.Kernel.IndepSets.indep_aux
Mathlib/Probability/Independence/Kernel.lean
theorem IndepSets.indep_aux {m₂ m : MeasurableSpace Ω} {κ : Kernel α Ω} {μ : Measure α} [IsZeroOrMarkovKernel κ] {p1 p2 : Set (Set Ω)} (h2 : m₂ ≤ m) (hp2 : IsPiSystem p2) (hpm2 : m₂ = generateFrom p2) (hyp : IndepSets p1 p2 κ μ) {t1 t2 : Set Ω} (ht1 : t1 ∈ p1) (ht1m : MeasurableSet[m] t1) (ht2m : MeasurableSet[m₂] t2) : ∀ᵐ a ∂μ, κ a (t1 ∩ t2) = κ a t1 * κ a t2
case inr.basic α : Type u_1 Ω : Type u_2 _mα : MeasurableSpace α m₂ m : MeasurableSpace Ω κ : Kernel α Ω μ : Measure α inst✝ : IsZeroOrMarkovKernel κ p1 p2 : Set (Set Ω) h2 : m₂ ≤ m hp2 : IsPiSystem p2 hpm2 : m₂ = generateFrom p2 hyp : IndepSets p1 p2 κ μ t1 t2 : Set Ω ht1 : t1 ∈ p1 ht1m : MeasurableSet t1 h : IsMarkovKernel κ u : Set Ω hu : u ∈ p2 ⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ u) = (κ a) t1 * (κ a) u
exact hyp t1 u ht1 hu
no goals
7296e6275e034385
SimpleGraph.Preconnected.boxProd
Mathlib/Combinatorics/SimpleGraph/Prod.lean
theorem Preconnected.boxProd (hG : G.Preconnected) (hH : H.Preconnected) : (G □ H).Preconnected
case intro.intro α : Type u_1 β : Type u_2 G : SimpleGraph α H : SimpleGraph β hG : G.Preconnected hH : H.Preconnected x y : α × β w₁ : G.Walk x.1 y.1 w₂ : H.Walk x.2 y.2 ⊢ (G □ H).Reachable x y
exact ⟨(w₁.boxProdLeft _ _).append (w₂.boxProdRight _ _)⟩
no goals
9563a2a9ce79f351
exists_msmooth_support_eq_eq_one_iff
Mathlib/Geometry/Manifold/PartitionOfUnity.lean
theorem exists_msmooth_support_eq_eq_one_iff {s t : Set M} (hs : IsOpen s) (ht : IsClosed t) (h : t ⊆ s) : ∃ f : M → ℝ, ContMDiff I 𝓘(ℝ) ∞ f ∧ range f ⊆ Icc 0 1 ∧ support f = s ∧ (∀ x, x ∈ t ↔ f x = 1)
E : Type uE inst✝⁸ : NormedAddCommGroup E inst✝⁷ : NormedSpace ℝ E H : Type uH inst✝⁶ : TopologicalSpace H I : ModelWithCorners ℝ E H M : Type uM inst✝⁵ : TopologicalSpace M inst✝⁴ : ChartedSpace H M inst✝³ : FiniteDimensional ℝ E inst✝² : IsManifold I ∞ M inst✝¹ : SigmaCompactSpace M inst✝ : T2Space M s t : Set M hs : IsOpen s ht : IsClosed t h : t ⊆ s f : M → ℝ f_supp : support f = s f_diff : ContMDiff I 𝓘(ℝ, ℝ) ∞ f f_pos : ∀ (x : M), 0 ≤ f x g : M → ℝ g_supp : support g = tᶜ g_diff : ContMDiff I 𝓘(ℝ, ℝ) ∞ g g_pos : ∀ (x : M), 0 ≤ g x x : M xs : x ∉ support f ⊢ 0 < g x
apply lt_of_le_of_ne (g_pos x) (Ne.symm ?_)
E : Type uE inst✝⁸ : NormedAddCommGroup E inst✝⁷ : NormedSpace ℝ E H : Type uH inst✝⁶ : TopologicalSpace H I : ModelWithCorners ℝ E H M : Type uM inst✝⁵ : TopologicalSpace M inst✝⁴ : ChartedSpace H M inst✝³ : FiniteDimensional ℝ E inst✝² : IsManifold I ∞ M inst✝¹ : SigmaCompactSpace M inst✝ : T2Space M s t : Set M hs : IsOpen s ht : IsClosed t h : t ⊆ s f : M → ℝ f_supp : support f = s f_diff : ContMDiff I 𝓘(ℝ, ℝ) ∞ f f_pos : ∀ (x : M), 0 ≤ f x g : M → ℝ g_supp : support g = tᶜ g_diff : ContMDiff I 𝓘(ℝ, ℝ) ∞ g g_pos : ∀ (x : M), 0 ≤ g x x : M xs : x ∉ support f ⊢ g x ≠ 0
2508fb22dbe6e145
MulAction.IsBlock.subsingleton_of_card_lt
Mathlib/GroupTheory/GroupAction/Blocks.lean
theorem subsingleton_of_card_lt [Finite X] (hB : IsBlock G B) (hB' : Nat.card X < 2 * Set.ncard (orbit G B)) : B.Subsingleton
G : Type u_1 inst✝³ : Group G X : Type u_2 inst✝² : MulAction G X inst✝¹ : IsPretransitive G X B : Set X inst✝ : Finite X hB : IsBlock G B hB' : Nat.card X < 2 * (orbit G B).ncard this : B.ncard < 2 ⊢ B.Subsingleton
rw [Nat.lt_succ_iff, Set.ncard_le_one_iff_eq] at this
G : Type u_1 inst✝³ : Group G X : Type u_2 inst✝² : MulAction G X inst✝¹ : IsPretransitive G X B : Set X inst✝ : Finite X hB : IsBlock G B hB' : Nat.card X < 2 * (orbit G B).ncard this : B = ∅ ∨ ∃ a, B = {a} ⊢ B.Subsingleton
97bb74a7b2c4a12d
Primrec.of_equiv_symm
Mathlib/Computability/Primrec.lean
theorem of_equiv_symm {β} {e : β ≃ α} : haveI := Primcodable.ofEquiv α e Primrec e.symm := letI := Primcodable.ofEquiv α e encode_iff.1 (show Primrec fun a => encode (e (e.symm a)) by simp [Primrec.encode])
α : Type u_1 inst✝ : Primcodable α β : Type u_4 e : β ≃ α this : Primcodable β := Primcodable.ofEquiv α e ⊢ Primrec fun a => encode (e (e.symm a))
simp [Primrec.encode]
no goals
596b50cd3bdff543
Polynomial.coprime_of_root_cyclotomic
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
theorem coprime_of_root_cyclotomic {n : ℕ} (hpos : 0 < n) {p : ℕ} [hprime : Fact p.Prime] {a : ℕ} (hroot : IsRoot (cyclotomic n (ZMod p)) (Nat.castRingHom (ZMod p) a)) : a.Coprime p
case a n : ℕ hpos : 0 < n p : ℕ hprime : Fact (Nat.Prime p) a : ℕ hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a) h : p ∣ a ⊢ False
replace h := (ZMod.natCast_zmod_eq_zero_iff_dvd a p).2 h
case a n : ℕ hpos : 0 < n p : ℕ hprime : Fact (Nat.Prime p) a : ℕ hroot : (cyclotomic n (ZMod p)).IsRoot ((Nat.castRingHom (ZMod p)) a) h : ↑a = 0 ⊢ False
0720e362f4eb9006
Nat.modEq_digits_sum
Mathlib/Data/Nat/Digits.lean
theorem modEq_digits_sum (b b' : ℕ) (h : b' % b = 1) (n : ℕ) : n ≡ (digits b' n).sum [MOD b]
case h.e'_3.h.e'_3 b b' : ℕ h : b' % b = 1 n : ℕ ⊢ 1 = b' % b
exact h.symm
no goals
854602fdaff1f255
Lean.Data.AC.Context.evalList_sort_congr
Mathlib/.lake/packages/lean4/src/lean/Init/Data/AC.lean
theorem Context.evalList_sort_congr (ctx : Context α) (h : Commutative ctx.op) (h₂ : evalList α ctx a = evalList α ctx b) (h₃ : a ≠ []) (h₄ : b ≠ []) : evalList α ctx (sort.loop a c) = evalList α ctx (sort.loop b c)
case cons.h₂.cons.nil α : Sort u_1 ctx : Context α h : Commutative ctx.op c : Nat tail✝ : List Nat ih : ∀ {a b : List Nat}, evalList α ctx a = evalList α ctx b → a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝) a : Nat as : List Nat h₃ : a :: as ≠ [] h₄ : [] ≠ [] h₂ : evalList α ctx (a :: as) = evalList α ctx [] ⊢ evalList α ctx (c :: a :: as) = evalList α ctx [c]
apply absurd h₄
case cons.h₂.cons.nil α : Sort u_1 ctx : Context α h : Commutative ctx.op c : Nat tail✝ : List Nat ih : ∀ {a b : List Nat}, evalList α ctx a = evalList α ctx b → a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝) a : Nat as : List Nat h₃ : a :: as ≠ [] h₄ : [] ≠ [] h₂ : evalList α ctx (a :: as) = evalList α ctx [] ⊢ ¬[] ≠ []
21bdef0510a8391b
ContinuousAffineMap.norm_comp_le
Mathlib/Analysis/Normed/Affine/ContinuousAffineMap.lean
theorem norm_comp_le (g : W₂ →ᴬ[𝕜] V) : ‖f.comp g‖ ≤ ‖f‖ * ‖g‖ + ‖f 0‖
𝕜 : Type u_1 V : Type u_3 W : Type u_4 W₂ : Type u_5 inst✝⁶ : NormedAddCommGroup V inst✝⁵ : NormedAddCommGroup W inst✝⁴ : NormedAddCommGroup W₂ inst✝³ : NontriviallyNormedField 𝕜 inst✝² : NormedSpace 𝕜 V inst✝¹ : NormedSpace 𝕜 W inst✝ : NormedSpace 𝕜 W₂ f : V →ᴬ[𝕜] W g : W₂ →ᴬ[𝕜] V ⊢ ‖f.comp g‖ ≤ ‖f‖ * ‖g‖ + ‖f 0‖
rw [norm_def, max_le_iff]
𝕜 : Type u_1 V : Type u_3 W : Type u_4 W₂ : Type u_5 inst✝⁶ : NormedAddCommGroup V inst✝⁵ : NormedAddCommGroup W inst✝⁴ : NormedAddCommGroup W₂ inst✝³ : NontriviallyNormedField 𝕜 inst✝² : NormedSpace 𝕜 V inst✝¹ : NormedSpace 𝕜 W inst✝ : NormedSpace 𝕜 W₂ f : V →ᴬ[𝕜] W g : W₂ →ᴬ[𝕜] V ⊢ ‖(f.comp g) 0‖ ≤ ‖f‖ * ‖g‖ + ‖f 0‖ ∧ ‖(f.comp g).contLinear‖ ≤ ‖f‖ * ‖g‖ + ‖f 0‖
aa55b874b2229b96
Zsqrtd.le_arch
Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem le_arch (a : ℤ√d) : ∃ n : ℕ, a ≤ n
case intro.intro.zero d : ℕ a : ℤ√↑d x : ℕ h : a ≤ { re := ↑x, im := ↑0 } ⊢ { re := 0, im := 0 }.Nonneg
trivial
no goals
8d26cc96bf8abedc
Std.Tactic.BVDecide.BVExpr.bitblast.blastMul.go_denote_eq
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/Bitblast/BVExpr/Circuit/Lemmas/Operations/Mul.lean
theorem go_denote_eq {w : Nat} (aig : AIG BVBit) (curr : Nat) (hcurr : curr + 1 ≤ w) (acc : AIG.RefVec aig w) (lhs rhs : AIG.RefVec aig w) (lexpr rexpr : BitVec w) (assign : Assignment) (hleft : ∀ (idx : Nat) (hidx : idx < w), ⟦aig, lhs.get idx hidx, assign.toAIGAssignment⟧ = lexpr.getLsbD idx) (hright : ∀ (idx : Nat) (hidx : idx < w), ⟦aig, rhs.get idx hidx, assign.toAIGAssignment⟧ = rexpr.getLsbD idx) (hacc : ∀ (idx : Nat) (hidx : idx < w), ⟦aig, acc.get idx hidx, assign.toAIGAssignment⟧ = (BitVec.mulRec lexpr rexpr curr).getLsbD idx) : ∀ (idx : Nat) (hidx : idx < w), ⟦ (go aig lhs rhs (curr + 1) acc).aig, (go aig lhs rhs (curr + 1) acc).vec.get idx hidx, assign.toAIGAssignment ⟧ = (BitVec.mulRec lexpr rexpr w).getLsbD idx
case isTrue.isFalse.hleft w : Nat aig : AIG BVBit curr : Nat hcurr : curr + 1 ≤ w acc lhs rhs : aig.RefVec w lexpr rexpr : BitVec w assign : Assignment hleft : ∀ (idx : Nat) (hidx : idx < w), ⟦assign.toAIGAssignment, { aig := aig, ref := lhs.get idx hidx }⟧ = lexpr.getLsbD idx hright : ∀ (idx : Nat) (hidx : idx < w), ⟦assign.toAIGAssignment, { aig := aig, ref := rhs.get idx hidx }⟧ = rexpr.getLsbD idx hacc : ∀ (idx : Nat) (hidx : idx < w), ⟦assign.toAIGAssignment, { aig := aig, ref := acc.get idx hidx }⟧ = (lexpr.mulRec rexpr curr).getLsbD idx idx✝ : Nat hidx✝ : idx✝ < w res : RefVecEntry BVBit w h✝¹ : curr + 1 < w h✝ : ¬aig.isConstant (rhs.get (curr + 1) h✝¹) false = true hgo : go (RefVec.ite (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).aig { discr := ((rhs.cast ⋯).cast ⋯).get (curr + 1) h✝¹, lhs := (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).vec, rhs := (acc.cast ⋯).cast ⋯ }).aig (((lhs.cast ⋯).cast ⋯).cast ⋯) (((rhs.cast ⋯).cast ⋯).cast ⋯) (curr + 1 + 1) (RefVec.ite (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).aig { discr := ((rhs.cast ⋯).cast ⋯).get (curr + 1) h✝¹, lhs := (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).vec, rhs := (acc.cast ⋯).cast ⋯ }).vec = res idx : Nat hidx : idx < w ⊢ ⟦assign.toAIGAssignment, { aig := (RefVec.ite (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).aig { discr := ((rhs.cast ⋯).cast ⋯).get (curr + 1) h✝¹, lhs := (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).vec, rhs := (acc.cast ⋯).cast ⋯ }).aig, ref := (((lhs.cast ⋯).cast ⋯).cast ⋯).get idx hidx }⟧ = lexpr.getLsbD idx
simp only [RefVec.get_cast, Ref.cast_eq]
case isTrue.isFalse.hleft w : Nat aig : AIG BVBit curr : Nat hcurr : curr + 1 ≤ w acc lhs rhs : aig.RefVec w lexpr rexpr : BitVec w assign : Assignment hleft : ∀ (idx : Nat) (hidx : idx < w), ⟦assign.toAIGAssignment, { aig := aig, ref := lhs.get idx hidx }⟧ = lexpr.getLsbD idx hright : ∀ (idx : Nat) (hidx : idx < w), ⟦assign.toAIGAssignment, { aig := aig, ref := rhs.get idx hidx }⟧ = rexpr.getLsbD idx hacc : ∀ (idx : Nat) (hidx : idx < w), ⟦assign.toAIGAssignment, { aig := aig, ref := acc.get idx hidx }⟧ = (lexpr.mulRec rexpr curr).getLsbD idx idx✝ : Nat hidx✝ : idx✝ < w res : RefVecEntry BVBit w h✝¹ : curr + 1 < w h✝ : ¬aig.isConstant (rhs.get (curr + 1) h✝¹) false = true hgo : go (RefVec.ite (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).aig { discr := ((rhs.cast ⋯).cast ⋯).get (curr + 1) h✝¹, lhs := (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).vec, rhs := (acc.cast ⋯).cast ⋯ }).aig (((lhs.cast ⋯).cast ⋯).cast ⋯) (((rhs.cast ⋯).cast ⋯).cast ⋯) (curr + 1 + 1) (RefVec.ite (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).aig { discr := ((rhs.cast ⋯).cast ⋯).get (curr + 1) h✝¹, lhs := (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).vec, rhs := (acc.cast ⋯).cast ⋯ }).vec = res idx : Nat hidx : idx < w ⊢ ⟦assign.toAIGAssignment, { aig := (RefVec.ite (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).aig { discr := ((rhs.cast ⋯).cast ⋯).get (curr + 1) h✝¹, lhs := (blastAdd (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).aig { lhs := acc.cast ⋯, rhs := (blastShiftLeftConst aig { vec := lhs, distance := curr + 1 }).vec }).vec, rhs := (acc.cast ⋯).cast ⋯ }).aig, ref := { gate := (lhs.get idx hidx).gate, hgate := ⋯ } }⟧ = lexpr.getLsbD idx
45666f07d8b1c2e0
hasBasis_nhdsSet_Iic_Iio
Mathlib/Topology/Order/NhdsSet.lean
theorem hasBasis_nhdsSet_Iic_Iio (a : α) [h : Nonempty (Ioi a)] : HasBasis (𝓝ˢ (Iic a)) (a < ·) Iio
α : Type u_1 inst✝² : LinearOrder α inst✝¹ : TopologicalSpace α inst✝ : OrderTopology α a : α h : Nonempty ↑(Ioi a) ⊢ (𝓝ˢ (Iic a)).HasBasis (fun x => a < x) Iio
refine ⟨fun s ↦ ⟨fun hs ↦ ?_, fun ⟨b, hab, hb⟩ ↦ mem_of_superset (Iio_mem_nhdsSet_Iic hab) hb⟩⟩
α : Type u_1 inst✝² : LinearOrder α inst✝¹ : TopologicalSpace α inst✝ : OrderTopology α a : α h : Nonempty ↑(Ioi a) s : Set α hs : s ∈ 𝓝ˢ (Iic a) ⊢ ∃ i, a < i ∧ Iio i ⊆ s
7165672eb2730c40
Module.DirectLimit.exists_eq_of_of_eq
Mathlib/Algebra/Colimit/Module.lean
theorem exists_eq_of_of_eq {i x y} (h : of R ι G f i x = of R ι G f i y) : ∃ j hij, f i j hij x = f i j hij y
R : Type u_1 inst✝⁶ : Semiring R ι : Type u_2 inst✝⁵ : Preorder ι G : ι → Type u_3 inst✝⁴ : DecidableEq ι inst✝³ : (i : ι) → AddCommMonoid (G i) inst✝² : (i : ι) → Module R (G i) f : (i j : ι) → i ≤ j → G i →ₗ[R] G j inst✝¹ : DirectedSystem G fun x1 x2 x3 => ⇑(f x1 x2 x3) inst✝ : IsDirected ι fun x1 x2 => x1 ≤ x2 i : ι x y : G i h : (of R ι G f i) x = (of R ι G f i) y ⊢ ∃ j, ∃ (hij : i ≤ j), (f i j hij) x = (f i j hij) y
have := Nonempty.intro i
R : Type u_1 inst✝⁶ : Semiring R ι : Type u_2 inst✝⁵ : Preorder ι G : ι → Type u_3 inst✝⁴ : DecidableEq ι inst✝³ : (i : ι) → AddCommMonoid (G i) inst✝² : (i : ι) → Module R (G i) f : (i j : ι) → i ≤ j → G i →ₗ[R] G j inst✝¹ : DirectedSystem G fun x1 x2 x3 => ⇑(f x1 x2 x3) inst✝ : IsDirected ι fun x1 x2 => x1 ≤ x2 i : ι x y : G i h : (of R ι G f i) x = (of R ι G f i) y this : Nonempty ι ⊢ ∃ j, ∃ (hij : i ≤ j), (f i j hij) x = (f i j hij) y
db7d351d31db8aaa
Quotient.inductionOn₃
Mathlib/.lake/packages/lean4/src/lean/Init/Core.lean
theorem inductionOn₃ {s₃ : Setoid φ} {motive : Quotient s₁ → Quotient s₂ → Quotient s₃ → Prop} (q₁ : Quotient s₁) (q₂ : Quotient s₂) (q₃ : Quotient s₃) (h : (a : α) → (b : β) → (c : φ) → motive (Quotient.mk s₁ a) (Quotient.mk s₂ b) (Quotient.mk s₃ c)) : motive q₁ q₂ q₃
α : Sort uA β : Sort uB φ : Sort uC s₁ : Setoid α s₂ : Setoid β s₃ : Setoid φ motive : Quotient s₁ → Quotient s₂ → Quotient s₃ → Prop q₁ : Quotient s₁ q₂ : Quotient s₂ q₃ : Quotient s₃ h : ∀ (a : α) (b : β) (c : φ), motive (Quotient.mk s₁ a) (Quotient.mk s₂ b) (Quotient.mk s₃ c) ⊢ motive q₁ q₂ q₃
induction q₁ using Quotient.ind
case a α : Sort uA β : Sort uB φ : Sort uC s₁ : Setoid α s₂ : Setoid β s₃ : Setoid φ motive : Quotient s₁ → Quotient s₂ → Quotient s₃ → Prop q₂ : Quotient s₂ q₃ : Quotient s₃ h : ∀ (a : α) (b : β) (c : φ), motive (Quotient.mk s₁ a) (Quotient.mk s₂ b) (Quotient.mk s₃ c) a✝ : α ⊢ motive (Quotient.mk s₁ a✝) q₂ q₃
b768315a7eea770d
Lean.Order.List.monotone_filterM
Mathlib/.lake/packages/lean4/src/lean/Init/Internal/Order/Lemmas.lean
theorem monotone_filterM {m : Type → Type v} [Monad m] [∀ α, PartialOrder (m α)] [MonoBind m] {α : Type} (f : γ → α → m Bool) (xs : List α) (hmono : monotone f) : monotone (fun x => xs.filterM (f x))
case hmono₁ γ : Type w inst✝³ : PartialOrder γ m : Type → Type v inst✝² : Monad m inst✝¹ : (α : Type) → PartialOrder (m α) inst✝ : MonoBind m α : Type f : γ → α → m Bool xs : List α hmono : monotone f ⊢ monotone fun x => List.filterAuxM (f x) xs []
exact monotone_filterAuxM f xs [] hmono
no goals
03c2246583d08433
Std.Tactic.BVDecide.BVExpr.bitblast.blastArithShiftRight.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 : AIG.RefVec aig n) (curr : Nat) (hcurr : curr ≤ n - 1) (acc : AIG.RefVec aig w) (lhs : BitVec w) (rhs : BitVec n) (assign : α → Bool) (hacc : ∀ (idx : Nat) (hidx : idx < w), ⟦aig, acc.get idx hidx, assign⟧ = (BitVec.sshiftRightRec lhs rhs curr).getLsbD idx) (hright : ∀ (idx : Nat) (hidx : idx < n), ⟦aig, distance.get idx hidx, assign⟧ = rhs.getLsbD idx) : ∀ (idx : Nat) (hidx : idx < w), ⟦ (go aig distance curr acc).aig, (go aig distance curr acc).vec.get idx hidx, assign ⟧ = (BitVec.sshiftRightRec lhs rhs (n - 1)).getLsbD idx
case isTrue.hacc α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α n w : Nat aig : AIG α distance : aig.RefVec n curr : Nat hcurr : curr ≤ n - 1 acc : aig.RefVec w lhs : BitVec w rhs : BitVec n assign : α → Bool hacc : ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := acc.get idx hidx }⟧ = (lhs.sshiftRightRec rhs curr).getLsbD idx hright : ∀ (idx : Nat) (hidx : idx < n), ⟦assign, { aig := aig, ref := distance.get idx hidx }⟧ = rhs.getLsbD idx idx✝ : Nat hidx✝ : idx✝ < w res : RefVecEntry α w h✝ : curr < n - 1 hgo : go (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).aig (distance.cast ⋯) (curr + 1) (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).vec = res idx : Nat hidx : idx < w ⊢ ⟦assign, { aig := (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).aig, ref := (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).vec.get idx hidx }⟧ = ((lhs.sshiftRightRec rhs curr).sshiftRight' (rhs &&& BitVec.twoPow n (curr + 1))).getLsbD idx
rw [twoPowShift_eq (lhs := BitVec.sshiftRightRec lhs rhs curr)]
case isTrue.hacc.hleft α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α n w : Nat aig : AIG α distance : aig.RefVec n curr : Nat hcurr : curr ≤ n - 1 acc : aig.RefVec w lhs : BitVec w rhs : BitVec n assign : α → Bool hacc : ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := acc.get idx hidx }⟧ = (lhs.sshiftRightRec rhs curr).getLsbD idx hright : ∀ (idx : Nat) (hidx : idx < n), ⟦assign, { aig := aig, ref := distance.get idx hidx }⟧ = rhs.getLsbD idx idx✝ : Nat hidx✝ : idx✝ < w res : RefVecEntry α w h✝ : curr < n - 1 hgo : go (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).aig (distance.cast ⋯) (curr + 1) (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).vec = res idx : Nat hidx : idx < w ⊢ ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := { n := n, lhs := acc, rhs := distance, pow := curr + 1 }.lhs.get idx hidx }⟧ = (lhs.sshiftRightRec rhs curr).getLsbD idx case isTrue.hacc.hright α : Type inst✝¹ : Hashable α inst✝ : DecidableEq α n w : Nat aig : AIG α distance : aig.RefVec n curr : Nat hcurr : curr ≤ n - 1 acc : aig.RefVec w lhs : BitVec w rhs : BitVec n assign : α → Bool hacc : ∀ (idx : Nat) (hidx : idx < w), ⟦assign, { aig := aig, ref := acc.get idx hidx }⟧ = (lhs.sshiftRightRec rhs curr).getLsbD idx hright : ∀ (idx : Nat) (hidx : idx < n), ⟦assign, { aig := aig, ref := distance.get idx hidx }⟧ = rhs.getLsbD idx idx✝ : Nat hidx✝ : idx✝ < w res : RefVecEntry α w h✝ : curr < n - 1 hgo : go (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).aig (distance.cast ⋯) (curr + 1) (twoPowShift aig { n := n, lhs := acc, rhs := distance, pow := curr + 1 }).vec = res idx : Nat hidx : idx < w ⊢ ∀ (idx : Nat) (hidx : idx < { n := n, lhs := acc, rhs := distance, pow := curr + 1 }.n), ⟦assign, { aig := aig, ref := { n := n, lhs := acc, rhs := distance, pow := curr + 1 }.rhs.get idx hidx }⟧ = rhs.getLsbD idx
a62c971c970b9dfe
MeasureTheory.AEEqFun.Integrable.add
Mathlib/MeasureTheory/Function/L1Space/AEEqFun.lean
theorem Integrable.add {f g : α →ₘ[μ] β} : Integrable f → Integrable g → Integrable (f + g)
α : Type u_1 β : Type u_2 m : MeasurableSpace α μ : Measure α inst✝ : NormedAddCommGroup β f g : α →ₘ[μ] β ⊢ f.Integrable → g.Integrable → (f + g).Integrable
refine induction_on₂ f g fun f hf g hg hfi hgi => ?_
α : Type u_1 β : Type u_2 m : MeasurableSpace α μ : Measure α inst✝ : NormedAddCommGroup β f✝ g✝ : α →ₘ[μ] β f : α → β hf : AEStronglyMeasurable f μ g : α → β hg : AEStronglyMeasurable g μ hfi : (mk f hf).Integrable hgi : (mk g hg).Integrable ⊢ (mk f hf + mk g hg).Integrable
48646018570a5bc9
exists_Ioo_extr_on_Icc
Mathlib/Topology/Order/Rolle.lean
theorem exists_Ioo_extr_on_Icc (hab : a < b) (hfc : ContinuousOn f (Icc a b)) (hfI : f a = f b) : ∃ c ∈ Ioo a b, IsExtrOn f (Icc a b) c
X : Type u_1 Y : Type u_2 inst✝⁶ : ConditionallyCompleteLinearOrder X inst✝⁵ : DenselyOrdered X inst✝⁴ : TopologicalSpace X inst✝³ : OrderTopology X inst✝² : LinearOrder Y inst✝¹ : TopologicalSpace Y inst✝ : OrderTopology Y f : X → Y a b : X hab : a < b hfc : ContinuousOn f (Icc a b) hfI : f a = f b ne : (Icc a b).Nonempty c : X cmem : c ∈ Icc a b cle : ∀ x ∈ Icc a b, f c ≤ f x C : X Cmem : C ∈ Icc a b Cge : ∀ x ∈ Icc a b, f x ≤ f C hc : f c = f a hC : ¬f C = f a h : a = C ⊢ f C = f a
rw [h]
no goals
d612389e0169ee4b
MvPolynomial.constantCoeff_rename
Mathlib/Algebra/MvPolynomial/Rename.lean
theorem constantCoeff_rename {τ : Type*} (f : σ → τ) (φ : MvPolynomial σ R) : constantCoeff (rename f φ) = constantCoeff φ
case h_add σ : Type u_1 R : Type u_4 inst✝ : CommSemiring R τ : Type u_6 f : σ → τ φ : MvPolynomial σ R ⊢ ∀ (p q : MvPolynomial σ R), constantCoeff ((rename f) p) = constantCoeff p → constantCoeff ((rename f) q) = constantCoeff q → constantCoeff ((rename f) (p + q)) = constantCoeff (p + q)
intro p q hp hq
case h_add σ : Type u_1 R : Type u_4 inst✝ : CommSemiring R τ : Type u_6 f : σ → τ φ p q : MvPolynomial σ R hp : constantCoeff ((rename f) p) = constantCoeff p hq : constantCoeff ((rename f) q) = constantCoeff q ⊢ constantCoeff ((rename f) (p + q)) = constantCoeff (p + q)
99e6581b3c86be32
LinearMap.lTensor_sub
Mathlib/LinearAlgebra/TensorProduct/Basic.lean
theorem lTensor_sub (f g : N →ₗ[R] P) : (f - g).lTensor M = f.lTensor M - g.lTensor M
R : Type u_1 inst✝⁶ : CommSemiring R M : Type u_2 N : Type u_3 P : Type u_4 inst✝⁵ : AddCommGroup M inst✝⁴ : AddCommGroup N inst✝³ : AddCommGroup P inst✝² : Module R M inst✝¹ : Module R N inst✝ : Module R P f g : N →ₗ[R] P ⊢ (lTensorHom M) (f - g) = (lTensorHom M) f - (lTensorHom M) g
exact (lTensorHom (R := R) (N := N) (P := P) M).map_sub f g
no goals
731dd0d94b8c6625
Uniform.tendsto_nhds_right
Mathlib/Topology/UniformSpace/Basic.lean
theorem tendsto_nhds_right {f : Filter β} {u : β → α} {a : α} : Tendsto u f (𝓝 a) ↔ Tendsto (fun x => (a, u x)) f (𝓤 α)
α : Type ua β : Type ub inst✝ : UniformSpace α f : Filter β u : β → α a : α ⊢ Tendsto (Prod.mk a ∘ u) f (𝓤 α) ↔ Tendsto (fun x => (a, u x)) f (𝓤 α)
rfl
no goals
e444ec12a4c4ae35
Subalgebra.eq_bot_of_rank_le_one
Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
theorem eq_bot_of_rank_le_one (h : Module.rank F S ≤ 1) [Module.Free F S] : S = ⊥
case intro.mk F : Type u_1 E : Type u_2 inst✝⁴ : CommRing F inst✝³ : StrongRankCondition F inst✝² : Ring E inst✝¹ : Algebra F E S : Subalgebra F E h : Module.rank F ↥S ≤ 1 inst✝ : Free F ↥S a✝ : Nontrivial E κ : Type u_2 b : Basis κ F ↥S ⊢ S = ⊥
by_cases h1 : Module.rank F S = 1
case pos F : Type u_1 E : Type u_2 inst✝⁴ : CommRing F inst✝³ : StrongRankCondition F inst✝² : Ring E inst✝¹ : Algebra F E S : Subalgebra F E h : Module.rank F ↥S ≤ 1 inst✝ : Free F ↥S a✝ : Nontrivial E κ : Type u_2 b : Basis κ F ↥S h1 : Module.rank F ↥S = 1 ⊢ S = ⊥ case neg F : Type u_1 E : Type u_2 inst✝⁴ : CommRing F inst✝³ : StrongRankCondition F inst✝² : Ring E inst✝¹ : Algebra F E S : Subalgebra F E h : Module.rank F ↥S ≤ 1 inst✝ : Free F ↥S a✝ : Nontrivial E κ : Type u_2 b : Basis κ F ↥S h1 : ¬Module.rank F ↥S = 1 ⊢ S = ⊥
9ac2057737ac9eb2
BoundedContinuousFunction.lipschitz_comp
Mathlib/Topology/ContinuousMap/Bounded/Basic.lean
theorem lipschitz_comp {G : β → γ} {C : ℝ≥0} (H : LipschitzWith C G) : LipschitzWith C (comp G H : (α →ᵇ β) → α →ᵇ γ) := LipschitzWith.of_dist_le_mul fun f g => (dist_le (mul_nonneg C.2 dist_nonneg)).2 fun x => calc dist (G (f x)) (G (g x)) ≤ C * dist (f x) (g x) := H.dist_le_mul _ _ _ ≤ C * dist f g
case h α : Type u β : Type v γ : Type w inst✝² : TopologicalSpace α inst✝¹ : PseudoMetricSpace β inst✝ : PseudoMetricSpace γ G : β → γ C : ℝ≥0 H : LipschitzWith C G f g : α →ᵇ β x : α ⊢ dist (f x) (g x) ≤ dist f g
apply dist_coe_le_dist
no goals
8b4dbb01a1e3a73a
Vector.eq_iff_flatten_eq
Mathlib/.lake/packages/lean4/src/lean/Init/Data/Vector/Lemmas.lean
theorem eq_iff_flatten_eq {L L' : Vector (Vector α n) m} : L = L' ↔ L.flatten = L'.flatten
case of.of.mp α : Type u_1 n m : Nat L : Array (Array α) h₁ : L.size = m h₂ : ∀ (xs : Array α), xs ∈ L → xs.size = n L' : Array (Array α) h₁' : L'.size = m h₂' : ∀ (xs : Array α), xs ∈ L' → xs.size = n ⊢ Array.map (fun x => { toArray := x.val, size_toArray := ⋯ }) L.attach = Array.map (fun x => { toArray := x.val, size_toArray := ⋯ }) L'.attach → L.flatten = L'.flatten
intro h
case of.of.mp α : Type u_1 n m : Nat L : Array (Array α) h₁ : L.size = m h₂ : ∀ (xs : Array α), xs ∈ L → xs.size = n L' : Array (Array α) h₁' : L'.size = m h₂' : ∀ (xs : Array α), xs ∈ L' → xs.size = n h : Array.map (fun x => { toArray := x.val, size_toArray := ⋯ }) L.attach = Array.map (fun x => { toArray := x.val, size_toArray := ⋯ }) L'.attach ⊢ L.flatten = L'.flatten
72d2568041cb6666
real_inner_div_norm_mul_norm_eq_neg_one_iff
Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem real_inner_div_norm_mul_norm_eq_neg_one_iff (x y : F) : ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) = -1 ↔ x ≠ 0 ∧ ∃ r : ℝ, r < 0 ∧ y = r • x
F : Type u_3 inst✝¹ : NormedAddCommGroup F inst✝ : InnerProductSpace ℝ F x y : F ⊢ (x ≠ 0 ∧ ∃ x_1, 0 < -x_1 ∧ -y = -x_1 • x) ↔ x ≠ 0 ∧ ∃ r < 0, y = r • x
refine Iff.rfl.and (exists_congr fun r => ?_)
F : Type u_3 inst✝¹ : NormedAddCommGroup F inst✝ : InnerProductSpace ℝ F x y : F r : ℝ ⊢ 0 < -r ∧ -y = -r • x ↔ r < 0 ∧ y = r • x
f7464562b660032b
LinearMap.BilinForm.span_singleton_sup_orthogonal_eq_top
Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
theorem span_singleton_sup_orthogonal_eq_top {B : BilinForm K V} {x : V} (hx : ¬B.IsOrtho x x) : (K ∙ x) ⊔ B.orthogonal (K ∙ x) = ⊤
V : Type u_5 K : Type u_6 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V B : BilinForm K V x : V hx : ¬B.IsOrtho x x ⊢ Submodule.span K {x} ⊔ ker (B.toLinHomAux₁ x) = ⊤
exact LinearMap.span_singleton_sup_ker_eq_top _ hx
no goals
fa0f717d19df8262
ProbabilityTheory.Kernel.deterministic_apply'
Mathlib/Probability/Kernel/Basic.lean
theorem deterministic_apply' {f : α → β} (hf : Measurable f) (a : α) {s : Set β} (hs : MeasurableSet s) : deterministic f hf a s = s.indicator (fun _ => 1) (f a)
α : Type u_1 β : Type u_2 mα : MeasurableSpace α mβ : MeasurableSpace β f : α → β hf : Measurable f a : α s : Set β hs : MeasurableSet s ⊢ ({ toFun := fun a => Measure.dirac (f a), measurable' := ⋯ } a) s = s.indicator (fun x => 1) (f a)
change Measure.dirac (f a) s = s.indicator 1 (f a)
α : Type u_1 β : Type u_2 mα : MeasurableSpace α mβ : MeasurableSpace β f : α → β hf : Measurable f a : α s : Set β hs : MeasurableSet s ⊢ (Measure.dirac (f a)) s = s.indicator 1 (f a)
0e51885f87331fa2
LocallyFinite.countable_univ
Mathlib/Topology/Compactness/SigmaCompact.lean
theorem LocallyFinite.countable_univ {f : ι → Set X} (hf : LocallyFinite f) (hne : ∀ i, (f i).Nonempty) : (univ : Set ι).Countable
case intro X : Type u_1 ι : Type u_3 inst✝¹ : TopologicalSpace X inst✝ : SigmaCompactSpace X f : ι → Set X hf : LocallyFinite f hne : ∀ (i : ι), (f i).Nonempty this : ∀ (n : ℕ), {i | (f i ∩ compactCovering X n).Nonempty}.Finite i : ι x✝ : i ∈ univ x : X hx : x ∈ f i ⊢ i ∈ ⋃ i, {i_1 | (f i_1 ∩ compactCovering X i).Nonempty}
rcases iUnion_eq_univ_iff.1 (iUnion_compactCovering X) x with ⟨n, hn⟩
case intro.intro X : Type u_1 ι : Type u_3 inst✝¹ : TopologicalSpace X inst✝ : SigmaCompactSpace X f : ι → Set X hf : LocallyFinite f hne : ∀ (i : ι), (f i).Nonempty this : ∀ (n : ℕ), {i | (f i ∩ compactCovering X n).Nonempty}.Finite i : ι x✝ : i ∈ univ x : X hx : x ∈ f i n : ℕ hn : x ∈ compactCovering X n ⊢ i ∈ ⋃ i, {i_1 | (f i_1 ∩ compactCovering X i).Nonempty}
7464f3928fba8b2f
MeasureTheory.tendsto_condExp_unique
Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
theorem tendsto_condExp_unique (fs gs : ℕ → α → E) (f g : α → E) (hfs_int : ∀ n, Integrable (fs n) μ) (hgs_int : ∀ n, Integrable (gs n) μ) (hfs : ∀ᵐ x ∂μ, Tendsto (fun n => fs n x) atTop (𝓝 (f x))) (hgs : ∀ᵐ x ∂μ, Tendsto (fun n => gs n x) atTop (𝓝 (g x))) (bound_fs : α → ℝ) (h_int_bound_fs : Integrable bound_fs μ) (bound_gs : α → ℝ) (h_int_bound_gs : Integrable bound_gs μ) (hfs_bound : ∀ n, ∀ᵐ x ∂μ, ‖fs n x‖ ≤ bound_fs x) (hgs_bound : ∀ n, ∀ᵐ x ∂μ, ‖gs n x‖ ≤ bound_gs x) (hfg : ∀ n, μ[fs n|m] =ᵐ[μ] μ[gs n|m]) : μ[f|m] =ᵐ[μ] μ[g|m]
case neg α : Type u_1 E : Type u_3 m m₀ : MeasurableSpace α μ : Measure α inst✝² : NormedLatticeAddCommGroup E inst✝¹ : CompleteSpace E inst✝ : NormedSpace ℝ E fs gs : ℕ → α → E f g : α → E hfs_int : ∀ (n : ℕ), Integrable (fs n) μ hgs_int : ∀ (n : ℕ), Integrable (gs n) μ hfs : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => fs n x) atTop (𝓝 (f x)) hgs : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => gs n x) atTop (𝓝 (g x)) bound_fs : α → ℝ h_int_bound_fs : Integrable bound_fs μ bound_gs : α → ℝ h_int_bound_gs : Integrable bound_gs μ hfs_bound : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, ‖fs n x‖ ≤ bound_fs x hgs_bound : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, ‖gs n x‖ ≤ bound_gs x hfg : ∀ (n : ℕ), μ[fs n|m] =ᶠ[ae μ] μ[gs n|m] hm : m ≤ m₀ hμm : ¬SigmaFinite (μ.trim hm) ⊢ 0 =ᶠ[ae μ] 0
rfl
no goals
a9df86dd1e158e77
LinearMap.polyCharpolyAux_baseChange
Mathlib/Algebra/Module/LinearMap/Polynomial.lean
lemma polyCharpolyAux_baseChange (A : Type*) [CommRing A] [Algebra R A] : polyCharpolyAux (tensorProduct _ _ _ _ ∘ₗ φ.baseChange A) (basis A b) (basis A bₘ) = (polyCharpolyAux φ b bₘ).map (MvPolynomial.map (algebraMap R A))
case h₀ R : Type u_1 L : Type u_2 M : Type u_3 ι : Type u_5 ιM : Type u_7 inst✝¹⁰ : CommRing R inst✝⁹ : AddCommGroup L inst✝⁸ : Module R L inst✝⁷ : AddCommGroup M inst✝⁶ : Module R M φ : L →ₗ[R] Module.End R M inst✝⁵ : Fintype ι inst✝⁴ : Fintype ιM inst✝³ : DecidableEq ι inst✝² : DecidableEq ιM b : Basis ι R L bₘ : Basis ιM R M A : Type u_8 inst✝¹ : CommRing A inst✝ : Algebra R A ij : ιM × ιM this : ∀ (kl : ιM × ιM), (toMatrix (basis A bₘ.end) (basis A bₘ).end) (tensorProduct R A M M) ij kl = if kl = ij then 1 else 0 kl : ιM × ιM H : kl ≠ ij ⊢ (monomial (Finsupp.single kl 1)) ((toMatrix (basis A bₘ.end) (basis A bₘ).end) (tensorProduct R A M M) ij kl) = 0
rw [this, if_neg H, map_zero]
no goals
43f09ebe5fe966ae
BitVec.getMsbD_or
Mathlib/.lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem getMsbD_or {x y : BitVec w} : (x ||| y).getMsbD i = (x.getMsbD i || y.getMsbD i)
w i : Nat x y : BitVec w ⊢ (x ||| y).getMsbD i = (x.getMsbD i || y.getMsbD i)
simp only [getMsbD]
w i : Nat x y : BitVec w ⊢ (decide (i < w) && (x ||| y).getLsbD (w - 1 - i)) = (decide (i < w) && x.getLsbD (w - 1 - i) || decide (i < w) && y.getLsbD (w - 1 - i))
b7b212b8c727554b
String.extract.go₂_append_left
Mathlib/.lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem extract.go₂_append_left : ∀ (s t : List Char) (i e : Nat), e = utf8Len s + i → go₂ (s ++ t) ⟨i⟩ ⟨e⟩ = s | [], t, i, _, rfl => by cases t <;> simp [go₂] | c :: cs, t, i, _, rfl => by simp only [List.cons_append, utf8Len_cons, go₂, Pos.ext_iff, ne_add_utf8Size_add_self, ↓reduceIte, Pos.addChar_eq, List.cons.injEq, true_and] apply go₂_append_left; rw [Nat.add_right_comm, Nat.add_assoc]
c : Char cs t : List Char i : Nat ⊢ go₂ (cs ++ t) { byteIdx := i + c.utf8Size } { byteIdx := utf8Len cs + c.utf8Size + i } = cs
apply go₂_append_left
case a c : Char cs t : List Char i : Nat ⊢ utf8Len cs + c.utf8Size + i = utf8Len cs + (i + c.utf8Size)
f179773ad64697cb
Metric.Sigma.dist_same
Mathlib/Topology/MetricSpace/Gluing.lean
theorem dist_same (i : ι) (x y : E i) : dist (Sigma.mk i x) ⟨i, y⟩ = dist x y
ι : Type u_1 E : ι → Type u_2 inst✝ : (i : ι) → MetricSpace (E i) i : ι x y : E i ⊢ dist ⟨i, x⟩ ⟨i, y⟩ = dist x y
simp [Dist.dist, Sigma.dist]
no goals
27687575e71f2783
mul_eq_of_eq_mul_inv₀
Mathlib/Algebra/GroupWithZero/Units/Basic.lean
/-- A variant of `eq_mul_inv_iff_mul_eq₀` that moves the nonzero hypothesis to another variable. -/ lemma mul_eq_of_eq_mul_inv₀ (ha : a ≠ 0) (h : a = c * b⁻¹) : a * b = c
G₀ : Type u_3 inst✝ : GroupWithZero G₀ a c : G₀ ha : a ≠ 0 h : a = c * 0⁻¹ ⊢ False
simp [ha] at h
no goals
a1b58083849146a3
Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.limplies_of_assignmentsInvariant
Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/LRAT/Internal/Formula/Lemmas.lean
theorem limplies_of_assignmentsInvariant {n : Nat} (f : DefaultFormula n) (f_AssignmentsInvariant : AssignmentsInvariant f) : Limplies (PosFin n) f f.assignments
case neg n : Nat f : DefaultFormula n p : PosFin n → Bool pf : p ⊨ f hsize : f.assignments.size = n i : PosFin n f_AssignmentsInvariant : hasAssignment (decide (p i = false)) f.assignments[i.val] = true → Limplies (PosFin n) f (i, decide (p i = false)) h✝ : ¬hasAssignment (decide (p i = false)) f.assignments[i.val] = true ⊢ hasAssignment (decide (p i = false)) f.assignments[i.val]! = false
next h => simp_all [getElem!, i.2.2, decidableGetElem?]
no goals
324db374b482bd66
LieModule.disjoint_genWeightSpaceOf
Mathlib/Algebra/Lie/Weights/Basic.lean
lemma disjoint_genWeightSpaceOf [NoZeroSMulDivisors R M] {x : L} {φ₁ φ₂ : R} (h : φ₁ ≠ φ₂) : Disjoint (genWeightSpaceOf M φ₁ x) (genWeightSpaceOf M φ₂ x)
R : Type u_2 L : Type u_3 M : Type u_4 inst✝⁸ : CommRing R inst✝⁷ : LieRing L inst✝⁶ : LieAlgebra R L inst✝⁵ : AddCommGroup M inst✝⁴ : Module R M inst✝³ : LieRingModule L M inst✝² : LieModule R L M inst✝¹ : LieRing.IsNilpotent L inst✝ : NoZeroSMulDivisors R M x : L φ₁ φ₂ : R h : φ₁ ≠ φ₂ ⊢ Disjoint ↑(genWeightSpaceOf M φ₁ x) ↑(genWeightSpaceOf M φ₂ x)
dsimp [genWeightSpaceOf]
R : Type u_2 L : Type u_3 M : Type u_4 inst✝⁸ : CommRing R inst✝⁷ : LieRing L inst✝⁶ : LieAlgebra R L inst✝⁵ : AddCommGroup M inst✝⁴ : Module R M inst✝³ : LieRingModule L M inst✝² : LieModule R L M inst✝¹ : LieRing.IsNilpotent L inst✝ : NoZeroSMulDivisors R M x : L φ₁ φ₂ : R h : φ₁ ≠ φ₂ ⊢ Disjoint (((toEnd R L M) x).maxGenEigenspace φ₁) (((toEnd R L M) x).maxGenEigenspace φ₂)
f2856c44a97b7b31
CategoryTheory.NatTrans.epi_iff_epi_app'
Mathlib/CategoryTheory/Adjunction/Evaluation.lean
theorem NatTrans.epi_iff_epi_app' {F G : C ⥤ D} (η : F ⟶ G) : Epi η ↔ ∀ c, Epi (η.app c)
C : Type u₁ inst✝² : Category.{v₁, u₁} C D : Type u₂ inst✝¹ : Category.{v₂, u₂} D inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D F G : C ⥤ D η : F ⟶ G ⊢ Epi η ↔ ∀ (c : C), Epi (η.app c)
constructor
case mp C : Type u₁ inst✝² : Category.{v₁, u₁} C D : Type u₂ inst✝¹ : Category.{v₂, u₂} D inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D F G : C ⥤ D η : F ⟶ G ⊢ Epi η → ∀ (c : C), Epi (η.app c) case mpr C : Type u₁ inst✝² : Category.{v₁, u₁} C D : Type u₂ inst✝¹ : Category.{v₂, u₂} D inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D F G : C ⥤ D η : F ⟶ G ⊢ (∀ (c : C), Epi (η.app c)) → Epi η
7c954a3aed68ec0c
exists_pow_lt_of_lt_one
Mathlib/Algebra/Order/Archimedean/Basic.lean
theorem exists_pow_lt_of_lt_one (hx : 0 < x) (hy : y < 1) : ∃ n : ℕ, y ^ n < x
case neg.intro α : Type u_1 inst✝² : LinearOrderedSemifield α inst✝¹ : Archimedean α x y : α inst✝ : ExistsAddOfLE α hx : 0 < x hy : y < 1 y_pos : 0 < y q : ℕ hq : x⁻¹ < y⁻¹ ^ q ⊢ ∃ n, y ^ n < x
exact ⟨q, by rwa [inv_pow, inv_lt_inv₀ hx (pow_pos y_pos _)] at hq⟩
no goals
21e7fde79a3a92b2