path
stringlengths
12
84
imports
sequencelengths
0
4.45k
premises
listlengths
0
625
Mathlib/Algebra/CharP/MixedCharZero.lean
[ "Mathlib/Algebra/CharP/LocalRing.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/Ideal/Quotient.lean", "Mathlib/Tactic/FieldSimp.lean" ]
[ { "full_name": "MixedCharZero", "code": "class MixedCharZero (p : ℕ) : Prop where\n [toCharZero : CharZero R]\n charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p", "start": [ 64, 1 ], "end": [ 76, 58 ], "kind": "commanddeclaration" }, { "full_name": "MixedCharZero.reduce_to_p_prime", "code": "theorem reduce_to_p_prime {P : Prop} :\n (∀ p > 0, MixedCharZero R p → P) ↔ ∀ p : ℕ, p.Prime → MixedCharZero R p → P", "start": [ 81, 1 ], "end": [ 105, 51 ], "kind": "commanddeclaration" }, { "full_name": "MixedCharZero.reduce_to_maximal_ideal", "code": "theorem reduce_to_maximal_ideal {p : ℕ} (hp : Nat.Prime p) :\n (∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p) ↔ ∃ I : Ideal R, I.IsMaximal ∧ CharP (R ⧸ I) p", "start": [ 108, 1 ], "end": [ 133, 51 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.of_algebraRat", "code": "theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)", "start": [ 157, 1 ], "end": [ 166, 71 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.PNat.isUnit_natCast", "code": "theorem PNat.isUnit_natCast [h : Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))]\n (n : ℕ+) : IsUnit (n : R)", "start": [ 174, 1 ], "end": [ 186, 48 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.pnatCast", "code": "@[coe]\nnoncomputable def pnatCast [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : ℕ+ → Rˣ :=\n fun n => (PNat.isUnit_natCast n).unit", "start": [ 189, 1 ], "end": [ 191, 40 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.coePNatUnits", "code": "noncomputable instance coePNatUnits\n [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : Coe ℕ+ Rˣ :=\n ⟨EqualCharZero.pnatCast⟩", "start": [ 193, 1 ], "end": [ 196, 27 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.pnatCast_one", "code": "@[simp]\ntheorem pnatCast_one [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : ((1 : ℕ+) : Rˣ) = 1", "start": [ 199, 1 ], "end": [ 206, 34 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.pnatCast_eq_natCast", "code": "@[simp]\ntheorem pnatCast_eq_natCast [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] (n : ℕ+) :\n ((n : Rˣ) : R) = ↑n", "start": [ 209, 1 ], "end": [ 214, 31 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.algebraRat", "code": "noncomputable def algebraRat (h : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)) :\n Algebra ℚ R :=\n haveI : Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)) := ⟨h⟩\n RingHom.toAlgebra\n { toFun := fun x => x.num /ₚ ↑x.pnatDen\n map_zero' := by simp [divp]\n map_one' := by simp\n map_mul' := by\n intro a b\n field_simp\n trans (↑((a * b).num * a.den * b.den) : R)\n · simp_rw [Int.cast_mul, Int.cast_natCast]\n ring\n rw [Rat.mul_num_den' a b]\n simp\n map_add' := by\n intro a b\n field_simp\n trans (↑((a + b).num * a.den * b.den) : R)\n · simp_rw [Int.cast_mul, Int.cast_natCast]\n ring\n rw [Rat.add_num_den' a b]\n simp }", "start": [ 217, 1 ], "end": [ 240, 13 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.of_not_mixedCharZero", "code": "theorem of_not_mixedCharZero [CharZero R] (h : ∀ p > 0, ¬MixedCharZero R p) :\n ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)", "start": [ 246, 1 ], "end": [ 257, 49 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.to_not_mixedCharZero", "code": "theorem to_not_mixedCharZero (h : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)) :\n ∀ p > 0, ¬MixedCharZero R p", "start": [ 260, 1 ], "end": [ 267, 64 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.iff_not_mixedCharZero", "code": "theorem iff_not_mixedCharZero [CharZero R] :\n (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)) ↔ ∀ p > 0, ¬MixedCharZero R p", "start": [ 270, 1 ], "end": [ 276, 51 ], "kind": "commanddeclaration" }, { "full_name": "EqualCharZero.nonempty_algebraRat_iff", "code": "theorem nonempty_algebraRat_iff :\n Nonempty (Algebra ℚ R) ↔ ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)", "start": [ 279, 1 ], "end": [ 288, 23 ], "kind": "commanddeclaration" }, { "full_name": "isEmpty_algebraRat_iff_mixedCharZero", "code": "theorem isEmpty_algebraRat_iff_mixedCharZero [CharZero R] :\n IsEmpty (Algebra ℚ R) ↔ ∃ p > 0, MixedCharZero R p", "start": [ 294, 1 ], "end": [ 302, 46 ], "kind": "commanddeclaration" }, { "full_name": "split_equalCharZero_mixedCharZero", "code": "theorem split_equalCharZero_mixedCharZero [CharZero R] (h_equal : Algebra ℚ R → P)\n (h_mixed : ∀ p : ℕ, Nat.Prime p → MixedCharZero R p → P) : P", "start": [ 320, 1 ], "end": [ 329, 17 ], "kind": "commanddeclaration" }, { "full_name": "split_by_characteristic", "code": "theorem split_by_characteristic (h_pos : ∀ p : ℕ, p ≠ 0 → CharP R p → P) (h_equal : Algebra ℚ R → P)\n (h_mixed : ∀ p : ℕ, Nat.Prime p → MixedCharZero R p → P) : P", "start": [ 335, 1 ], "end": [ 349, 30 ], "kind": "commanddeclaration" }, { "full_name": "split_by_characteristic_domain", "code": "theorem split_by_characteristic_domain [IsDomain R] (h_pos : ∀ p : ℕ, Nat.Prime p → CharP R p → P)\n (h_equal : Algebra ℚ R → P) (h_mixed : ∀ p : ℕ, Nat.Prime p → MixedCharZero R p → P) : P", "start": [ 352, 1 ], "end": [ 363, 31 ], "kind": "commanddeclaration" }, { "full_name": "split_by_characteristic_localRing", "code": "theorem split_by_characteristic_localRing [LocalRing R]\n (h_pos : ∀ p : ℕ, IsPrimePow p → CharP R p → P) (h_equal : Algebra ℚ R → P)\n (h_mixed : ∀ p : ℕ, Nat.Prime p → MixedCharZero R p → P) : P", "start": [ 366, 2 ], "end": [ 378, 30 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Num/Prime.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Num/Lemmas.lean", "Mathlib/Data/Nat/Prime.lean", "Mathlib/Tactic/Ring.lean" ]
[ { "full_name": "PosNum.minFacAux", "code": "def minFacAux (n : PosNum) : ℕ → PosNum → PosNum\n | 0, _ => n\n | fuel + 1, k =>\n if n < k.bit1 * k.bit1 then n else if k.bit1 ∣ n then k.bit1 else minFacAux n fuel k.succ", "start": [ 31, 1 ], "end": [ 40, 94 ], "kind": "commanddeclaration" }, { "full_name": "PosNum.minFacAux_to_nat", "code": "theorem minFacAux_to_nat {fuel : ℕ} {n k : PosNum} (h : Nat.sqrt n < fuel + k.bit1) :\n (minFacAux n fuel k : ℕ) = Nat.minFacAux n k.bit1", "start": [ 44, 1 ], "end": [ 54, 43 ], "kind": "commanddeclaration" }, { "full_name": "PosNum.minFac", "code": "def minFac : PosNum → PosNum\n | 1 => 1\n | bit0 _ => 2\n | bit1 n => minFacAux (bit1 n) n 1", "start": [ 57, 1 ], "end": [ 61, 37 ], "kind": "commanddeclaration" }, { "full_name": "PosNum.minFac_to_nat", "code": "@[simp]\ntheorem minFac_to_nat (n : PosNum) : (minFac n : ℕ) = Nat.minFac n", "start": [ 64, 1 ], "end": [ 83, 9 ], "kind": "commanddeclaration" }, { "full_name": "PosNum.Prime", "code": "@[simp]\ndef Prime (n : PosNum) : Prop :=\n Nat.Prime n", "start": [ 86, 1 ], "end": [ 89, 14 ], "kind": "commanddeclaration" }, { "full_name": "PosNum.decidablePrime", "code": "instance decidablePrime : DecidablePred PosNum.Prime\n | 1 => Decidable.isFalse Nat.not_prime_one\n | bit0 n =>\n decidable_of_iff' (n = 1)\n (by\n refine Nat.prime_def_minFac.trans ((and_iff_right ?_).trans <| eq_comm.trans ?_)\n · exact add_le_add (Nat.succ_le_of_lt (to_nat_pos _)) (Nat.succ_le_of_lt (to_nat_pos _))\n rw [← minFac_to_nat, to_nat_inj]\n exact ⟨bit0.inj, congr_arg _⟩)\n | bit1 n =>\n decidable_of_iff' (minFacAux (bit1 n) n 1 = bit1 n)\n (by\n refine Nat.prime_def_minFac.trans ((and_iff_right ?_).trans ?_)\n · exact Nat.bit0_le_bit1_iff.2 (to_nat_pos _)\n rw [← minFac_to_nat, to_nat_inj]; rfl)", "start": [ 92, 1 ], "end": [ 106, 47 ], "kind": "commanddeclaration" }, { "full_name": "Num.minFac", "code": "def minFac : Num → PosNum\n | 0 => 2\n | pos n => n.minFac", "start": [ 113, 1 ], "end": [ 116, 22 ], "kind": "commanddeclaration" }, { "full_name": "Num.minFac_to_nat", "code": "@[simp]\ntheorem minFac_to_nat : ∀ n : Num, (minFac n : ℕ) = Nat.minFac n", "start": [ 119, 1 ], "end": [ 122, 36 ], "kind": "commanddeclaration" }, { "full_name": "Num.Prime", "code": "@[simp]\ndef Prime (n : Num) : Prop :=\n Nat.Prime n", "start": [ 125, 1 ], "end": [ 128, 14 ], "kind": "commanddeclaration" }, { "full_name": "Num.decidablePrime", "code": "instance decidablePrime : DecidablePred Num.Prime\n | 0 => Decidable.isFalse Nat.not_prime_zero\n | pos n => PosNum.decidablePrime n", "start": [ 131, 1 ], "end": [ 133, 37 ], "kind": "commanddeclaration" } ]
Mathlib/Util/SleepHeartbeats.lean
[ ".lake/packages/lean4/src/lean/Init.lean", ".lake/packages/lean4/src/lean/Lean/Elab/Tactic/Basic.lean" ]
[ { "full_name": "sleepAtLeastHeartbeats", "code": "def sleepAtLeastHeartbeats (n : Nat) : IO Unit := do\n let i ← IO.getNumHeartbeats\n while (← IO.getNumHeartbeats) < i + n do\n continue", "start": [ 16, 1 ], "end": [ 26, 13 ], "kind": "commanddeclaration" } ]
Mathlib/Condensed/TopComparison.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Limits/Preserves/Opposites.lean", "Mathlib/Topology/Category/TopCat/Yoneda.lean", "Mathlib/Condensed/Explicit.lean" ]
[ { "full_name": "factorsThrough_of_pullbackCondition", "code": "theorem factorsThrough_of_pullbackCondition {Z B : C} {π : Z ⟶ B} [HasPullback π π]\n [PreservesLimit (cospan π π) G]\n {a : C(G.obj Z, X)}\n (ha : a ∘ (G.map pullback.fst) = a ∘ (G.map (pullback.snd (f := π) (g := π)))) :\n Function.FactorsThrough a (G.map π)", "start": [ 36, 1 ], "end": [ 58, 18 ], "kind": "commanddeclaration" }, { "full_name": "equalizerCondition_yonedaPresheaf", "code": "theorem equalizerCondition_yonedaPresheaf\n [∀ (Z B : C) (π : Z ⟶ B) [EffectiveEpi π], PreservesLimit (cospan π π) G]\n (hq : ∀ (Z B : C) (π : Z ⟶ B) [EffectiveEpi π], QuotientMap (G.map π)) :\n EqualizerCondition (yonedaPresheaf G X)", "start": [ 60, 1 ], "end": [ 86, 101 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.toCondensed", "code": "noncomputable def TopCat.toCondensed (X : TopCat.{u+1}) : CondensedSet.{u} :=\n @CondensedSet.ofSheafCompHaus (yonedaPresheaf.{u, u+1, u, u+1} compHausToTop.{u} X) _ (by\n apply (config := { allowSynthFailures := true }) equalizerCondition_yonedaPresheaf\n compHausToTop.{u} X\n intro Z B π he\n rw [((CompHaus.effectiveEpi_tfae π).out 0 2 :)] at he\n apply QuotientMap.of_surjective_continuous he π.continuous )", "start": [ 107, 1 ], "end": [ 118, 65 ], "kind": "commanddeclaration" }, { "full_name": "topCatToCondensed", "code": "noncomputable def topCatToCondensed : TopCat.{u+1} ⥤ CondensedSet.{u} where\n obj X := X.toCondensed\n map f := ⟨⟨fun _ g ↦ f.comp g, by aesop⟩⟩", "start": [ 121, 1 ], "end": [ 126, 44 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/SimpleGraph/Metric.lean
[ "Mathlib/Combinatorics/SimpleGraph/Connectivity.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Nat/Lattice.lean" ]
[ { "full_name": "SimpleGraph.dist", "code": "noncomputable def dist (u v : V) : ℕ :=\n sInf (Set.range (Walk.length : G.Walk u v → ℕ))", "start": [ 47, 1 ], "end": [ 50, 50 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Reachable.exists_walk_of_dist", "code": "protected theorem Reachable.exists_walk_of_dist {u v : V} (hr : G.Reachable u v) :\n ∃ p : G.Walk u v, p.length = G.dist u v", "start": [ 55, 1 ], "end": [ 57, 56 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Connected.exists_walk_of_dist", "code": "protected theorem Connected.exists_walk_of_dist (hconn : G.Connected) (u v : V) :\n ∃ p : G.Walk u v, p.length = G.dist u v", "start": [ 60, 1 ], "end": [ 62, 34 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dist_le", "code": "theorem dist_le {u v : V} (p : G.Walk u v) : G.dist u v ≤ p.length", "start": [ 65, 1 ], "end": [ 66, 23 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dist_eq_zero_iff_eq_or_not_reachable", "code": "@[simp]\ntheorem dist_eq_zero_iff_eq_or_not_reachable {u v : V} :\n G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v", "start": [ 69, 1 ], "end": [ 71, 93 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dist_self", "code": "theorem dist_self {v : V} : dist G v v = 0", "start": [ 74, 1 ], "end": [ 74, 54 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Reachable.dist_eq_zero_iff", "code": "protected theorem Reachable.dist_eq_zero_iff {u v : V} (hr : G.Reachable u v) :\n G.dist u v = 0 ↔ u = v", "start": [ 77, 1 ], "end": [ 78, 43 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Reachable.pos_dist_of_ne", "code": "protected theorem Reachable.pos_dist_of_ne {u v : V} (h : G.Reachable u v) (hne : u ≠ v) :\n 0 < G.dist u v", "start": [ 81, 1 ], "end": [ 83, 40 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Connected.dist_eq_zero_iff", "code": "protected theorem Connected.dist_eq_zero_iff (hconn : G.Connected) {u v : V} :\n G.dist u v = 0 ↔ u = v", "start": [ 86, 1 ], "end": [ 87, 50 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Connected.pos_dist_of_ne", "code": "protected theorem Connected.pos_dist_of_ne {u v : V} (hconn : G.Connected) (hne : u ≠ v) :\n 0 < G.dist u v", "start": [ 90, 1 ], "end": [ 92, 88 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dist_eq_zero_of_not_reachable", "code": "theorem dist_eq_zero_of_not_reachable {u v : V} (h : ¬G.Reachable u v) : G.dist u v = 0", "start": [ 95, 1 ], "end": [ 96, 11 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.nonempty_of_pos_dist", "code": "theorem nonempty_of_pos_dist {u v : V} (h : 0 < G.dist u v) :\n (Set.univ : Set (G.Walk u v)).Nonempty", "start": [ 99, 1 ], "end": [ 102, 31 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Connected.dist_triangle", "code": "protected theorem Connected.dist_triangle (hconn : G.Connected) {u v w : V} :\n G.dist u w ≤ G.dist u v + G.dist v w", "start": [ 105, 1 ], "end": [ 110, 16 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dist_comm_aux", "code": "private theorem dist_comm_aux {u v : V} (h : G.Reachable u v) : G.dist u v ≤ G.dist v u", "start": [ 113, 1 ], "end": [ 116, 16 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dist_comm", "code": "theorem dist_comm {u v : V} : G.dist u v = G.dist v u", "start": [ 118, 1 ], "end": [ 122, 48 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dist_ne_zero_iff_ne_and_reachable", "code": "lemma dist_ne_zero_iff_ne_and_reachable {u v : V} : G.dist u v ≠ 0 ↔ u ≠ v ∧ G.Reachable u v := by\n rw [ne_eq, dist_eq_zero_iff_eq_or_not_reachable.not]\n push_neg; rfl", "start": [ 125, 1 ], "end": [ 127, 16 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Reachable.of_dist_ne_zero", "code": "lemma Reachable.of_dist_ne_zero {u v : V} (h : G.dist u v ≠ 0) : G.Reachable u v :=\n (dist_ne_zero_iff_ne_and_reachable.mp h).2", "start": [ 129, 1 ], "end": [ 130, 45 ], "kind": "lemma" }, { "full_name": "SimpleGraph.exists_walk_of_dist_ne_zero", "code": "lemma exists_walk_of_dist_ne_zero {u v : V} (h : G.dist u v ≠ 0) :\n ∃ p : G.Walk u v, p.length = G.dist u v :=\n (Reachable.of_dist_ne_zero h).exists_walk_of_dist", "start": [ 132, 1 ], "end": [ 134, 52 ], "kind": "lemma" }, { "full_name": "SimpleGraph.dist_eq_one_iff_adj", "code": "theorem dist_eq_one_iff_adj {u v : V} : G.dist u v = 1 ↔ G.Adj u v", "start": [ 137, 1 ], "end": [ 142, 75 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Walk.isPath_of_length_eq_dist", "code": "theorem Walk.isPath_of_length_eq_dist {u v : V} (p : G.Walk u v) (hp : p.length = G.dist u v) :\n p.IsPath", "start": [ 144, 1 ], "end": [ 153, 27 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Reachable.exists_path_of_dist", "code": "lemma Reachable.exists_path_of_dist {u v : V} (hr : G.Reachable u v) :\n ∃ (p : G.Walk u v), p.IsPath ∧ p.length = G.dist u v := by\n obtain ⟨p, h⟩ := hr.exists_walk_of_dist\n exact ⟨p, p.isPath_of_length_eq_dist h, h⟩", "start": [ 155, 1 ], "end": [ 158, 45 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Connected.exists_path_of_dist", "code": "lemma Connected.exists_path_of_dist (hconn : G.Connected) (u v : V) :\n ∃ (p : G.Walk u v), p.IsPath ∧ p.length = G.dist u v := by\n obtain ⟨p, h⟩ := hconn.exists_walk_of_dist u v\n exact ⟨p, p.isPath_of_length_eq_dist h, h⟩", "start": [ 160, 1 ], "end": [ 163, 45 ], "kind": "lemma" } ]
Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Geometry/Manifold/ContMDiffMap.lean", "Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean" ]
[ { "full_name": "ContMDiffAt.mfderiv", "code": "protected theorem ContMDiffAt.mfderiv {x₀ : N} (f : N → M → M') (g : N → M)\n (hf : ContMDiffAt (J.prod I) I' n (Function.uncurry f) (x₀, g x₀)) (hg : ContMDiffAt J I m g x₀)\n (hmn : m + 1 ≤ n) :\n ContMDiffAt J 𝓘(𝕜, E →L[𝕜] E') m\n (inTangentCoordinates I I' g (fun x => f x (g x)) (fun x => mfderiv I I' (f x) (g x)) x₀)\n x₀", "start": [ 68, 1 ], "end": [ 182, 35 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffAt.mfderiv_const", "code": "theorem ContMDiffAt.mfderiv_const {x₀ : M} {f : M → M'} (hf : ContMDiffAt I I' n f x₀)\n (hmn : m + 1 ≤ n) :\n ContMDiffAt I 𝓘(𝕜, E →L[𝕜] E') m (inTangentCoordinates I I' id f (mfderiv I I' f) x₀) x₀", "start": [ 185, 1 ], "end": [ 196, 50 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffAt.mfderiv_apply", "code": "theorem ContMDiffAt.mfderiv_apply {x₀ : N'} (f : N → M → M') (g : N → M) (g₁ : N' → N) (g₂ : N' → E)\n (hf : ContMDiffAt (J.prod I) I' n (Function.uncurry f) (g₁ x₀, g (g₁ x₀)))\n (hg : ContMDiffAt J I m g (g₁ x₀)) (hg₁ : ContMDiffAt J' J m g₁ x₀)\n (hg₂ : ContMDiffAt J' 𝓘(𝕜, E) m g₂ x₀) (hmn : m + 1 ≤ n) :\n ContMDiffAt J' 𝓘(𝕜, E') m\n (fun x => inTangentCoordinates I I' g (fun x => f x (g x))\n (fun x => mfderiv I I' (f x) (g x)) (g₁ x₀) (g₁ x) (g₂ x)) x₀", "start": [ 199, 1 ], "end": [ 214, 61 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffOn.continuousOn_tangentMapWithin_aux", "code": "theorem ContMDiffOn.continuousOn_tangentMapWithin_aux {f : H → H'} {s : Set H}\n (hf : ContMDiffOn I I' n f s) (hn : 1 ≤ n) (hs : UniqueMDiffOn I s) :\n ContinuousOn (tangentMapWithin I I' f s) (π E (TangentSpace I) ⁻¹' s)", "start": [ 223, 1 ], "end": [ 280, 37 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffOn.contMDiffOn_tangentMapWithin_aux", "code": "theorem ContMDiffOn.contMDiffOn_tangentMapWithin_aux {f : H → H'} {s : Set H}\n (hf : ContMDiffOn I I' n f s) (hmn : m + 1 ≤ n) (hs : UniqueMDiffOn I s) :\n ContMDiffOn I.tangent I'.tangent m (tangentMapWithin I I' f s)\n (π E (TangentSpace I) ⁻¹' s)", "start": [ 283, 1 ], "end": [ 339, 70 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffOn.contMDiffOn_tangentMapWithin", "code": "theorem ContMDiffOn.contMDiffOn_tangentMapWithin (hf : ContMDiffOn I I' n f s) (hmn : m + 1 ≤ n)\n (hs : UniqueMDiffOn I s) :\n ContMDiffOn I.tangent I'.tangent m (tangentMapWithin I I' f s)\n (π E (TangentSpace I) ⁻¹' s)", "start": [ 342, 1 ], "end": [ 518, 39 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffOn.continuousOn_tangentMapWithin", "code": "theorem ContMDiffOn.continuousOn_tangentMapWithin (hf : ContMDiffOn I I' n f s) (hmn : 1 ≤ n)\n (hs : UniqueMDiffOn I s) :\n ContinuousOn (tangentMapWithin I I' f s) (π E (TangentSpace I) ⁻¹' s)", "start": [ 521, 1 ], "end": [ 529, 20 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiff.contMDiff_tangentMap", "code": "theorem ContMDiff.contMDiff_tangentMap (hf : ContMDiff I I' n f) (hmn : m + 1 ≤ n) :\n ContMDiff I.tangent I'.tangent m (tangentMap I I' f)", "start": [ 532, 1 ], "end": [ 537, 29 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiff.continuous_tangentMap", "code": "theorem ContMDiff.continuous_tangentMap (hf : ContMDiff I I' n f) (hmn : 1 ≤ n) :\n Continuous (tangentMap I I' f)", "start": [ 540, 1 ], "end": [ 546, 29 ], "kind": "commanddeclaration" }, { "full_name": "TangentBundle.tangentMap_tangentBundle_pure", "code": "theorem tangentMap_tangentBundle_pure (p : TangentBundle I M) :\n tangentMap I I.tangent (zeroSection E (TangentSpace I)) p = ⟨⟨p.proj, 0⟩, ⟨p.2, 0⟩⟩", "start": [ 557, 1 ], "end": [ 599, 44 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffMap.mdifferentiable'", "code": "protected theorem mdifferentiable' (f : C^n⟮I, M; I', M'⟯) (hn : 1 ≤ n) : MDifferentiable I I' f", "start": [ 612, 1 ], "end": [ 613, 33 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffMap.mdifferentiable", "code": "protected theorem mdifferentiable (f : C^∞⟮I, M; I', M'⟯) : MDifferentiable I I' f", "start": [ 616, 1 ], "end": [ 617, 37 ], "kind": "commanddeclaration" }, { "full_name": "ContMDiffMap.mdifferentiableAt", "code": "protected theorem mdifferentiableAt (f : C^∞⟮I, M; I', M'⟯) {x} : MDifferentiableAt I I' f x", "start": [ 620, 1 ], "end": [ 621, 22 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Pointwise/Stabilizer.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/GroupTheory/QuotientGroup.lean", "Mathlib/Data/Finset/Pointwise.lean" ]
[ { "full_name": "MulAction.stabilizer_empty", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_empty : stabilizer G (∅ : Set α) = ⊤ :=\n Subgroup.coe_eq_univ.1 <| eq_univ_of_forall fun _a ↦ smul_set_empty", "start": [ 25, 1 ], "end": [ 27, 70 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_univ", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_univ : stabilizer G (Set.univ : Set α) = ⊤ := by\n ext\n simp", "start": [ 29, 1 ], "end": [ 32, 7 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_singleton", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_singleton (b : α) : stabilizer G ({b} : Set α) = stabilizer G b := by ext; simp", "start": [ 34, 1 ], "end": [ 35, 97 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_set", "code": "@[to_additive]\nlemma mem_stabilizer_set {s : Set α} : a ∈ stabilizer G s ↔ ∀ b, a • b ∈ s ↔ b ∈ s := by\n refine mem_stabilizer_iff.trans ⟨fun h b ↦ ?_, fun h ↦ ?_⟩\n · rw [← (smul_mem_smul_set_iff : a • b ∈ _ ↔ _), h]\n simp_rw [Set.ext_iff, mem_smul_set_iff_inv_smul_mem]\n exact ((MulAction.toPerm a).forall_congr' <| by simp [Iff.comm]).1 h", "start": [ 37, 1 ], "end": [ 42, 71 ], "kind": "lemma" }, { "full_name": "MulAction.map_stabilizer_le", "code": "@[to_additive]\nlemma map_stabilizer_le (f : G →* H) (s : Set G) :\n (stabilizer G s).map f ≤ stabilizer H (f '' s) := by\n rintro a\n simp only [Subgroup.mem_map, mem_stabilizer_iff, exists_prop, forall_exists_index, and_imp]\n rintro a ha rfl\n rw [← image_smul_distrib, ha]", "start": [ 44, 1 ], "end": [ 50, 32 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_mul_self", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_mul_self (s : Set G) : (stabilizer G s : Set G) * s = s := by\n ext\n refine ⟨?_, fun h ↦ ⟨_, (stabilizer G s).one_mem, _, h, one_mul _⟩⟩\n rintro ⟨a, ha, b, hb, rfl⟩\n rw [← mem_stabilizer_iff.1 ha]\n exact smul_mem_smul_set hb", "start": [ 52, 1 ], "end": [ 58, 29 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_subgroup", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_subgroup (s : Subgroup G) : stabilizer G (s : Set G) = s := by\n simp_rw [SetLike.ext_iff, mem_stabilizer_set]\n refine fun a ↦ ⟨fun h ↦ ?_, fun ha b ↦ s.mul_mem_cancel_left ha⟩\n simpa only [smul_eq_mul, SetLike.mem_coe, mul_one] using (h 1).2 s.one_mem", "start": [ 68, 1 ], "end": [ 72, 77 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_op_subgroup", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_op_subgroup (s : Subgroup G) : stabilizer Gᵐᵒᵖ (s : Set G) = s.op := by\n simp_rw [SetLike.ext_iff, mem_stabilizer_set]\n simp? says simp only [smul_eq_mul_unop, SetLike.mem_coe, Subgroup.mem_op]\n refine fun a ↦ ⟨fun h ↦ ?_, fun ha b ↦ s.mul_mem_cancel_right ha⟩\n simpa only [op_smul_eq_mul, SetLike.mem_coe, one_mul] using (h 1).2 s.one_mem", "start": [ 74, 1 ], "end": [ 79, 80 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_subgroup_op", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_subgroup_op (s : Subgroup Gᵐᵒᵖ) : stabilizer G (s : Set Gᵐᵒᵖ) = s.unop := by\n simp_rw [SetLike.ext_iff, mem_stabilizer_set]\n refine fun a ↦ ⟨fun h ↦ ?_, fun ha b ↦ s.mul_mem_cancel_right ha⟩\n have : 1 * MulOpposite.op a ∈ s := (h 1).2 s.one_mem\n simpa only [op_smul_eq_mul, SetLike.mem_coe, one_mul] using this", "start": [ 81, 1 ], "end": [ 86, 67 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_coe_finset", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_coe_finset (s : Finset α) : stabilizer G (s : Set α) = stabilizer G s := by\n ext; simp [← Finset.coe_inj]", "start": [ 95, 1 ], "end": [ 97, 31 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_finset_empty", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_finset_empty : stabilizer G (∅ : Finset α) = ⊤ :=\n Subgroup.coe_eq_univ.1 <| eq_univ_of_forall Finset.smul_finset_empty", "start": [ 99, 1 ], "end": [ 101, 71 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_finset_univ", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_finset_univ [Fintype α] : stabilizer G (Finset.univ : Finset α) = ⊤ := by\n ext\n simp", "start": [ 103, 1 ], "end": [ 106, 7 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_finset_singleton", "code": "@[to_additive (attr := simp)]\nlemma stabilizer_finset_singleton (b : α) : stabilizer G ({b} : Finset α) = stabilizer G b := by\n ext; simp", "start": [ 108, 1 ], "end": [ 110, 12 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_finset", "code": "@[to_additive]\nlemma mem_stabilizer_finset {s : Finset α} : a ∈ stabilizer G s ↔ ∀ b, a • b ∈ s ↔ b ∈ s := by\n simp_rw [← stabilizer_coe_finset, mem_stabilizer_set, Finset.mem_coe]", "start": [ 112, 1 ], "end": [ 114, 72 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_finset_iff_subset_smul_finset", "code": "@[to_additive]\nlemma mem_stabilizer_finset_iff_subset_smul_finset {s : Finset α} :\n a ∈ stabilizer G s ↔ s ⊆ a • s := by\n rw [mem_stabilizer_iff, Finset.subset_iff_eq_of_card_le (Finset.card_smul_finset _ _).le, eq_comm]", "start": [ 116, 1 ], "end": [ 119, 101 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_finset_iff_smul_finset_subset", "code": "@[to_additive]\nlemma mem_stabilizer_finset_iff_smul_finset_subset {s : Finset α} :\n a ∈ stabilizer G s ↔ a • s ⊆ s := by\n rw [mem_stabilizer_iff, Finset.subset_iff_eq_of_card_le (Finset.card_smul_finset _ _).ge]", "start": [ 121, 1 ], "end": [ 124, 92 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_finset'", "code": "@[to_additive]\nlemma mem_stabilizer_finset' {s : Finset α} : a ∈ stabilizer G s ↔ ∀ ⦃b⦄, b ∈ s → a • b ∈ s := by\n rw [← Subgroup.inv_mem_iff, mem_stabilizer_finset_iff_subset_smul_finset]\n simp_rw [← Finset.mem_inv_smul_finset_iff, Finset.subset_iff]", "start": [ 126, 1 ], "end": [ 129, 64 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_set_iff_subset_smul_set", "code": "@[to_additive]\nlemma mem_stabilizer_set_iff_subset_smul_set {s : Set α} (hs : s.Finite) :\n a ∈ stabilizer G s ↔ s ⊆ a • s := by\n lift s to Finset α using hs\n classical\n rw [stabilizer_coe_finset, mem_stabilizer_finset_iff_subset_smul_finset, ← Finset.coe_smul_finset,\n Finset.coe_subset]", "start": [ 135, 1 ], "end": [ 141, 23 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_set_iff_smul_set_subset", "code": "@[to_additive]\nlemma mem_stabilizer_set_iff_smul_set_subset {s : Set α} (hs : s.Finite) :\n a ∈ stabilizer G s ↔ a • s ⊆ s := by\n lift s to Finset α using hs\n classical\n rw [stabilizer_coe_finset, mem_stabilizer_finset_iff_smul_finset_subset, ← Finset.coe_smul_finset,\n Finset.coe_subset]", "start": [ 143, 1 ], "end": [ 149, 23 ], "kind": "lemma" }, { "full_name": "MulAction.mem_stabilizer_set'", "code": "@[to_additive]\nlemma mem_stabilizer_set' {s : Set α} (hs : s.Finite) :\n a ∈ stabilizer G s ↔ ∀ ⦃b⦄, b ∈ s → a • b ∈ s := by\n lift s to Finset α using hs\n classical simp [-mem_stabilizer_iff, mem_stabilizer_finset']", "start": [ 151, 1 ], "end": [ 155, 63 ], "kind": "lemma" }, { "full_name": "MulAction.mul_stabilizer_self", "code": "@[to_additive (attr := simp)]\nlemma mul_stabilizer_self : s * stabilizer G s = s := by rw [mul_comm, stabilizer_mul_self]", "start": [ 164, 1 ], "end": [ 165, 92 ], "kind": "lemma" }, { "full_name": "MulAction.stabilizer_image_coe_quotient", "code": "@[to_additive]\nlemma stabilizer_image_coe_quotient : stabilizer Q (q '' s) = ⊥ := by\n ext a\n induction' a using QuotientGroup.induction_on' with a\n simp only [mem_stabilizer_iff, Subgroup.mem_bot, QuotientGroup.eq_one_iff]\n have : q a • q '' s = q '' (a • s) :=\n (image_smul_distrib (QuotientGroup.mk' <| stabilizer G s) _ _).symm\n rw [this]\n refine ⟨fun h ↦ ?_, fun h ↦ by rw [h]⟩\n rwa [QuotientGroup.image_coe_inj, mul_smul_comm, stabilizer_mul_self] at h", "start": [ 170, 1 ], "end": [ 179, 77 ], "kind": "lemma" } ]
Mathlib/Topology/Algebra/Localization.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/Localization/Basic.lean", "Mathlib/Topology/Algebra/Ring/Basic.lean" ]
[ { "full_name": "Localization.ringTopology", "code": "def Localization.ringTopology : RingTopology (Localization M) :=\n RingTopology.coinduced (Localization.monoidOf M).toFun", "start": [ 29, 1 ], "end": [ 32, 57 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/SimpleGraph/Finsubgraph.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Combinatorics/SimpleGraph/Subgraph.lean", "Mathlib/CategoryTheory/CofilteredSystem.lean" ]
[ { "full_name": "SimpleGraph.Finsubgraph", "code": "abbrev Finsubgraph (G : SimpleGraph V) :=\n { G' : G.Subgraph // G'.verts.Finite }", "start": [ 44, 1 ], "end": [ 46, 41 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.FinsubgraphHom", "code": "abbrev FinsubgraphHom (G' : G.Finsubgraph) (F : SimpleGraph W) :=\n G'.val.coe →g F", "start": [ 49, 1 ], "end": [ 51, 18 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.singletonFinsubgraph", "code": "def singletonFinsubgraph (v : V) : G.Finsubgraph :=\n ⟨SimpleGraph.singletonSubgraph _ v, by simp⟩", "start": [ 82, 1 ], "end": [ 84, 47 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.finsubgraphOfAdj", "code": "def finsubgraphOfAdj {u v : V} (e : G.Adj u v) : G.Finsubgraph :=\n ⟨SimpleGraph.subgraphOfAdj _ e, by simp⟩", "start": [ 87, 1 ], "end": [ 89, 43 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.singletonFinsubgraph_le_adj_left", "code": "theorem singletonFinsubgraph_le_adj_left {u v : V} {e : G.Adj u v} :\n singletonFinsubgraph u ≤ finsubgraphOfAdj e", "start": [ 93, 1 ], "end": [ 95, 48 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.singletonFinsubgraph_le_adj_right", "code": "theorem singletonFinsubgraph_le_adj_right {u v : V} {e : G.Adj u v} :\n singletonFinsubgraph v ≤ finsubgraphOfAdj e", "start": [ 98, 1 ], "end": [ 100, 48 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.FinsubgraphHom.restrict", "code": "def FinsubgraphHom.restrict {G' G'' : G.Finsubgraph} (h : G'' ≤ G') (f : G' →fg F) : G'' →fg F := by\n refine ⟨fun ⟨v, hv⟩ => f.toFun ⟨v, h.1 hv⟩, ?_⟩\n rintro ⟨u, hu⟩ ⟨v, hv⟩ huv\n exact f.map_rel' (h.2 huv)", "start": [ 103, 1 ], "end": [ 107, 29 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.finsubgraphHomFunctor", "code": "def finsubgraphHomFunctor (G : SimpleGraph V) (F : SimpleGraph W) :\n G.Finsubgraphᵒᵖ ⥤ Type max u v where\n obj G' := G'.unop →fg F\n map g f := f.restrict (CategoryTheory.leOfHom g.unop)", "start": [ 110, 1 ], "end": [ 114, 56 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.nonempty_hom_of_forall_finite_subgraph_hom", "code": "theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]\n (h : ∀ G' : G.Subgraph, G'.verts.Finite → G'.coe →g F) : Nonempty (G →g F)", "start": [ 117, 1 ], "end": [ 153, 28 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Convex/Caratheodory.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/AffineSpace/Independent.lean", "Mathlib/Analysis/Convex/Combination.lean", "Mathlib/Tactic/FieldSimp.lean" ]
[ { "full_name": "Caratheodory.mem_convexHull_erase", "code": "theorem mem_convexHull_erase [DecidableEq E] {t : Finset E} (h : ¬AffineIndependent 𝕜 ((↑) : t → E))\n {x : E} (m : x ∈ convexHull 𝕜 (↑t : Set E)) :\n ∃ y : (↑t : Set E), x ∈ convexHull 𝕜 (↑(t.erase y) : Set E)", "start": [ 50, 1 ], "end": [ 98, 51 ], "kind": "commanddeclaration" }, { "full_name": "Caratheodory.minCardFinsetOfMemConvexHull", "code": "noncomputable def minCardFinsetOfMemConvexHull : Finset E :=\n Function.argminOn Finset.card Nat.lt_wfRel.2 { t | ↑t ⊆ s ∧ x ∈ convexHull 𝕜 (t : Set E) } <| by\n simpa only [convexHull_eq_union_convexHull_finite_subsets s, exists_prop, mem_iUnion] using hx", "start": [ 103, 1 ], "end": [ 107, 99 ], "kind": "commanddeclaration" }, { "full_name": "Caratheodory.minCardFinsetOfMemConvexHull_subseteq", "code": "theorem minCardFinsetOfMemConvexHull_subseteq : ↑(minCardFinsetOfMemConvexHull hx) ⊆ s", "start": [ 110, 1 ], "end": [ 111, 91 ], "kind": "commanddeclaration" }, { "full_name": "Caratheodory.mem_minCardFinsetOfMemConvexHull", "code": "theorem mem_minCardFinsetOfMemConvexHull :\n x ∈ convexHull 𝕜 (minCardFinsetOfMemConvexHull hx : Set E)", "start": [ 114, 1 ], "end": [ 116, 91 ], "kind": "commanddeclaration" }, { "full_name": "Caratheodory.minCardFinsetOfMemConvexHull_nonempty", "code": "theorem minCardFinsetOfMemConvexHull_nonempty : (minCardFinsetOfMemConvexHull hx).Nonempty", "start": [ 119, 1 ], "end": [ 121, 49 ], "kind": "commanddeclaration" }, { "full_name": "Caratheodory.minCardFinsetOfMemConvexHull_card_le_card", "code": "theorem minCardFinsetOfMemConvexHull_card_le_card {t : Finset E} (ht₁ : ↑t ⊆ s)\n (ht₂ : x ∈ convexHull 𝕜 (t : Set E)) : (minCardFinsetOfMemConvexHull hx).card ≤ t.card", "start": [ 124, 1 ], "end": [ 126, 51 ], "kind": "commanddeclaration" }, { "full_name": "Caratheodory.affineIndependent_minCardFinsetOfMemConvexHull", "code": "theorem affineIndependent_minCardFinsetOfMemConvexHull :\n AffineIndependent 𝕜 ((↑) : minCardFinsetOfMemConvexHull hx → E)", "start": [ 129, 1 ], "end": [ 143, 21 ], "kind": "commanddeclaration" }, { "full_name": "convexHull_eq_union", "code": "theorem convexHull_eq_union : convexHull 𝕜 s =\n ⋃ (t : Finset E) (hss : ↑t ⊆ s) (hai : AffineIndependent 𝕜 ((↑) : t → E)), convexHull 𝕜 ↑t", "start": [ 150, 1 ], "end": [ 161, 30 ], "kind": "commanddeclaration" }, { "full_name": "eq_pos_convex_span_of_mem_convexHull", "code": "theorem eq_pos_convex_span_of_mem_convexHull {x : E} (hx : x ∈ convexHull 𝕜 s) :\n ∃ (ι : Sort (u + 1)) (_ : Fintype ι),\n ∃ (z : ι → E) (w : ι → 𝕜), Set.range z ⊆ s ∧ AffineIndependent 𝕜 z ∧ (∀ i, 0 < w i) ∧\n ∑ i, w i = 1 ∧ ∑ i, w i • z i = x", "start": [ 164, 1 ], "end": [ 188, 29 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Matrix/DualNumber.lean
[ "Mathlib/Algebra/DualNumber.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Matrix/Basic.lean" ]
[ { "full_name": "Matrix.dualNumberEquiv", "code": "@[simps]\ndef Matrix.dualNumberEquiv : Matrix n n (DualNumber R) ≃ₐ[R] DualNumber (Matrix n n R) where\n toFun A := ⟨of fun i j => (A i j).fst, of fun i j => (A i j).snd⟩\n invFun d := of fun i j => (d.fst i j, d.snd i j)\n left_inv A := Matrix.ext fun i j => TrivSqZeroExt.ext rfl rfl\n right_inv d := TrivSqZeroExt.ext (Matrix.ext fun i j => rfl) (Matrix.ext fun i j => rfl)\n map_mul' A B := by\n ext\n · dsimp [mul_apply]\n simp_rw [fst_sum]\n rfl\n · simp_rw [snd_mul, smul_eq_mul, op_smul_eq_mul]\n simp only [mul_apply, snd_sum, DualNumber.snd_mul, snd_mk, of_apply, fst_mk, add_apply]\n rw [← Finset.sum_add_distrib]\n map_add' A B := TrivSqZeroExt.ext rfl rfl\n commutes' r := by\n simp_rw [algebraMap_eq_inl', algebraMap_eq_diagonal, Pi.algebraMap_def,\n Algebra.id.map_eq_self, algebraMap_eq_inl, ← diagonal_map (inl_zero R), map_apply, fst_inl,\n snd_inl]\n rfl", "start": [ 23, 1 ], "end": [ 43, 8 ], "kind": "commanddeclaration" } ]
Mathlib/Computability/Reduce.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Computability/Halting.lean" ]
[ { "full_name": "ManyOneReducible", "code": "def ManyOneReducible {α β} [Primcodable α] [Primcodable β] (p : α → Prop) (q : β → Prop) :=\n ∃ f, Computable f ∧ ∀ a, p a ↔ q (f a)", "start": [ 35, 1 ], "end": [ 40, 41 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneReducible.mk", "code": "theorem ManyOneReducible.mk {α β} [Primcodable α] [Primcodable β] {f : α → β} (q : β → Prop)\n (h : Computable f) : (fun a => q (f a)) ≤₀ q", "start": [ 46, 1 ], "end": [ 48, 27 ], "kind": "commanddeclaration" }, { "full_name": "manyOneReducible_refl", "code": "@[refl]\ntheorem manyOneReducible_refl {α} [Primcodable α] (p : α → Prop) : p ≤₀ p", "start": [ 51, 1 ], "end": [ 53, 31 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneReducible.trans", "code": "@[trans]\ntheorem ManyOneReducible.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} : p ≤₀ q → q ≤₀ r → p ≤₀ r", "start": [ 56, 1 ], "end": [ 61, 85 ], "kind": "commanddeclaration" }, { "full_name": "reflexive_manyOneReducible", "code": "theorem reflexive_manyOneReducible {α} [Primcodable α] : Reflexive (@ManyOneReducible α α _ _)", "start": [ 64, 1 ], "end": [ 65, 24 ], "kind": "commanddeclaration" }, { "full_name": "transitive_manyOneReducible", "code": "theorem transitive_manyOneReducible {α} [Primcodable α] : Transitive (@ManyOneReducible α α _ _)", "start": [ 68, 1 ], "end": [ 69, 38 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible", "code": "def OneOneReducible {α β} [Primcodable α] [Primcodable β] (p : α → Prop) (q : β → Prop) :=\n ∃ f, Computable f ∧ Injective f ∧ ∀ a, p a ↔ q (f a)", "start": [ 72, 1 ], "end": [ 77, 55 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible.mk", "code": "theorem OneOneReducible.mk {α β} [Primcodable α] [Primcodable β] {f : α → β} (q : β → Prop)\n (h : Computable f) (i : Injective f) : (fun a => q (f a)) ≤₁ q", "start": [ 83, 1 ], "end": [ 85, 30 ], "kind": "commanddeclaration" }, { "full_name": "oneOneReducible_refl", "code": "@[refl]\ntheorem oneOneReducible_refl {α} [Primcodable α] (p : α → Prop) : p ≤₁ p", "start": [ 88, 1 ], "end": [ 90, 45 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible.trans", "code": "@[trans]\ntheorem OneOneReducible.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {p : α → Prop}\n {q : β → Prop} {r : γ → Prop} : p ≤₁ q → q ≤₁ r → p ≤₁ r", "start": [ 93, 1 ], "end": [ 98, 76 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible.to_many_one", "code": "theorem OneOneReducible.to_many_one {α β} [Primcodable α] [Primcodable β] {p : α → Prop}\n {q : β → Prop} : p ≤₁ q → p ≤₀ q", "start": [ 101, 1 ], "end": [ 103, 30 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible.of_equiv", "code": "theorem OneOneReducible.of_equiv {α β} [Primcodable α] [Primcodable β] {e : α ≃ β} (q : β → Prop)\n (h : Computable e) : (q ∘ e) ≤₁ q", "start": [ 106, 1 ], "end": [ 108, 37 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible.of_equiv_symm", "code": "theorem OneOneReducible.of_equiv_symm {α β} [Primcodable α] [Primcodable β] {e : α ≃ β}\n (q : β → Prop) (h : Computable e.symm) : q ≤₁ (q ∘ e)", "start": [ 111, 1 ], "end": [ 113, 53 ], "kind": "commanddeclaration" }, { "full_name": "reflexive_oneOneReducible", "code": "theorem reflexive_oneOneReducible {α} [Primcodable α] : Reflexive (@OneOneReducible α α _ _)", "start": [ 116, 1 ], "end": [ 117, 23 ], "kind": "commanddeclaration" }, { "full_name": "transitive_oneOneReducible", "code": "theorem transitive_oneOneReducible {α} [Primcodable α] : Transitive (@OneOneReducible α α _ _)", "start": [ 120, 1 ], "end": [ 121, 37 ], "kind": "commanddeclaration" }, { "full_name": "ComputablePred.computable_of_manyOneReducible", "code": "theorem computable_of_manyOneReducible {p : α → Prop} {q : β → Prop} (h₁ : p ≤₀ q)\n (h₂ : ComputablePred q) : ComputablePred p", "start": [ 131, 1 ], "end": [ 136, 54 ], "kind": "commanddeclaration" }, { "full_name": "ComputablePred.computable_of_oneOneReducible", "code": "theorem computable_of_oneOneReducible {p : α → Prop} {q : β → Prop} (h : p ≤₁ q) :\n ComputablePred q → ComputablePred p", "start": [ 139, 1 ], "end": [ 141, 47 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv", "code": "def ManyOneEquiv {α β} [Primcodable α] [Primcodable β] (p : α → Prop) (q : β → Prop) :=\n p ≤₀ q ∧ q ≤₀ p", "start": [ 146, 1 ], "end": [ 148, 18 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv", "code": "def OneOneEquiv {α β} [Primcodable α] [Primcodable β] (p : α → Prop) (q : β → Prop) :=\n p ≤₁ q ∧ q ≤₁ p", "start": [ 151, 1 ], "end": [ 153, 18 ], "kind": "commanddeclaration" }, { "full_name": "manyOneEquiv_refl", "code": "@[refl]\ntheorem manyOneEquiv_refl {α} [Primcodable α] (p : α → Prop) : ManyOneEquiv p p", "start": [ 156, 1 ], "end": [ 158, 53 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv.symm", "code": "@[symm]\ntheorem ManyOneEquiv.symm {α β} [Primcodable α] [Primcodable β] {p : α → Prop} {q : β → Prop} :\n ManyOneEquiv p q → ManyOneEquiv q p", "start": [ 161, 1 ], "end": [ 164, 11 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv.trans", "code": "@[trans]\ntheorem ManyOneEquiv.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {p : α → Prop}\n {q : β → Prop} {r : γ → Prop} : ManyOneEquiv p q → ManyOneEquiv q r → ManyOneEquiv p r", "start": [ 167, 1 ], "end": [ 170, 53 ], "kind": "commanddeclaration" }, { "full_name": "equivalence_of_manyOneEquiv", "code": "theorem equivalence_of_manyOneEquiv {α} [Primcodable α] : Equivalence (@ManyOneEquiv α α _ _)", "start": [ 173, 1 ], "end": [ 174, 89 ], "kind": "commanddeclaration" }, { "full_name": "oneOneEquiv_refl", "code": "@[refl]\ntheorem oneOneEquiv_refl {α} [Primcodable α] (p : α → Prop) : OneOneEquiv p p", "start": [ 177, 1 ], "end": [ 179, 51 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.symm", "code": "@[symm]\ntheorem OneOneEquiv.symm {α β} [Primcodable α] [Primcodable β] {p : α → Prop} {q : β → Prop} :\n OneOneEquiv p q → OneOneEquiv q p", "start": [ 182, 1 ], "end": [ 185, 11 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.trans", "code": "@[trans]\ntheorem OneOneEquiv.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {p : α → Prop}\n {q : β → Prop} {r : γ → Prop} : OneOneEquiv p q → OneOneEquiv q r → OneOneEquiv p r", "start": [ 188, 1 ], "end": [ 191, 53 ], "kind": "commanddeclaration" }, { "full_name": "equivalence_of_oneOneEquiv", "code": "theorem equivalence_of_oneOneEquiv {α} [Primcodable α] : Equivalence (@OneOneEquiv α α _ _)", "start": [ 194, 1 ], "end": [ 195, 86 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.to_many_one", "code": "theorem OneOneEquiv.to_many_one {α β} [Primcodable α] [Primcodable β] {p : α → Prop}\n {q : β → Prop} : OneOneEquiv p q → ManyOneEquiv p q", "start": [ 198, 1 ], "end": [ 200, 49 ], "kind": "commanddeclaration" }, { "full_name": "Equiv.Computable", "code": "nonrec def Equiv.Computable {α β} [Primcodable α] [Primcodable β] (e : α ≃ β) :=\n Computable e ∧ Computable e.symm", "start": [ 203, 1 ], "end": [ 205, 35 ], "kind": "commanddeclaration" }, { "full_name": "Equiv.Computable.symm", "code": "theorem Equiv.Computable.symm {α β} [Primcodable α] [Primcodable β] {e : α ≃ β} :\n e.Computable → e.symm.Computable", "start": [ 208, 1 ], "end": [ 210, 11 ], "kind": "commanddeclaration" }, { "full_name": "Equiv.Computable.trans", "code": "theorem Equiv.Computable.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {e₁ : α ≃ β}\n {e₂ : β ≃ γ} : e₁.Computable → e₂.Computable → (e₁.trans e₂).Computable", "start": [ 213, 1 ], "end": [ 215, 51 ], "kind": "commanddeclaration" }, { "full_name": "Computable.eqv", "code": "theorem Computable.eqv (α) [Denumerable α] : (Denumerable.eqv α).Computable", "start": [ 218, 1 ], "end": [ 219, 42 ], "kind": "commanddeclaration" }, { "full_name": "Computable.equiv₂", "code": "theorem Computable.equiv₂ (α β) [Denumerable α] [Denumerable β] :\n (Denumerable.equiv₂ α β).Computable", "start": [ 222, 1 ], "end": [ 224, 51 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.of_equiv", "code": "theorem OneOneEquiv.of_equiv {α β} [Primcodable α] [Primcodable β] {e : α ≃ β} (h : e.Computable)\n {p} : OneOneEquiv (p ∘ e) p", "start": [ 227, 1 ], "end": [ 229, 72 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv.of_equiv", "code": "theorem ManyOneEquiv.of_equiv {α β} [Primcodable α] [Primcodable β] {e : α ≃ β} (h : e.Computable)\n {p} : ManyOneEquiv (p ∘ e) p", "start": [ 232, 1 ], "end": [ 234, 39 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv.le_congr_left", "code": "theorem ManyOneEquiv.le_congr_left {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : ManyOneEquiv p q) : p ≤₀ r ↔ q ≤₀ r", "start": [ 237, 1 ], "end": [ 239, 25 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv.le_congr_right", "code": "theorem ManyOneEquiv.le_congr_right {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : ManyOneEquiv q r) : p ≤₀ q ↔ p ≤₀ r", "start": [ 242, 1 ], "end": [ 244, 51 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.le_congr_left", "code": "theorem OneOneEquiv.le_congr_left {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : OneOneEquiv p q) : p ≤₁ r ↔ q ≤₁ r", "start": [ 247, 1 ], "end": [ 249, 25 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.le_congr_right", "code": "theorem OneOneEquiv.le_congr_right {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : OneOneEquiv q r) : p ≤₁ q ↔ p ≤₁ r", "start": [ 252, 1 ], "end": [ 254, 51 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv.congr_left", "code": "theorem ManyOneEquiv.congr_left {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : ManyOneEquiv p q) :\n ManyOneEquiv p r ↔ ManyOneEquiv q r", "start": [ 257, 1 ], "end": [ 260, 45 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneEquiv.congr_right", "code": "theorem ManyOneEquiv.congr_right {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : ManyOneEquiv q r) :\n ManyOneEquiv p q ↔ ManyOneEquiv p r", "start": [ 263, 1 ], "end": [ 266, 45 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.congr_left", "code": "theorem OneOneEquiv.congr_left {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : OneOneEquiv p q) :\n OneOneEquiv p r ↔ OneOneEquiv q r", "start": [ 269, 1 ], "end": [ 272, 45 ], "kind": "commanddeclaration" }, { "full_name": "OneOneEquiv.congr_right", "code": "theorem OneOneEquiv.congr_right {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : OneOneEquiv q r) :\n OneOneEquiv p q ↔ OneOneEquiv p r", "start": [ 275, 1 ], "end": [ 278, 45 ], "kind": "commanddeclaration" }, { "full_name": "ULower.down_computable", "code": "@[simp]\ntheorem ULower.down_computable {α} [Primcodable α] : (ULower.equiv α).Computable", "start": [ 281, 1 ], "end": [ 283, 59 ], "kind": "commanddeclaration" }, { "full_name": "manyOneEquiv_up", "code": "theorem manyOneEquiv_up {α} [Primcodable α] {p : α → Prop} : ManyOneEquiv (p ∘ ULower.up) p", "start": [ 286, 1 ], "end": [ 287, 52 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible.disjoin_left", "code": "theorem OneOneReducible.disjoin_left {α β} [Primcodable α] [Primcodable β] {p : α → Prop}\n {q : β → Prop} : p ≤₁ p ⊕' q", "start": [ 294, 1 ], "end": [ 296, 80 ], "kind": "commanddeclaration" }, { "full_name": "OneOneReducible.disjoin_right", "code": "theorem OneOneReducible.disjoin_right {α β} [Primcodable α] [Primcodable β] {p : α → Prop}\n {q : β → Prop} : q ≤₁ p ⊕' q", "start": [ 299, 1 ], "end": [ 301, 80 ], "kind": "commanddeclaration" }, { "full_name": "disjoin_manyOneReducible", "code": "theorem disjoin_manyOneReducible {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]\n {p : α → Prop} {q : β → Prop} {r : γ → Prop} : p ≤₀ r → q ≤₀ r → (p ⊕' q) ≤₀ r", "start": [ 304, 1 ], "end": [ 309, 52 ], "kind": "commanddeclaration" }, { "full_name": "disjoin_le", "code": "theorem disjoin_le {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {p : α → Prop}\n {q : β → Prop} {r : γ → Prop} : (p ⊕' q) ≤₀ r ↔ p ≤₀ r ∧ q ≤₀ r", "start": [ 312, 1 ], "end": [ 317, 52 ], "kind": "commanddeclaration" }, { "full_name": "toNat", "code": "def toNat (p : Set α) : Set ℕ :=\n { n | p ((Encodable.decode (α := α) n).getD default) }", "start": [ 324, 1 ], "end": [ 327, 57 ], "kind": "commanddeclaration" }, { "full_name": "toNat_manyOneReducible", "code": "@[simp]\ntheorem toNat_manyOneReducible {p : Set α} : toNat p ≤₀ p", "start": [ 330, 1 ], "end": [ 333, 85 ], "kind": "commanddeclaration" }, { "full_name": "manyOneReducible_toNat", "code": "@[simp]\ntheorem manyOneReducible_toNat {p : Set α} : p ≤₀ toNat p", "start": [ 336, 1 ], "end": [ 338, 64 ], "kind": "commanddeclaration" }, { "full_name": "manyOneReducible_toNat_toNat", "code": "@[simp]\ntheorem manyOneReducible_toNat_toNat {p : Set α} {q : Set β} : toNat p ≤₀ toNat q ↔ p ≤₀ q", "start": [ 341, 1 ], "end": [ 344, 67 ], "kind": "commanddeclaration" }, { "full_name": "toNat_manyOneEquiv", "code": "@[simp]\ntheorem toNat_manyOneEquiv {p : Set α} : ManyOneEquiv (toNat p) p", "start": [ 347, 1 ], "end": [ 348, 92 ], "kind": "commanddeclaration" }, { "full_name": "manyOneEquiv_toNat", "code": "@[simp]\ntheorem manyOneEquiv_toNat (p : Set α) (q : Set β) :\n ManyOneEquiv (toNat p) (toNat q) ↔ ManyOneEquiv p q", "start": [ 351, 1 ], "end": [ 353, 82 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree", "code": "def ManyOneDegree : Type :=\n Quotient (⟨ManyOneEquiv, equivalence_of_manyOneEquiv⟩ : Setoid (Set ℕ))", "start": [ 356, 1 ], "end": [ 358, 74 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.of", "code": "def of (p : α → Prop) : ManyOneDegree :=\n Quotient.mk'' (toNat p)", "start": [ 363, 1 ], "end": [ 365, 26 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.ind_on", "code": "@[elab_as_elim]\nprotected theorem ind_on {C : ManyOneDegree → Prop} (d : ManyOneDegree)\n (h : ∀ p : Set ℕ, C (of p)) : C d", "start": [ 368, 1 ], "end": [ 371, 28 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.liftOn", "code": "protected abbrev liftOn {φ} (d : ManyOneDegree) (f : Set ℕ → φ)\n (h : ∀ p q, ManyOneEquiv p q → f p = f q) : φ :=\n Quotient.liftOn' d f h", "start": [ 374, 1 ], "end": [ 379, 25 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.liftOn_eq", "code": "@[simp]\nprotected theorem liftOn_eq {φ} (p : Set ℕ) (f : Set ℕ → φ)\n (h : ∀ p q, ManyOneEquiv p q → f p = f q) : (of p).liftOn f h = f p", "start": [ 382, 1 ], "end": [ 385, 6 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.liftOn₂", "code": "@[reducible, simp] protected def liftOn₂ {φ} (d₁ d₂ : ManyOneDegree) (f : Set ℕ → Set ℕ → φ)\n (h : ∀ p₁ p₂ q₁ q₂, ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂) : φ :=\n d₁.liftOn (fun p => d₂.liftOn (f p) fun q₁ q₂ hq => h _ _ _ _ (by rfl) hq)\n (by\n intro p₁ p₂ hp\n induction d₂ using ManyOneDegree.ind_on\n apply h\n · assumption\n · rfl)", "start": [ 388, 1 ], "end": [ 399, 13 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.liftOn₂_eq", "code": "@[simp]\nprotected theorem liftOn₂_eq {φ} (p q : Set ℕ) (f : Set ℕ → Set ℕ → φ)\n (h : ∀ p₁ p₂ q₁ q₂, ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂) :\n (of p).liftOn₂ (of q) f h = f p q", "start": [ 402, 1 ], "end": [ 406, 6 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.of_eq_of", "code": "@[simp]\ntheorem of_eq_of {p : α → Prop} {q : β → Prop} : of p = of q ↔ ManyOneEquiv p q", "start": [ 409, 1 ], "end": [ 413, 7 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.instInhabited", "code": "instance instInhabited : Inhabited ManyOneDegree :=\n ⟨of (∅ : Set ℕ)⟩", "start": [ 416, 1 ], "end": [ 417, 19 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.instLE", "code": "instance instLE : LE ManyOneDegree :=\n ⟨fun d₁ d₂ =>\n ManyOneDegree.liftOn₂ d₁ d₂ (· ≤₀ ·) fun _p₁ _p₂ _q₁ _q₂ hp hq =>\n propext (hp.le_congr_left.trans hq.le_congr_right)⟩", "start": [ 420, 1 ], "end": [ 426, 58 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.of_le_of", "code": "@[simp]\ntheorem of_le_of {p : α → Prop} {q : β → Prop} : of p ≤ of q ↔ p ≤₀ q", "start": [ 429, 1 ], "end": [ 431, 31 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.le_refl", "code": "private theorem le_refl (d : ManyOneDegree) : d ≤ d", "start": [ 434, 1 ], "end": [ 435, 52 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.le_antisymm", "code": "private theorem le_antisymm {d₁ d₂ : ManyOneDegree} : d₁ ≤ d₂ → d₂ ≤ d₁ → d₁ = d₂", "start": [ 437, 1 ], "end": [ 441, 65 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.le_trans", "code": "private theorem le_trans {d₁ d₂ d₃ : ManyOneDegree} : d₁ ≤ d₂ → d₂ ≤ d₃ → d₁ ≤ d₃", "start": [ 443, 1 ], "end": [ 447, 31 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.instPartialOrder", "code": "instance instPartialOrder : PartialOrder ManyOneDegree where\n le := (· ≤ ·)\n le_refl := le_refl\n le_trans _ _ _ := le_trans\n le_antisymm _ _ := le_antisymm", "start": [ 449, 1 ], "end": [ 453, 33 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.instAdd", "code": "instance instAdd : Add ManyOneDegree :=\n ⟨fun d₁ d₂ =>\n d₁.liftOn₂ d₂ (fun a b => of (a ⊕' b))\n (by\n rintro a b c d ⟨hl₁, hr₁⟩ ⟨hl₂, hr₂⟩\n rw [of_eq_of]\n exact\n ⟨disjoin_manyOneReducible (hl₁.trans OneOneReducible.disjoin_left.to_many_one)\n (hl₂.trans OneOneReducible.disjoin_right.to_many_one),\n disjoin_manyOneReducible (hr₁.trans OneOneReducible.disjoin_left.to_many_one)\n (hr₂.trans OneOneReducible.disjoin_right.to_many_one)⟩)⟩", "start": [ 456, 1 ], "end": [ 467, 71 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.add_of", "code": "@[simp]\ntheorem add_of (p : Set α) (q : Set β) : of (p ⊕' q) = of p + of q", "start": [ 470, 1 ], "end": [ 478, 82 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.add_le", "code": "@[simp]\nprotected theorem add_le {d₁ d₂ d₃ : ManyOneDegree} : d₁ + d₂ ≤ d₃ ↔ d₁ ≤ d₃ ∧ d₂ ≤ d₃", "start": [ 481, 1 ], "end": [ 486, 51 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.le_add_left", "code": "@[simp]\nprotected theorem le_add_left (d₁ d₂ : ManyOneDegree) : d₁ ≤ d₁ + d₂", "start": [ 489, 1 ], "end": [ 491, 38 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.le_add_right", "code": "@[simp]\nprotected theorem le_add_right (d₁ d₂ : ManyOneDegree) : d₂ ≤ d₁ + d₂", "start": [ 494, 1 ], "end": [ 496, 38 ], "kind": "commanddeclaration" }, { "full_name": "ManyOneDegree.instSemilatticeSup", "code": "instance instSemilatticeSup : SemilatticeSup ManyOneDegree :=\n { ManyOneDegree.instPartialOrder with\n sup := (· + ·)\n le_sup_left := ManyOneDegree.le_add_left\n le_sup_right := ManyOneDegree.le_add_right\n sup_le := fun _ _ _ h₁ h₂ => ManyOneDegree.add_le.2 ⟨h₁, h₂⟩ }", "start": [ 499, 1 ], "end": [ 504, 67 ], "kind": "commanddeclaration" } ]
Mathlib/ModelTheory/Graph.lean
[ "Mathlib/ModelTheory/Satisfiability.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Combinatorics/SimpleGraph/Basic.lean" ]
[ { "full_name": "FirstOrder.Language.graph", "code": "protected def graph : Language :=\n Language.mk₂ Empty Empty Empty Empty Unit", "start": [ 42, 1 ], "end": [ 44, 44 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.adj", "code": "def adj : Language.graph.Relations 2 :=\n Unit.unit", "start": [ 47, 1 ], "end": [ 49, 12 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.structure", "code": "def _root_.SimpleGraph.structure (G : SimpleGraph V) : Language.graph.Structure V :=\n Structure.mk₂ Empty.elim Empty.elim Empty.elim Empty.elim fun _ => G.Adj", "start": [ 52, 1 ], "end": [ 54, 75 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.graph.instIsRelational", "code": "instance instIsRelational : IsRelational Language.graph :=\n Language.isRelational_mk₂", "start": [ 59, 1 ], "end": [ 60, 28 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.graph.instSubsingleton", "code": "instance instSubsingleton : Subsingleton (Language.graph.Relations n) :=\n Language.subsingleton_mk₂_relations", "start": [ 63, 1 ], "end": [ 64, 38 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.Theory.simpleGraph", "code": "protected def Theory.simpleGraph : Language.graph.Theory :=\n {adj.irreflexive, adj.symmetric}", "start": [ 69, 1 ], "end": [ 71, 35 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.Theory.simpleGraph_model_iff", "code": "@[simp]\ntheorem Theory.simpleGraph_model_iff [Language.graph.Structure V] :\n V ⊨ Theory.simpleGraph ↔\n (Irreflexive fun x y : V => RelMap adj ![x, y]) ∧\n Symmetric fun x y : V => RelMap adj ![x, y]", "start": [ 74, 1 ], "end": [ 79, 28 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.simpleGraph_model", "code": "instance simpleGraph_model (G : SimpleGraph V) :\n @Theory.Model _ V G.structure Theory.simpleGraph := by\n simp only [@Theory.simpleGraph_model_iff _ G.structure, relMap_apply₂]\n exact ⟨G.loopless, G.symm⟩", "start": [ 82, 1 ], "end": [ 85, 29 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.simpleGraphOfStructure", "code": "@[simps]\ndef simpleGraphOfStructure [Language.graph.Structure V] [V ⊨ Theory.simpleGraph] :\n SimpleGraph V where\n Adj x y := RelMap adj ![x, y]\n symm :=\n Relations.realize_symmetric.1\n (Theory.realize_sentence_of_mem Theory.simpleGraph\n (Set.mem_insert_of_mem _ (Set.mem_singleton _)))\n loopless :=\n Relations.realize_irreflexive.1\n (Theory.realize_sentence_of_mem Theory.simpleGraph (Set.mem_insert _ _))", "start": [ 90, 1 ], "end": [ 101, 79 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.simpleGraphOfStructure", "code": "@[simp]\ntheorem _root_.SimpleGraph.simpleGraphOfStructure (G : SimpleGraph V) :\n @simpleGraphOfStructure V G.structure _ = G", "start": [ 106, 1 ], "end": [ 110, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.structure_simpleGraphOfStructure", "code": "@[simp]\ntheorem structure_simpleGraphOfStructure [S : Language.graph.Structure V] [V ⊨ Theory.simpleGraph] :\n (simpleGraphOfStructure V).structure = S", "start": [ 113, 1 ], "end": [ 130, 23 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.Theory.simpleGraph_isSatisfiable", "code": "theorem Theory.simpleGraph_isSatisfiable : Theory.IsSatisfiable Theory.simpleGraph", "start": [ 133, 1 ], "end": [ 134, 64 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Fin/Tuple/Curry.lean
[ "Mathlib/Logic/Equiv/Fin.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Logic/Function/OfArity.lean", "Mathlib/Data/Fin/Tuple/Basic.lean" ]
[ { "full_name": "Function.FromTypes.uncurry", "code": "def uncurry : {n : ℕ} → {p : Fin n → Type u} → {τ : Type u} →\n (f : Function.FromTypes p τ) → ((i : Fin n) → p i) → τ\n | 0 , _, _, f => fun _ => f\n | _ + 1, _, _, f => fun args => (f (args 0)).uncurry (args ∘' Fin.succ)", "start": [ 34, 1 ], "end": [ 41, 74 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.curry", "code": "def curry : {n : ℕ} → {p : Fin n → Type u} → {τ : Type u} →\n (((i : Fin n) → p i) → τ) → Function.FromTypes p τ\n | 0 , _, _, f => f isEmptyElim\n | _ + 1, _, _, f => fun a => curry (fun args => f (Fin.cons a args))", "start": [ 43, 1 ], "end": [ 47, 71 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.uncurry_apply_cons", "code": "@[simp]\ntheorem uncurry_apply_cons {n : ℕ} {α} {p : Fin n → Type u} {τ : Type u}\n (f : Function.FromTypes (vecCons α p) τ) (a : α) (args : (i : Fin n) → p i) :\n uncurry f (Fin.cons a args) = @uncurry _ p _ (f a) args", "start": [ 49, 1 ], "end": [ 52, 67 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.uncurry_apply_succ", "code": "@[simp low]\ntheorem uncurry_apply_succ {n : ℕ} {p : Fin (n + 1) → Type u} {τ : Type u}\n (f : Function.FromTypes p τ) (args : (i : Fin (n + 1)) → p i) :\n uncurry f args = uncurry (f (args 0)) (Fin.tail args)", "start": [ 54, 1 ], "end": [ 58, 71 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.curry_apply_cons", "code": "@[simp]\ntheorem curry_apply_cons {n : ℕ} {α} {p : Fin n → Type u} {τ : Type u}\n (f : ((i : Fin (n + 1)) → (vecCons α p) i) → τ) (a : α) :\n curry f a = @curry _ p _ (f ∘' Fin.cons a)", "start": [ 60, 1 ], "end": [ 63, 54 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.curry_apply_succ", "code": "@[simp low]\ntheorem curry_apply_succ {n : ℕ} {p : Fin (n + 1) → Type u} {τ : Type u}\n (f : ((i : Fin (n + 1)) → p i) → τ) (a : p 0) :\n curry f a = curry (f ∘ Fin.cons a)", "start": [ 65, 1 ], "end": [ 68, 46 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.curry_uncurry", "code": "@[simp]\ntheorem curry_uncurry (f : Function.FromTypes p τ) : curry (uncurry f) = f", "start": [ 72, 1 ], "end": [ 76, 41 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.uncurry_curry", "code": "@[simp]\ntheorem uncurry_curry (f : ((i : Fin n) → p i) → τ) :\n uncurry (curry f) = f", "start": [ 78, 1 ], "end": [ 84, 80 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.curryEquiv", "code": "@[simps]\ndef curryEquiv (p : Fin n → Type u) : (((i : Fin n) → p i) → τ) ≃ FromTypes p τ where\n toFun := curry\n invFun := uncurry\n left_inv := uncurry_curry\n right_inv := curry_uncurry", "start": [ 86, 1 ], "end": [ 92, 29 ], "kind": "commanddeclaration" }, { "full_name": "Function.FromTypes.curry_two_eq_curry", "code": "lemma curry_two_eq_curry {p : Fin 2 → Type u} {τ : Type u}\n (f : ((i : Fin 2) → p i) → τ) :\n curry f = Function.curry (f ∘ (piFinTwoEquiv p).symm) := rfl", "start": [ 94, 1 ], "end": [ 96, 65 ], "kind": "lemma" }, { "full_name": "Function.FromTypes.uncurry_two_eq_uncurry", "code": "lemma uncurry_two_eq_uncurry (p : Fin 2 → Type u) (τ : Type u)\n (f : Function.FromTypes p τ) :\n uncurry f = Function.uncurry f ∘ piFinTwoEquiv p := rfl", "start": [ 98, 1 ], "end": [ 100, 60 ], "kind": "lemma" }, { "full_name": "Function.OfArity.uncurry", "code": "def uncurry {n} (f : Function.OfArity α β n) : (Fin n → α) → β := FromTypes.uncurry f", "start": [ 108, 1 ], "end": [ 111, 86 ], "kind": "commanddeclaration" }, { "full_name": "Function.OfArity.curry", "code": "def curry {n} (f : (Fin n → α) → β) : Function.OfArity α β n := FromTypes.curry f", "start": [ 113, 1 ], "end": [ 114, 82 ], "kind": "commanddeclaration" }, { "full_name": "Function.OfArity.curry_uncurry", "code": "@[simp]\ntheorem curry_uncurry {n} (f : Function.OfArity α β n) :\n curry (uncurry f) = f", "start": [ 116, 1 ], "end": [ 118, 55 ], "kind": "commanddeclaration" }, { "full_name": "Function.OfArity.uncurry_curry", "code": "@[simp]\ntheorem uncurry_curry {n} (f : (Fin n → α) → β) :\n uncurry (curry f) = f", "start": [ 120, 1 ], "end": [ 122, 55 ], "kind": "commanddeclaration" }, { "full_name": "Function.OfArity.curryEquiv", "code": "@[simps!]\ndef curryEquiv (n : ℕ) : ((Fin n → α) → β) ≃ OfArity α β n :=\n FromTypes.curryEquiv _", "start": [ 124, 1 ], "end": [ 127, 25 ], "kind": "commanddeclaration" }, { "full_name": "Function.OfArity.curry_two_eq_curry", "code": "lemma curry_two_eq_curry {α β : Type u} (f : ((i : Fin 2) → α) → β) :\n curry f = Function.curry (f ∘ (finTwoArrowEquiv α).symm) :=\n FromTypes.curry_two_eq_curry f", "start": [ 129, 1 ], "end": [ 131, 33 ], "kind": "lemma" }, { "full_name": "Function.OfArity.uncurry_two_eq_uncurry", "code": "lemma uncurry_two_eq_uncurry {α β : Type u} (f : OfArity α β 2) :\n uncurry f = Function.uncurry f ∘ (finTwoArrowEquiv α) :=\n FromTypes.uncurry_two_eq_uncurry _ _ f", "start": [ 133, 1 ], "end": [ 135, 41 ], "kind": "lemma" } ]
Mathlib/Data/List/Intervals.lean
[ "Mathlib/Data/Bool/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/List/Lattice.lean", "Mathlib/Data/List/Range.lean" ]
[ { "full_name": "List.Ico", "code": "def Ico (n m : ℕ) : List ℕ :=\n range' n (m - n)", "start": [ 30, 1 ], "end": [ 37, 19 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.zero_bot", "code": "theorem zero_bot (n : ℕ) : Ico 0 n = range n", "start": [ 42, 1 ], "end": [ 42, 91 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.length", "code": "@[simp]\ntheorem length (n m : ℕ) : length (Ico n m) = m - n", "start": [ 45, 1 ], "end": [ 48, 34 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.pairwise_lt", "code": "theorem pairwise_lt (n m : ℕ) : Pairwise (· < ·) (Ico n m)", "start": [ 51, 1 ], "end": [ 53, 39 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.nodup", "code": "theorem nodup (n m : ℕ) : Nodup (Ico n m)", "start": [ 56, 1 ], "end": [ 58, 33 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.mem", "code": "@[simp]\ntheorem mem {n m l : ℕ} : l ∈ Ico n m ↔ n ≤ l ∧ l < m", "start": [ 61, 1 ], "end": [ 69, 93 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.eq_nil_of_le", "code": "theorem eq_nil_of_le {n m : ℕ} (h : m ≤ n) : Ico n m = []", "start": [ 72, 1 ], "end": [ 73, 43 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.map_add", "code": "theorem map_add (n m k : ℕ) : (Ico n m).map (k + ·) = Ico (n + k) (m + k)", "start": [ 76, 1 ], "end": [ 77, 77 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.map_sub", "code": "theorem map_sub (n m k : ℕ) (h₁ : k ≤ n) :\n ((Ico n m).map fun x => x - k) = Ico (n - k) (m - k)", "start": [ 80, 1 ], "end": [ 82, 74 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.self_empty", "code": "@[simp]\ntheorem self_empty {n : ℕ} : Ico n n = []", "start": [ 85, 1 ], "end": [ 87, 27 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.eq_empty_iff", "code": "@[simp]\ntheorem eq_empty_iff {n m : ℕ} : Ico n m = [] ↔ m ≤ n", "start": [ 90, 1 ], "end": [ 92, 98 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.append_consecutive", "code": "theorem append_consecutive {n m l : ℕ} (hnm : n ≤ m) (hml : m ≤ l) :\n Ico n m ++ Ico m l = Ico n l", "start": [ 95, 1 ], "end": [ 100, 40 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.inter_consecutive", "code": "@[simp]\ntheorem inter_consecutive (n m l : ℕ) : Ico n m ∩ Ico m l = []", "start": [ 103, 1 ], "end": [ 110, 27 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.bagInter_consecutive", "code": "@[simp]\ntheorem bagInter_consecutive (n m l : Nat) :\n @List.bagInter ℕ instBEqOfDecidableEq (Ico n m) (Ico m l) = []", "start": [ 113, 1 ], "end": [ 116, 74 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.succ_singleton", "code": "@[simp]\ntheorem succ_singleton {n : ℕ} : Ico n (n + 1) = [n]", "start": [ 119, 1 ], "end": [ 122, 41 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.succ_top", "code": "theorem succ_top {n m : ℕ} (h : n ≤ m) : Ico n (m + 1) = Ico n m ++ [m]", "start": [ 125, 1 ], "end": [ 127, 22 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.eq_cons", "code": "theorem eq_cons {n m : ℕ} (h : n < m) : Ico n m = n :: Ico (n + 1) m", "start": [ 130, 1 ], "end": [ 132, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.pred_singleton", "code": "@[simp]\ntheorem pred_singleton {m : ℕ} (h : 0 < m) : Ico (m - 1) m = [m - 1]", "start": [ 135, 1 ], "end": [ 139, 32 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.chain'_succ", "code": "theorem chain'_succ (n m : ℕ) : Chain' (fun a b => b = succ a) (Ico n m)", "start": [ 143, 1 ], "end": [ 148, 12 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.not_mem_top", "code": "theorem not_mem_top {n m : ℕ} : m ∉ Ico n m", "start": [ 153, 1 ], "end": [ 153, 55 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_lt_of_top_le", "code": "theorem filter_lt_of_top_le {n m l : ℕ} (hml : m ≤ l) :\n ((Ico n m).filter fun x => x < l) = Ico n m", "start": [ 156, 1 ], "end": [ 159, 63 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_lt_of_le_bot", "code": "theorem filter_lt_of_le_bot {n m l : ℕ} (hln : l ≤ n) : ((Ico n m).filter fun x => x < l) = []", "start": [ 162, 1 ], "end": [ 166, 24 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_lt_of_ge", "code": "theorem filter_lt_of_ge {n m l : ℕ} (hlm : l ≤ m) :\n ((Ico n m).filter fun x => x < l) = Ico n l", "start": [ 169, 1 ], "end": [ 174, 51 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_lt", "code": "@[simp]\ntheorem filter_lt (n m l : ℕ) :\n ((Ico n m).filter fun x => x < l) = Ico n (min m l)", "start": [ 177, 1 ], "end": [ 182, 47 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_le_of_le_bot", "code": "theorem filter_le_of_le_bot {n m l : ℕ} (hln : l ≤ n) :\n ((Ico n m).filter fun x => l ≤ x) = Ico n m", "start": [ 185, 1 ], "end": [ 189, 36 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_le_of_top_le", "code": "theorem filter_le_of_top_le {n m l : ℕ} (hml : m ≤ l) : ((Ico n m).filter fun x => l ≤ x) = []", "start": [ 192, 1 ], "end": [ 195, 57 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_le_of_le", "code": "theorem filter_le_of_le {n m l : ℕ} (hnl : n ≤ l) :\n ((Ico n m).filter fun x => l ≤ x) = Ico l m", "start": [ 198, 1 ], "end": [ 203, 51 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_le", "code": "@[simp]\ntheorem filter_le (n m l : ℕ) : ((Ico n m).filter fun x => l ≤ x) = Ico (max n l) m", "start": [ 206, 1 ], "end": [ 210, 50 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_lt_of_succ_bot", "code": "theorem filter_lt_of_succ_bot {n m : ℕ} (hnm : n < m) :\n ((Ico n m).filter fun x => x < n + 1) = [n]", "start": [ 213, 1 ], "end": [ 216, 34 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.filter_le_of_bot", "code": "@[simp]\ntheorem filter_le_of_bot {n m : ℕ} (hnm : n < m) : ((Ico n m).filter fun x => x ≤ n) = [n]", "start": [ 219, 1 ], "end": [ 223, 37 ], "kind": "commanddeclaration" }, { "full_name": "List.Ico.trichotomy", "code": "theorem trichotomy (n a b : ℕ) : n < a ∨ b ≤ n ∨ n ∈ Ico a b", "start": [ 226, 1 ], "end": [ 241, 18 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean
[ "Mathlib/Analysis/NormedSpace/FiniteDimension.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Calculus/ContDiff/Basic.lean" ]
[ { "full_name": "contDiffOn_clm_apply", "code": "theorem contDiffOn_clm_apply {n : ℕ∞} {f : E → F →L[𝕜] G} {s : Set E} [FiniteDimensional 𝕜 F] :\n ContDiffOn 𝕜 n f s ↔ ∀ y, ContDiffOn 𝕜 n (fun x => f x y) s", "start": [ 34, 1 ], "end": [ 43, 74 ], "kind": "commanddeclaration" }, { "full_name": "contDiff_clm_apply_iff", "code": "theorem contDiff_clm_apply_iff {n : ℕ∞} {f : E → F →L[𝕜] G} [FiniteDimensional 𝕜 F] :\n ContDiff 𝕜 n f ↔ ∀ y, ContDiff 𝕜 n fun x => f x y", "start": [ 46, 1 ], "end": [ 48, 52 ], "kind": "commanddeclaration" }, { "full_name": "contDiff_succ_iff_fderiv_apply", "code": "theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional 𝕜 E] {n : ℕ} {f : E → F} :\n ContDiff 𝕜 (n + 1 : ℕ) f ↔ Differentiable 𝕜 f ∧ ∀ y, ContDiff 𝕜 n fun x => fderiv 𝕜 f x y", "start": [ 51, 1 ], "end": [ 62, 56 ], "kind": "commanddeclaration" }, { "full_name": "contDiffOn_succ_of_fderiv_apply", "code": "theorem contDiffOn_succ_of_fderiv_apply [FiniteDimensional 𝕜 E] {n : ℕ} {f : E → F} {s : Set E}\n (hf : DifferentiableOn 𝕜 f s) (h : ∀ y, ContDiffOn 𝕜 n (fun x => fderivWithin 𝕜 f s x y) s) :\n ContDiffOn 𝕜 (n + 1 : ℕ) f s", "start": [ 65, 1 ], "end": [ 68, 67 ], "kind": "commanddeclaration" }, { "full_name": "contDiffOn_succ_iff_fderiv_apply", "code": "theorem contDiffOn_succ_iff_fderiv_apply [FiniteDimensional 𝕜 E] {n : ℕ} {f : E → F} {s : Set E}\n (hs : UniqueDiffOn 𝕜 s) :\n ContDiffOn 𝕜 (n + 1 : ℕ) f s ↔\n DifferentiableOn 𝕜 f s ∧ ∀ y, ContDiffOn 𝕜 n (fun x => fderivWithin 𝕜 f s x y) s", "start": [ 71, 1 ], "end": [ 75, 65 ], "kind": "commanddeclaration" } ]
Mathlib/Condensed/Discrete.lean
[ "Mathlib/CategoryTheory/Sites/ConstantSheaf.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Condensed/Basic.lean" ]
[ { "full_name": "Condensed.discrete", "code": "@[simps!]\nnoncomputable def Condensed.discrete : C ⥤ Condensed.{u} C := constantSheaf _ C", "start": [ 27, 1 ], "end": [ 31, 80 ], "kind": "commanddeclaration" }, { "full_name": "Condensed.underlying", "code": "@[simps!]\nnoncomputable def Condensed.underlying : Condensed.{u} C ⥤ C :=\n (sheafSections _ _).obj ⟨CompHaus.of PUnit.{u+1}⟩", "start": [ 33, 1 ], "end": [ 39, 52 ], "kind": "commanddeclaration" }, { "full_name": "Condensed.discreteUnderlyingAdj", "code": "noncomputable def Condensed.discreteUnderlyingAdj : discrete C ⊣ underlying C :=\n constantSheafAdj _ _ CompHaus.isTerminalPUnit", "start": [ 41, 1 ], "end": [ 46, 48 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/ModuleCat/Simple.lean
[ "Mathlib/CategoryTheory/Simple.lean", "Mathlib/RingTheory/SimpleModule.lean", "Mathlib/Algebra/Category/ModuleCat/Algebra.lean", "Mathlib/LinearAlgebra/FiniteDimensional.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Category/ModuleCat/Subobject.lean" ]
[ { "full_name": "simple_iff_isSimpleModule", "code": "theorem simple_iff_isSimpleModule : Simple (of R M) ↔ IsSimpleModule R M", "start": [ 25, 1 ], "end": [ 26, 92 ], "kind": "commanddeclaration" }, { "full_name": "simple_iff_isSimpleModule'", "code": "theorem simple_iff_isSimpleModule' (M : ModuleCat R) : Simple M ↔ IsSimpleModule R M", "start": [ 29, 1 ], "end": [ 30, 73 ], "kind": "commanddeclaration" }, { "full_name": "simple_of_isSimpleModule", "code": "instance simple_of_isSimpleModule [IsSimpleModule R M] : Simple (of R M) :=\n simple_iff_isSimpleModule.mpr ‹_›", "start": [ 33, 1 ], "end": [ 35, 36 ], "kind": "commanddeclaration" }, { "full_name": "isSimpleModule_of_simple", "code": "instance isSimpleModule_of_simple (M : ModuleCat R) [Simple M] : IsSimpleModule R M :=\n simple_iff_isSimpleModule.mp (Simple.of_iso (ofSelfIso M))", "start": [ 38, 1 ], "end": [ 40, 61 ], "kind": "commanddeclaration" }, { "full_name": "simple_of_finrank_eq_one", "code": "theorem simple_of_finrank_eq_one {k : Type*} [Field k] [Algebra k R] {V : ModuleCat R}\n (h : finrank k V = 1) : Simple V", "start": [ 47, 1 ], "end": [ 50, 76 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Polynomial/PartialFractions.lean
[ "Mathlib/Logic/Function/Basic.lean", "Mathlib/RingTheory/Localization/FractionRing.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Polynomial/Div.lean", "Mathlib/Tactic/LinearCombination.lean", "Mathlib/Tactic/FieldSimp.lean" ]
[ { "full_name": "div_eq_quo_add_rem_div_add_rem_div", "code": "theorem div_eq_quo_add_rem_div_add_rem_div (f : R[X]) {g₁ g₂ : R[X]} (hg₁ : g₁.Monic)\n (hg₂ : g₂.Monic) (hcoprime : IsCoprime g₁ g₂) :\n ∃ q r₁ r₂ : R[X],\n r₁.degree < g₁.degree ∧\n r₂.degree < g₂.degree ∧ (f : K) / (↑g₁ * ↑g₂) = ↑q + ↑r₁ / ↑g₁ + ↑r₂ / ↑g₂", "start": [ 56, 1 ], "end": [ 79, 66 ], "kind": "commanddeclaration" }, { "full_name": "div_eq_quo_add_sum_rem_div", "code": "theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type*} {g : ι → R[X]} {s : Finset ι}\n (hg : ∀ i ∈ s, (g i).Monic) (hcop : Set.Pairwise ↑s fun i j => IsCoprime (g i) (g j)) :\n ∃ (q : R[X]) (r : ι → R[X]),\n (∀ i ∈ s, (r i).degree < (g i).degree) ∧\n ((↑f : K) / ∏ i ∈ s, ↑(g i)) = ↑q + ∑ i ∈ s, (r i : K) / (g i : K)", "start": [ 89, 1 ], "end": [ 131, 16 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Int/CardIntervalMod.lean
[ "Mathlib/Data/Int/Interval.lean", "Mathlib/Order/Interval/Finset/Nat.lean", "Mathlib/Data/Nat/Count.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Int/ModEq.lean", "Mathlib/Data/Rat/Floor.lean" ]
[ { "full_name": "Int.Ico_filter_dvd_eq", "code": "lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) =\n (Ico ⌈a / (r : ℚ)⌉ ⌈b / (r : ℚ)⌉).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by\n ext x\n simp only [mem_map, mem_filter, mem_Ico, ceil_le, lt_ceil, div_le_iff, lt_div_iff,\n dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le]\n aesop", "start": [ 27, 1 ], "end": [ 32, 8 ], "kind": "lemma" }, { "full_name": "Int.Ioc_filter_dvd_eq", "code": "lemma Ioc_filter_dvd_eq : (Ioc a b).filter (r ∣ ·) =\n (Ioc ⌊a / (r : ℚ)⌋ ⌊b / (r : ℚ)⌋).map ⟨(· * r), mul_left_injective₀ hr.ne'⟩ := by\n ext x\n simp only [mem_map, mem_filter, mem_Ioc, floor_lt, le_floor, div_lt_iff, le_div_iff,\n dvd_iff_exists_eq_mul_left, cast_pos.2 hr, ← cast_mul, cast_lt, cast_le]\n aesop", "start": [ 34, 1 ], "end": [ 39, 8 ], "kind": "lemma" }, { "full_name": "Int.Ico_filter_dvd_card", "code": "theorem Ico_filter_dvd_card : ((Ico a b).filter (r ∣ ·)).card =\n max (⌈b / (r : ℚ)⌉ - ⌈a / (r : ℚ)⌉) 0", "start": [ 41, 1 ], "end": [ 44, 66 ], "kind": "commanddeclaration" }, { "full_name": "Int.Ioc_filter_dvd_card", "code": "theorem Ioc_filter_dvd_card : ((Ioc a b).filter (r ∣ ·)).card =\n max (⌊b / (r : ℚ)⌋ - ⌊a / (r : ℚ)⌋) 0", "start": [ 46, 1 ], "end": [ 49, 66 ], "kind": "commanddeclaration" }, { "full_name": "Int.Ico_filter_modEq_eq", "code": "lemma Ico_filter_modEq_eq (v : ℤ) : (Ico a b).filter (· ≡ v [ZMOD r]) =\n ((Ico (a - v) (b - v)).filter (r ∣ ·)).map ⟨(· + v), add_left_injective v⟩ := by\n ext x\n simp_rw [mem_map, mem_filter, mem_Ico, Function.Embedding.coeFn_mk, ← eq_sub_iff_add_eq,\n exists_eq_right, modEq_comm, modEq_iff_dvd, sub_lt_sub_iff_right, sub_le_sub_iff_right]", "start": [ 51, 1 ], "end": [ 55, 92 ], "kind": "lemma" }, { "full_name": "Int.Ioc_filter_modEq_eq", "code": "lemma Ioc_filter_modEq_eq (v : ℤ) : (Ioc a b).filter (· ≡ v [ZMOD r]) =\n ((Ioc (a - v) (b - v)).filter (r ∣ ·)).map ⟨(· + v), add_left_injective v⟩ := by\n ext x\n simp_rw [mem_map, mem_filter, mem_Ioc, Function.Embedding.coeFn_mk, ← eq_sub_iff_add_eq,\n exists_eq_right, modEq_comm, modEq_iff_dvd, sub_lt_sub_iff_right, sub_le_sub_iff_right]", "start": [ 57, 1 ], "end": [ 61, 92 ], "kind": "lemma" }, { "full_name": "Int.Ico_filter_modEq_card", "code": "theorem Ico_filter_modEq_card (v : ℤ) : ((Ico a b).filter (· ≡ v [ZMOD r])).card =\n max (⌈(b - v) / (r : ℚ)⌉ - ⌈(a - v) / (r : ℚ)⌉) 0", "start": [ 63, 1 ], "end": [ 67, 66 ], "kind": "commanddeclaration" }, { "full_name": "Int.Ioc_filter_modEq_card", "code": "theorem Ioc_filter_modEq_card (v : ℤ) : ((Ioc a b).filter (· ≡ v [ZMOD r])).card =\n max (⌊(b - v) / (r : ℚ)⌋ - ⌊(a - v) / (r : ℚ)⌋) 0", "start": [ 69, 1 ], "end": [ 73, 66 ], "kind": "commanddeclaration" }, { "full_name": "Nat.Ico_filter_modEq_cast", "code": "lemma Ico_filter_modEq_cast {v : ℕ} : ((Ico a b).filter (· ≡ v [MOD r])).map castEmbedding =\n (Ico (a : ℤ) (b : ℤ)).filter (· ≡ v [ZMOD r]) := by\n ext x\n simp only [mem_map, mem_filter, mem_Ico, castEmbedding_apply]\n constructor\n · simp_rw [forall_exists_index, ← natCast_modEq_iff]; intro y ⟨h, c⟩; subst c; exact_mod_cast h\n · intro h; lift x to ℕ using (by linarith); exact ⟨x, by simp_all [natCast_modEq_iff]⟩", "start": [ 81, 1 ], "end": [ 87, 89 ], "kind": "lemma" }, { "full_name": "Nat.Ioc_filter_modEq_cast", "code": "lemma Ioc_filter_modEq_cast {v : ℕ} : ((Ioc a b).filter (· ≡ v [MOD r])).map castEmbedding =\n (Ioc (a : ℤ) (b : ℤ)).filter (· ≡ v [ZMOD r]) := by\n ext x\n simp only [mem_map, mem_filter, mem_Ioc, castEmbedding_apply]\n constructor\n · simp_rw [forall_exists_index, ← natCast_modEq_iff]; intro y ⟨h, c⟩; subst c; exact_mod_cast h\n · intro h; lift x to ℕ using (by linarith); exact ⟨x, by simp_all [natCast_modEq_iff]⟩", "start": [ 89, 1 ], "end": [ 95, 89 ], "kind": "lemma" }, { "full_name": "Nat.Ico_filter_modEq_card", "code": "theorem Ico_filter_modEq_card (v : ℕ) : ((Ico a b).filter (· ≡ v [MOD r])).card =\n max (⌈(b - v) / (r : ℚ)⌉ - ⌈(a - v) / (r : ℚ)⌉) 0", "start": [ 97, 1 ], "end": [ 102, 70 ], "kind": "commanddeclaration" }, { "full_name": "Nat.Ioc_filter_modEq_card", "code": "theorem Ioc_filter_modEq_card (v : ℕ) : ((Ioc a b).filter (· ≡ v [MOD r])).card =\n max (⌊(b - v) / (r : ℚ)⌋ - ⌊(a - v) / (r : ℚ)⌋) 0", "start": [ 104, 1 ], "end": [ 109, 70 ], "kind": "commanddeclaration" }, { "full_name": "Nat.count_modEq_card_eq_ceil", "code": "theorem count_modEq_card_eq_ceil (v : ℕ) :\n b.count (· ≡ v [MOD r]) = ⌈(b - (v % r : ℕ)) / (r : ℚ)⌉", "start": [ 111, 1 ], "end": [ 123, 31 ], "kind": "commanddeclaration" }, { "full_name": "Nat.count_modEq_card", "code": "theorem count_modEq_card (v : ℕ) :\n b.count (· ≡ v [MOD r]) = b / r + if v % r < b % r then 1 else 0", "start": [ 125, 1 ], "end": [ 140, 58 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Shift/ShiftedHom.lean
[ "Mathlib/CategoryTheory/Preadditive/AdditiveFunctor.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Shift/Basic.lean" ]
[ { "full_name": "CategoryTheory.ShiftedHom", "code": "def ShiftedHom (X Y : C) (m : M) : Type _ := X ⟶ (Y⟦m⟧)", "start": [ 30, 1 ], "end": [ 32, 56 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShiftedHom.comp", "code": "noncomputable def comp {a b c : M} (f : ShiftedHom X Y a) (g : ShiftedHom Y Z b) (h : b + a = c) :\n ShiftedHom X Z c :=\n f ≫ g⟦a⟧' ≫ (shiftFunctorAdd' C b a c h).inv.app _", "start": [ 42, 1 ], "end": [ 46, 53 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShiftedHom.comp_assoc", "code": "lemma comp_assoc {a₁ a₂ a₃ a₁₂ a₂₃ a : M}\n (α : ShiftedHom X Y a₁) (β : ShiftedHom Y Z a₂) (γ : ShiftedHom Z T a₃)\n (h₁₂ : a₂ + a₁ = a₁₂) (h₂₃ : a₃ + a₂ = a₂₃) (h : a₃ + a₂ + a₁ = a) :\n (α.comp β h₁₂).comp γ (show a₃ + a₁₂ = a by rw [← h₁₂, ← add_assoc, h]) =\n α.comp (β.comp γ h₂₃) (by rw [← h₂₃, h]) := by\n simp only [comp, assoc, Functor.map_comp,\n shiftFunctorAdd'_assoc_inv_app a₃ a₂ a₁ a₂₃ a₁₂ a h₂₃ h₁₂ h,\n ← NatTrans.naturality_assoc, Functor.comp_map]", "start": [ 48, 1 ], "end": [ 55, 51 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.mk₀", "code": "noncomputable def mk₀ (m₀ : M) (hm₀ : m₀ = 0) (f : X ⟶ Y) : ShiftedHom X Y m₀ :=\n f ≫ (shiftFunctorZero' C m₀ hm₀).inv.app Y", "start": [ 61, 1 ], "end": [ 63, 45 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShiftedHom.homEquiv", "code": "@[simps apply]\nnoncomputable def homEquiv (m₀ : M) (hm₀ : m₀ = 0) : (X ⟶ Y) ≃ ShiftedHom X Y m₀ where\n toFun f := mk₀ m₀ hm₀ f\n invFun g := g ≫ (shiftFunctorZero' C m₀ hm₀).hom.app Y\n left_inv f := by simp [mk₀]\n right_inv g := by simp [mk₀]", "start": [ 65, 1 ], "end": [ 71, 31 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShiftedHom.mk₀_comp", "code": "lemma mk₀_comp (m₀ : M) (hm₀ : m₀ = 0) (f : X ⟶ Y) {a : M} (g : ShiftedHom Y Z a) :\n (mk₀ m₀ hm₀ f).comp g (by rw [hm₀, add_zero]) = f ≫ g := by\n subst hm₀\n simp [comp, mk₀, shiftFunctorAdd'_add_zero_inv_app, shiftFunctorZero']", "start": [ 73, 1 ], "end": [ 76, 73 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.mk₀_id_comp", "code": "@[simp]\nlemma mk₀_id_comp (m₀ : M) (hm₀ : m₀ = 0) {a : M} (f : ShiftedHom X Y a) :\n (mk₀ m₀ hm₀ (𝟙 X)).comp f (by rw [hm₀, add_zero]) = f := by\n simp [mk₀_comp]", "start": [ 78, 1 ], "end": [ 81, 18 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.comp_mk₀", "code": "lemma comp_mk₀ {a : M} (f : ShiftedHom X Y a) (m₀ : M) (hm₀ : m₀ = 0) (g : Y ⟶ Z) :\n f.comp (mk₀ m₀ hm₀ g) (by rw [hm₀, zero_add]) = f ≫ g⟦a⟧' := by\n subst hm₀\n simp only [comp, shiftFunctorAdd'_zero_add_inv_app, mk₀, shiftFunctorZero',\n eqToIso_refl, Iso.refl_trans, ← Functor.map_comp, assoc, Iso.inv_hom_id_app,\n Functor.id_obj, comp_id]", "start": [ 83, 1 ], "end": [ 88, 29 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.comp_mk₀_id", "code": "@[simp]\nlemma comp_mk₀_id {a : M} (f : ShiftedHom X Y a) (m₀ : M) (hm₀ : m₀ = 0) :\n f.comp (mk₀ m₀ hm₀ (𝟙 Y)) (by rw [hm₀, zero_add]) = f := by\n simp [comp_mk₀]", "start": [ 90, 1 ], "end": [ 93, 18 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.comp_add", "code": "@[simp]\nlemma comp_add [∀ (a : M), (shiftFunctor C a).Additive]\n {a b c : M} (α : ShiftedHom X Y a) (β₁ β₂ : ShiftedHom Y Z b) (h : b + a = c) :\n α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h := by\n rw [comp, comp, comp, Functor.map_add, Preadditive.add_comp, Preadditive.comp_add]", "start": [ 99, 1 ], "end": [ 103, 85 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.add_comp", "code": "@[simp]\nlemma add_comp\n {a b c : M} (α₁ α₂ : ShiftedHom X Y a) (β : ShiftedHom Y Z b) (h : b + a = c) :\n (α₁ + α₂).comp β h = α₁.comp β h + α₂.comp β h := by\n rw [comp, comp, comp, Preadditive.add_comp]", "start": [ 105, 1 ], "end": [ 109, 46 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.comp_zero", "code": "lemma comp_zero [∀ (a : M), (shiftFunctor C a).PreservesZeroMorphisms]\n {a : M} (β : ShiftedHom X Y a) {b c : M} (h : b + a = c) :\n β.comp (0 : ShiftedHom Y Z b) h = 0 := by\n rw [comp, Functor.map_zero, Limits.zero_comp, Limits.comp_zero]", "start": [ 112, 1 ], "end": [ 115, 66 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShiftedHom.zero_comp", "code": "lemma zero_comp (a : M) {b c : M} (β : ShiftedHom Y Z b) (h : b + a = c) :\n (0 : ShiftedHom X Y a).comp β h = 0 := by\n rw [comp, Limits.zero_comp]", "start": [ 118, 1 ], "end": [ 120, 30 ], "kind": "lemma" } ]
Mathlib/MeasureTheory/Tactic.lean
[ "Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Tactic/Measurability.lean" ]
[]
Mathlib/RingTheory/Flat/Algebra.lean
[ "Mathlib/LinearAlgebra/TensorProduct/Tower.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/Flat/Stability.lean" ]
[ { "full_name": "Algebra.Flat", "code": "class Algebra.Flat (R : Type u) (S : Type v) [CommRing R] [CommRing S] [Algebra R S] : Prop where\n out : Module.Flat R S", "start": [ 29, 1 ], "end": [ 31, 24 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.Flat.self", "code": "instance self (R : Type u) [CommRing R] : Algebra.Flat R R where\n out := Module.Flat.self R", "start": [ 37, 1 ], "end": [ 38, 28 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.Flat.comp", "code": "theorem comp (T : Type w) [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T]\n [IsScalarTower R S T] [Algebra.Flat R S] [Algebra.Flat S T] : Algebra.Flat R T where", "start": [ 42, 1 ], "end": [ 46, 32 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.Flat.baseChange", "code": "instance baseChange (T : Type w) [CommRing T] [Algebra R S] [Algebra R T] [Algebra.Flat R S] :\n Algebra.Flat T (T ⊗[R] S) where\n out := Module.Flat.baseChange R T S", "start": [ 48, 1 ], "end": [ 52, 38 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.Flat.isBaseChange", "code": "theorem isBaseChange [Algebra R S] (R' : Type w) (S' : Type t) [CommRing R'] [CommRing S']\n [Algebra R R'] [Algebra S S'] [Algebra R' S'] [Algebra R S'] [IsScalarTower R R' S']\n [IsScalarTower R S S'] [h : IsPushout R S R' S'] [Algebra.Flat R R'] : Algebra.Flat S S' where", "start": [ 54, 1 ], "end": [ 58, 50 ], "kind": "commanddeclaration" }, { "full_name": "RingHom.Flat", "code": "class RingHom.Flat {R : Type u} {S : Type v} [CommRing R] [CommRing S] (f : R →+* S) : Prop where\n out : f.toAlgebra.Flat := by infer_instance", "start": [ 62, 1 ], "end": [ 64, 46 ], "kind": "commanddeclaration" }, { "full_name": "RingHom.Flat.identity", "code": "instance identity (R : Type u) [CommRing R] : RingHom.Flat (1 : R →+* R) where", "start": [ 70, 1 ], "end": [ 71, 79 ], "kind": "commanddeclaration" }, { "full_name": "RingHom.Flat.comp", "code": "instance comp [RingHom.Flat f] [RingHom.Flat g] : RingHom.Flat (g.comp f) where\n out :=\n letI : Algebra R S := f.toAlgebra\n letI : Algebra S T := g.toAlgebra\n letI : Algebra R T := (g.comp f).toAlgebra\n letI : IsScalarTower R S T := IsScalarTower.of_algebraMap_eq (congrFun rfl)\n Algebra.Flat.comp R S T", "start": [ 76, 1 ], "end": [ 83, 28 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Functor/KanExtension/Adjunction.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Functor/KanExtension/Pointwise.lean" ]
[ { "full_name": "CategoryTheory.Functor.lan", "code": "noncomputable def lan : (C ⥤ H) ⥤ (D ⥤ H) where\n obj F := leftKanExtension L F\n map {F₁ F₂} φ := descOfIsLeftKanExtension _ (leftKanExtensionUnit L F₁) _\n (φ ≫ leftKanExtensionUnit L F₂)", "start": [ 35, 1 ], "end": [ 39, 36 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.lanUnit", "code": "noncomputable def lanUnit : (𝟭 (C ⥤ H)) ⟶ L.lan ⋙ (whiskeringLeft C D H).obj L where\n app F := leftKanExtensionUnit L F\n naturality {F₁ F₂} φ := by ext; simp [lan]", "start": [ 41, 1 ], "end": [ 44, 45 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.isPointwiseLeftKanExtensionLanUnit", "code": "noncomputable def isPointwiseLeftKanExtensionLanUnit\n (F : C ⥤ H) [HasPointwiseLeftKanExtension L F] :\n (LeftExtension.mk _ (L.lanUnit.app F)).IsPointwiseLeftKanExtension :=\n isPointwiseLeftKanExtensionOfIsLeftKanExtension (F := F) _ (L.lanUnit.app F)", "start": [ 50, 1 ], "end": [ 55, 79 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.lanAdjunction", "code": "noncomputable def lanAdjunction : L.lan ⊣ (whiskeringLeft C D H).obj L :=\n Adjunction.mkOfHomEquiv\n { homEquiv := fun F G => homEquivOfIsLeftKanExtension _ (L.lanUnit.app F) G\n homEquiv_naturality_left_symm := fun {F₁ F₂ G} f α =>\n hom_ext_of_isLeftKanExtension _ (L.lanUnit.app F₁) _ _ (by\n ext X\n dsimp [homEquivOfIsLeftKanExtension]\n rw [descOfIsLeftKanExtension_fac_app, NatTrans.comp_app, ← assoc]\n have h := congr_app (L.lanUnit.naturality f) X\n dsimp at h ⊢\n rw [← h, assoc, descOfIsLeftKanExtension_fac_app] )\n homEquiv_naturality_right := fun {F G₁ G₂} β f => by\n dsimp [homEquivOfIsLeftKanExtension]\n rw [assoc] }", "start": [ 58, 1 ], "end": [ 73, 21 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.lanAdjunction_unit", "code": "@[simp]\nlemma lanAdjunction_unit : (L.lanAdjunction H).unit = L.lanUnit := by\n ext F : 2\n dsimp [lanAdjunction, homEquivOfIsLeftKanExtension]\n simp", "start": [ 76, 1 ], "end": [ 80, 7 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.lanAdjunction_counit_app", "code": "lemma lanAdjunction_counit_app (G : D ⥤ H) :\n (L.lanAdjunction H).counit.app G =\n descOfIsLeftKanExtension (L.lan.obj (L ⋙ G)) (L.lanUnit.app (L ⋙ G)) G (𝟙 (L ⋙ G)) :=\n rfl", "start": [ 82, 1 ], "end": [ 85, 6 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.lanUnit_app_whiskerLeft_lanAdjunction_counit_app", "code": "@[reassoc (attr := simp)]\nlemma lanUnit_app_whiskerLeft_lanAdjunction_counit_app (G : D ⥤ H) :\n L.lanUnit.app (L ⋙ G) ≫ whiskerLeft L ((L.lanAdjunction H).counit.app G) = 𝟙 (L ⋙ G) := by\n simp [lanAdjunction_counit_app]", "start": [ 87, 1 ], "end": [ 90, 34 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.lanUnit_app_app_lanAdjunction_counit_app_app", "code": "@[reassoc (attr := simp)]\nlemma lanUnit_app_app_lanAdjunction_counit_app_app (G : D ⥤ H) (X : C) :\n (L.lanUnit.app (L ⋙ G)).app X ≫ ((L.lanAdjunction H).counit.app G).app (L.obj X) = 𝟙 _ :=\n congr_app (L.lanUnit_app_whiskerLeft_lanAdjunction_counit_app G) X", "start": [ 92, 1 ], "end": [ 95, 69 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.isIso_lanAdjunction_counit_app_iff", "code": "lemma isIso_lanAdjunction_counit_app_iff (G : D ⥤ H) :\n IsIso ((L.lanAdjunction H).counit.app G) ↔ G.IsLeftKanExtension (𝟙 (L ⋙ G)) :=\n (isLeftKanExtension_iff_isIso _ (L.lanUnit.app (L ⋙ G)) _ (by simp)).symm", "start": [ 97, 1 ], "end": [ 99, 76 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.coreflective", "code": "instance coreflective [∀ (F : C ⥤ H), HasPointwiseLeftKanExtension L F] :\n IsIso (L.lanUnit (H := H)) := by\n apply NatIso.isIso_of_isIso_app _", "start": [ 113, 1 ], "end": [ 115, 36 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.coreflective'", "code": "instance coreflective' [∀ (F : C ⥤ H), HasPointwiseLeftKanExtension L F] :\n IsIso (L.lanAdjunction H).unit := by\n apply NatIso.isIso_of_isIso_app _", "start": [ 122, 1 ], "end": [ 124, 36 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/EulerProduct/DirichletLSeries.lean
[ "Mathlib/NumberTheory/LSeries/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/NumberTheory/DirichletCharacter/Bounds.lean", "Mathlib/NumberTheory/LSeries/RiemannZeta.lean", "Mathlib/NumberTheory/EulerProduct/Basic.lean" ]
[ { "full_name": "riemannZetaSummandHom", "code": "noncomputable\ndef riemannZetaSummandHom (hs : s ≠ 0) : ℕ →*₀ ℂ where\n toFun n := (n : ℂ) ^ (-s)\n map_zero' := by simp [hs]\n map_one' := by simp\n map_mul' m n := by\n simpa only [Nat.cast_mul, ofReal_natCast]\n using mul_cpow_ofReal_nonneg m.cast_nonneg n.cast_nonneg _", "start": [ 31, 1 ], "end": [ 39, 65 ], "kind": "commanddeclaration" }, { "full_name": "dirichletSummandHom", "code": "noncomputable\ndef dirichletSummandHom {n : ℕ} (χ : DirichletCharacter ℂ n) (hs : s ≠ 0) : ℕ →*₀ ℂ where\n toFun n := χ n * (n : ℂ) ^ (-s)\n map_zero' := by simp [hs]\n map_one' := by simp\n map_mul' m n := by\n simp_rw [← ofReal_natCast]\n simpa only [Nat.cast_mul, IsUnit.mul_iff, not_and, map_mul, ofReal_mul,\n mul_cpow_ofReal_nonneg m.cast_nonneg n.cast_nonneg _]\n using mul_mul_mul_comm ..", "start": [ 41, 1 ], "end": [ 52, 32 ], "kind": "commanddeclaration" }, { "full_name": "summable_riemannZetaSummand", "code": "lemma summable_riemannZetaSummand (hs : 1 < s.re) :\n Summable (fun n ↦ ‖riemannZetaSummandHom (ne_zero_of_one_lt_re hs) n‖) := by\n simp only [riemannZetaSummandHom, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]\n convert Real.summable_nat_rpow_inv.mpr hs with n\n rw [← ofReal_natCast, Complex.norm_eq_abs,\n abs_cpow_eq_rpow_re_of_nonneg (Nat.cast_nonneg n) <| re_neg_ne_zero_of_one_lt_re hs,\n neg_re, Real.rpow_neg <| Nat.cast_nonneg n]", "start": [ 54, 1 ], "end": [ 61, 48 ], "kind": "lemma" }, { "full_name": "tsum_riemannZetaSummand", "code": "lemma tsum_riemannZetaSummand (hs : 1 < s.re) :\n ∑' (n : ℕ), riemannZetaSummandHom (ne_zero_of_one_lt_re hs) n = riemannZeta s := by\n have hsum := summable_riemannZetaSummand hs\n rw [zeta_eq_tsum_one_div_nat_add_one_cpow hs, tsum_eq_zero_add hsum.of_norm, map_zero, zero_add]\n simp only [riemannZetaSummandHom, cpow_neg, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk,\n Nat.cast_add, Nat.cast_one, one_div]", "start": [ 63, 1 ], "end": [ 68, 41 ], "kind": "lemma" }, { "full_name": "summable_dirichletSummand", "code": "lemma summable_dirichletSummand {N : ℕ} (χ : DirichletCharacter ℂ N) (hs : 1 < s.re) :\n Summable (fun n ↦ ‖dirichletSummandHom χ (ne_zero_of_one_lt_re hs) n‖) := by\n simp only [dirichletSummandHom, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, norm_mul]\n exact (summable_riemannZetaSummand hs).of_nonneg_of_le (fun _ ↦ by positivity)\n (fun n ↦ mul_le_of_le_one_left (norm_nonneg _) <| χ.norm_le_one n)", "start": [ 70, 1 ], "end": [ 75, 71 ], "kind": "lemma" }, { "full_name": "tsum_dirichletSummand", "code": "lemma tsum_dirichletSummand {N : ℕ} (χ : DirichletCharacter ℂ N) (hs : 1 < s.re) :\n ∑' (n : ℕ), dirichletSummandHom χ (ne_zero_of_one_lt_re hs) n = L ↗χ s := by\n simp only [LSeries, LSeries.term, dirichletSummandHom]\n refine tsum_congr (fun n ↦ ?_)\n rcases eq_or_ne n 0 with rfl | hn\n · simp only [map_zero, ↓reduceIte]\n · simp only [cpow_neg, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, hn, ↓reduceIte,\n Field.div_eq_mul_inv]", "start": [ 78, 1 ], "end": [ 85, 28 ], "kind": "lemma" }, { "full_name": "riemannZeta_eulerProduct_hasProd", "code": "theorem riemannZeta_eulerProduct_hasProd (hs : 1 < s.re) :\n HasProd (fun p : Primes ↦ (1 - (p : ℂ) ^ (-s))⁻¹) (riemannZeta s)", "start": [ 89, 1 ], "end": [ 94, 89 ], "kind": "commanddeclaration" }, { "full_name": "riemannZeta_eulerProduct_tprod", "code": "theorem riemannZeta_eulerProduct_tprod (hs : 1 < s.re) :\n ∏' p : Primes, (1 - (p : ℂ) ^ (-s))⁻¹ = riemannZeta s", "start": [ 96, 1 ], "end": [ 100, 49 ], "kind": "commanddeclaration" }, { "full_name": "riemannZeta_eulerProduct", "code": "theorem riemannZeta_eulerProduct (hs : 1 < s.re) :\n Tendsto (fun n : ℕ ↦ ∏ p ∈ primesBelow n, (1 - (p : ℂ) ^ (-s))⁻¹) atTop\n (𝓝 (riemannZeta s))", "start": [ 102, 1 ], "end": [ 108, 81 ], "kind": "commanddeclaration" }, { "full_name": "dirichletLSeries_eulerProduct_hasProd", "code": "theorem dirichletLSeries_eulerProduct_hasProd {N : ℕ} (χ : DirichletCharacter ℂ N)\n (hs : 1 < s.re) :\n HasProd (fun p : Primes ↦ (1 - χ p * (p : ℂ) ^ (-s))⁻¹) (L ↗χ s)", "start": [ 112, 1 ], "end": [ 118, 91 ], "kind": "commanddeclaration" }, { "full_name": "dirichletLSeries_eulerProduct_tprod", "code": "theorem dirichletLSeries_eulerProduct_tprod {N : ℕ} (χ : DirichletCharacter ℂ N)\n (hs : 1 < s.re) :\n ∏' p : Primes, (1 - χ p * (p : ℂ) ^ (-s))⁻¹ = L ↗χ s", "start": [ 120, 1 ], "end": [ 125, 56 ], "kind": "commanddeclaration" }, { "full_name": "dirichletLSeries_eulerProduct", "code": "theorem dirichletLSeries_eulerProduct {N : ℕ} (χ : DirichletCharacter ℂ N) (hs : 1 < s.re) :\n Tendsto (fun n : ℕ ↦ ∏ p ∈ primesBelow n, (1 - χ p * (p : ℂ) ^ (-s))⁻¹) atTop\n (𝓝 (L ↗χ s))", "start": [ 127, 1 ], "end": [ 133, 81 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Vertex/HVertexOperator.lean
[ "Mathlib/RingTheory/HahnSeries/Multiplication.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/BigOperators/Group/Finset.lean" ]
[ { "full_name": "HVertexOperator", "code": "abbrev HVertexOperator (Γ : Type*) [PartialOrder Γ] (R : Type*) [CommRing R]\n (V : Type*) (W : Type*) [AddCommGroup V] [Module R V] [AddCommGroup W] [Module R W] :=\n V →ₗ[R] (HahnModule Γ R W)", "start": [ 38, 1 ], "end": [ 42, 29 ], "kind": "commanddeclaration" }, { "full_name": "VertexAlg.HetVertexOperator.ext", "code": "@[ext]\ntheorem HetVertexOperator.ext (A B : HVertexOperator Γ R V W) (h : ∀ v : V, A v = B v) :\n A = B", "start": [ 46, 1 ], "end": [ 48, 29 ], "kind": "commanddeclaration" }, { "full_name": "VertexAlg.coeff", "code": "@[simps]\ndef coeff (A : HVertexOperator Γ R V W) (n : Γ) : V →ₗ[R] W where\n toFun x := (A x).coeff n\n map_add' x y := by simp only [map_add, ← HahnSeries.add_coeff]\n map_smul' r x := by simp only [map_smul, RingHom.id_apply, ← HahnSeries.smul_coeff]", "start": [ 50, 1 ], "end": [ 56, 86 ], "kind": "commanddeclaration" }, { "full_name": "VertexAlg.coeff_isPWOsupport", "code": "theorem coeff_isPWOsupport (A : HVertexOperator Γ R V W) (v : V) : (A v).coeff.support.IsPWO", "start": [ 58, 1 ], "end": [ 59, 23 ], "kind": "commanddeclaration" }, { "full_name": "VertexAlg.coeff_inj", "code": "@[ext]\ntheorem coeff_inj : Function.Injective (coeff : HVertexOperator Γ R V W → Γ → (V →ₗ[R] W))", "start": [ 61, 1 ], "end": [ 65, 58 ], "kind": "commanddeclaration" }, { "full_name": "VertexAlg.HetVertexOperator.of_coeff", "code": "@[simps]\ndef HetVertexOperator.of_coeff (f : Γ → V →ₗ[R] W)\n (hf : ∀ x : V, (Function.support (f · x)).IsPWO) : HVertexOperator Γ R V W where\n toFun x :=\n { coeff := fun g => f g x\n isPWO_support' := hf x }\n map_add' _ _ := by\n simp only [map_add]\n exact rfl\n map_smul' r x := by\n simp only [map_smul, RingHom.id_apply]\n exact rfl", "start": [ 67, 1 ], "end": [ 80, 14 ], "kind": "commanddeclaration" } ]
Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Geometry/Euclidean/Sphere/Basic.lean" ]
[ { "full_name": "EuclideanGeometry.Sphere.secondInter", "code": "def Sphere.secondInter (s : Sphere P) (p : P) (v : V) : P :=\n (-2 * ⟪v, p -ᵥ s.center⟫ / ⟪v, v⟫) • v +ᵥ p", "start": [ 33, 1 ], "end": [ 38, 46 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_dist", "code": "@[simp]\ntheorem Sphere.secondInter_dist (s : Sphere P) (p : P) (v : V) :\n dist (s.secondInter p v) s.center = dist p s.center", "start": [ 41, 1 ], "end": [ 49, 19 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_mem", "code": "@[simp]\ntheorem Sphere.secondInter_mem {s : Sphere P} {p : P} (v : V) : s.secondInter p v ∈ s ↔ p ∈ s", "start": [ 52, 1 ], "end": [ 55, 48 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_zero", "code": "@[simp]\ntheorem Sphere.secondInter_zero (s : Sphere P) (p : P) : s.secondInter p (0 : V) = p", "start": [ 60, 1 ], "end": [ 63, 28 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_eq_self_iff", "code": "theorem Sphere.secondInter_eq_self_iff {s : Sphere P} {p : P} {v : V} :\n s.secondInter p v = p ↔ ⟪v, p -ᵥ s.center⟫ = 0", "start": [ 68, 1 ], "end": [ 78, 74 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.eq_or_eq_secondInter_of_mem_mk'_span_singleton_iff_mem", "code": "theorem Sphere.eq_or_eq_secondInter_of_mem_mk'_span_singleton_iff_mem {s : Sphere P} {p : P}\n (hp : p ∈ s) {v : V} {p' : P} (hp' : p' ∈ AffineSubspace.mk' p (ℝ ∙ v)) :\n p' = p ∨ p' = s.secondInter p v ↔ p' ∈ s", "start": [ 81, 1 ], "end": [ 98, 39 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_smul", "code": "@[simp]\ntheorem Sphere.secondInter_smul (s : Sphere P) (p : P) (v : V) {r : ℝ} (hr : r ≠ 0) :\n s.secondInter p (r • v) = s.secondInter p v", "start": [ 101, 1 ], "end": [ 108, 41 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_neg", "code": "@[simp]\ntheorem Sphere.secondInter_neg (s : Sphere P) (p : P) (v : V) :\n s.secondInter p (-v) = s.secondInter p v", "start": [ 111, 1 ], "end": [ 115, 79 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_secondInter", "code": "@[simp]\ntheorem Sphere.secondInter_secondInter (s : Sphere P) (p : P) (v : V) :\n s.secondInter (s.secondInter p v) v = p", "start": [ 118, 1 ], "end": [ 129, 7 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_eq_lineMap", "code": "theorem Sphere.secondInter_eq_lineMap (s : Sphere P) (p p' : P) :\n s.secondInter p (p' -ᵥ p) =\n AffineMap.lineMap p p' (-2 * ⟪p' -ᵥ p, p -ᵥ s.center⟫ / ⟪p' -ᵥ p, p' -ᵥ p⟫)", "start": [ 132, 1 ], "end": [ 137, 6 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_vsub_mem_affineSpan", "code": "theorem Sphere.secondInter_vsub_mem_affineSpan (s : Sphere P) (p₁ p₂ : P) :\n s.secondInter p₁ (p₂ -ᵥ p₁) ∈ line[ℝ, p₁, p₂]", "start": [ 140, 1 ], "end": [ 144, 43 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.secondInter_collinear", "code": "theorem Sphere.secondInter_collinear (s : Sphere P) (p p' : P) :\n Collinear ℝ ({p, p', s.secondInter p (p' -ᵥ p)} : Set P)", "start": [ 147, 1 ], "end": [ 154, 29 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.wbtw_secondInter", "code": "theorem Sphere.wbtw_secondInter {s : Sphere P} {p p' : P} (hp : p ∈ s)\n (hp' : dist p' s.center ≤ s.radius) : Wbtw ℝ p p' (s.secondInter p (p' -ᵥ p))", "start": [ 157, 1 ], "end": [ 169, 85 ], "kind": "commanddeclaration" }, { "full_name": "EuclideanGeometry.Sphere.sbtw_secondInter", "code": "theorem Sphere.sbtw_secondInter {s : Sphere P} {p p' : P} (hp : p ∈ s)\n (hp' : dist p' s.center < s.radius) : Sbtw ℝ p p' (s.secondInter p (p' -ᵥ p))", "start": [ 172, 1 ], "end": [ 183, 26 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/DedekindDomain/FiniteAdeleRing.lean
[ "Mathlib/RingTheory/DedekindDomain/AdicValuation.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/GroupWithZero/WithZero.lean", "Mathlib/RingTheory/DedekindDomain/Factorization.lean" ]
[ { "full_name": "DedekindDomain.FiniteIntegralAdeles", "code": "def FiniteIntegralAdeles : Type _ :=\n ∀ v : HeightOneSpectrum R, v.adicCompletionIntegers K", "start": [ 45, 1 ], "end": [ 47, 56 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions", "code": "def ProdAdicCompletions :=\n ∀ v : HeightOneSpectrum R, v.adicCompletion K", "start": [ 70, 1 ], "end": [ 72, 48 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteIntegralAdeles.coe_apply", "code": "theorem coe_apply (x : R_hat R K) (v : HeightOneSpectrum R) : (x : K_hat R K) v = ↑(x v)", "start": [ 101, 1 ], "end": [ 102, 6 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteIntegralAdeles.Coe.addMonoidHom", "code": "@[simps]\ndef Coe.addMonoidHom : AddMonoidHom (R_hat R K) (K_hat R K) where\n toFun := (↑)\n map_zero' := rfl\n map_add' x y := by\n refine funext fun v => ?_\n simp only [coe_apply, Pi.add_apply, Subring.coe_add]\n erw [Pi.add_apply, Pi.add_apply, Subring.coe_add]", "start": [ 105, 1 ], "end": [ 115, 54 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteIntegralAdeles.Coe.ringHom", "code": "@[simps]\ndef Coe.ringHom : RingHom (R_hat R K) (K_hat R K) :=\n { Coe.addMonoidHom R K with\n toFun := (↑)\n map_one' := rfl\n map_mul' := fun x y => by\n refine funext fun p => ?_\n simp only [Pi.mul_apply, Subring.coe_mul]\n erw [Pi.mul_apply, Pi.mul_apply, Subring.coe_mul] }", "start": [ 118, 1 ], "end": [ 129, 58 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.algebraMap_apply'", "code": "@[simp]\nlemma ProdAdicCompletions.algebraMap_apply' (k : K) :\n algebraMap K (K_hat R K) k v = (k : v.adicCompletion K) := rfl", "start": [ 139, 1 ], "end": [ 141, 67 ], "kind": "lemma" }, { "full_name": "DedekindDomain.ProdAdicCompletions.algebra'", "code": "instance ProdAdicCompletions.algebra' : Algebra R (K_hat R K) :=\n (by infer_instance : Algebra R <| ∀ v : HeightOneSpectrum R, v.adicCompletion K)", "start": [ 143, 1 ], "end": [ 144, 83 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.algebraMap_apply", "code": "@[simp]\nlemma ProdAdicCompletions.algebraMap_apply (r : R) :\n algebraMap R (K_hat R K) r v = (algebraMap R K r : v.adicCompletion K) := rfl", "start": [ 147, 1 ], "end": [ 149, 82 ], "kind": "lemma" }, { "full_name": "DedekindDomain.ProdAdicCompletions.algebraCompletions", "code": "instance ProdAdicCompletions.algebraCompletions : Algebra (R_hat R K) (K_hat R K) :=\n (FiniteIntegralAdeles.Coe.ringHom R K).toAlgebra", "start": [ 157, 1 ], "end": [ 158, 51 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.isScalarTower_completions", "code": "instance ProdAdicCompletions.isScalarTower_completions : IsScalarTower R (R_hat R K) (K_hat R K) :=\n (by infer_instance :\n IsScalarTower R (∀ v : HeightOneSpectrum R, v.adicCompletionIntegers K) <|\n ∀ v : HeightOneSpectrum R, v.adicCompletion K)", "start": [ 161, 1 ], "end": [ 164, 53 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteIntegralAdeles.Coe.algHom", "code": "def Coe.algHom : AlgHom R (R_hat R K) (K_hat R K) :=\n { Coe.ringHom R K with\n toFun := (↑)\n commutes' := fun _ => rfl }", "start": [ 171, 1 ], "end": [ 175, 32 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteIntegralAdeles.Coe.algHom_apply", "code": "theorem Coe.algHom_apply (x : R_hat R K) (v : HeightOneSpectrum R) : (Coe.algHom R K) x v = x v", "start": [ 178, 1 ], "end": [ 179, 6 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.IsFiniteAdele", "code": "def IsFiniteAdele (x : K_hat R K) :=\n ∀ᶠ v : HeightOneSpectrum R in Filter.cofinite, x v ∈ v.adicCompletionIntegers K", "start": [ 194, 1 ], "end": [ 197, 82 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.isFiniteAdele_iff", "code": "@[simp]\nlemma isFiniteAdele_iff (x : K_hat R K) :\n x.IsFiniteAdele ↔ {v | x v ∉ adicCompletionIntegers K v}.Finite := Iff.rfl", "start": [ 200, 1 ], "end": [ 202, 79 ], "kind": "lemma" }, { "full_name": "DedekindDomain.ProdAdicCompletions.IsFiniteAdele.add", "code": "theorem add {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :\n (x + y).IsFiniteAdele", "start": [ 206, 1 ], "end": [ 221, 38 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.IsFiniteAdele.zero", "code": "theorem zero : (0 : K_hat R K).IsFiniteAdele", "start": [ 224, 1 ], "end": [ 235, 23 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.IsFiniteAdele.neg", "code": "theorem neg {x : K_hat R K} (hx : x.IsFiniteAdele) : (-x).IsFiniteAdele", "start": [ 238, 1 ], "end": [ 248, 14 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.IsFiniteAdele.mul", "code": "theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :\n (x * y).IsFiniteAdele", "start": [ 251, 1 ], "end": [ 268, 38 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.IsFiniteAdele.one", "code": "theorem one : (1 : K_hat R K).IsFiniteAdele", "start": [ 271, 1 ], "end": [ 280, 23 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.ProdAdicCompletions.IsFiniteAdele.algebraMap'", "code": "theorem algebraMap' (k : K) : (_root_.algebraMap K (K_hat R K) k).IsFiniteAdele", "start": [ 285, 1 ], "end": [ 310, 73 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteAdeleRing", "code": "def FiniteAdeleRing : Type _ := {x : K_hat R K // x.IsFiniteAdele}", "start": [ 318, 1 ], "end": [ 323, 67 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteAdeleRing.subalgebra", "code": "def subalgebra : Subalgebra K (K_hat R K) where\n carrier := {x : K_hat R K | x.IsFiniteAdele}\n mul_mem' := mul\n one_mem' := one\n add_mem' := add\n zero_mem' := zero\n algebraMap_mem' := algebraMap'", "start": [ 328, 1 ], "end": [ 341, 33 ], "kind": "commanddeclaration" }, { "full_name": "DedekindDomain.FiniteAdeleRing.ext", "code": "@[ext]\nlemma ext {a₁ a₂ : FiniteAdeleRing R K} (h : (a₁ : K_hat R K) = a₂) : a₁ = a₂ :=\n Subtype.ext h", "start": [ 352, 1 ], "end": [ 354, 16 ], "kind": "lemma" } ]
Mathlib/Order/UpperLower/LocallyFinite.lean
[ "Mathlib/Order/Interval/Finset/Defs.lean", "Mathlib/Order/UpperLower/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "Set.Finite.upperClosure", "code": "protected theorem Finite.upperClosure [LocallyFiniteOrderTop α] (hs : s.Finite) :\n (upperClosure s : Set α).Finite", "start": [ 22, 1 ], "end": [ 25, 43 ], "kind": "commanddeclaration" }, { "full_name": "Set.Finite.lowerClosure", "code": "protected theorem Finite.lowerClosure [LocallyFiniteOrderBot α] (hs : s.Finite) :\n (lowerClosure s : Set α).Finite", "start": [ 28, 1 ], "end": [ 31, 43 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/TensorAlgebra/ToTensorPower.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean", "Mathlib/LinearAlgebra/TensorPower.lean" ]
[ { "full_name": "TensorPower.toTensorAlgebra", "code": "def toTensorAlgebra {n} : ⨂[R]^n M →ₗ[R] TensorAlgebra R M :=\n PiTensorProduct.lift (TensorAlgebra.tprod R M n)", "start": [ 26, 1 ], "end": [ 28, 51 ], "kind": "commanddeclaration" }, { "full_name": "TensorPower.toTensorAlgebra_tprod", "code": "@[simp]\ntheorem toTensorAlgebra_tprod {n} (x : Fin n → M) :\n TensorPower.toTensorAlgebra (PiTensorProduct.tprod R x) = TensorAlgebra.tprod R M n x", "start": [ 31, 1 ], "end": [ 34, 31 ], "kind": "commanddeclaration" }, { "full_name": "TensorPower.toTensorAlgebra_gOne", "code": "@[simp]\ntheorem toTensorAlgebra_gOne :\n TensorPower.toTensorAlgebra (@GradedMonoid.GOne.one _ (fun n => ⨂[R]^n M) _ _) = 1", "start": [ 37, 1 ], "end": [ 40, 38 ], "kind": "commanddeclaration" }, { "full_name": "TensorPower.toTensorAlgebra_gMul", "code": "@[simp]\ntheorem toTensorAlgebra_gMul {i j} (a : (⨂[R]^i) M) (b : (⨂[R]^j) M) :\n TensorPower.toTensorAlgebra (@GradedMonoid.GMul.mul _ (fun n => ⨂[R]^n M) _ _ _ _ a b) =\n TensorPower.toTensorAlgebra a * TensorPower.toTensorAlgebra b", "start": [ 43, 1 ], "end": [ 64, 82 ], "kind": "commanddeclaration" }, { "full_name": "TensorPower.toTensorAlgebra_galgebra_toFun", "code": "@[simp]\ntheorem toTensorAlgebra_galgebra_toFun (r : R) :\n TensorPower.toTensorAlgebra (DirectSum.GAlgebra.toFun (R := R) (A := fun n => ⨂[R]^n M) r) =\n algebraMap _ _ r", "start": [ 67, 1 ], "end": [ 72, 70 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.ofDirectSum", "code": "def ofDirectSum : (⨁ n, ⨂[R]^n M) →ₐ[R] TensorAlgebra R M :=\n DirectSum.toAlgebra _ _ (fun _ => TensorPower.toTensorAlgebra) TensorPower.toTensorAlgebra_gOne\n (fun {_ _} => TensorPower.toTensorAlgebra_gMul)", "start": [ 79, 1 ], "end": [ 82, 52 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.ofDirectSum_of_tprod", "code": "@[simp]\ntheorem ofDirectSum_of_tprod {n} (x : Fin n → M) :\n ofDirectSum (DirectSum.of _ n (PiTensorProduct.tprod R x)) = tprod R M n x", "start": [ 85, 1 ], "end": [ 90, 40 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.toDirectSum", "code": "def toDirectSum : TensorAlgebra R M →ₐ[R] ⨁ n, ⨂[R]^n M :=\n TensorAlgebra.lift R <|\n DirectSum.lof R ℕ (fun n => ⨂[R]^n M) _ ∘ₗ\n (LinearEquiv.symm <| PiTensorProduct.subsingletonEquiv (0 : Fin 1) : M ≃ₗ[R] _).toLinearMap", "start": [ 93, 1 ], "end": [ 97, 98 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.toDirectSum_ι", "code": "@[simp]\ntheorem toDirectSum_ι (x : M) :\n toDirectSum (ι R x) =\n DirectSum.of (fun n => ⨂[R]^n M) _ (PiTensorProduct.tprod R fun _ : Fin 1 => x)", "start": [ 100, 1 ], "end": [ 104, 33 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.ofDirectSum_comp_toDirectSum", "code": "theorem ofDirectSum_comp_toDirectSum :\n ofDirectSum.comp toDirectSum = AlgHom.id R (TensorAlgebra R M)", "start": [ 107, 1 ], "end": [ 110, 42 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.ofDirectSum_toDirectSum", "code": "@[simp]\ntheorem ofDirectSum_toDirectSum (x : TensorAlgebra R M) :\n ofDirectSum (TensorAlgebra.toDirectSum x) = x", "start": [ 113, 1 ], "end": [ 116, 50 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.mk_reindex_cast", "code": "@[simp, nolint simpNF] theorem mk_reindex_cast {n m : ℕ} (h : n = m) (x : ⨂[R]^n M) :\n GradedMonoid.mk (A := fun i => (⨂[R]^i) M) m\n (PiTensorProduct.reindex R (fun _ ↦ M) (Equiv.cast <| congr_arg Fin h) x) =\n GradedMonoid.mk n x", "start": [ 119, 1 ], "end": [ 124, 66 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.mk_reindex_fin_cast", "code": "@[simp]\ntheorem mk_reindex_fin_cast {n m : ℕ} (h : n = m) (x : ⨂[R]^n M) :\n GradedMonoid.mk (A := fun i => (⨂[R]^i) M) m\n (PiTensorProduct.reindex R (fun _ ↦ M) (finCongr h) x) = GradedMonoid.mk n x", "start": [ 127, 1 ], "end": [ 131, 48 ], "kind": "commanddeclaration" }, { "full_name": "TensorPower.list_prod_gradedMonoid_mk_single", "code": "theorem _root_.TensorPower.list_prod_gradedMonoid_mk_single (n : ℕ) (x : Fin n → M) :\n ((List.finRange n).map fun a =>\n (GradedMonoid.mk _ (PiTensorProduct.tprod R fun _ : Fin 1 => x a) :\n GradedMonoid fun n => ⨂[R]^n M)).prod =\n GradedMonoid.mk n (PiTensorProduct.tprod R x)", "start": [ 134, 1 ], "end": [ 152, 19 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.toDirectSum_tensorPower_tprod", "code": "theorem toDirectSum_tensorPower_tprod {n} (x : Fin n → M) :\n toDirectSum (tprod R M n x) = DirectSum.of _ n (PiTensorProduct.tprod R x)", "start": [ 155, 1 ], "end": [ 162, 52 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.toDirectSum_comp_ofDirectSum", "code": "theorem toDirectSum_comp_ofDirectSum :\n toDirectSum.comp ofDirectSum = AlgHom.id R (⨁ n, ⨂[R]^n M)", "start": [ 165, 1 ], "end": [ 168, 74 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.toDirectSum_ofDirectSum", "code": "@[simp]\ntheorem toDirectSum_ofDirectSum (x : ⨁ n, ⨂[R]^n M) :\n TensorAlgebra.toDirectSum (ofDirectSum x) = x", "start": [ 171, 1 ], "end": [ 174, 50 ], "kind": "commanddeclaration" }, { "full_name": "TensorAlgebra.equivDirectSum", "code": "@[simps!]\ndef equivDirectSum : TensorAlgebra R M ≃ₐ[R] ⨁ n, ⨂[R]^n M :=\n AlgEquiv.ofAlgHom toDirectSum ofDirectSum toDirectSum_comp_ofDirectSum\n ofDirectSum_comp_toDirectSum", "start": [ 177, 1 ], "end": [ 181, 33 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/Complex.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/Trace.lean", "Mathlib/RingTheory/Norm.lean", "Mathlib/Data/Complex/Module.lean" ]
[ { "full_name": "Algebra.leftMulMatrix_complex", "code": "theorem Algebra.leftMulMatrix_complex (z : ℂ) :\n Algebra.leftMulMatrix Complex.basisOneI z = !![z.re, -z.im; z.im, z.re]", "start": [ 17, 1 ], "end": [ 28, 24 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.trace_complex_apply", "code": "theorem Algebra.trace_complex_apply (z : ℂ) : Algebra.trace ℝ ℂ z = 2 * z.re", "start": [ 31, 1 ], "end": [ 34, 25 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.norm_complex_apply", "code": "theorem Algebra.norm_complex_apply (z : ℂ) : Algebra.norm ℝ z = Complex.normSq z", "start": [ 37, 1 ], "end": [ 40, 7 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.norm_complex_eq", "code": "theorem Algebra.norm_complex_eq : Algebra.norm ℝ = normSq.toMonoidHom", "start": [ 43, 1 ], "end": [ 44, 43 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean
[ "Mathlib/Data/Rat/Floor.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/ContinuedFractions/Computation/CorrectnessTerminating.lean", "Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean" ]
[ { "full_name": "GeneralizedContinuedFraction.exists_gcf_pair_rat_eq_of_nth_conts_aux", "code": "nonrec theorem exists_gcf_pair_rat_eq_of_nth_conts_aux :\n ∃ conts : Pair ℚ, (of v).continuantsAux n = (conts.map (↑) : Pair K)", "start": [ 62, 1 ], "end": [ 98, 66 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.exists_gcf_pair_rat_eq_nth_conts", "code": "theorem exists_gcf_pair_rat_eq_nth_conts :\n ∃ conts : Pair ℚ, (of v).continuants n = (conts.map (↑) : Pair K)", "start": [ 101, 1 ], "end": [ 103, 95 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.exists_rat_eq_nth_numerator", "code": "theorem exists_rat_eq_nth_numerator : ∃ q : ℚ, (of v).numerators n = (q : K)", "start": [ 106, 1 ], "end": [ 109, 37 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.exists_rat_eq_nth_denominator", "code": "theorem exists_rat_eq_nth_denominator : ∃ q : ℚ, (of v).denominators n = (q : K)", "start": [ 112, 1 ], "end": [ 115, 39 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.exists_rat_eq_nth_convergent", "code": "theorem exists_rat_eq_nth_convergent : ∃ q : ℚ, (of v).convergents n = (q : K)", "start": [ 118, 1 ], "end": [ 123, 63 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.exists_rat_eq_of_terminates", "code": "theorem exists_rat_eq_of_terminates (terminates : (of v).Terminates) : ∃ q : ℚ, v = ↑q", "start": [ 128, 1 ], "end": [ 135, 14 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.IntFractPair.coe_of_rat_eq", "code": "theorem coe_of_rat_eq : ((IntFractPair.of q).mapFr (↑) : IntFractPair K) = IntFractPair.of v", "start": [ 170, 1 ], "end": [ 171, 33 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.IntFractPair.coe_stream_nth_rat_eq", "code": "theorem coe_stream_nth_rat_eq :\n ((IntFractPair.stream q n).map (mapFr (↑)) : Option <| IntFractPair K) =\n IntFractPair.stream v n", "start": [ 174, 1 ], "end": [ 194, 82 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.IntFractPair.coe_stream'_rat_eq", "code": "theorem coe_stream'_rat_eq :\n ((IntFractPair.stream q).map (Option.map (mapFr (↑))) : Stream' <| Option <| IntFractPair K) =\n IntFractPair.stream v", "start": [ 197, 1 ], "end": [ 200, 62 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.coe_of_h_rat_eq", "code": "theorem coe_of_h_rat_eq : (↑((of q).h : ℚ) : K) = (of v).h", "start": [ 208, 1 ], "end": [ 211, 7 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.coe_of_s_get?_rat_eq", "code": "theorem coe_of_s_get?_rat_eq :\n (((of q).s.get? n).map (Pair.map (↑)) : Option <| Pair K) = (of v).s.get? n", "start": [ 214, 1 ], "end": [ 220, 56 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.coe_of_s_rat_eq", "code": "theorem coe_of_s_rat_eq : ((of q).s.map (Pair.map ((↑))) : Stream'.Seq <| Pair K) = (of v).s", "start": [ 223, 1 ], "end": [ 224, 49 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.coe_of_rat_eq", "code": "theorem coe_of_rat_eq :\n (⟨(of q).h, (of q).s.map (Pair.map (↑))⟩ : GeneralizedContinuedFraction K) = of v", "start": [ 227, 1 ], "end": [ 236, 74 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.of_terminates_iff_of_rat_terminates", "code": "theorem of_terminates_iff_of_rat_terminates {v : K} {q : ℚ} (v_eq_q : v = (q : K)) :\n (of v).Terminates ↔ (of q).Terminates", "start": [ 239, 1 ], "end": [ 245, 12 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.IntFractPair.of_inv_fr_num_lt_num_of_pos", "code": "theorem of_inv_fr_num_lt_num_of_pos (q_pos : 0 < q) : (IntFractPair.of q⁻¹).fr.num < q.num", "start": [ 269, 1 ], "end": [ 273, 40 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.IntFractPair.stream_succ_nth_fr_num_lt_nth_fr_num_rat", "code": "theorem stream_succ_nth_fr_num_lt_nth_fr_num_rat {ifp_n ifp_succ_n : IntFractPair ℚ}\n (stream_nth_eq : IntFractPair.stream q n = some ifp_n)\n (stream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n) :\n ifp_succ_n.fr.num < ifp_n.fr.num", "start": [ 276, 1 ], "end": [ 292, 41 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.IntFractPair.stream_nth_fr_num_le_fr_num_sub_n_rat", "code": "theorem stream_nth_fr_num_le_fr_num_sub_n_rat :\n ∀ {ifp_n : IntFractPair ℚ},\n IntFractPair.stream q n = some ifp_n → ifp_n.fr.num ≤ (IntFractPair.of q).fr.num - n", "start": [ 295, 1 ], "end": [ 312, 43 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.IntFractPair.exists_nth_stream_eq_none_of_rat", "code": "theorem exists_nth_stream_eq_none_of_rat (q : ℚ) : ∃ n : ℕ, IntFractPair.stream q n = none", "start": [ 315, 1 ], "end": [ 331, 10 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.terminates_of_rat", "code": "theorem terminates_of_rat (q : ℚ) : (of q).Terminates", "start": [ 336, 1 ], "end": [ 341, 75 ], "kind": "commanddeclaration" }, { "full_name": "GeneralizedContinuedFraction.terminates_iff_rat", "code": "theorem terminates_iff_rat (v : K) : (of v).Terminates ↔ ∃ q : ℚ, v = (q : K)", "start": [ 346, 1 ], "end": [ 355, 60 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Order/Algebra.lean
[ "Mathlib/Algebra/Order/Module/OrderedSMul.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Algebra/Defs.lean" ]
[ { "full_name": "algebraMap_monotone", "code": "theorem algebraMap_monotone : Monotone (algebraMap R A)", "start": [ 44, 1 ], "end": [ 48, 69 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/FermatPsp.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Order/Filter/Cofinite.lean", "Mathlib/FieldTheory/Finite/Basic.lean" ]
[ { "full_name": "Nat.ProbablePrime", "code": "def ProbablePrime (n b : ℕ) : Prop :=\n n ∣ b ^ (n - 1) - 1", "start": [ 45, 1 ], "end": [ 52, 22 ], "kind": "commanddeclaration" }, { "full_name": "Nat.FermatPsp", "code": "def FermatPsp (n b : ℕ) : Prop :=\n ProbablePrime n b ∧ ¬n.Prime ∧ 1 < n", "start": [ 55, 1 ], "end": [ 61, 39 ], "kind": "commanddeclaration" }, { "full_name": "Nat.decidableProbablePrime", "code": "instance decidableProbablePrime (n b : ℕ) : Decidable (ProbablePrime n b) :=\n Nat.decidable_dvd _ _", "start": [ 64, 1 ], "end": [ 65, 24 ], "kind": "commanddeclaration" }, { "full_name": "Nat.decidablePsp", "code": "instance decidablePsp (n b : ℕ) : Decidable (FermatPsp n b) :=\n And.decidable", "start": [ 68, 1 ], "end": [ 69, 16 ], "kind": "commanddeclaration" }, { "full_name": "Nat.coprime_of_probablePrime", "code": "theorem coprime_of_probablePrime {n b : ℕ} (h : ProbablePrime n b) (h₁ : 1 ≤ n) (h₂ : 1 ≤ b) :\n Nat.Coprime n b", "start": [ 72, 1 ], "end": [ 99, 13 ], "kind": "commanddeclaration" }, { "full_name": "Nat.probablePrime_iff_modEq", "code": "theorem probablePrime_iff_modEq (n : ℕ) {b : ℕ} (h : 1 ≤ b) :\n ProbablePrime n b ↔ b ^ (n - 1) ≡ 1 [MOD n]", "start": [ 102, 1 ], "end": [ 112, 36 ], "kind": "commanddeclaration" }, { "full_name": "Nat.coprime_of_fermatPsp", "code": "theorem coprime_of_fermatPsp {n b : ℕ} (h : FermatPsp n b) (h₁ : 1 ≤ b) : Nat.Coprime n b", "start": [ 115, 1 ], "end": [ 122, 50 ], "kind": "commanddeclaration" }, { "full_name": "Nat.fermatPsp_base_one", "code": "theorem fermatPsp_base_one {n : ℕ} (h₁ : 1 < n) (h₂ : ¬n.Prime) : FermatPsp n 1", "start": [ 125, 1 ], "end": [ 129, 58 ], "kind": "commanddeclaration" }, { "full_name": "Nat.a_id_helper", "code": "private theorem a_id_helper {a b : ℕ} (ha : 2 ≤ a) (hb : 2 ≤ b) : 2 ≤ (a ^ b - 1) / (a - 1)", "start": [ 136, 1 ], "end": [ 140, 46 ], "kind": "commanddeclaration" }, { "full_name": "Nat.b_id_helper", "code": "private theorem b_id_helper {a b : ℕ} (ha : 2 ≤ a) (hb : 2 < b) : 2 ≤ (a ^ b + 1) / (a + 1)", "start": [ 142, 1 ], "end": [ 148, 60 ], "kind": "commanddeclaration" }, { "full_name": "Nat.AB_id_helper", "code": "private theorem AB_id_helper (b p : ℕ) (_ : 2 ≤ b) (hp : Odd p) :\n (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)", "start": [ 150, 1 ], "end": [ 155, 10 ], "kind": "commanddeclaration" }, { "full_name": "Nat.bp_helper", "code": "private theorem bp_helper {b p : ℕ} (hb : 0 < b) (hp : 1 ≤ p) :\n b ^ (2 * p) - 1 - (b ^ 2 - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)", "start": [ 157, 1 ], "end": [ 173, 80 ], "kind": "commanddeclaration" }, { "full_name": "Nat.psp_from_prime", "code": "private def psp_from_prime (b : ℕ) (p : ℕ) : ℕ :=\n (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1))", "start": [ 177, 1 ], "end": [ 189, 50 ], "kind": "commanddeclaration" }, { "full_name": "Nat.psp_from_prime_psp", "code": "private theorem psp_from_prime_psp {b : ℕ} (b_ge_two : 2 ≤ b) {p : ℕ} (p_prime : p.Prime)\n (p_gt_two : 2 < p) (not_dvd : ¬p ∣ b * (b ^ 2 - 1)) : FermatPsp (psp_from_prime b p) b", "start": [ 191, 1 ], "end": [ 292, 26 ], "kind": "commanddeclaration" }, { "full_name": "Nat.psp_from_prime_gt_p", "code": "private theorem psp_from_prime_gt_p {b : ℕ} (b_ge_two : 2 ≤ b) {p : ℕ} (p_prime : p.Prime)\n (p_gt_two : 2 < p) : p < psp_from_prime b p", "start": [ 294, 1 ], "end": [ 329, 47 ], "kind": "commanddeclaration" }, { "full_name": "Nat.exists_infinite_pseudoprimes", "code": "theorem exists_infinite_pseudoprimes {b : ℕ} (h : 1 ≤ b) (m : ℕ) :\n ∃ n : ℕ, FermatPsp n b ∧ m ≤ n", "start": [ 331, 1 ], "end": [ 368, 57 ], "kind": "commanddeclaration" }, { "full_name": "Nat.frequently_atTop_fermatPsp", "code": "theorem frequently_atTop_fermatPsp {b : ℕ} (h : 1 ≤ b) : ∃ᶠ n in Filter.atTop, FermatPsp n b", "start": [ 371, 1 ], "end": [ 375, 24 ], "kind": "commanddeclaration" }, { "full_name": "Nat.infinite_setOf_pseudoprimes", "code": "theorem infinite_setOf_pseudoprimes {b : ℕ} (h : 1 ≤ b) :\n Set.Infinite { n : ℕ | FermatPsp n b }", "start": [ 378, 1 ], "end": [ 382, 70 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Finsupp/BigOperators.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Finset/Pairwise.lean", "Mathlib/Algebra/BigOperators/Group/Finset.lean", "Mathlib/Data/Finsupp/Defs.lean" ]
[ { "full_name": "List.support_sum_subset", "code": "theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :\n l.sum.support ⊆ l.foldr (Finsupp.support · ⊔ ·) ∅", "start": [ 39, 1 ], "end": [ 45, 8 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.support_sum_subset", "code": "theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M)) :\n s.sum.support ⊆ (s.map Finsupp.support).sup", "start": [ 48, 1 ], "end": [ 52, 52 ], "kind": "commanddeclaration" }, { "full_name": "Finset.support_sum_subset", "code": "theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ι →₀ M)) :\n (s.sum id).support ⊆ Finset.sup s Finsupp.support", "start": [ 55, 1 ], "end": [ 57, 58 ], "kind": "commanddeclaration" }, { "full_name": "List.mem_foldr_sup_support_iff", "code": "theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :\n x ∈ l.foldr (Finsupp.support · ⊔ ·) ∅ ↔ ∃ f ∈ l, x ∈ f.support", "start": [ 60, 1 ], "end": [ 66, 41 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.mem_sup_map_support_iff", "code": "theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ι →₀ M)} {x : ι} :\n x ∈ (s.map Finsupp.support).sup ↔ ∃ f ∈ s, x ∈ f.support", "start": [ 69, 1 ], "end": [ 73, 41 ], "kind": "commanddeclaration" }, { "full_name": "Finset.mem_sup_support_iff", "code": "theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι} :\n x ∈ s.sup Finsupp.support ↔ ∃ f ∈ s, x ∈ f.support", "start": [ 76, 1 ], "end": [ 78, 35 ], "kind": "commanddeclaration" }, { "full_name": "List.support_sum_eq", "code": "theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))\n (hl : l.Pairwise (_root_.Disjoint on Finsupp.support)) :\n l.sum.support = l.foldr (Finsupp.support · ⊔ ·) ∅", "start": [ 81, 1 ], "end": [ 96, 23 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.support_sum_eq", "code": "theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))\n (hs : s.Pairwise (_root_.Disjoint on Finsupp.support)) :\n s.sum.support = (s.map Finsupp.support).sup", "start": [ 99, 1 ], "end": [ 111, 59 ], "kind": "commanddeclaration" }, { "full_name": "Finset.support_sum_eq", "code": "theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ι →₀ M))\n (hs : (s : Set (ι →₀ M)).PairwiseDisjoint Finsupp.support) :\n (s.sum id).support = Finset.sup s Finsupp.support", "start": [ 114, 1 ], "end": [ 128, 31 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
[ "Mathlib/Data/Matrix/Invertible.lean", "Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/Matrix/PosDef.lean" ]
[ { "full_name": "Matrix.fromBlocks_eq_of_invertible₁₁", "code": "theorem fromBlocks_eq_of_invertible₁₁ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix l m α)\n (D : Matrix l n α) [Invertible A] :\n fromBlocks A B C D =\n fromBlocks 1 0 (C * ⅟ A) 1 * fromBlocks A 0 0 (D - C * ⅟ A * B) *\n fromBlocks 1 (⅟ A * B) 0 1", "start": [ 50, 1 ], "end": [ 59, 72 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.fromBlocks_eq_of_invertible₂₂", "code": "theorem fromBlocks_eq_of_invertible₂₂ (A : Matrix l m α) (B : Matrix l n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible D] :\n fromBlocks A B C D =\n fromBlocks 1 (B * ⅟ D) 0 1 * fromBlocks (A - B * ⅟ D * C) 0 0 D *\n fromBlocks 1 0 (⅟ D * C) 1", "start": [ 62, 1 ], "end": [ 72, 90 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.fromBlocksZero₂₁Invertible", "code": "def fromBlocksZero₂₁Invertible (A : Matrix m m α) (B : Matrix m n α) (D : Matrix n n α)\n [Invertible A] [Invertible D] : Invertible (fromBlocks A B 0 D) :=\n invertibleOfLeftInverse _ (fromBlocks (⅟ A) (-(⅟ A * B * ⅟ D)) 0 (⅟ D)) <| by\n simp_rw [fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, zero_add, add_zero,\n Matrix.neg_mul, invOf_mul_self, Matrix.mul_invOf_mul_self_cancel, add_right_neg,\n fromBlocks_one]", "start": [ 80, 1 ], "end": [ 86, 22 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.fromBlocksZero₁₂Invertible", "code": "def fromBlocksZero₁₂Invertible (A : Matrix m m α) (C : Matrix n m α) (D : Matrix n n α)\n [Invertible A] [Invertible D] : Invertible (fromBlocks A 0 C D) :=\n invertibleOfLeftInverse _\n (fromBlocks (⅟ A) 0 (-(⅟ D * C * ⅟ A))\n (⅟ D)) <| by simp_rw [fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, zero_add, add_zero,\n Matrix.neg_mul, invOf_mul_self, Matrix.mul_invOf_mul_self_cancel, add_left_neg,\n fromBlocks_one]", "start": [ 89, 1 ], "end": [ 97, 22 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invOf_fromBlocks_zero₂₁_eq", "code": "theorem invOf_fromBlocks_zero₂₁_eq (A : Matrix m m α) (B : Matrix m n α) (D : Matrix n n α)\n [Invertible A] [Invertible D] [Invertible (fromBlocks A B 0 D)] :\n ⅟ (fromBlocks A B 0 D) = fromBlocks (⅟ A) (-(⅟ A * B * ⅟ D)) 0 (⅟ D)", "start": [ 100, 1 ], "end": [ 104, 45 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invOf_fromBlocks_zero₁₂_eq", "code": "theorem invOf_fromBlocks_zero₁₂_eq (A : Matrix m m α) (C : Matrix n m α) (D : Matrix n n α)\n [Invertible A] [Invertible D] [Invertible (fromBlocks A 0 C D)] :\n ⅟ (fromBlocks A 0 C D) = fromBlocks (⅟ A) 0 (-(⅟ D * C * ⅟ A)) (⅟ D)", "start": [ 107, 1 ], "end": [ 111, 45 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invertibleOfFromBlocksZero₂₁Invertible", "code": "def invertibleOfFromBlocksZero₂₁Invertible (A : Matrix m m α) (B : Matrix m n α) (D : Matrix n n α)\n [Invertible (fromBlocks A B 0 D)] : Invertible A × Invertible D where\n fst :=\n invertibleOfLeftInverse _ (⅟ (fromBlocks A B 0 D)).toBlocks₁₁ <| by\n have := invOf_mul_self (fromBlocks A B 0 D)\n rw [← fromBlocks_toBlocks (⅟ (fromBlocks A B 0 D)), fromBlocks_multiply] at this\n replace := congr_arg Matrix.toBlocks₁₁ this\n simpa only [Matrix.toBlocks_fromBlocks₁₁, Matrix.mul_zero, add_zero, ← fromBlocks_one] using\n this\n snd :=\n invertibleOfRightInverse _ (⅟ (fromBlocks A B 0 D)).toBlocks₂₂ <| by\n have := mul_invOf_self (fromBlocks A B 0 D)\n rw [← fromBlocks_toBlocks (⅟ (fromBlocks A B 0 D)), fromBlocks_multiply] at this\n replace := congr_arg Matrix.toBlocks₂₂ this\n simpa only [Matrix.toBlocks_fromBlocks₂₂, Matrix.zero_mul, zero_add, ← fromBlocks_one] using\n this", "start": [ 114, 1 ], "end": [ 131, 13 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invertibleOfFromBlocksZero₁₂Invertible", "code": "def invertibleOfFromBlocksZero₁₂Invertible (A : Matrix m m α) (C : Matrix n m α) (D : Matrix n n α)\n [Invertible (fromBlocks A 0 C D)] : Invertible A × Invertible D where\n fst :=\n invertibleOfRightInverse _ (⅟ (fromBlocks A 0 C D)).toBlocks₁₁ <| by\n have := mul_invOf_self (fromBlocks A 0 C D)\n rw [← fromBlocks_toBlocks (⅟ (fromBlocks A 0 C D)), fromBlocks_multiply] at this\n replace := congr_arg Matrix.toBlocks₁₁ this\n simpa only [Matrix.toBlocks_fromBlocks₁₁, Matrix.zero_mul, add_zero, ← fromBlocks_one] using\n this\n snd :=\n invertibleOfLeftInverse _ (⅟ (fromBlocks A 0 C D)).toBlocks₂₂ <| by\n have := invOf_mul_self (fromBlocks A 0 C D)\n rw [← fromBlocks_toBlocks (⅟ (fromBlocks A 0 C D)), fromBlocks_multiply] at this\n replace := congr_arg Matrix.toBlocks₂₂ this\n simpa only [Matrix.toBlocks_fromBlocks₂₂, Matrix.mul_zero, zero_add, ← fromBlocks_one] using\n this", "start": [ 134, 1 ], "end": [ 151, 13 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.fromBlocksZero₂₁InvertibleEquiv", "code": "def fromBlocksZero₂₁InvertibleEquiv (A : Matrix m m α) (B : Matrix m n α) (D : Matrix n n α) :\n Invertible (fromBlocks A B 0 D) ≃ Invertible A × Invertible D where\n toFun _ := invertibleOfFromBlocksZero₂₁Invertible A B D\n invFun i := by\n letI := i.1\n letI := i.2\n exact fromBlocksZero₂₁Invertible A B D\n left_inv _ := Subsingleton.elim _ _\n right_inv _ := Subsingleton.elim _ _", "start": [ 154, 1 ], "end": [ 164, 39 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.fromBlocksZero₁₂InvertibleEquiv", "code": "def fromBlocksZero₁₂InvertibleEquiv (A : Matrix m m α) (C : Matrix n m α) (D : Matrix n n α) :\n Invertible (fromBlocks A 0 C D) ≃ Invertible A × Invertible D where\n toFun _ := invertibleOfFromBlocksZero₁₂Invertible A C D\n invFun i := by\n letI := i.1\n letI := i.2\n exact fromBlocksZero₁₂Invertible A C D\n left_inv _ := Subsingleton.elim _ _\n right_inv _ := Subsingleton.elim _ _", "start": [ 167, 1 ], "end": [ 177, 39 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isUnit_fromBlocks_zero₂₁", "code": "@[simp]\ntheorem isUnit_fromBlocks_zero₂₁ {A : Matrix m m α} {B : Matrix m n α} {D : Matrix n n α} :\n IsUnit (fromBlocks A B 0 D) ↔ IsUnit A ∧ IsUnit D", "start": [ 180, 1 ], "end": [ 187, 60 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isUnit_fromBlocks_zero₁₂", "code": "@[simp]\ntheorem isUnit_fromBlocks_zero₁₂ {A : Matrix m m α} {C : Matrix n m α} {D : Matrix n n α} :\n IsUnit (fromBlocks A 0 C D) ↔ IsUnit A ∧ IsUnit D", "start": [ 190, 1 ], "end": [ 197, 60 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.inv_fromBlocks_zero₂₁_of_isUnit_iff", "code": "theorem inv_fromBlocks_zero₂₁_of_isUnit_iff (A : Matrix m m α) (B : Matrix m n α) (D : Matrix n n α)\n (hAD : IsUnit A ↔ IsUnit D) :\n (fromBlocks A B 0 D)⁻¹ = fromBlocks A⁻¹ (-(A⁻¹ * B * D⁻¹)) 0 D⁻¹", "start": [ 200, 1 ], "end": [ 215, 80 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.inv_fromBlocks_zero₁₂_of_isUnit_iff", "code": "theorem inv_fromBlocks_zero₁₂_of_isUnit_iff (A : Matrix m m α) (C : Matrix n m α) (D : Matrix n n α)\n (hAD : IsUnit A ↔ IsUnit D) :\n (fromBlocks A 0 C D)⁻¹ = fromBlocks A⁻¹ 0 (-(D⁻¹ * C * A⁻¹)) D⁻¹", "start": [ 218, 1 ], "end": [ 233, 80 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.fromBlocks₂₂Invertible", "code": "def fromBlocks₂₂Invertible (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible D] [Invertible (A - B * ⅟ D * C)] :\n Invertible (fromBlocks A B C D) := by\n convert Invertible.copy' _ _ (fromBlocks (⅟ (A - B * ⅟ D * C)) (-(⅟ (A - B * ⅟ D * C) * B * ⅟ D))\n (-(⅟ D * C * ⅟ (A - B * ⅟ D * C))) (⅟ D + ⅟ D * C * ⅟ (A - B * ⅟ D * C) * B * ⅟ D))\n (fromBlocks_eq_of_invertible₂₂ _ _ _ _) _\n · letI : Invertible (1 : Matrix n n α) := invertibleOne\n letI : Invertible (1 : Matrix m m α) := invertibleOne\n refine Invertible.mul ?_ (fromBlocksZero₁₂Invertible _ _ _)\n exact\n Invertible.mul (fromBlocksZero₂₁Invertible _ _ _)\n (fromBlocksZero₂₁Invertible _ _ _)\n · show\n _ =\n fromBlocks 1 0 (-(1 * (⅟ D * C) * 1)) 1 *\n (fromBlocks (⅟ (A - B * ⅟ D * C)) (-(⅟ (A - B * ⅟ D * C) * 0 * ⅟ D)) 0 (⅟ D) *\n fromBlocks 1 (-(1 * (B * ⅟ D) * 1)) 0 1)\n simp only [fromBlocks_multiply, invOf_one, Matrix.one_mul, Matrix.mul_one, Matrix.zero_mul,\n Matrix.mul_zero, add_zero, zero_add, neg_zero, Matrix.mul_neg, Matrix.neg_mul, neg_neg, ←\n Matrix.mul_assoc, add_comm (⅟D)]", "start": [ 246, 1 ], "end": [ 271, 39 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.fromBlocks₁₁Invertible", "code": "def fromBlocks₁₁Invertible (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible A] [Invertible (D - C * ⅟ A * B)] :\n Invertible (fromBlocks A B C D) := by\n letI := fromBlocks₂₂Invertible D C B A\n letI iDCBA :=\n submatrixEquivInvertible (fromBlocks D C B A) (Equiv.sumComm _ _) (Equiv.sumComm _ _)\n exact\n iDCBA.copy' _\n (fromBlocks (⅟ A + ⅟ A * B * ⅟ (D - C * ⅟ A * B) * C * ⅟ A) (-(⅟ A * B * ⅟ (D - C * ⅟ A * B)))\n (-(⅟ (D - C * ⅟ A * B) * C * ⅟ A)) (⅟ (D - C * ⅟ A * B)))\n (fromBlocks_submatrix_sum_swap_sum_swap _ _ _ _).symm\n (fromBlocks_submatrix_sum_swap_sum_swap _ _ _ _).symm", "start": [ 274, 1 ], "end": [ 288, 60 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invOf_fromBlocks₂₂_eq", "code": "theorem invOf_fromBlocks₂₂_eq (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible D] [Invertible (A - B * ⅟ D * C)]\n [Invertible (fromBlocks A B C D)] :\n ⅟ (fromBlocks A B C D) =\n fromBlocks (⅟ (A - B * ⅟ D * C)) (-(⅟ (A - B * ⅟ D * C) * B * ⅟ D))\n (-(⅟ D * C * ⅟ (A - B * ⅟ D * C))) (⅟ D + ⅟ D * C * ⅟ (A - B * ⅟ D * C) * B * ⅟ D)", "start": [ 291, 1 ], "end": [ 298, 45 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invOf_fromBlocks₁₁_eq", "code": "theorem invOf_fromBlocks₁₁_eq (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible A] [Invertible (D - C * ⅟ A * B)]\n [Invertible (fromBlocks A B C D)] :\n ⅟ (fromBlocks A B C D) =\n fromBlocks (⅟ A + ⅟ A * B * ⅟ (D - C * ⅟ A * B) * C * ⅟ A) (-(⅟ A * B * ⅟ (D - C * ⅟ A * B)))\n (-(⅟ (D - C * ⅟ A * B) * C * ⅟ A)) (⅟ (D - C * ⅟ A * B))", "start": [ 301, 1 ], "end": [ 308, 45 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invertibleOfFromBlocks₂₂Invertible", "code": "def invertibleOfFromBlocks₂₂Invertible (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible D] [Invertible (fromBlocks A B C D)] :\n Invertible (A - B * ⅟ D * C) := by\n suffices Invertible (fromBlocks (A - B * ⅟ D * C) 0 0 D) by\n exact (invertibleOfFromBlocksZero₁₂Invertible (A - B * ⅟ D * C) 0 D).1\n letI : Invertible (1 : Matrix n n α) := invertibleOne\n letI : Invertible (1 : Matrix m m α) := invertibleOne\n letI iDC : Invertible (fromBlocks 1 0 (⅟ D * C) 1 : Matrix (Sum m n) (Sum m n) α) :=\n fromBlocksZero₁₂Invertible _ _ _\n letI iBD : Invertible (fromBlocks 1 (B * ⅟ D) 0 1 : Matrix (Sum m n) (Sum m n) α) :=\n fromBlocksZero₂₁Invertible _ _ _\n letI iBDC := Invertible.copy ‹_› _ (fromBlocks_eq_of_invertible₂₂ A B C D).symm\n refine (iBD.mulLeft _).symm ?_\n exact (iDC.mulRight _).symm iBDC", "start": [ 311, 1 ], "end": [ 326, 35 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invertibleOfFromBlocks₁₁Invertible", "code": "def invertibleOfFromBlocks₁₁Invertible (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible A] [Invertible (fromBlocks A B C D)] :\n Invertible (D - C * ⅟ A * B) := by\n letI iABCD' :=\n submatrixEquivInvertible (fromBlocks A B C D) (Equiv.sumComm _ _) (Equiv.sumComm _ _)\n letI iDCBA := iABCD'.copy _ (fromBlocks_submatrix_sum_swap_sum_swap _ _ _ _).symm\n exact invertibleOfFromBlocks₂₂Invertible D C B A", "start": [ 329, 1 ], "end": [ 338, 51 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invertibleEquivFromBlocks₂₂Invertible", "code": "def invertibleEquivFromBlocks₂₂Invertible (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible D] :\n Invertible (fromBlocks A B C D) ≃ Invertible (A - B * ⅟ D * C) where\n toFun _iABCD := invertibleOfFromBlocks₂₂Invertible _ _ _ _\n invFun _i_schur := fromBlocks₂₂Invertible _ _ _ _\n left_inv _iABCD := Subsingleton.elim _ _\n right_inv _i_schur := Subsingleton.elim _ _", "start": [ 341, 1 ], "end": [ 349, 46 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.invertibleEquivFromBlocks₁₁Invertible", "code": "def invertibleEquivFromBlocks₁₁Invertible (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible A] :\n Invertible (fromBlocks A B C D) ≃ Invertible (D - C * ⅟ A * B) where\n toFun _iABCD := invertibleOfFromBlocks₁₁Invertible _ _ _ _\n invFun _i_schur := fromBlocks₁₁Invertible _ _ _ _\n left_inv _iABCD := Subsingleton.elim _ _\n right_inv _i_schur := Subsingleton.elim _ _", "start": [ 352, 1 ], "end": [ 360, 46 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isUnit_fromBlocks_iff_of_invertible₂₂", "code": "theorem isUnit_fromBlocks_iff_of_invertible₂₂ {A : Matrix m m α} {B : Matrix m n α}\n {C : Matrix n m α} {D : Matrix n n α} [Invertible D] :\n IsUnit (fromBlocks A B C D) ↔ IsUnit (A - B * ⅟ D * C)", "start": [ 363, 1 ], "end": [ 369, 68 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isUnit_fromBlocks_iff_of_invertible₁₁", "code": "theorem isUnit_fromBlocks_iff_of_invertible₁₁ {A : Matrix m m α} {B : Matrix m n α}\n {C : Matrix n m α} {D : Matrix n n α} [Invertible A] :\n IsUnit (fromBlocks A B C D) ↔ IsUnit (D - C * ⅟ A * B)", "start": [ 372, 1 ], "end": [ 378, 68 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_fromBlocks₁₁", "code": "theorem det_fromBlocks₁₁ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible A] :\n (Matrix.fromBlocks A B C D).det = det A * det (D - C * ⅟ A * B)", "start": [ 388, 1 ], "end": [ 394, 95 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_fromBlocks_one₁₁", "code": "@[simp]\ntheorem det_fromBlocks_one₁₁ (B : Matrix m n α) (C : Matrix n m α) (D : Matrix n n α) :\n (Matrix.fromBlocks 1 B C D).det = det (D - C * B)", "start": [ 397, 1 ], "end": [ 401, 69 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_fromBlocks₂₂", "code": "theorem det_fromBlocks₂₂ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)\n (D : Matrix n n α) [Invertible D] :\n (Matrix.fromBlocks A B C D).det = det D * det (A - B * ⅟ D * C)", "start": [ 404, 1 ], "end": [ 413, 56 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_fromBlocks_one₂₂", "code": "@[simp]\ntheorem det_fromBlocks_one₂₂ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α) :\n (Matrix.fromBlocks A B C 1).det = det (A - B * C)", "start": [ 416, 1 ], "end": [ 420, 69 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_one_add_mul_comm", "code": "theorem det_one_add_mul_comm (A : Matrix m n α) (B : Matrix n m α) :\n det (1 + A * B) = det (1 + B * A)", "start": [ 423, 1 ], "end": [ 430, 88 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_mul_add_one_comm", "code": "theorem det_mul_add_one_comm (A : Matrix m n α) (B : Matrix n m α) :\n det (A * B + 1) = det (B * A + 1)", "start": [ 433, 1 ], "end": [ 435, 90 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_one_sub_mul_comm", "code": "theorem det_one_sub_mul_comm (A : Matrix m n α) (B : Matrix n m α) :\n det (1 - A * B) = det (1 - B * A)", "start": [ 438, 1 ], "end": [ 440, 96 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_one_add_col_mul_row", "code": "theorem det_one_add_col_mul_row {ι : Type*} [Unique ι] (u v : m → α) :\n det (1 + col ι u * row ι v) = 1 + v ⬝ᵥ u", "start": [ 443, 1 ], "end": [ 447, 30 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_add_col_mul_row", "code": "theorem det_add_col_mul_row {ι : Type*} [Unique ι]\n {A : Matrix m m α} (hA : IsUnit A.det) (u v : m → α) :\n (A + col ι u * row ι v).det = A.det * (1 + row ι v * A⁻¹ * col ι u).det", "start": [ 450, 1 ], "end": [ 461, 24 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.det_add_mul", "code": "theorem det_add_mul {A : Matrix m m α} (U : Matrix m n α)\n (V : Matrix n m α) (hA : IsUnit A.det) :\n (A + U * V).det = A.det * (1 + V * A⁻¹ * U).det", "start": [ 463, 1 ], "end": [ 469, 75 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.schur_complement_eq₁₁", "code": "theorem schur_complement_eq₁₁ [Fintype m] [DecidableEq m] [Fintype n] {A : Matrix m m 𝕜}\n (B : Matrix m n 𝕜) (D : Matrix n n 𝕜) (x : m → 𝕜) (y : n → 𝕜) [Invertible A]\n (hA : A.IsHermitian) :\n (star (x ⊕ᵥ y)) ᵥ* (fromBlocks A B Bᴴ D) ⬝ᵥ (x ⊕ᵥ y) =\n (star (x + (A⁻¹ * B) *ᵥ y)) ᵥ* A ⬝ᵥ (x + (A⁻¹ * B) *ᵥ y) +\n (star y) ᵥ* (D - Bᴴ * A⁻¹ * B) ⬝ᵥ y", "start": [ 484, 1 ], "end": [ 493, 7 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.schur_complement_eq₂₂", "code": "theorem schur_complement_eq₂₂ [Fintype m] [Fintype n] [DecidableEq n] (A : Matrix m m 𝕜)\n (B : Matrix m n 𝕜) {D : Matrix n n 𝕜} (x : m → 𝕜) (y : n → 𝕜) [Invertible D]\n (hD : D.IsHermitian) :\n (star (x ⊕ᵥ y)) ᵥ* (fromBlocks A B Bᴴ D) ⬝ᵥ (x ⊕ᵥ y) =\n (star ((D⁻¹ * Bᴴ) *ᵥ x + y)) ᵥ* D ⬝ᵥ ((D⁻¹ * Bᴴ) *ᵥ x + y) +\n (star x) ᵥ* (A - B * D⁻¹ * Bᴴ) ⬝ᵥ x", "start": [ 496, 1 ], "end": [ 505, 7 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsHermitian.fromBlocks₁₁", "code": "theorem IsHermitian.fromBlocks₁₁ [Fintype m] [DecidableEq m] {A : Matrix m m 𝕜} (B : Matrix m n 𝕜)\n (D : Matrix n n 𝕜) (hA : A.IsHermitian) :\n (Matrix.fromBlocks A B Bᴴ D).IsHermitian ↔ (D - Bᴴ * A⁻¹ * B).IsHermitian", "start": [ 508, 1 ], "end": [ 521, 33 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsHermitian.fromBlocks₂₂", "code": "theorem IsHermitian.fromBlocks₂₂ [Fintype n] [DecidableEq n] (A : Matrix m m 𝕜) (B : Matrix m n 𝕜)\n {D : Matrix n n 𝕜} (hD : D.IsHermitian) :\n (Matrix.fromBlocks A B Bᴴ D).IsHermitian ↔ (A - B * D⁻¹ * Bᴴ).IsHermitian", "start": [ 524, 1 ], "end": [ 529, 51 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.PosSemidef.fromBlocks₁₁", "code": "theorem PosSemidef.fromBlocks₁₁ [Fintype m] [DecidableEq m] [Fintype n] {A : Matrix m m 𝕜}\n (B : Matrix m n 𝕜) (D : Matrix n n 𝕜) (hA : A.PosDef) [Invertible A] :\n (fromBlocks A B Bᴴ D).PosSemidef ↔ (D - Bᴴ * A⁻¹ * B).PosSemidef", "start": [ 532, 1 ], "end": [ 548, 16 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.PosSemidef.fromBlocks₂₂", "code": "theorem PosSemidef.fromBlocks₂₂ [Fintype m] [Fintype n] [DecidableEq n] (A : Matrix m m 𝕜)\n (B : Matrix m n 𝕜) {D : Matrix n n 𝕜} (hD : D.PosDef) [Invertible D] :\n (fromBlocks A B Bᴴ D).PosSemidef ↔ (A - B * D⁻¹ * Bᴴ).PosSemidef", "start": [ 551, 1 ], "end": [ 557, 9 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/ContinuousFunction/T0Sierpinski.lean
[ "Mathlib/Topology/Order.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Sets/Opens.lean", "Mathlib/Topology/ContinuousFunction/Basic.lean" ]
[ { "full_name": "TopologicalSpace.eq_induced_by_maps_to_sierpinski", "code": "theorem eq_induced_by_maps_to_sierpinski (X : Type*) [t : TopologicalSpace X] :\n t = ⨅ u : Opens X, sierpinskiSpace.induced (· ∈ u)", "start": [ 28, 1 ], "end": [ 37, 74 ], "kind": "commanddeclaration" }, { "full_name": "TopologicalSpace.productOfMemOpens", "code": "def productOfMemOpens : C(X, Opens X → Prop) where\n toFun x u := x ∈ u\n continuous_toFun := continuous_pi_iff.2 fun u => continuous_Prop.2 u.isOpen", "start": [ 42, 1 ], "end": [ 47, 78 ], "kind": "commanddeclaration" }, { "full_name": "TopologicalSpace.productOfMemOpens_inducing", "code": "theorem productOfMemOpens_inducing : Inducing (productOfMemOpens X)", "start": [ 50, 1 ], "end": [ 52, 41 ], "kind": "commanddeclaration" }, { "full_name": "TopologicalSpace.productOfMemOpens_injective", "code": "theorem productOfMemOpens_injective [T0Space X] : Function.Injective (productOfMemOpens X)", "start": [ 55, 1 ], "end": [ 58, 68 ], "kind": "commanddeclaration" }, { "full_name": "TopologicalSpace.productOfMemOpens_embedding", "code": "theorem productOfMemOpens_embedding [T0Space X] : Embedding (productOfMemOpens X)", "start": [ 61, 1 ], "end": [ 62, 78 ], "kind": "commanddeclaration" } ]
Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/MeasureTheory/Measure/Tilted.lean" ]
[ { "full_name": "MeasureTheory.llr", "code": "noncomputable def llr (μ ν : Measure α) (x : α) : ℝ := log (μ.rnDeriv ν x).toReal", "start": [ 32, 1 ], "end": [ 33, 82 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.llr_def", "code": "lemma llr_def (μ ν : Measure α) : llr μ ν = fun x ↦ log (μ.rnDeriv ν x).toReal := rfl", "start": [ 35, 1 ], "end": [ 35, 86 ], "kind": "lemma" }, { "full_name": "MeasureTheory.exp_llr", "code": "lemma exp_llr (μ ν : Measure α) [SigmaFinite μ] :\n (fun x ↦ exp (llr μ ν x))\n =ᵐ[ν] fun x ↦ if μ.rnDeriv ν x = 0 then 1 else (μ.rnDeriv ν x).toReal := by\n filter_upwards [Measure.rnDeriv_lt_top μ ν] with x hx\n by_cases h_zero : μ.rnDeriv ν x = 0\n · simp only [llr, h_zero, ENNReal.zero_toReal, log_zero, exp_zero, ite_true]\n · rw [llr, exp_log, if_neg h_zero]\n exact ENNReal.toReal_pos h_zero hx.ne", "start": [ 37, 1 ], "end": [ 44, 42 ], "kind": "lemma" }, { "full_name": "MeasureTheory.exp_llr_of_ac", "code": "lemma exp_llr_of_ac (μ ν : Measure α) [SigmaFinite μ] [Measure.HaveLebesgueDecomposition μ ν]\n (hμν : μ ≪ ν) :\n (fun x ↦ exp (llr μ ν x)) =ᵐ[μ] fun x ↦ (μ.rnDeriv ν x).toReal := by\n filter_upwards [hμν.ae_le (exp_llr μ ν), Measure.rnDeriv_pos hμν] with x hx_eq hx_pos\n rw [hx_eq, if_neg hx_pos.ne']", "start": [ 46, 1 ], "end": [ 50, 32 ], "kind": "lemma" }, { "full_name": "MeasureTheory.exp_llr_of_ac'", "code": "lemma exp_llr_of_ac' (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν] (hμν : ν ≪ μ) :\n (fun x ↦ exp (llr μ ν x)) =ᵐ[ν] fun x ↦ (μ.rnDeriv ν x).toReal := by\n filter_upwards [exp_llr μ ν, Measure.rnDeriv_pos' hμν] with x hx hx_pos\n rwa [if_neg hx_pos.ne'] at hx", "start": [ 52, 1 ], "end": [ 55, 32 ], "kind": "lemma" }, { "full_name": "MeasureTheory.neg_llr", "code": "lemma neg_llr [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν) :\n - llr μ ν =ᵐ[μ] llr ν μ := by\n filter_upwards [Measure.inv_rnDeriv hμν] with x hx\n rw [Pi.neg_apply, llr, llr, ← log_inv, ← ENNReal.toReal_inv]\n congr", "start": [ 57, 1 ], "end": [ 61, 8 ], "kind": "lemma" }, { "full_name": "MeasureTheory.exp_neg_llr", "code": "lemma exp_neg_llr [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν) :\n (fun x ↦ exp (- llr μ ν x)) =ᵐ[μ] fun x ↦ (ν.rnDeriv μ x).toReal := by\n filter_upwards [neg_llr hμν, exp_llr_of_ac' ν μ hμν] with x hx hx_exp_log\n rw [Pi.neg_apply] at hx\n rw [hx, hx_exp_log]", "start": [ 63, 1 ], "end": [ 67, 22 ], "kind": "lemma" }, { "full_name": "MeasureTheory.exp_neg_llr'", "code": "lemma exp_neg_llr' [SigmaFinite μ] [SigmaFinite ν] (hμν : ν ≪ μ) :\n (fun x ↦ exp (- llr μ ν x)) =ᵐ[ν] fun x ↦ (ν.rnDeriv μ x).toReal := by\n filter_upwards [neg_llr hμν, exp_llr_of_ac ν μ hμν] with x hx hx_exp_log\n rw [Pi.neg_apply, neg_eq_iff_eq_neg] at hx\n rw [← hx, hx_exp_log]", "start": [ 69, 1 ], "end": [ 73, 24 ], "kind": "lemma" }, { "full_name": "MeasureTheory.measurable_llr", "code": "@[measurability]\nlemma measurable_llr (μ ν : Measure α) : Measurable (llr μ ν) :=\n (Measure.measurable_rnDeriv μ ν).ennreal_toReal.log", "start": [ 75, 1 ], "end": [ 77, 54 ], "kind": "lemma" }, { "full_name": "MeasureTheory.stronglyMeasurable_llr", "code": "@[measurability]\nlemma stronglyMeasurable_llr (μ ν : Measure α) : StronglyMeasurable (llr μ ν) :=\n (measurable_llr μ ν).stronglyMeasurable", "start": [ 79, 1 ], "end": [ 81, 42 ], "kind": "lemma" }, { "full_name": "MeasureTheory.llr_smul_left", "code": "lemma llr_smul_left [IsFiniteMeasure μ] [Measure.HaveLebesgueDecomposition μ ν]\n (hμν : μ ≪ ν) (c : ℝ≥0∞) (hc : c ≠ 0) (hc_ne_top : c ≠ ∞) :\n llr (c • μ) ν =ᵐ[μ] fun x ↦ llr μ ν x + log c.toReal := by\n simp only [llr, llr_def]\n have h := Measure.rnDeriv_smul_left_of_ne_top μ ν hc_ne_top\n filter_upwards [hμν.ae_le h, Measure.rnDeriv_pos hμν, hμν.ae_le (Measure.rnDeriv_lt_top μ ν)]\n with x hx_eq hx_pos hx_ne_top\n rw [hx_eq]\n simp only [Pi.smul_apply, smul_eq_mul, ENNReal.toReal_mul]\n rw [log_mul]\n rotate_left\n · rw [ENNReal.toReal_ne_zero]\n simp [hc, hc_ne_top]\n · rw [ENNReal.toReal_ne_zero]\n simp [hx_pos.ne', hx_ne_top.ne]\n ring", "start": [ 83, 1 ], "end": [ 98, 7 ], "kind": "lemma" }, { "full_name": "MeasureTheory.llr_smul_right", "code": "lemma llr_smul_right [IsFiniteMeasure μ] [Measure.HaveLebesgueDecomposition μ ν]\n (hμν : μ ≪ ν) (c : ℝ≥0∞) (hc : c ≠ 0) (hc_ne_top : c ≠ ∞) :\n llr μ (c • ν) =ᵐ[μ] fun x ↦ llr μ ν x - log c.toReal := by\n simp only [llr, llr_def]\n have h := Measure.rnDeriv_smul_right_of_ne_top μ ν hc hc_ne_top\n filter_upwards [hμν.ae_le h, Measure.rnDeriv_pos hμν, hμν.ae_le (Measure.rnDeriv_lt_top μ ν)]\n with x hx_eq hx_pos hx_ne_top\n rw [hx_eq]\n simp only [Pi.smul_apply, smul_eq_mul, ENNReal.toReal_mul]\n rw [log_mul]\n rotate_left\n · rw [ENNReal.toReal_ne_zero]\n simp [hc, hc_ne_top]\n · rw [ENNReal.toReal_ne_zero]\n simp [hx_pos.ne', hx_ne_top.ne]\n rw [ENNReal.toReal_inv, log_inv]\n ring", "start": [ 100, 1 ], "end": [ 116, 7 ], "kind": "lemma" }, { "full_name": "MeasureTheory.llr_tilted_left", "code": "lemma llr_tilted_left [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν)\n (hf : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :\n (llr (μ.tilted f) ν) =ᵐ[μ] fun x ↦ f x - log (∫ z, exp (f z) ∂μ) + llr μ ν x := by\n have hfμ : AEMeasurable f μ :=\n aemeasurable_of_aemeasurable_exp (AEStronglyMeasurable.aemeasurable hf.1)\n cases eq_zero_or_neZero μ with\n | inl hμ =>\n simp only [hμ, ae_zero, Filter.EventuallyEq]; exact Filter.eventually_bot\n | inr h0 =>\n filter_upwards [hμν.ae_le (toReal_rnDeriv_tilted_left hfμ hfν), Measure.rnDeriv_pos hμν,\n hμν.ae_le (Measure.rnDeriv_lt_top μ ν)] with x hx hx_pos hx_lt_top\n rw [llr, hx, log_mul, div_eq_mul_inv, log_mul (exp_pos _).ne', log_exp, log_inv, llr,\n ← sub_eq_add_neg]\n · simp only [ne_eq, inv_eq_zero]\n exact (integral_exp_pos hf).ne'\n · simp only [ne_eq, div_eq_zero_iff]\n push_neg\n exact ⟨(exp_pos _).ne', (integral_exp_pos hf).ne'⟩\n · simp [ENNReal.toReal_eq_zero_iff, hx_lt_top.ne, hx_pos.ne']", "start": [ 120, 1 ], "end": [ 138, 66 ], "kind": "lemma" }, { "full_name": "MeasureTheory.integrable_llr_tilted_left", "code": "lemma integrable_llr_tilted_left [IsFiniteMeasure μ] [SigmaFinite ν]\n (hμν : μ ≪ ν) (hf : Integrable f μ) (h_int : Integrable (llr μ ν) μ)\n (hfμ : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :\n Integrable (llr (μ.tilted f) ν) μ := by\n rw [integrable_congr (llr_tilted_left hμν hfμ hfν)]\n exact Integrable.add (hf.sub (integrable_const _)) h_int", "start": [ 140, 1 ], "end": [ 145, 59 ], "kind": "lemma" }, { "full_name": "MeasureTheory.integral_llr_tilted_left", "code": "lemma integral_llr_tilted_left [IsProbabilityMeasure μ] [SigmaFinite ν]\n (hμν : μ ≪ ν) (hf : Integrable f μ) (h_int : Integrable (llr μ ν) μ)\n (hfμ : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :\n ∫ x, llr (μ.tilted f) ν x ∂μ = ∫ x, llr μ ν x ∂μ + ∫ x, f x ∂μ - log (∫ x, exp (f x) ∂μ) := by\n calc ∫ x, llr (μ.tilted f) ν x ∂μ\n = ∫ x, f x - log (∫ x, exp (f x) ∂μ) + llr μ ν x ∂μ :=\n integral_congr_ae (llr_tilted_left hμν hfμ hfν)\n _ = ∫ x, f x ∂μ - log (∫ x, exp (f x) ∂μ) + ∫ x, llr μ ν x ∂μ := by\n rw [integral_add ?_ h_int]\n swap; · exact hf.sub (integrable_const _)\n rw [integral_sub hf (integrable_const _)]\n simp only [integral_const, measure_univ, ENNReal.one_toReal, smul_eq_mul, one_mul]\n _ = ∫ x, llr μ ν x ∂μ + ∫ x, f x ∂μ - log (∫ x, exp (f x) ∂μ) := by abel", "start": [ 147, 1 ], "end": [ 159, 75 ], "kind": "lemma" }, { "full_name": "MeasureTheory.llr_tilted_right", "code": "lemma llr_tilted_right [SigmaFinite μ] [SigmaFinite ν]\n (hμν : μ ≪ ν) (hf : Integrable (fun x ↦ exp (f x)) ν) :\n (llr μ (ν.tilted f)) =ᵐ[μ] fun x ↦ - f x + log (∫ z, exp (f z) ∂ν) + llr μ ν x := by\n cases eq_zero_or_neZero ν with\n | inl h =>\n have hμ : μ = 0 := by ext s _; exact hμν (by simp [h])\n simp only [hμ, ae_zero, Filter.EventuallyEq]; exact Filter.eventually_bot\n | inr h0 =>\n filter_upwards [hμν.ae_le (toReal_rnDeriv_tilted_right μ ν hf), Measure.rnDeriv_pos hμν,\n hμν.ae_le (Measure.rnDeriv_lt_top μ ν)] with x hx hx_pos hx_lt_top\n rw [llr, hx, log_mul, log_mul (exp_pos _).ne', log_exp, llr]\n · exact (integral_exp_pos hf).ne'\n · refine (mul_pos (exp_pos _) (integral_exp_pos hf)).ne'\n · simp [ENNReal.toReal_eq_zero_iff, hx_lt_top.ne, hx_pos.ne']", "start": [ 161, 1 ], "end": [ 174, 66 ], "kind": "lemma" }, { "full_name": "MeasureTheory.integrable_llr_tilted_right", "code": "lemma integrable_llr_tilted_right [IsFiniteMeasure μ] [SigmaFinite ν]\n (hμν : μ ≪ ν) (hfμ : Integrable f μ)\n (h_int : Integrable (llr μ ν) μ) (hfν : Integrable (fun x ↦ exp (f x)) ν) :\n Integrable (llr μ (ν.tilted f)) μ := by\n rw [integrable_congr (llr_tilted_right hμν hfν)]\n exact Integrable.add (hfμ.neg.add (integrable_const _)) h_int", "start": [ 176, 1 ], "end": [ 181, 64 ], "kind": "lemma" }, { "full_name": "MeasureTheory.integral_llr_tilted_right", "code": "lemma integral_llr_tilted_right [IsProbabilityMeasure μ] [SigmaFinite ν]\n (hμν : μ ≪ ν) (hfμ : Integrable f μ) (hfν : Integrable (fun x ↦ exp (f x)) ν)\n (h_int : Integrable (llr μ ν) μ) :\n ∫ x, llr μ (ν.tilted f) x ∂μ = ∫ x, llr μ ν x ∂μ - ∫ x, f x ∂μ + log (∫ x, exp (f x) ∂ν) := by\n calc ∫ x, llr μ (ν.tilted f) x ∂μ\n = ∫ x, - f x + log (∫ x, exp (f x) ∂ν) + llr μ ν x ∂μ :=\n integral_congr_ae (llr_tilted_right hμν hfν)\n _ = - ∫ x, f x ∂μ + log (∫ x, exp (f x) ∂ν) + ∫ x, llr μ ν x ∂μ := by\n rw [← integral_neg, integral_add ?_ h_int]\n swap; · exact hfμ.neg.add (integrable_const _)\n rw [integral_add ?_ (integrable_const _)]\n swap; · exact hfμ.neg\n simp only [integral_const, measure_univ, ENNReal.one_toReal, smul_eq_mul, one_mul]\n _ = ∫ x, llr μ ν x ∂μ - ∫ x, f x ∂μ + log (∫ x, exp (f x) ∂ν) := by abel", "start": [ 183, 1 ], "end": [ 196, 75 ], "kind": "lemma" } ]
Mathlib/Analysis/NormedSpace/LpEquiv.lean
[ "Mathlib/Analysis/NormedSpace/lpSpace.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/NormedSpace/PiLp.lean", "Mathlib/Topology/ContinuousFunction/Bounded.lean" ]
[ { "full_name": "Memℓp.all", "code": "theorem Memℓp.all (f : ∀ i, E i) : Memℓp f p", "start": [ 53, 1 ], "end": [ 58, 84 ], "kind": "commanddeclaration" }, { "full_name": "Equiv.lpPiLp", "code": "def Equiv.lpPiLp : lp E p ≃ PiLp p E where\n toFun f := ⇑f\n invFun f := ⟨f, Memℓp.all f⟩\n left_inv _f := rfl\n right_inv _f := rfl", "start": [ 61, 1 ], "end": [ 66, 22 ], "kind": "commanddeclaration" }, { "full_name": "coe_equiv_lpPiLp", "code": "theorem coe_equiv_lpPiLp (f : lp E p) : Equiv.lpPiLp f = ⇑f", "start": [ 69, 1 ], "end": [ 70, 6 ], "kind": "commanddeclaration" }, { "full_name": "coe_equiv_lpPiLp_symm", "code": "theorem coe_equiv_lpPiLp_symm (f : PiLp p E) : (Equiv.lpPiLp.symm f : ∀ i, E i) = f", "start": [ 73, 1 ], "end": [ 74, 6 ], "kind": "commanddeclaration" }, { "full_name": "AddEquiv.lpPiLp", "code": "def AddEquiv.lpPiLp : lp E p ≃+ PiLp p E :=\n { Equiv.lpPiLp with map_add' := fun _f _g ↦ rfl }", "start": [ 77, 1 ], "end": [ 80, 52 ], "kind": "commanddeclaration" }, { "full_name": "coe_addEquiv_lpPiLp", "code": "theorem coe_addEquiv_lpPiLp (f : lp E p) : AddEquiv.lpPiLp f = ⇑f", "start": [ 83, 1 ], "end": [ 84, 6 ], "kind": "commanddeclaration" }, { "full_name": "coe_addEquiv_lpPiLp_symm", "code": "theorem coe_addEquiv_lpPiLp_symm (f : PiLp p E) :\n (AddEquiv.lpPiLp.symm f : ∀ i, E i) = f", "start": [ 87, 1 ], "end": [ 89, 6 ], "kind": "commanddeclaration" }, { "full_name": "equiv_lpPiLp_norm", "code": "theorem equiv_lpPiLp_norm [Fintype α] (f : lp E p) : ‖Equiv.lpPiLp f‖ = ‖f‖", "start": [ 94, 1 ], "end": [ 98, 71 ], "kind": "commanddeclaration" }, { "full_name": "lpPiLpₗᵢ", "code": "noncomputable def lpPiLpₗᵢ [Fact (1 ≤ p)] : lp E p ≃ₗᵢ[𝕜] PiLp p E :=\n { AddEquiv.lpPiLp with\n map_smul' := fun _k _f ↦ rfl\n norm_map' := equiv_lpPiLp_norm }", "start": [ 109, 1 ], "end": [ 114, 37 ], "kind": "commanddeclaration" }, { "full_name": "coe_lpPiLpₗᵢ", "code": "theorem coe_lpPiLpₗᵢ [Fact (1 ≤ p)] (f : lp E p) : (lpPiLpₗᵢ E 𝕜 f : ∀ i, E i) = ⇑f", "start": [ 120, 1 ], "end": [ 121, 6 ], "kind": "commanddeclaration" }, { "full_name": "coe_lpPiLpₗᵢ_symm", "code": "theorem coe_lpPiLpₗᵢ_symm [Fact (1 ≤ p)] (f : PiLp p E) :\n ((lpPiLpₗᵢ E 𝕜).symm f : ∀ i, E i) = f", "start": [ 124, 1 ], "end": [ 126, 6 ], "kind": "commanddeclaration" }, { "full_name": "AddEquiv.lpBCF", "code": "noncomputable def AddEquiv.lpBCF : lp (fun _ : α ↦ E) ∞ ≃+ (α →ᵇ E) where\n toFun f := ofNormedAddCommGroupDiscrete f ‖f‖ <| le_ciSup (memℓp_infty_iff.mp f.prop)\n invFun f := ⟨⇑f, f.bddAbove_range_norm_comp⟩\n left_inv _f := lp.ext rfl\n right_inv _f := rfl\n map_add' _f _g := rfl", "start": [ 146, 1 ], "end": [ 152, 24 ], "kind": "commanddeclaration" }, { "full_name": "coe_addEquiv_lpBCF", "code": "theorem coe_addEquiv_lpBCF (f : lp (fun _ : α ↦ E) ∞) : (AddEquiv.lpBCF f : α → E) = f", "start": [ 157, 1 ], "end": [ 158, 6 ], "kind": "commanddeclaration" }, { "full_name": "coe_addEquiv_lpBCF_symm", "code": "theorem coe_addEquiv_lpBCF_symm (f : α →ᵇ E) : (AddEquiv.lpBCF.symm f : α → E) = f", "start": [ 161, 1 ], "end": [ 162, 6 ], "kind": "commanddeclaration" }, { "full_name": "lpBCFₗᵢ", "code": "noncomputable def lpBCFₗᵢ : lp (fun _ : α ↦ E) ∞ ≃ₗᵢ[𝕜] α →ᵇ E :=\n { AddEquiv.lpBCF with\n map_smul' := fun k f ↦ rfl\n norm_map' := fun f ↦ by simp only [norm_eq_iSup_norm, lp.norm_eq_ciSup]; rfl }", "start": [ 170, 1 ], "end": [ 174, 83 ], "kind": "commanddeclaration" }, { "full_name": "coe_lpBCFₗᵢ", "code": "theorem coe_lpBCFₗᵢ (f : lp (fun _ : α ↦ E) ∞) : (lpBCFₗᵢ E 𝕜 f : α → E) = f", "start": [ 182, 1 ], "end": [ 183, 6 ], "kind": "commanddeclaration" }, { "full_name": "coe_lpBCFₗᵢ_symm", "code": "theorem coe_lpBCFₗᵢ_symm (f : α →ᵇ E) : ((lpBCFₗᵢ E 𝕜).symm f : α → E) = f", "start": [ 186, 1 ], "end": [ 187, 6 ], "kind": "commanddeclaration" }, { "full_name": "RingEquiv.lpBCF", "code": "noncomputable def RingEquiv.lpBCF : lp (fun _ : α ↦ R) ∞ ≃+* (α →ᵇ R) :=\n { @AddEquiv.lpBCF _ R _ _ _ with\n map_mul' := fun _f _g => rfl }", "start": [ 194, 1 ], "end": [ 197, 35 ], "kind": "commanddeclaration" }, { "full_name": "coe_ringEquiv_lpBCF", "code": "theorem coe_ringEquiv_lpBCF (f : lp (fun _ : α ↦ R) ∞) : (RingEquiv.lpBCF R f : α → R) = f", "start": [ 204, 1 ], "end": [ 205, 6 ], "kind": "commanddeclaration" }, { "full_name": "coe_ringEquiv_lpBCF_symm", "code": "theorem coe_ringEquiv_lpBCF_symm (f : α →ᵇ R) : ((RingEquiv.lpBCF R).symm f : α → R) = f", "start": [ 208, 1 ], "end": [ 209, 6 ], "kind": "commanddeclaration" }, { "full_name": "AlgEquiv.lpBCF", "code": "noncomputable def AlgEquiv.lpBCF : lp (fun _ : α ↦ A) ∞ ≃ₐ[𝕜] α →ᵇ A :=\n { RingEquiv.lpBCF A with commutes' := fun _k ↦ rfl }", "start": [ 217, 1 ], "end": [ 219, 55 ], "kind": "commanddeclaration" }, { "full_name": "coe_algEquiv_lpBCF", "code": "theorem coe_algEquiv_lpBCF (f : lp (fun _ : α ↦ A) ∞) : (AlgEquiv.lpBCF α A 𝕜 f : α → A) = f", "start": [ 226, 1 ], "end": [ 227, 6 ], "kind": "commanddeclaration" }, { "full_name": "coe_algEquiv_lpBCF_symm", "code": "theorem coe_algEquiv_lpBCF_symm (f : α →ᵇ A) : ((AlgEquiv.lpBCF α A 𝕜).symm f : α → A) = f", "start": [ 230, 1 ], "end": [ 231, 6 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Calculus/Deriv/Star.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Calculus/FDeriv/Star.lean", "Mathlib/Analysis/Calculus/Deriv/Basic.lean" ]
[ { "full_name": "HasDerivAtFilter.star", "code": "protected nonrec theorem HasDerivAtFilter.star (h : HasDerivAtFilter f f' x L) :\n HasDerivAtFilter (fun x => star (f x)) (star f') x L", "start": [ 31, 1 ], "end": [ 33, 38 ], "kind": "commanddeclaration" }, { "full_name": "HasDerivWithinAt.star", "code": "protected nonrec theorem HasDerivWithinAt.star (h : HasDerivWithinAt f f' s x) :\n HasDerivWithinAt (fun x => star (f x)) (star f') s x", "start": [ 36, 1 ], "end": [ 38, 9 ], "kind": "commanddeclaration" }, { "full_name": "HasDerivAt.star", "code": "protected nonrec theorem HasDerivAt.star (h : HasDerivAt f f' x) :\n HasDerivAt (fun x => star (f x)) (star f') x", "start": [ 41, 1 ], "end": [ 43, 9 ], "kind": "commanddeclaration" }, { "full_name": "HasStrictDerivAt.star", "code": "protected nonrec theorem HasStrictDerivAt.star (h : HasStrictDerivAt f f' x) :\n HasStrictDerivAt (fun x => star (f x)) (star f') x", "start": [ 46, 1 ], "end": [ 47, 97 ], "kind": "commanddeclaration" }, { "full_name": "derivWithin.star", "code": "protected theorem derivWithin.star (hxs : UniqueDiffWithinAt 𝕜 s x) :\n derivWithin (fun y => star (f y)) s x = star (derivWithin f s x)", "start": [ 50, 1 ], "end": [ 52, 47 ], "kind": "commanddeclaration" }, { "full_name": "deriv.star", "code": "protected theorem deriv.star : deriv (fun y => star (f y)) x = star (deriv f x)", "start": [ 55, 1 ], "end": [ 56, 35 ], "kind": "commanddeclaration" }, { "full_name": "deriv.star'", "code": "@[simp]\nprotected theorem deriv.star' : (deriv fun y => star (f y)) = fun x => star (deriv f x)", "start": [ 59, 1 ], "end": [ 61, 29 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/SmallObject/Iteration.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Category/Preorder.lean", "Mathlib/CategoryTheory/Limits/IsLimit.lean", "Mathlib/Order/IsWellOrderLimitElement.lean" ]
[ { "full_name": "CategoryTheory.Functor.Iteration.mapSucc'", "code": "noncomputable abbrev mapSucc' (i : J) (hi : i < j) :\n F.obj ⟨i, hi.le⟩ ⟶ F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ :=\n F.map (homOfLE (by simpa only [Subtype.mk_le_mk] using self_le_wellOrderSucc i))", "start": [ 48, 1 ], "end": [ 52, 83 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.Iteration.restrictionLT", "code": "def restrictionLT : { k // k < i } ⥤ C :=\n (monotone_inclusion_lt_le_of_le hi).functor ⋙ F", "start": [ 56, 1 ], "end": [ 59, 50 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.Iteration.restrictionLT_obj", "code": "@[simp]\nlemma restrictionLT_obj (k : J) (hk : k < i) :\n (restrictionLT F hi).obj ⟨k, hk⟩ = F.obj ⟨k, hk.le.trans hi⟩ := rfl", "start": [ 61, 1 ], "end": [ 63, 72 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.Iteration.restrictionLT_map", "code": "@[simp]\nlemma restrictionLT_map {k₁ k₂ : { k // k < i }} (φ : k₁ ⟶ k₂) :\n (restrictionLT F hi).map φ = F.map (homOfLE (by simpa using leOfHom φ)) := rfl", "start": [ 65, 1 ], "end": [ 67, 83 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.Iteration.coconeOfLE", "code": "@[simps]\ndef coconeOfLE : Cocone (restrictionLT F hi) where\n pt := F.obj ⟨i, hi⟩\n ι :=\n { app := fun ⟨k, hk⟩ => F.map (homOfLE (by simpa using hk.le))\n naturality := fun ⟨k₁, hk₁⟩ ⟨k₂, hk₂⟩ _ => by\n simp [comp_id, ← Functor.map_comp, homOfLE_comp] }", "start": [ 69, 1 ], "end": [ 77, 59 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.Iteration", "code": "structure Iteration (j : J) where\n \n F : { i // i ≤ j } ⥤ C ⥤ C\n \n isoZero : F.obj ⟨⊥, bot_le⟩ ≅ 𝟭 C\n \n isoSucc (i : J) (hi : i < j) :\n F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ ≅ F.obj ⟨i, hi.le⟩ ⋙ Φ\n \n mapSucc'_eq (i : J) (hi : i < j) :\n Iteration.mapSucc' F i hi = whiskerLeft _ ε ≫ (isoSucc i hi).inv\n \n isColimit (i : J) [IsWellOrderLimitElement i] (hi : i ≤ j) :\n IsColimit (Iteration.coconeOfLE F hi)", "start": [ 81, 1 ], "end": [ 101, 42 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.Iteration.mapSucc", "code": "noncomputable abbrev mapSucc (i : J) (hi : i < j) :\n iter.F.obj ⟨i, hi.le⟩ ⟶ iter.F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ :=\n mapSucc' iter.F i hi", "start": [ 112, 1 ], "end": [ 116, 23 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.Iteration.mapSucc_eq", "code": "lemma mapSucc_eq (i : J) (hi : i < j) :\n iter.mapSucc i hi = whiskerLeft _ ε ≫ (iter.isoSucc i hi).inv :=\n iter.mapSucc'_eq _ hi", "start": [ 118, 1 ], "end": [ 120, 24 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.Iteration.Hom", "code": "structure Hom where\n \n natTrans : iter₁.F ⟶ iter₂.F\n natTrans_app_zero :\n natTrans.app ⟨⊥, bot_le⟩ = iter₁.isoZero.hom ≫ iter₂.isoZero.inv := by aesop_cat\n natTrans_app_succ (i : J) (hi : i < j) :\n natTrans.app ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ = (iter₁.isoSucc i hi).hom ≫\n whiskerRight (natTrans.app ⟨i, hi.le⟩) _ ≫ (iter₂.isoSucc i hi).inv := by aesop_cat", "start": [ 126, 1 ], "end": [ 138, 90 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.Iteration.Hom.id", "code": "@[simps]\ndef id : Hom iter₁ iter₁ where\n natTrans := 𝟙 _", "start": [ 144, 1 ], "end": [ 147, 18 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.Iteration.Hom.ext'", "code": "lemma ext' {f g : Hom iter₁ iter₂} (h : f.natTrans = g.natTrans) : f = g := by\n cases f\n cases g\n subst h\n rfl", "start": [ 153, 1 ], "end": [ 157, 6 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.Iteration.Hom.comp", "code": "@[simps]\ndef comp {iter₃ : Iteration ε j} (f : Hom iter₁ iter₂) (g : Hom iter₂ iter₃) :\n Hom iter₁ iter₃ where\n natTrans := f.natTrans ≫ g.natTrans\n natTrans_app_succ i hi := by simp [natTrans_app_succ _ _ hi]", "start": [ 161, 1 ], "end": [ 166, 63 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Analytic/Meromorphic.lean
[ "Mathlib/Analysis/Analytic/IsolatedZeros.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/Group/WithTop.lean" ]
[ { "full_name": "MeromorphicAt", "code": "def MeromorphicAt (f : 𝕜 → E) (x : 𝕜) :=\n ∃ (n : ℕ), AnalyticAt 𝕜 (fun z ↦ (z - x) ^ n • f z) x", "start": [ 27, 1 ], "end": [ 30, 56 ], "kind": "commanddeclaration" }, { "full_name": "AnalyticAt.meromorphicAt", "code": "lemma AnalyticAt.meromorphicAt {f : 𝕜 → E} {x : 𝕜} (hf : AnalyticAt 𝕜 f x) :\n MeromorphicAt f x :=\n ⟨0, by simpa only [pow_zero, one_smul]⟩", "start": [ 32, 1 ], "end": [ 34, 42 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.id", "code": "lemma id (x : 𝕜) : MeromorphicAt id x := (analyticAt_id 𝕜 x).meromorphicAt", "start": [ 38, 1 ], "end": [ 38, 75 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.const", "code": "lemma const (e : E) (x : 𝕜) : MeromorphicAt (fun _ ↦ e) x :=\n analyticAt_const.meromorphicAt", "start": [ 40, 1 ], "end": [ 41, 33 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.add", "code": "lemma add {f g : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :\n MeromorphicAt (f + g) x := by\n rcases hf with ⟨m, hf⟩\n rcases hg with ⟨n, hg⟩\n refine ⟨max m n, ?_⟩\n have : (fun z ↦ (z - x) ^ max m n • (f + g) z) = fun z ↦ (z - x) ^ (max m n - m) •\n ((z - x) ^ m • f z) + (z - x) ^ (max m n - n) • ((z - x) ^ n • g z) := by\n simp_rw [← mul_smul, ← pow_add, Nat.sub_add_cancel (Nat.le_max_left _ _),\n Nat.sub_add_cancel (Nat.le_max_right _ _), Pi.add_apply, smul_add]\n rw [this]\n exact ((((analyticAt_id 𝕜 x).sub analyticAt_const).pow _).smul hf).add\n ((((analyticAt_id 𝕜 x).sub analyticAt_const).pow _).smul hg)", "start": [ 43, 1 ], "end": [ 54, 64 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.smul", "code": "lemma smul {f : 𝕜 → 𝕜} {g : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :\n MeromorphicAt (f • g) x := by\n rcases hf with ⟨m, hf⟩\n rcases hg with ⟨n, hg⟩\n refine ⟨m + n, ?_⟩\n convert hf.smul hg using 2 with z\n rw [smul_eq_mul, ← mul_smul, mul_assoc, mul_comm (f z), ← mul_assoc, pow_add,\n ← smul_eq_mul (a' := f z), smul_assoc, Pi.smul_apply']", "start": [ 56, 1 ], "end": [ 63, 59 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.mul", "code": "lemma mul {f g : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :\n MeromorphicAt (f * g) x :=\n hf.smul hg", "start": [ 65, 1 ], "end": [ 67, 13 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.neg", "code": "lemma neg {f : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) : MeromorphicAt (-f) x := by\n convert (MeromorphicAt.const (-1 : 𝕜) x).smul hf using 1\n ext1 z\n simp only [Pi.neg_apply, Pi.smul_apply', neg_smul, one_smul]", "start": [ 69, 1 ], "end": [ 72, 63 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.neg_iff", "code": "@[simp]\nlemma neg_iff {f : 𝕜 → E} {x : 𝕜} :\n MeromorphicAt (-f) x ↔ MeromorphicAt f x :=\n ⟨fun h ↦ by simpa only [neg_neg] using h.neg, MeromorphicAt.neg⟩", "start": [ 74, 1 ], "end": [ 77, 67 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.sub", "code": "lemma sub {f g : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :\n MeromorphicAt (f - g) x := by\n convert hf.add hg.neg using 1\n ext1 z\n simp_rw [Pi.sub_apply, Pi.add_apply, Pi.neg_apply, sub_eq_add_neg]", "start": [ 79, 1 ], "end": [ 83, 69 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.congr", "code": "lemma congr {f g : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (hfg : f =ᶠ[𝓝[≠] x] g) :\n MeromorphicAt g x := by\n rcases hf with ⟨m, hf⟩\n refine ⟨m + 1, ?_⟩\n have : AnalyticAt 𝕜 (fun z ↦ z - x) x := (analyticAt_id 𝕜 x).sub analyticAt_const\n refine (this.smul hf).congr ?_\n rw [eventuallyEq_nhdsWithin_iff] at hfg\n filter_upwards [hfg] with z hz\n rcases eq_or_ne z x with rfl | hn\n · simp\n · rw [hz (Set.mem_compl_singleton_iff.mp hn), pow_succ', mul_smul]", "start": [ 85, 1 ], "end": [ 97, 69 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.inv", "code": "lemma inv {f : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) : MeromorphicAt f⁻¹ x := by\n rcases hf with ⟨m, hf⟩\n by_cases h_eq : (fun z ↦ (z - x) ^ m • f z) =ᶠ[𝓝 x] 0\n · refine (MeromorphicAt.const 0 x).congr ?_\n rw [eventuallyEq_nhdsWithin_iff]\n filter_upwards [h_eq] with z hfz hz\n rw [Pi.inv_apply, (smul_eq_zero_iff_right <| pow_ne_zero _ (sub_ne_zero.mpr hz)).mp hfz,\n inv_zero]\n · obtain ⟨n, g, hg_an, hg_ne, hg_eq⟩ := hf.exists_eventuallyEq_pow_smul_nonzero_iff.mpr h_eq\n have : AnalyticAt 𝕜 (fun z ↦ (z - x) ^ (m + 1)) x :=\n ((analyticAt_id 𝕜 x).sub analyticAt_const).pow _\n refine ⟨n + 1, (this.smul <| hg_an.inv hg_ne).congr ?_⟩\n filter_upwards [hg_eq, hg_an.continuousAt.eventually_ne hg_ne] with z hfg hg_ne'\n rcases eq_or_ne z x with rfl | hz_ne\n · simp only [sub_self, pow_succ, mul_zero, zero_smul]\n · simp_rw [smul_eq_mul] at hfg ⊢\n have aux1 : f z ≠ 0 := by\n have : (z - x) ^ n * g z ≠ 0 := mul_ne_zero (pow_ne_zero _ (sub_ne_zero.mpr hz_ne)) hg_ne'\n rw [← hfg, mul_ne_zero_iff] at this\n exact this.2\n field_simp [sub_ne_zero.mpr hz_ne]\n rw [pow_succ', mul_assoc, hfg]\n ring", "start": [ 99, 1 ], "end": [ 124, 11 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.inv_iff", "code": "@[simp]\nlemma inv_iff {f : 𝕜 → 𝕜} {x : 𝕜} :\n MeromorphicAt f⁻¹ x ↔ MeromorphicAt f x :=\n ⟨fun h ↦ by simpa only [inv_inv] using h.inv, MeromorphicAt.inv⟩", "start": [ 126, 1 ], "end": [ 129, 67 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.div", "code": "lemma div {f g : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :\n MeromorphicAt (f / g) x :=\n (div_eq_mul_inv f g).symm ▸ (hf.mul hg.inv)", "start": [ 131, 1 ], "end": [ 133, 46 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.pow", "code": "lemma pow {f : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) (n : ℕ) : MeromorphicAt (f ^ n) x := by\n induction' n with m hm\n · simpa only [Nat.zero_eq, pow_zero] using MeromorphicAt.const 1 x\n · simpa only [pow_succ] using hm.mul hf", "start": [ 135, 1 ], "end": [ 138, 42 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.zpow", "code": "lemma zpow {f : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) (n : ℤ) : MeromorphicAt (f ^ n) x := by\n induction' n with m m\n · simpa only [Int.ofNat_eq_coe, zpow_natCast] using hf.pow m\n · simpa only [zpow_negSucc, inv_iff] using hf.pow (m + 1)", "start": [ 140, 1 ], "end": [ 143, 60 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.order", "code": "noncomputable def order {f : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) : WithTop ℤ :=\n (hf.choose_spec.order.map (↑· : ℕ → ℤ)) - hf.choose", "start": [ 145, 1 ], "end": [ 148, 54 ], "kind": "commanddeclaration" }, { "full_name": "MeromorphicAt.order_eq_top_iff", "code": "lemma order_eq_top_iff {f : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) :\n hf.order = ⊤ ↔ ∀ᶠ z in 𝓝[≠] x, f z = 0 := by\n unfold order\n by_cases h : hf.choose_spec.order = ⊤\n · rw [h, WithTop.map_top, ← WithTop.coe_natCast,\n top_sub, eq_self, true_iff, eventually_nhdsWithin_iff]\n rw [AnalyticAt.order_eq_top_iff] at h\n filter_upwards [h] with z hf hz\n rwa [smul_eq_zero_iff_right <| pow_ne_zero _ (sub_ne_zero.mpr hz)] at hf\n · obtain ⟨m, hm⟩ := WithTop.ne_top_iff_exists.mp h\n rw [← hm, WithTop.map_coe, sub_eq_top_iff, eq_false_intro WithTop.coe_ne_top, false_or]\n simp only [WithTop.natCast_ne_top, false_iff]\n contrapose! h\n rw [AnalyticAt.order_eq_top_iff]\n rw [← hf.choose_spec.frequently_eq_iff_eventually_eq analyticAt_const]\n apply Eventually.frequently\n filter_upwards [h] with z hfz\n rw [hfz, smul_zero]", "start": [ 152, 1 ], "end": [ 169, 24 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.order_eq_int_iff", "code": "lemma order_eq_int_iff {f : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (n : ℤ) : hf.order = n ↔\n ∃ g : 𝕜 → E, AnalyticAt 𝕜 g x ∧ g x ≠ 0 ∧ ∀ᶠ z in 𝓝[≠] x, f z = (z - x) ^ n • g z := by\n unfold order\n by_cases h : hf.choose_spec.order = ⊤\n · rw [h, WithTop.map_top, ← WithTop.coe_natCast, top_sub,\n eq_false_intro WithTop.top_ne_coe, false_iff]\n rw [AnalyticAt.order_eq_top_iff] at h\n refine fun ⟨g, hg_an, hg_ne, hg_eq⟩ ↦ hg_ne ?_\n apply EventuallyEq.eq_of_nhds\n rw [EventuallyEq, ← AnalyticAt.frequently_eq_iff_eventually_eq hg_an analyticAt_const]\n apply Eventually.frequently\n rw [eventually_nhdsWithin_iff] at hg_eq ⊢\n filter_upwards [h, hg_eq] with z hfz hfz_eq hz\n rwa [hfz_eq hz, ← mul_smul, smul_eq_zero_iff_right] at hfz\n exact mul_ne_zero (pow_ne_zero _ (sub_ne_zero.mpr hz)) (zpow_ne_zero _ (sub_ne_zero.mpr hz))\n · obtain ⟨m, h⟩ := WithTop.ne_top_iff_exists.mp h\n rw [← h, WithTop.map_coe, ← WithTop.coe_natCast, ← coe_sub, WithTop.coe_inj]\n obtain ⟨g, hg_an, hg_ne, hg_eq⟩ := (AnalyticAt.order_eq_nat_iff _ _).mp h.symm\n replace hg_eq : ∀ᶠ (z : 𝕜) in 𝓝[≠] x, f z = (z - x) ^ (↑m - ↑hf.choose : ℤ) • g z := by\n rw [eventually_nhdsWithin_iff]\n filter_upwards [hg_eq] with z hg_eq hz\n rwa [← smul_right_inj <| zpow_ne_zero _ (sub_ne_zero.mpr hz), ← mul_smul,\n ← zpow_add₀ (sub_ne_zero.mpr hz), ← add_sub_assoc, add_sub_cancel_left, zpow_natCast,\n zpow_natCast]\n exact ⟨fun h ↦ ⟨g, hg_an, hg_ne, h ▸ hg_eq⟩,\n AnalyticAt.unique_eventuallyEq_zpow_smul_nonzero ⟨g, hg_an, hg_ne, hg_eq⟩⟩", "start": [ 171, 1 ], "end": [ 196, 81 ], "kind": "lemma" }, { "full_name": "AnalyticAt.meromorphicAt_order", "code": "lemma _root_.AnalyticAt.meromorphicAt_order {f : 𝕜 → E} {x : 𝕜} (hf : AnalyticAt 𝕜 f x) :\n hf.meromorphicAt.order = hf.order.map (↑) := by\n rcases eq_or_ne hf.order ⊤ with ho | ho\n · rw [ho, WithTop.map_top, order_eq_top_iff]\n exact (hf.order_eq_top_iff.mp ho).filter_mono nhdsWithin_le_nhds\n · obtain ⟨n, hn⟩ := WithTop.ne_top_iff_exists.mp ho\n simp_rw [← hn, WithTop.map_coe, order_eq_int_iff, zpow_natCast]\n rcases (hf.order_eq_nat_iff _).mp hn.symm with ⟨g, h1, h2, h3⟩\n exact ⟨g, h1, h2, h3.filter_mono nhdsWithin_le_nhds⟩", "start": [ 198, 1 ], "end": [ 207, 57 ], "kind": "lemma" }, { "full_name": "MeromorphicAt.iff_eventuallyEq_zpow_smul_analyticAt", "code": "lemma iff_eventuallyEq_zpow_smul_analyticAt {f : 𝕜 → E} {x : 𝕜} : MeromorphicAt f x ↔\n ∃ (n : ℤ) (g : 𝕜 → E), AnalyticAt 𝕜 g x ∧ ∀ᶠ z in 𝓝[≠] x, f z = (z - x) ^ n • g z := by\n refine ⟨fun ⟨n, hn⟩ ↦ ⟨-n, _, ⟨hn, eventually_nhdsWithin_iff.mpr ?_⟩⟩, ?_⟩\n · filter_upwards with z hz\n rw [← mul_smul, ← zpow_natCast, ← zpow_add₀ (sub_ne_zero.mpr hz), add_left_neg,\n zpow_zero, one_smul]\n · refine fun ⟨n, g, hg_an, hg_eq⟩ ↦ MeromorphicAt.congr ?_ (EventuallyEq.symm hg_eq)\n exact (((MeromorphicAt.id x).sub (.const _ x)).zpow _).smul hg_an.meromorphicAt", "start": [ 209, 1 ], "end": [ 216, 84 ], "kind": "lemma" }, { "full_name": "MeromorphicOn", "code": "def MeromorphicOn (f : 𝕜 → E) (U : Set 𝕜) : Prop := ∀ x ∈ U, MeromorphicAt f x", "start": [ 220, 1 ], "end": [ 221, 79 ], "kind": "commanddeclaration" }, { "full_name": "AnalyticOn.meromorphicOn", "code": "lemma AnalyticOn.meromorphicOn {f : 𝕜 → E} {U : Set 𝕜} (hf : AnalyticOn 𝕜 f U) :\n MeromorphicOn f U :=\n fun x hx ↦ (hf x hx).meromorphicAt", "start": [ 223, 1 ], "end": [ 225, 37 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.id", "code": "lemma id {U : Set 𝕜} : MeromorphicOn id U := fun x _ ↦ .id x", "start": [ 234, 1 ], "end": [ 234, 61 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.const", "code": "lemma const (e : E) {U : Set 𝕜} : MeromorphicOn (fun _ ↦ e) U :=\n fun x _ ↦ .const e x", "start": [ 236, 1 ], "end": [ 237, 23 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.mono_set", "code": "lemma mono_set {V : Set 𝕜} (hv : V ⊆ U) : MeromorphicOn f V := fun x hx ↦ hf x (hv hx)", "start": [ 241, 1 ], "end": [ 241, 87 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.add", "code": "lemma add : MeromorphicOn (f + g) U := fun x hx ↦ (hf x hx).add (hg x hx)", "start": [ 243, 1 ], "end": [ 243, 74 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.sub", "code": "lemma sub : MeromorphicOn (f - g) U := fun x hx ↦ (hf x hx).sub (hg x hx)", "start": [ 245, 1 ], "end": [ 245, 74 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.neg", "code": "lemma neg : MeromorphicOn (-f) U := fun x hx ↦ (hf x hx).neg", "start": [ 247, 1 ], "end": [ 247, 61 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.neg_iff", "code": "@[simp] lemma neg_iff : MeromorphicOn (-f) U ↔ MeromorphicOn f U :=\n ⟨fun h ↦ by simpa only [neg_neg] using h.neg, neg⟩", "start": [ 249, 1 ], "end": [ 250, 53 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.smul", "code": "lemma smul : MeromorphicOn (s • f) U := fun x hx ↦ (hs x hx).smul (hf x hx)", "start": [ 252, 1 ], "end": [ 252, 76 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.mul", "code": "lemma mul : MeromorphicOn (s * t) U := fun x hx ↦ (hs x hx).mul (ht x hx)", "start": [ 254, 1 ], "end": [ 254, 74 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.inv", "code": "lemma inv : MeromorphicOn s⁻¹ U := fun x hx ↦ (hs x hx).inv", "start": [ 256, 1 ], "end": [ 256, 60 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.inv_iff", "code": "@[simp] lemma inv_iff : MeromorphicOn s⁻¹ U ↔ MeromorphicOn s U :=\n ⟨fun h ↦ by simpa only [inv_inv] using h.inv, inv⟩", "start": [ 258, 1 ], "end": [ 259, 53 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.div", "code": "lemma div : MeromorphicOn (s / t) U := fun x hx ↦ (hs x hx).div (ht x hx)", "start": [ 261, 1 ], "end": [ 261, 74 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.pow", "code": "lemma pow (n : ℕ) : MeromorphicOn (s ^ n) U := fun x hx ↦ (hs x hx).pow _", "start": [ 263, 1 ], "end": [ 263, 74 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.zpow", "code": "lemma zpow (n : ℤ) : MeromorphicOn (s ^ n) U := fun x hx ↦ (hs x hx).zpow _", "start": [ 265, 1 ], "end": [ 265, 76 ], "kind": "lemma" }, { "full_name": "MeromorphicOn.congr", "code": "lemma congr (h_eq : Set.EqOn f g U) (hu : IsOpen U) : MeromorphicOn g U := by\n refine fun x hx ↦ (hf x hx).congr (EventuallyEq.filter_mono ?_ nhdsWithin_le_nhds)\n exact eventually_of_mem (hu.mem_nhds hx) h_eq", "start": [ 269, 1 ], "end": [ 271, 48 ], "kind": "lemma" } ]
Mathlib/Combinatorics/SetFamily/Kleitman.lean
[ "Mathlib/Combinatorics/SetFamily/Intersecting.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean" ]
[ { "full_name": "Finset.card_biUnion_le_of_intersecting", "code": "theorem Finset.card_biUnion_le_of_intersecting (s : Finset ι) (f : ι → Finset (Finset α))\n (hf : ∀ i ∈ s, (f i : Set (Finset α)).Intersecting) :\n (s.biUnion f).card ≤ 2 ^ Fintype.card α - 2 ^ (Fintype.card α - s.card)", "start": [ 35, 1 ], "end": [ 85, 68 ], "kind": "commanddeclaration" } ]
Mathlib/Order/PrimeSeparator.lean
[ "Mathlib/Order/PrimeIdeal.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Order/Zorn.lean" ]
[ { "full_name": "DistribLattice.mem_ideal_sup_principal", "code": "lemma mem_ideal_sup_principal (a b : α) (J : Ideal α) : b ∈ J ⊔ principal a ↔ ∃ j ∈ J, b ≤ j ⊔ a :=\n ⟨fun ⟨j, ⟨jJ, _, ha', bja'⟩⟩ => ⟨j, jJ, le_trans bja' (sup_le_sup_left ha' j)⟩,\n fun ⟨j, hj, hbja⟩ => ⟨j, hj, a, le_refl a, hbja⟩⟩", "start": [ 42, 1 ], "end": [ 44, 54 ], "kind": "lemma" }, { "full_name": "DistribLattice.prime_ideal_of_disjoint_filter_ideal", "code": "theorem prime_ideal_of_disjoint_filter_ideal (hFI : Disjoint (F : Set α) (I : Set α)) :\n ∃ J : Ideal α, (IsPrime J) ∧ I ≤ J ∧ Disjoint (F : Set α) J", "start": [ 46, 1 ], "end": [ 143, 35 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Sites/Types.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Sites/Canonical.lean" ]
[ { "full_name": "CategoryTheory.typesGrothendieckTopology", "code": "def typesGrothendieckTopology : GrothendieckTopology (Type u) where\n sieves α S := ∀ x : α, S fun _ : PUnit => x\n top_mem' _ _ := trivial\n pullback_stable' _ _ _ f hs x := hs (f x)\n transitive' _ _ hs _ hr x := hr (hs x) PUnit.unit", "start": [ 27, 1 ], "end": [ 33, 52 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.discreteSieve", "code": "@[simps]\ndef discreteSieve (α : Type u) : Sieve α where\n arrows _ f := ∃ x, ∀ y, f y = x\n downward_closed := fun ⟨x, hx⟩ g => ⟨x, fun y => hx <| g y⟩", "start": [ 36, 1 ], "end": [ 40, 62 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.discreteSieve_mem", "code": "theorem discreteSieve_mem (α : Type u) : discreteSieve α ∈ typesGrothendieckTopology α", "start": [ 43, 1 ], "end": [ 44, 29 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.discretePresieve", "code": "def discretePresieve (α : Type u) : Presieve α :=\n fun β _ => ∃ x : β, ∀ y : β, y = x", "start": [ 47, 1 ], "end": [ 49, 37 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.generate_discretePresieve_mem", "code": "theorem generate_discretePresieve_mem (α : Type u) :\n Sieve.generate (discretePresieve α) ∈ typesGrothendieckTopology α", "start": [ 52, 1 ], "end": [ 54, 86 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.isSheaf_yoneda'", "code": "theorem isSheaf_yoneda' {α : Type u} : IsSheaf typesGrothendieckTopology (yoneda.obj α)", "start": [ 59, 1 ], "end": [ 64, 79 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.yoneda'", "code": "@[simps]\ndef yoneda' : Type u ⥤ SheafOfTypes typesGrothendieckTopology where\n obj α := ⟨yoneda.obj α, isSheaf_yoneda'⟩\n map f := ⟨yoneda.map f⟩", "start": [ 67, 1 ], "end": [ 71, 26 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.yoneda'_comp", "code": "@[simp]\ntheorem yoneda'_comp : yoneda'.{u} ⋙ sheafOfTypesToPresheaf _ = yoneda", "start": [ 74, 1 ], "end": [ 76, 6 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.eval", "code": "def eval (P : Type uᵒᵖ ⥤ Type u) (α : Type u) (s : P.obj (op α)) (x : α) : P.obj (op PUnit) :=\n P.map (↾fun _ => x).op s", "start": [ 81, 1 ], "end": [ 84, 27 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.typesGlue", "code": "noncomputable def typesGlue (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S)\n (α : Type u) (f : α → S.obj (op PUnit)) : S.obj (op α) :=\n (hs.isSheafFor _ _ (generate_discretePresieve_mem α)).amalgamate\n (fun β g hg => S.map (↾fun _ => PUnit.unit).op <| f <| g <| Classical.choose hg)\n fun β γ δ g₁ g₂ f₁ f₂ hf₁ hf₂ h =>\n (hs.isSheafFor _ _ (generate_discretePresieve_mem δ)).isSeparatedFor.ext fun ε g ⟨x, _⟩ => by\n have : f₁ (Classical.choose hf₁) = f₂ (Classical.choose hf₂) :=\n Classical.choose_spec hf₁ (g₁ <| g x) ▸\n Classical.choose_spec hf₂ (g₂ <| g x) ▸ congr_fun h _\n simp_rw [← FunctorToTypes.map_comp_apply, this, ← op_comp]\n rfl", "start": [ 87, 1 ], "end": [ 99, 10 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.eval_typesGlue", "code": "theorem eval_typesGlue {S hs α} (f) : eval.{u} S α (typesGlue S hs α f) = f", "start": [ 102, 1 ], "end": [ 105, 42 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.typesGlue_eval", "code": "theorem typesGlue_eval {S hs α} (s) : typesGlue.{u} S hs α (eval S α s) = s", "start": [ 108, 1 ], "end": [ 117, 54 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.evalEquiv", "code": "@[simps]\nnoncomputable def evalEquiv (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S)\n (α : Type u) : S.obj (op α) ≃ (α → S.obj (op PUnit)) where\n toFun := eval S α\n invFun := typesGlue S hs α\n left_inv := typesGlue_eval\n right_inv := eval_typesGlue", "start": [ 120, 1 ], "end": [ 127, 30 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.eval_map", "code": "theorem eval_map (S : Type uᵒᵖ ⥤ Type u) (α β) (f : β ⟶ α) (s x) :\n eval S β (S.map f.op s) x = eval S α s (f x)", "start": [ 130, 1 ], "end": [ 132, 66 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.equivYoneda", "code": "@[simps!]\nnoncomputable def equivYoneda (S : Type uᵒᵖ ⥤ Type u) (hs : IsSheaf typesGrothendieckTopology S) :\n S ≅ yoneda.obj (S.obj (op PUnit)) :=\n NatIso.ofComponents (fun α => Equiv.toIso <| evalEquiv S hs <| unop α) fun {α β} f =>\n funext fun _ => funext fun _ => eval_map S (unop α) (unop β) f.unop _ _", "start": [ 135, 1 ], "end": [ 140, 76 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.equivYoneda'", "code": "@[simps]\nnoncomputable def equivYoneda' (S : SheafOfTypes typesGrothendieckTopology) :\n S ≅ yoneda'.obj (S.1.obj (op PUnit)) where\n hom := ⟨(equivYoneda S.1 S.2).hom⟩\n inv := ⟨(equivYoneda S.1 S.2).inv⟩\n hom_inv_id := by ext1; apply (equivYoneda S.1 S.2).hom_inv_id\n inv_hom_id := by ext1; apply (equivYoneda S.1 S.2).inv_hom_id", "start": [ 143, 1 ], "end": [ 150, 64 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.eval_app", "code": "theorem eval_app (S₁ S₂ : SheafOfTypes.{u} typesGrothendieckTopology) (f : S₁ ⟶ S₂) (α : Type u)\n (s : S₁.1.obj (op α)) (x : α) :\n eval S₂.1 α (f.val.app (op α) s) x = f.val.app (op PUnit) (eval S₁.1 α s x)", "start": [ 153, 1 ], "end": [ 156, 65 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.typeEquiv", "code": "@[simps!]\nnoncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology :=\n Equivalence.mk yoneda' (sheafOfTypesToPresheaf _ ⋙ (evaluation _ _).obj (op PUnit))\n (NatIso.ofComponents\n (fun _α => { hom := fun x _ => x\n inv := fun f => f PUnit.unit\n hom_inv_id := funext fun _ => rfl\n inv_hom_id := funext fun _ => funext fun y => PUnit.casesOn y rfl })\n fun _ => rfl)\n (Iso.symm <|\n NatIso.ofComponents (fun S => equivYoneda' S) fun {S₁ S₂} f =>\n SheafOfTypes.Hom.ext _ _ <|\n NatTrans.ext _ _ <|\n funext fun α => funext fun s => funext fun x => eval_app S₁ S₂ f (unop α) s x)", "start": [ 159, 1 ], "end": [ 175, 91 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.subcanonical_typesGrothendieckTopology", "code": "theorem subcanonical_typesGrothendieckTopology : Sheaf.Subcanonical typesGrothendieckTopology.{u}", "start": [ 178, 1 ], "end": [ 179, 66 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.typesGrothendieckTopology_eq_canonical", "code": "theorem typesGrothendieckTopology_eq_canonical :\n typesGrothendieckTopology.{u} = Sheaf.canonicalTopology (Type u)", "start": [ 182, 1 ], "end": [ 193, 37 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Real/ENatENNReal.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/ENat/Basic.lean", "Mathlib/Data/ENNReal/Basic.lean" ]
[ { "full_name": "ENat.toENNReal", "code": "@[coe] def toENNReal : ℕ∞ → ℝ≥0∞ := WithTop.map Nat.cast", "start": [ 27, 1 ], "end": [ 28, 57 ], "kind": "commanddeclaration" }, { "full_name": "ENat.hasCoeENNReal", "code": "instance hasCoeENNReal : CoeTC ℕ∞ ℝ≥0∞ := ⟨toENNReal⟩", "start": [ 30, 1 ], "end": [ 30, 54 ], "kind": "commanddeclaration" }, { "full_name": "ENat.map_coe_nnreal", "code": "@[simp]\ntheorem map_coe_nnreal : WithTop.map ((↑) : ℕ → ℝ≥0) = ((↑) : ℕ∞ → ℝ≥0∞)", "start": [ 33, 1 ], "end": [ 35, 6 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNRealOrderEmbedding", "code": "@[simps! (config := .asFn)]\ndef toENNRealOrderEmbedding : ℕ∞ ↪o ℝ≥0∞ :=\n Nat.castOrderEmbedding.withTopMap", "start": [ 38, 1 ], "end": [ 41, 36 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNRealRingHom", "code": "@[simps! (config := .asFn)]\ndef toENNRealRingHom : ℕ∞ →+* ℝ≥0∞ :=\n .withTopMap (Nat.castRingHom ℝ≥0) Nat.cast_injective", "start": [ 44, 1 ], "end": [ 47, 55 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_top", "code": "@[simp, norm_cast]\ntheorem toENNReal_top : ((⊤ : ℕ∞) : ℝ≥0∞) = ⊤", "start": [ 50, 1 ], "end": [ 52, 6 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_coe", "code": "@[simp, norm_cast]\ntheorem toENNReal_coe (n : ℕ) : ((n : ℕ∞) : ℝ≥0∞) = n", "start": [ 55, 1 ], "end": [ 57, 6 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_ofNat", "code": "@[simp, norm_cast]\ntheorem toENNReal_ofNat (n : ℕ) [n.AtLeastTwo] :\n ((no_index (OfNat.ofNat n : ℕ∞)) : ℝ≥0∞) = OfNat.ofNat n", "start": [ 61, 1 ], "end": [ 64, 6 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_le", "code": "@[simp, norm_cast]\ntheorem toENNReal_le : (m : ℝ≥0∞) ≤ n ↔ m ≤ n", "start": [ 66, 1 ], "end": [ 68, 36 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_lt", "code": "@[simp, norm_cast]\ntheorem toENNReal_lt : (m : ℝ≥0∞) < n ↔ m < n", "start": [ 71, 1 ], "end": [ 73, 36 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_mono", "code": "@[mono]\ntheorem toENNReal_mono : Monotone ((↑) : ℕ∞ → ℝ≥0∞)", "start": [ 76, 1 ], "end": [ 78, 35 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_strictMono", "code": "@[mono]\ntheorem toENNReal_strictMono : StrictMono ((↑) : ℕ∞ → ℝ≥0∞)", "start": [ 81, 1 ], "end": [ 83, 37 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_zero", "code": "@[simp, norm_cast]\ntheorem toENNReal_zero : ((0 : ℕ∞) : ℝ≥0∞) = 0", "start": [ 86, 1 ], "end": [ 88, 28 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_add", "code": "@[simp]\ntheorem toENNReal_add (m n : ℕ∞) : ↑(m + n) = (m + n : ℝ≥0∞)", "start": [ 91, 1 ], "end": [ 93, 31 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_one", "code": "@[simp]\ntheorem toENNReal_one : ((1 : ℕ∞) : ℝ≥0∞) = 1", "start": [ 96, 1 ], "end": [ 98, 27 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_mul", "code": "@[simp]\ntheorem toENNReal_mul (m n : ℕ∞) : ↑(m * n) = (m * n : ℝ≥0∞)", "start": [ 104, 1 ], "end": [ 106, 31 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_min", "code": "@[simp]\ntheorem toENNReal_min (m n : ℕ∞) : ↑(min m n) = (min m n : ℝ≥0∞)", "start": [ 109, 1 ], "end": [ 111, 25 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_max", "code": "@[simp]\ntheorem toENNReal_max (m n : ℕ∞) : ↑(max m n) = (max m n : ℝ≥0∞)", "start": [ 114, 1 ], "end": [ 116, 25 ], "kind": "commanddeclaration" }, { "full_name": "ENat.toENNReal_sub", "code": "@[simp]\ntheorem toENNReal_sub (m n : ℕ∞) : ↑(m - n) = (m - n : ℝ≥0∞)", "start": [ 119, 1 ], "end": [ 121, 50 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/AlgebraCat/Symmetric.lean
[ "Mathlib/Algebra/Category/AlgebraCat/Monoidal.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean" ]
[ { "full_name": "AlgebraCat.toModuleCatBraidedFunctor", "code": "@[simps toMonoidalFunctor]\ndef toModuleCatBraidedFunctor : BraidedFunctor (AlgebraCat.{u} R) (ModuleCat.{u} R) where\n toMonoidalFunctor := toModuleCatMonoidalFunctor R", "start": [ 33, 1 ], "end": [ 36, 52 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.instSymmetricCategory", "code": "instance instSymmetricCategory : SymmetricCategory (AlgebraCat.{u} R) :=\n symmetricCategoryOfFaithful (toModuleCatBraidedFunctor R)", "start": [ 41, 1 ], "end": [ 42, 60 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Limits/Fubini.lean
[ "Mathlib/CategoryTheory/Products/Basic.lean", "Mathlib/CategoryTheory/Limits/HasLimits.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Products/Bifunctor.lean", "Mathlib/CategoryTheory/Functor/Currying.lean" ]
[ { "full_name": "CategoryTheory.Limits.DiagramOfCones", "code": "structure DiagramOfCones where\n \n obj : ∀ j : J, Cone (F.obj j)\n \n map : ∀ {j j' : J} (f : j ⟶ j'), (Cones.postcompose (F.map f)).obj (obj j) ⟶ obj j'\n id : ∀ j : J, (map (𝟙 j)).hom = 𝟙 _ := by aesop_cat\n comp : ∀ {j₁ j₂ j₃ : J} (f : j₁ ⟶ j₂) (g : j₂ ⟶ j₃),\n (map (f ≫ g)).hom = (map f).hom ≫ (map g).hom := by aesop_cat", "start": [ 51, 1 ], "end": [ 60, 66 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.DiagramOfCocones", "code": "structure DiagramOfCocones where\n \n obj : ∀ j : J, Cocone (F.obj j)\n \n map : ∀ {j j' : J} (f : j ⟶ j'), (obj j) ⟶ (Cocones.precompose (F.map f)).obj (obj j')\n id : ∀ j : J, (map (𝟙 j)).hom = 𝟙 _ := by aesop_cat\n comp : ∀ {j₁ j₂ j₃ : J} (f : j₁ ⟶ j₂) (g : j₂ ⟶ j₃),\n (map (f ≫ g)).hom = (map f).hom ≫ (map g).hom := by aesop_cat", "start": [ 63, 1 ], "end": [ 72, 66 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.DiagramOfCones.conePoints", "code": "@[simps]\ndef DiagramOfCones.conePoints (D : DiagramOfCones F) : J ⥤ C where\n obj j := (D.obj j).pt\n map f := (D.map f).hom\n map_id j := D.id j\n map_comp f g := D.comp f g", "start": [ 76, 1 ], "end": [ 84, 29 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.DiagramOfCocones.coconePoints", "code": "@[simps]\ndef DiagramOfCocones.coconePoints (D : DiagramOfCocones F) : J ⥤ C where\n obj j := (D.obj j).pt\n map f := (D.map f).hom\n map_id j := D.id j\n map_comp f g := D.comp f g", "start": [ 87, 1 ], "end": [ 95, 29 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.coneOfConeUncurry", "code": "@[simps]\ndef coneOfConeUncurry {D : DiagramOfCones F} (Q : ∀ j, IsLimit (D.obj j))\n (c : Cone (uncurry.obj F)) : Cone D.conePoints where\n pt := c.pt\n π :=\n { app := fun j =>\n (Q j).lift\n { pt := c.pt\n π :=\n { app := fun k => c.π.app (j, k)\n naturality := fun k k' f => by\n dsimp; simp only [Category.id_comp]\n have := @NatTrans.naturality _ _ _ _ _ _ c.π (j, k) (j, k') (𝟙 j, f)\n dsimp at this\n simp? at this says\n simp only [Category.id_comp, Functor.map_id, NatTrans.id_app] at this\n exact this } }\n naturality := fun j j' f =>\n (Q j').hom_ext\n (by\n dsimp\n intro k\n simp only [Limits.ConeMorphism.w, Limits.Cones.postcompose_obj_π,\n Limits.IsLimit.fac_assoc, Limits.IsLimit.fac, NatTrans.comp_app, Category.id_comp,\n Category.assoc]\n have := @NatTrans.naturality _ _ _ _ _ _ c.π (j, k) (j', k) (f, 𝟙 k)\n dsimp at this\n simp only [Category.id_comp, Category.comp_id, CategoryTheory.Functor.map_id,\n NatTrans.id_app] at this\n exact this) }", "start": [ 97, 1 ], "end": [ 129, 26 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.coconeOfCoconeUncurry", "code": "@[simps]\ndef coconeOfCoconeUncurry {D : DiagramOfCocones F} (Q : ∀ j, IsColimit (D.obj j))\n (c : Cocone (uncurry.obj F)) : Cocone D.coconePoints where\n pt := c.pt\n ι :=\n { app := fun j =>\n (Q j).desc\n { pt := c.pt\n ι :=\n { app := fun k => c.ι.app (j, k)\n naturality := fun k k' f => by\n dsimp; simp only [Category.comp_id]\n conv_lhs =>\n arg 1; equals (F.map (𝟙 _)).app _ ≫ (F.obj j).map f =>\n simp;\n conv_lhs => arg 1; rw [← uncurry_obj_map F ((𝟙 j,f) : (j,k) ⟶ (j,k'))]\n rw [c.w] } }\n naturality := fun j j' f =>\n (Q j).hom_ext\n (by\n dsimp\n intro k\n simp only [Limits.CoconeMorphism.w_assoc, Limits.Cocones.precompose_obj_ι,\n Limits.IsColimit.fac_assoc, Limits.IsColimit.fac, NatTrans.comp_app, Category.comp_id,\n Category.assoc]\n have := @NatTrans.naturality _ _ _ _ _ _ c.ι (j, k) (j', k) (f, 𝟙 k)\n dsimp at this\n simp only [Category.id_comp, Category.comp_id, CategoryTheory.Functor.map_id,\n NatTrans.id_app] at this\n exact this) }", "start": [ 132, 1 ], "end": [ 164, 26 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.coneOfConeUncurryIsLimit", "code": "def coneOfConeUncurryIsLimit {D : DiagramOfCones F} (Q : ∀ j, IsLimit (D.obj j))\n {c : Cone (uncurry.obj F)} (P : IsLimit c) : IsLimit (coneOfConeUncurry Q c) where\n lift s :=\n P.lift\n { pt := s.pt\n π :=\n { app := fun p => s.π.app p.1 ≫ (D.obj p.1).π.app p.2\n naturality := fun p p' f => by\n dsimp; simp only [Category.id_comp, Category.assoc]\n rcases p with ⟨j, k⟩\n rcases p' with ⟨j', k'⟩\n rcases f with ⟨fj, fk⟩\n dsimp\n slice_rhs 3 4 => rw [← NatTrans.naturality]\n slice_rhs 2 3 => rw [← (D.obj j).π.naturality]\n simp only [Functor.const_obj_map, Category.id_comp, Category.assoc]\n have w := (D.map fj).w k'\n dsimp at w\n rw [← w]\n have n := s.π.naturality fj\n dsimp at n\n simp only [Category.id_comp] at n\n rw [n]\n simp } }\n fac s j := by\n apply (Q j).hom_ext\n intro k\n simp\n uniq s m w := by\n refine P.uniq\n { pt := s.pt\n π := _ } m ?_\n rintro ⟨j, k⟩\n dsimp\n rw [← w j]\n simp", "start": [ 166, 1 ], "end": [ 203, 9 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.coconeOfCoconeUncurryIsColimit", "code": "def coconeOfCoconeUncurryIsColimit {D : DiagramOfCocones F} (Q : ∀ j, IsColimit (D.obj j))\n {c : Cocone (uncurry.obj F)} (P : IsColimit c) : IsColimit (coconeOfCoconeUncurry Q c) where\n desc s :=\n P.desc\n { pt := s.pt\n ι :=\n { app := fun p => (D.obj p.1).ι.app p.2 ≫ s.ι.app p.1\n naturality := fun p p' f => by\n dsimp; simp only [Category.id_comp, Category.assoc]\n rcases p with ⟨j, k⟩\n rcases p' with ⟨j', k'⟩\n rcases f with ⟨fj, fk⟩\n dsimp\n slice_lhs 2 3 => rw [(D.obj j').ι.naturality]\n simp only [Functor.const_obj_map, Category.id_comp, Category.assoc]\n have w := (D.map fj).w k\n dsimp at w\n slice_lhs 1 2 => rw [← w]\n have n := s.ι.naturality fj\n dsimp at n\n simp only [Category.comp_id] at n\n rw [← n]\n simp } }\n fac s j := by\n apply (Q j).hom_ext\n intro k\n simp\n uniq s m w := by\n refine P.uniq\n { pt := s.pt\n ι := _ } m ?_\n rintro ⟨j, k⟩\n dsimp\n rw [← w j]\n simp", "start": [ 206, 1 ], "end": [ 242, 9 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.DiagramOfCones.mkOfHasLimits", "code": "@[simps]\nnoncomputable def DiagramOfCones.mkOfHasLimits : DiagramOfCones F where\n obj j := limit.cone (F.obj j)\n map f := { hom := lim.map (F.map f) }", "start": [ 249, 1 ], "end": [ 256, 40 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.diagramOfConesInhabited", "code": "noncomputable instance diagramOfConesInhabited : Inhabited (DiagramOfCones F) :=\n ⟨DiagramOfCones.mkOfHasLimits F⟩", "start": [ 260, 1 ], "end": [ 261, 35 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.DiagramOfCones.mkOfHasLimits_conePoints", "code": "@[simp]\ntheorem DiagramOfCones.mkOfHasLimits_conePoints :\n (DiagramOfCones.mkOfHasLimits F).conePoints = F ⋙ lim", "start": [ 264, 1 ], "end": [ 267, 6 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitUncurryIsoLimitCompLim", "code": "noncomputable def limitUncurryIsoLimitCompLim : limit (uncurry.obj F) ≅ limit (F ⋙ lim) := by\n let c := limit.cone (uncurry.obj F)\n let P : IsLimit c := limit.isLimit _\n let G := DiagramOfCones.mkOfHasLimits F\n let Q : ∀ j, IsLimit (G.obj j) := fun j => limit.isLimit _\n have Q' := coneOfConeUncurryIsLimit Q P\n have Q'' := limit.isLimit (F ⋙ lim)\n exact IsLimit.conePointUniqueUpToIso Q' Q''", "start": [ 273, 1 ], "end": [ 284, 46 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitUncurryIsoLimitCompLim_hom_π_π", "code": "@[simp, reassoc]\ntheorem limitUncurryIsoLimitCompLim_hom_π_π {j} {k} :\n (limitUncurryIsoLimitCompLim F).hom ≫ limit.π _ j ≫ limit.π _ k = limit.π _ (j, k)", "start": [ 287, 1 ], "end": [ 291, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitUncurryIsoLimitCompLim_inv_π", "code": "@[simp, reassoc]\ntheorem limitUncurryIsoLimitCompLim_inv_π {j} {k} :\n (limitUncurryIsoLimitCompLim F).inv ≫ limit.π _ (j, k) =\n (limit.π _ j ≫ limit.π _ k : limit (_ ⋙ lim) ⟶ _)", "start": [ 295, 1 ], "end": [ 300, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.DiagramOfCocones.mkOfHasColimits", "code": "@[simps]\nnoncomputable def DiagramOfCocones.mkOfHasColimits : DiagramOfCocones F where\n obj j := colimit.cocone (F.obj j)\n map f := { hom := colim.map (F.map f) }", "start": [ 310, 1 ], "end": [ 317, 42 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.diagramOfCoconesInhabited", "code": "noncomputable instance diagramOfCoconesInhabited : Inhabited (DiagramOfCocones F) :=\n ⟨DiagramOfCocones.mkOfHasColimits F⟩", "start": [ 320, 1 ], "end": [ 321, 39 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.DiagramOfCocones.mkOfHasColimits_coconePoints", "code": "@[simp]\ntheorem DiagramOfCocones.mkOfHasColimits_coconePoints :\n (DiagramOfCocones.mkOfHasColimits F).coconePoints = F ⋙ colim", "start": [ 323, 1 ], "end": [ 326, 6 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitUncurryIsoColimitCompColim", "code": "noncomputable def colimitUncurryIsoColimitCompColim :\n colimit (uncurry.obj F) ≅ colimit (F ⋙ colim) := by\n let c := colimit.cocone (uncurry.obj F)\n let P : IsColimit c := colimit.isColimit _\n let G := DiagramOfCocones.mkOfHasColimits F\n let Q : ∀ j, IsColimit (G.obj j) := fun j => colimit.isColimit _\n have Q' := coconeOfCoconeUncurryIsColimit Q P\n have Q'' := colimit.isColimit (F ⋙ colim)\n exact IsColimit.coconePointUniqueUpToIso Q' Q''", "start": [ 331, 1 ], "end": [ 343, 50 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitUncurryIsoColimitCompColim_ι_ι_inv", "code": "@[simp, reassoc]\ntheorem colimitUncurryIsoColimitCompColim_ι_ι_inv {j} {k} :\n colimit.ι (F.obj j) k ≫ colimit.ι (F ⋙ colim) j ≫ (colimitUncurryIsoColimitCompColim F).inv =\n colimit.ι (uncurry.obj F) (j, k)", "start": [ 345, 1 ], "end": [ 351, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitUncurryIsoColimitCompColim_ι_hom", "code": "@[simp, reassoc]\ntheorem colimitUncurryIsoColimitCompColim_ι_hom {j} {k} :\n colimit.ι _ (j, k) ≫ (colimitUncurryIsoColimitCompColim F).hom =\n (colimit.ι _ k ≫ colimit.ι (F ⋙ colim) j : _ ⟶ (colimit (F ⋙ colim)))", "start": [ 353, 1 ], "end": [ 358, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitFlipCompLimIsoLimitCompLim", "code": "noncomputable def limitFlipCompLimIsoLimitCompLim : limit (F.flip ⋙ lim) ≅ limit (F ⋙ lim) :=\n (limitUncurryIsoLimitCompLim _).symm ≪≫\n HasLimit.isoOfNatIso (uncurryObjFlip _) ≪≫\n HasLimit.isoOfEquivalence (Prod.braiding _ _)\n (NatIso.ofComponents fun _ => by rfl) ≪≫\n limitUncurryIsoLimitCompLim _", "start": [ 369, 1 ], "end": [ 375, 38 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitFlipCompLimIsoLimitCompLim_hom_π_π", "code": "@[simp, reassoc]\ntheorem limitFlipCompLimIsoLimitCompLim_hom_π_π (j) (k) :\n (limitFlipCompLimIsoLimitCompLim F).hom ≫ limit.π _ j ≫ limit.π _ k =\n (limit.π _ k ≫ limit.π _ j : limit (_ ⋙ lim) ⟶ _)", "start": [ 379, 1 ], "end": [ 384, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitFlipCompLimIsoLimitCompLim_inv_π_π", "code": "@[simp, reassoc]\ntheorem limitFlipCompLimIsoLimitCompLim_inv_π_π (k) (j) :\n (limitFlipCompLimIsoLimitCompLim F).inv ≫ limit.π _ k ≫ limit.π _ j =\n (limit.π _ j ≫ limit.π _ k : limit (_ ⋙ lim) ⟶ _)", "start": [ 389, 1 ], "end": [ 394, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitFlipCompColimIsoColimitCompColim", "code": "noncomputable def colimitFlipCompColimIsoColimitCompColim :\n colimit (F.flip ⋙ colim) ≅ colimit (F ⋙ colim) :=\n (colimitUncurryIsoColimitCompColim _).symm ≪≫\n HasColimit.isoOfNatIso (uncurryObjFlip _) ≪≫\n HasColimit.isoOfEquivalence (Prod.braiding _ _)\n (NatIso.ofComponents fun _ => by rfl) ≪≫\n colimitUncurryIsoColimitCompColim _", "start": [ 404, 1 ], "end": [ 411, 44 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitFlipCompColimIsoColimitCompColim_ι_ι_hom", "code": "@[simp, reassoc]\ntheorem colimitFlipCompColimIsoColimitCompColim_ι_ι_hom (j) (k) :\n colimit.ι (F.flip.obj k) j ≫ colimit.ι (F.flip ⋙ colim) k ≫\n (colimitFlipCompColimIsoColimitCompColim F).hom =\n (colimit.ι _ k ≫ colimit.ι (F ⋙ colim) j : _ ⟶ colimit (F⋙ colim))", "start": [ 413, 1 ], "end": [ 420, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitFlipCompColimIsoColimitCompColim_ι_ι_inv", "code": "@[simp, reassoc]\ntheorem colimitFlipCompColimIsoColimitCompColim_ι_ι_inv (k) (j) :\n colimit.ι (F.obj j) k ≫ colimit.ι (F ⋙ colim) j ≫\n (colimitFlipCompColimIsoColimitCompColim F).inv =\n (colimit.ι _ j ≫ colimit.ι (F.flip ⋙ colim) k : _ ⟶ colimit (F.flip ⋙ colim))", "start": [ 422, 1 ], "end": [ 429, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitIsoLimitCurryCompLim", "code": "noncomputable def limitIsoLimitCurryCompLim : limit G ≅ limit (curry.obj G ⋙ lim) := by\n have i : G ≅ uncurry.obj ((@curry J _ K _ C _).obj G) := currying.symm.unitIso.app G\n haveI : Limits.HasLimit (uncurry.obj ((@curry J _ K _ C _).obj G)) := hasLimitOfIso i\n trans limit (uncurry.obj ((@curry J _ K _ C _).obj G))\n · apply HasLimit.isoOfNatIso i\n · exact limitUncurryIsoLimitCompLim ((@curry J _ K _ C _).obj G)", "start": [ 441, 1 ], "end": [ 450, 67 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitIsoLimitCurryCompLim_hom_π_π", "code": "@[simp, reassoc]\ntheorem limitIsoLimitCurryCompLim_hom_π_π {j} {k} :\n (limitIsoLimitCurryCompLim G).hom ≫ limit.π _ j ≫ limit.π _ k = limit.π _ (j, k)", "start": [ 453, 1 ], "end": [ 457, 100 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitIsoLimitCurryCompLim_inv_π", "code": "@[simp, reassoc]\ntheorem limitIsoLimitCurryCompLim_inv_π {j} {k} :\n (limitIsoLimitCurryCompLim G).inv ≫ limit.π _ (j, k) =\n (limit.π _ j ≫ limit.π _ k : limit (_ ⋙ lim) ⟶ _)", "start": [ 461, 1 ], "end": [ 466, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitIsoColimitCurryCompColim", "code": "noncomputable def colimitIsoColimitCurryCompColim : colimit G ≅ colimit (curry.obj G ⋙ colim) := by\n have i : G ≅ uncurry.obj ((@curry J _ K _ C _).obj G) := currying.symm.unitIso.app G\n haveI : Limits.HasColimit (uncurry.obj ((@curry J _ K _ C _).obj G)) := hasColimitOfIso i.symm\n trans colimit (uncurry.obj ((@curry J _ K _ C _).obj G))\n · apply HasColimit.isoOfNatIso i\n · exact colimitUncurryIsoColimitCompColim ((@curry J _ K _ C _).obj G)", "start": [ 477, 1 ], "end": [ 486, 73 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitIsoColimitCurryCompColim_ι_ι_inv", "code": "@[simp, reassoc]\ntheorem colimitIsoColimitCurryCompColim_ι_ι_inv {j} {k} :\n colimit.ι ((curry.obj G).obj j) k ≫ colimit.ι (curry.obj G ⋙ colim) j ≫\n (colimitIsoColimitCurryCompColim G).inv = colimit.ι _ (j, k)", "start": [ 488, 1 ], "end": [ 494, 39 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitIsoColimitCurryCompColim_ι_hom", "code": "@[simp, reassoc]\ntheorem colimitIsoColimitCurryCompColim_ι_hom {j} {k} :\n colimit.ι _ (j, k) ≫ (colimitIsoColimitCurryCompColim G).hom =\n (colimit.ι (_) k ≫ colimit.ι (curry.obj G ⋙ colim) j : _ ⟶ colimit (_ ⋙ colim))", "start": [ 496, 1 ], "end": [ 501, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitCurrySwapCompLimIsoLimitCurryCompLim", "code": "noncomputable def limitCurrySwapCompLimIsoLimitCurryCompLim :\n limit (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) ≅ limit (curry.obj G ⋙ lim) :=\n calc\n limit (curry.obj (Prod.swap K J ⋙ G) ⋙ lim) ≅ limit (Prod.swap K J ⋙ G) :=\n (limitIsoLimitCurryCompLim _).symm\n _ ≅ limit G := HasLimit.isoOfEquivalence (Prod.braiding K J) (Iso.refl _)\n _ ≅ limit (curry.obj G ⋙ lim) := limitIsoLimitCurryCompLim _", "start": [ 512, 1 ], "end": [ 521, 65 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitCurrySwapCompLimIsoLimitCurryCompLim_hom_π_π", "code": "@[simp]\ntheorem limitCurrySwapCompLimIsoLimitCurryCompLim_hom_π_π {j} {k} :\n (limitCurrySwapCompLimIsoLimitCurryCompLim G).hom ≫ limit.π _ j ≫ limit.π _ k =\n (limit.π _ k ≫ limit.π _ j : limit (_ ⋙ lim) ⟶ _)", "start": [ 525, 1 ], "end": [ 538, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.limitCurrySwapCompLimIsoLimitCurryCompLim_inv_π_π", "code": "@[simp]\ntheorem limitCurrySwapCompLimIsoLimitCurryCompLim_inv_π_π {j} {k} :\n (limitCurrySwapCompLimIsoLimitCurryCompLim G).inv ≫ limit.π _ k ≫ limit.π _ j =\n (limit.π _ j ≫ limit.π _ k : limit (_ ⋙ lim) ⟶ _)", "start": [ 543, 1 ], "end": [ 552, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitCurrySwapCompColimIsoColimitCurryCompColim", "code": "noncomputable def colimitCurrySwapCompColimIsoColimitCurryCompColim :\n colimit (curry.obj (Prod.swap K J ⋙ G) ⋙ colim) ≅ colimit (curry.obj G ⋙ colim) :=\n calc\n colimit (curry.obj (Prod.swap K J ⋙ G) ⋙ colim) ≅ colimit (Prod.swap K J ⋙ G) :=\n (colimitIsoColimitCurryCompColim _).symm\n _ ≅ colimit G := HasColimit.isoOfEquivalence (Prod.braiding K J) (Iso.refl _)\n _ ≅ colimit (curry.obj G ⋙ colim) := colimitIsoColimitCurryCompColim _", "start": [ 563, 1 ], "end": [ 572, 75 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitCurrySwapCompColimIsoColimitCurryCompColim_ι_ι_hom", "code": "@[simp]\ntheorem colimitCurrySwapCompColimIsoColimitCurryCompColim_ι_ι_hom {j} {k} :\n colimit.ι _ j ≫ colimit.ι (curry.obj (Prod.swap K J ⋙ G) ⋙ colim) k ≫\n (colimitCurrySwapCompColimIsoColimitCurryCompColim G).hom =\n (colimit.ι _ k ≫ colimit.ι (curry.obj G ⋙ colim) j : _ ⟶ colimit (curry.obj G⋙ colim))", "start": [ 574, 1 ], "end": [ 581, 7 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.colimitCurrySwapCompColimIsoColimitCurryCompColim_ι_ι_inv", "code": "@[simp]\ntheorem colimitCurrySwapCompColimIsoColimitCurryCompColim_ι_ι_inv {j} {k} :\n colimit.ι _ k ≫ colimit.ι (curry.obj G ⋙ colim) j ≫\n (colimitCurrySwapCompColimIsoColimitCurryCompColim G).inv =\n (colimit.ι _ j ≫\n colimit.ι (curry.obj _ ⋙ colim) k :\n _ ⟶ colimit (curry.obj (Prod.swap K J ⋙ G) ⋙ colim))", "start": [ 583, 1 ], "end": [ 597, 7 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Fin/Tuple/NatAntidiagonal.lean
[ "Mathlib/Logic/Equiv/Fin.lean", "Mathlib/Data/Fin/VecNotation.lean", "Mathlib/Algebra/BigOperators/Fin.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Finset/NatAntidiagonal.lean" ]
[ { "full_name": "List.Nat.antidiagonalTuple", "code": "def antidiagonalTuple : ∀ k, ℕ → List (Fin k → ℕ)\n | 0, 0 => [![]]\n | 0, _ + 1 => []\n | k + 1, n =>\n (List.Nat.antidiagonal n).bind fun ni =>\n (antidiagonalTuple k ni.2).map fun x => Fin.cons ni.1 x", "start": [ 50, 1 ], "end": [ 66, 62 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.antidiagonalTuple_zero_zero", "code": "@[simp]\ntheorem antidiagonalTuple_zero_zero : antidiagonalTuple 0 0 = [![]]", "start": [ 69, 1 ], "end": [ 71, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.antidiagonalTuple_zero_succ", "code": "@[simp]\ntheorem antidiagonalTuple_zero_succ (n : ℕ) : antidiagonalTuple 0 (n + 1) = []", "start": [ 74, 1 ], "end": [ 76, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.mem_antidiagonalTuple", "code": "theorem mem_antidiagonalTuple {n : ℕ} {k : ℕ} {x : Fin k → ℕ} :\n x ∈ antidiagonalTuple k n ↔ ∑ i, x i = n", "start": [ 79, 1 ], "end": [ 90, 61 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.nodup_antidiagonalTuple", "code": "theorem nodup_antidiagonalTuple (k n : ℕ) : List.Nodup (antidiagonalTuple k n)", "start": [ 93, 1 ], "end": [ 117, 70 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.antidiagonalTuple_zero_right", "code": "theorem antidiagonalTuple_zero_right : ∀ k, antidiagonalTuple k 0 = [0]", "start": [ 120, 1 ], "end": [ 125, 57 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.antidiagonalTuple_one", "code": "@[simp]\ntheorem antidiagonalTuple_one (n : ℕ) : antidiagonalTuple 1 n = [![n]]", "start": [ 128, 1 ], "end": [ 137, 68 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.antidiagonalTuple_two", "code": "theorem antidiagonalTuple_two (n : ℕ) :\n antidiagonalTuple 2 n = (antidiagonal n).map fun i => ![i.1, i.2]", "start": [ 140, 1 ], "end": [ 145, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.Nat.antidiagonalTuple_pairwise_pi_lex", "code": "theorem antidiagonalTuple_pairwise_pi_lex :\n ∀ k n, (antidiagonalTuple k n).Pairwise (Pi.Lex (· < ·) @fun _ => (· < ·))", "start": [ 148, 1 ], "end": [ 169, 17 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.antidiagonalTuple", "code": "def antidiagonalTuple (k n : ℕ) : Multiset (Fin k → ℕ) :=\n List.Nat.antidiagonalTuple k n", "start": [ 179, 1 ], "end": [ 181, 33 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.antidiagonalTuple_zero_zero", "code": "@[simp]\ntheorem antidiagonalTuple_zero_zero : antidiagonalTuple 0 0 = {![]}", "start": [ 184, 1 ], "end": [ 186, 6 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.antidiagonalTuple_zero_succ", "code": "@[simp]\ntheorem antidiagonalTuple_zero_succ (n : ℕ) : antidiagonalTuple 0 n.succ = 0", "start": [ 189, 1 ], "end": [ 191, 6 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.mem_antidiagonalTuple", "code": "theorem mem_antidiagonalTuple {n : ℕ} {k : ℕ} {x : Fin k → ℕ} :\n x ∈ antidiagonalTuple k n ↔ ∑ i, x i = n", "start": [ 194, 1 ], "end": [ 196, 33 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.nodup_antidiagonalTuple", "code": "theorem nodup_antidiagonalTuple (k n : ℕ) : (antidiagonalTuple k n).Nodup", "start": [ 199, 1 ], "end": [ 200, 39 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.antidiagonalTuple_zero_right", "code": "theorem antidiagonalTuple_zero_right (k : ℕ) : antidiagonalTuple k 0 = {0}", "start": [ 203, 1 ], "end": [ 204, 56 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.antidiagonalTuple_one", "code": "@[simp]\ntheorem antidiagonalTuple_one (n : ℕ) : antidiagonalTuple 1 n = {![n]}", "start": [ 207, 1 ], "end": [ 209, 49 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.Nat.antidiagonalTuple_two", "code": "theorem antidiagonalTuple_two (n : ℕ) :\n antidiagonalTuple 2 n = (antidiagonal n).map fun i => ![i.1, i.2]", "start": [ 212, 1 ], "end": [ 214, 49 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.antidiagonalTuple", "code": "def antidiagonalTuple (k n : ℕ) : Finset (Fin k → ℕ) :=\n ⟨Multiset.Nat.antidiagonalTuple k n, Multiset.Nat.nodup_antidiagonalTuple k n⟩", "start": [ 224, 1 ], "end": [ 226, 81 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.antidiagonalTuple_zero_zero", "code": "@[simp]\ntheorem antidiagonalTuple_zero_zero : antidiagonalTuple 0 0 = {![]}", "start": [ 229, 1 ], "end": [ 231, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.antidiagonalTuple_zero_succ", "code": "@[simp]\ntheorem antidiagonalTuple_zero_succ (n : ℕ) : antidiagonalTuple 0 n.succ = ∅", "start": [ 234, 1 ], "end": [ 236, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.mem_antidiagonalTuple", "code": "theorem mem_antidiagonalTuple {n : ℕ} {k : ℕ} {x : Fin k → ℕ} :\n x ∈ antidiagonalTuple k n ↔ ∑ i, x i = n", "start": [ 239, 1 ], "end": [ 241, 33 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.antidiagonalTuple_zero_right", "code": "theorem antidiagonalTuple_zero_right (k : ℕ) : antidiagonalTuple k 0 = {0}", "start": [ 244, 1 ], "end": [ 245, 65 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.antidiagonalTuple_one", "code": "@[simp]\ntheorem antidiagonalTuple_one (n : ℕ) : antidiagonalTuple 1 n = {![n]}", "start": [ 248, 1 ], "end": [ 250, 58 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.antidiagonalTuple_two", "code": "theorem antidiagonalTuple_two (n : ℕ) :\n antidiagonalTuple 2 n = (antidiagonal n).map (piFinTwoEquiv fun _ => ℕ).symm.toEmbedding", "start": [ 253, 1 ], "end": [ 255, 58 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Nat.sigmaAntidiagonalTupleEquivTuple", "code": "@[simps]\ndef sigmaAntidiagonalTupleEquivTuple (k : ℕ) : (Σ n, antidiagonalTuple k n) ≃ (Fin k → ℕ) where\n toFun x := x.2\n invFun x := ⟨∑ i, x i, x, mem_antidiagonalTuple.mpr rfl⟩\n left_inv := fun ⟨_, _, h⟩ => Sigma.subtype_ext (mem_antidiagonalTuple.mp h) rfl\n right_inv _ := rfl", "start": [ 260, 1 ], "end": [ 269, 21 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/RingHom/Integral.lean
[ "Mathlib/RingTheory/IntegralClosure.lean", "Mathlib/RingTheory/RingHomProperties.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "RingHom.isIntegral_stableUnderComposition", "code": "theorem isIntegral_stableUnderComposition : StableUnderComposition fun f => f.IsIntegral", "start": [ 24, 1 ], "end": [ 25, 40 ], "kind": "commanddeclaration" }, { "full_name": "RingHom.isIntegral_respectsIso", "code": "theorem isIntegral_respectsIso : RespectsIso fun f => f.IsIntegral", "start": [ 28, 1 ], "end": [ 32, 35 ], "kind": "commanddeclaration" }, { "full_name": "RingHom.isIntegral_stableUnderBaseChange", "code": "theorem isIntegral_stableUnderBaseChange : StableUnderBaseChange fun f => f.IsIntegral", "start": [ 35, 1 ], "end": [ 41, 48 ], "kind": "commanddeclaration" } ]
Mathlib/Order/Concept.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Set/Lattice.lean" ]
[ { "full_name": "intentClosure", "code": "def intentClosure (s : Set α) : Set β :=\n { b | ∀ ⦃a⦄, a ∈ s → r a b }", "start": [ 48, 1 ], "end": [ 51, 31 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure", "code": "def extentClosure (t : Set β) : Set α :=\n { a | ∀ ⦃b⦄, b ∈ t → r a b }", "start": [ 54, 1 ], "end": [ 57, 31 ], "kind": "commanddeclaration" }, { "full_name": "subset_intentClosure_iff_subset_extentClosure", "code": "theorem subset_intentClosure_iff_subset_extentClosure :\n t ⊆ intentClosure r s ↔ s ⊆ extentClosure r t", "start": [ 62, 1 ], "end": [ 64, 59 ], "kind": "commanddeclaration" }, { "full_name": "gc_intentClosure_extentClosure", "code": "theorem gc_intentClosure_extentClosure :\n GaloisConnection (toDual ∘ intentClosure r) (extentClosure r ∘ ofDual)", "start": [ 69, 1 ], "end": [ 71, 48 ], "kind": "commanddeclaration" }, { "full_name": "intentClosure_swap", "code": "theorem intentClosure_swap (t : Set β) : intentClosure (swap r) t = extentClosure r t", "start": [ 74, 1 ], "end": [ 75, 6 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure_swap", "code": "theorem extentClosure_swap (s : Set α) : extentClosure (swap r) s = intentClosure r s", "start": [ 78, 1 ], "end": [ 79, 6 ], "kind": "commanddeclaration" }, { "full_name": "intentClosure_empty", "code": "@[simp]\ntheorem intentClosure_empty : intentClosure r ∅ = univ", "start": [ 82, 1 ], "end": [ 84, 42 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure_empty", "code": "@[simp]\ntheorem extentClosure_empty : extentClosure r ∅ = univ", "start": [ 87, 1 ], "end": [ 89, 24 ], "kind": "commanddeclaration" }, { "full_name": "intentClosure_union", "code": "@[simp]\ntheorem intentClosure_union (s₁ s₂ : Set α) :\n intentClosure r (s₁ ∪ s₂) = intentClosure r s₁ ∩ intentClosure r s₂", "start": [ 92, 1 ], "end": [ 95, 35 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure_union", "code": "@[simp]\ntheorem extentClosure_union (t₁ t₂ : Set β) :\n extentClosure r (t₁ ∪ t₂) = extentClosure r t₁ ∩ extentClosure r t₂", "start": [ 98, 1 ], "end": [ 101, 28 ], "kind": "commanddeclaration" }, { "full_name": "intentClosure_iUnion", "code": "@[simp]\ntheorem intentClosure_iUnion (f : ι → Set α) :\n intentClosure r (⋃ i, f i) = ⋂ i, intentClosure r (f i)", "start": [ 104, 1 ], "end": [ 107, 44 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure_iUnion", "code": "@[simp]\ntheorem extentClosure_iUnion (f : ι → Set β) :\n extentClosure r (⋃ i, f i) = ⋂ i, extentClosure r (f i)", "start": [ 110, 1 ], "end": [ 113, 27 ], "kind": "commanddeclaration" }, { "full_name": "intentClosure_iUnion₂", "code": "theorem intentClosure_iUnion₂ (f : ∀ i, κ i → Set α) :\n intentClosure r (⋃ (i) (j), f i j) = ⋂ (i) (j), intentClosure r (f i j)", "start": [ 116, 1 ], "end": [ 118, 45 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure_iUnion₂", "code": "theorem extentClosure_iUnion₂ (f : ∀ i, κ i → Set β) :\n extentClosure r (⋃ (i) (j), f i j) = ⋂ (i) (j), extentClosure r (f i j)", "start": [ 121, 1 ], "end": [ 123, 28 ], "kind": "commanddeclaration" }, { "full_name": "subset_extentClosure_intentClosure", "code": "theorem subset_extentClosure_intentClosure (s : Set α) :\n s ⊆ extentClosure r (intentClosure r s)", "start": [ 126, 1 ], "end": [ 128, 46 ], "kind": "commanddeclaration" }, { "full_name": "subset_intentClosure_extentClosure", "code": "theorem subset_intentClosure_extentClosure (t : Set β) :\n t ⊆ intentClosure r (extentClosure r t)", "start": [ 131, 1 ], "end": [ 133, 41 ], "kind": "commanddeclaration" }, { "full_name": "intentClosure_extentClosure_intentClosure", "code": "@[simp]\ntheorem intentClosure_extentClosure_intentClosure (s : Set α) :\n intentClosure r (extentClosure r <| intentClosure r s) = intentClosure r s", "start": [ 136, 1 ], "end": [ 139, 50 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure_intentClosure_extentClosure", "code": "@[simp]\ntheorem extentClosure_intentClosure_extentClosure (t : Set β) :\n extentClosure r (intentClosure r <| extentClosure r t) = extentClosure r t", "start": [ 142, 1 ], "end": [ 145, 48 ], "kind": "commanddeclaration" }, { "full_name": "intentClosure_anti", "code": "theorem intentClosure_anti : Antitone (intentClosure r)", "start": [ 148, 1 ], "end": [ 149, 48 ], "kind": "commanddeclaration" }, { "full_name": "extentClosure_anti", "code": "theorem extentClosure_anti : Antitone (extentClosure r)", "start": [ 152, 1 ], "end": [ 153, 23 ], "kind": "commanddeclaration" }, { "full_name": "Concept", "code": "structure Concept extends Set α × Set β where\n \n closure_fst : intentClosure r fst = snd\n \n closure_snd : extentClosure r snd = fst", "start": [ 161, 1 ], "end": [ 168, 42 ], "kind": "commanddeclaration" }, { "full_name": "Concept.ext", "code": "@[ext]\ntheorem ext (h : c.fst = d.fst) : c = d", "start": [ 180, 1 ], "end": [ 186, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.ext'", "code": "theorem ext' (h : c.snd = d.snd) : c = d", "start": [ 189, 1 ], "end": [ 194, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.fst_injective", "code": "theorem fst_injective : Injective fun c : Concept α β r => c.fst", "start": [ 197, 1 ], "end": [ 197, 83 ], "kind": "commanddeclaration" }, { "full_name": "Concept.snd_injective", "code": "theorem snd_injective : Injective fun c : Concept α β r => c.snd", "start": [ 200, 1 ], "end": [ 200, 84 ], "kind": "commanddeclaration" }, { "full_name": "Concept.instSupConcept", "code": "instance instSupConcept : Sup (Concept α β r) :=\n ⟨fun c d =>\n { fst := extentClosure r (c.snd ∩ d.snd)\n snd := c.snd ∩ d.snd\n closure_fst := by\n rw [← c.closure_fst, ← d.closure_fst, ← intentClosure_union,\n intentClosure_extentClosure_intentClosure]\n closure_snd := rfl }⟩", "start": [ 203, 1 ], "end": [ 210, 28 ], "kind": "commanddeclaration" }, { "full_name": "Concept.instInfConcept", "code": "instance instInfConcept : Inf (Concept α β r) :=\n ⟨fun c d =>\n { fst := c.fst ∩ d.fst\n snd := intentClosure r (c.fst ∩ d.fst)\n closure_fst := rfl\n closure_snd := by\n rw [← c.closure_snd, ← d.closure_snd, ← extentClosure_union,\n extentClosure_intentClosure_extentClosure] }⟩", "start": [ 212, 1 ], "end": [ 219, 56 ], "kind": "commanddeclaration" }, { "full_name": "Concept.instSemilatticeInfConcept", "code": "instance instSemilatticeInfConcept : SemilatticeInf (Concept α β r) :=\n (fst_injective.semilatticeInf _) fun _ _ => rfl", "start": [ 221, 1 ], "end": [ 222, 50 ], "kind": "commanddeclaration" }, { "full_name": "Concept.fst_subset_fst_iff", "code": "@[simp]\ntheorem fst_subset_fst_iff : c.fst ⊆ d.fst ↔ c ≤ d", "start": [ 224, 1 ], "end": [ 226, 10 ], "kind": "commanddeclaration" }, { "full_name": "Concept.fst_ssubset_fst_iff", "code": "@[simp]\ntheorem fst_ssubset_fst_iff : c.fst ⊂ d.fst ↔ c < d", "start": [ 229, 1 ], "end": [ 231, 10 ], "kind": "commanddeclaration" }, { "full_name": "Concept.snd_subset_snd_iff", "code": "@[simp]\ntheorem snd_subset_snd_iff : c.snd ⊆ d.snd ↔ d ≤ c", "start": [ 234, 1 ], "end": [ 240, 33 ], "kind": "commanddeclaration" }, { "full_name": "Concept.snd_ssubset_snd_iff", "code": "@[simp]\ntheorem snd_ssubset_snd_iff : c.snd ⊂ d.snd ↔ d < c", "start": [ 243, 1 ], "end": [ 245, 95 ], "kind": "commanddeclaration" }, { "full_name": "Concept.strictMono_fst", "code": "theorem strictMono_fst : StrictMono (Prod.fst ∘ toProd : Concept α β r → Set α)", "start": [ 248, 1 ], "end": [ 249, 24 ], "kind": "commanddeclaration" }, { "full_name": "Concept.strictAnti_snd", "code": "theorem strictAnti_snd : StrictAnti (Prod.snd ∘ toProd : Concept α β r → Set β)", "start": [ 252, 1 ], "end": [ 253, 24 ], "kind": "commanddeclaration" }, { "full_name": "Concept.instLatticeConcept", "code": "instance instLatticeConcept : Lattice (Concept α β r) :=\n { Concept.instSemilatticeInfConcept with\n sup := (· ⊔ ·)\n le_sup_left := fun c d => snd_subset_snd_iff.1 inter_subset_left\n le_sup_right := fun c d => snd_subset_snd_iff.1 inter_subset_right\n sup_le := fun c d e => by\n simp_rw [← snd_subset_snd_iff]\n exact subset_inter }", "start": [ 256, 1 ], "end": [ 263, 27 ], "kind": "commanddeclaration" }, { "full_name": "Concept.instBoundedOrderConcept", "code": "instance instBoundedOrderConcept : BoundedOrder (Concept α β r) where\n top := ⟨⟨univ, intentClosure r univ⟩, rfl, eq_univ_of_forall fun _ _ hb => hb trivial⟩\n le_top _ := subset_univ _\n bot := ⟨⟨extentClosure r univ, univ⟩, eq_univ_of_forall fun _ _ ha => ha trivial, rfl⟩\n bot_le _ := snd_subset_snd_iff.1 <| subset_univ _", "start": [ 265, 1 ], "end": [ 269, 52 ], "kind": "commanddeclaration" }, { "full_name": "Concept.top_fst", "code": "@[simp]\ntheorem top_fst : (⊤ : Concept α β r).fst = univ", "start": [ 300, 1 ], "end": [ 302, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.top_snd", "code": "@[simp]\ntheorem top_snd : (⊤ : Concept α β r).snd = intentClosure r univ", "start": [ 305, 1 ], "end": [ 307, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.bot_fst", "code": "@[simp]\ntheorem bot_fst : (⊥ : Concept α β r).fst = extentClosure r univ", "start": [ 310, 1 ], "end": [ 312, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.bot_snd", "code": "@[simp]\ntheorem bot_snd : (⊥ : Concept α β r).snd = univ", "start": [ 315, 1 ], "end": [ 317, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.sup_fst", "code": "@[simp]\ntheorem sup_fst (c d : Concept α β r) : (c ⊔ d).fst = extentClosure r (c.snd ∩ d.snd)", "start": [ 320, 1 ], "end": [ 322, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.sup_snd", "code": "@[simp]\ntheorem sup_snd (c d : Concept α β r) : (c ⊔ d).snd = c.snd ∩ d.snd", "start": [ 325, 1 ], "end": [ 327, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.inf_fst", "code": "@[simp]\ntheorem inf_fst (c d : Concept α β r) : (c ⊓ d).fst = c.fst ∩ d.fst", "start": [ 330, 1 ], "end": [ 332, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.inf_snd", "code": "@[simp]\ntheorem inf_snd (c d : Concept α β r) : (c ⊓ d).snd = intentClosure r (c.fst ∩ d.fst)", "start": [ 335, 1 ], "end": [ 337, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.sSup_fst", "code": "@[simp]\ntheorem sSup_fst (S : Set (Concept α β r)) :\n (sSup S).fst = extentClosure r (⋂ c ∈ S, (c : Concept _ _ _).snd)", "start": [ 340, 1 ], "end": [ 343, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.sSup_snd", "code": "@[simp]\ntheorem sSup_snd (S : Set (Concept α β r)) : (sSup S).snd = ⋂ c ∈ S, (c : Concept _ _ _).snd", "start": [ 346, 1 ], "end": [ 348, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.sInf_fst", "code": "@[simp]\ntheorem sInf_fst (S : Set (Concept α β r)) : (sInf S).fst = ⋂ c ∈ S, (c : Concept _ _ _).fst", "start": [ 351, 1 ], "end": [ 353, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.sInf_snd", "code": "@[simp]\ntheorem sInf_snd (S : Set (Concept α β r)) :\n (sInf S).snd = intentClosure r (⋂ c ∈ S, (c : Concept _ _ _).fst)", "start": [ 356, 1 ], "end": [ 359, 6 ], "kind": "commanddeclaration" }, { "full_name": "Concept.swap", "code": "@[simps]\ndef swap (c : Concept α β r) : Concept β α (swap r) :=\n ⟨c.toProd.swap, c.closure_snd, c.closure_fst⟩", "start": [ 365, 1 ], "end": [ 368, 48 ], "kind": "commanddeclaration" }, { "full_name": "Concept.swap_swap", "code": "@[simp]\ntheorem swap_swap (c : Concept α β r) : c.swap.swap = c", "start": [ 372, 1 ], "end": [ 374, 10 ], "kind": "commanddeclaration" }, { "full_name": "Concept.swap_le_swap_iff", "code": "@[simp]\ntheorem swap_le_swap_iff : c.swap ≤ d.swap ↔ d ≤ c", "start": [ 377, 1 ], "end": [ 379, 21 ], "kind": "commanddeclaration" }, { "full_name": "Concept.swap_lt_swap_iff", "code": "@[simp]\ntheorem swap_lt_swap_iff : c.swap < d.swap ↔ d < c", "start": [ 382, 1 ], "end": [ 384, 22 ], "kind": "commanddeclaration" }, { "full_name": "Concept.swapEquiv", "code": "@[simps]\ndef swapEquiv : (Concept α β r)ᵒᵈ ≃o Concept β α (Function.swap r) where\n toFun := swap ∘ ofDual\n invFun := toDual ∘ swap\n left_inv := swap_swap\n right_inv := swap_swap\n map_rel_iff' := swap_le_swap_iff", "start": [ 387, 1 ], "end": [ 394, 35 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Products/Unitor.lean
[ "Mathlib/CategoryTheory/DiscreteCategory.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Products/Basic.lean" ]
[ { "full_name": "CategoryTheory.prod.leftUnitor", "code": "@[simps]\ndef leftUnitor : Discrete (PUnit : Type w) × C ⥤ C where\n obj X := X.2\n map f := f.2", "start": [ 21, 1 ], "end": [ 25, 15 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.prod.rightUnitor", "code": "@[simps]\ndef rightUnitor : C × Discrete (PUnit : Type w) ⥤ C where\n obj X := X.1\n map f := f.1", "start": [ 27, 1 ], "end": [ 31, 15 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.prod.leftInverseUnitor", "code": "@[simps]\ndef leftInverseUnitor : C ⥤ Discrete (PUnit : Type w) × C where\n obj X := ⟨⟨PUnit.unit⟩, X⟩\n map f := ⟨𝟙 _, f⟩", "start": [ 33, 1 ], "end": [ 37, 20 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.prod.rightInverseUnitor", "code": "@[simps]\ndef rightInverseUnitor : C ⥤ C × Discrete (PUnit : Type w) where\n obj X := ⟨X, ⟨PUnit.unit⟩⟩\n map f := ⟨f, 𝟙 _⟩", "start": [ 39, 1 ], "end": [ 43, 20 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.prod.leftUnitorEquivalence", "code": "@[simps]\ndef leftUnitorEquivalence : Discrete (PUnit : Type w) × C ≌ C where\n functor := leftUnitor C\n inverse := leftInverseUnitor C\n unitIso := Iso.refl _\n counitIso := Iso.refl _", "start": [ 45, 1 ], "end": [ 51, 26 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.prod.rightUnitorEquivalence", "code": "@[simps]\ndef rightUnitorEquivalence : C × Discrete (PUnit : Type w) ≌ C where\n functor := rightUnitor C\n inverse := rightInverseUnitor C\n unitIso := Iso.refl _\n counitIso := Iso.refl _", "start": [ 53, 1 ], "end": [ 59, 26 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.prod.leftUnitor_isEquivalence", "code": "instance leftUnitor_isEquivalence : (leftUnitor C).IsEquivalence :=\n (leftUnitorEquivalence C).isEquivalence_functor", "start": [ 61, 1 ], "end": [ 62, 50 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.prod.rightUnitor_isEquivalence", "code": "instance rightUnitor_isEquivalence : (rightUnitor C).IsEquivalence :=\n (rightUnitorEquivalence C).isEquivalence_functor", "start": [ 64, 1 ], "end": [ 65, 51 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/HopfAlgebra.lean
[ "Mathlib/RingTheory/Bialgebra/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "HopfAlgebra", "code": "class HopfAlgebra (R : Type u) (A : Type v) [CommSemiring R] [Semiring A] extends\n Bialgebra R A where\n \n antipode : A →ₗ[R] A\n \n mul_antipode_rTensor_comul :\n LinearMap.mul' R A ∘ₗ antipode.rTensor A ∘ₗ comul = (Algebra.linearMap R A) ∘ₗ counit\n \n mul_antipode_lTensor_comul :\n LinearMap.mul' R A ∘ₗ antipode.lTensor A ∘ₗ comul = (Algebra.linearMap R A) ∘ₗ counit", "start": [ 44, 1 ], "end": [ 55, 90 ], "kind": "commanddeclaration" }, { "full_name": "HopfAlgebra.mul_antipode_rTensor_comul_apply", "code": "@[simp]\ntheorem mul_antipode_rTensor_comul_apply (a : A) :\n LinearMap.mul' R A (antipode.rTensor A (Coalgebra.comul a)) =\n algebraMap R A (Coalgebra.counit a)", "start": [ 61, 1 ], "end": [ 65, 51 ], "kind": "commanddeclaration" }, { "full_name": "HopfAlgebra.mul_antipode_lTensor_comul_apply", "code": "@[simp]\ntheorem mul_antipode_lTensor_comul_apply (a : A) :\n LinearMap.mul' R A (antipode.lTensor A (Coalgebra.comul a)) =\n algebraMap R A (Coalgebra.counit a)", "start": [ 67, 1 ], "end": [ 71, 51 ], "kind": "commanddeclaration" }, { "full_name": "CommSemiring.toHopfAlgebra", "code": "instance toHopfAlgebra : HopfAlgebra R R where\n antipode := .id\n mul_antipode_rTensor_comul := by ext; simp\n mul_antipode_lTensor_comul := by ext; simp", "start": [ 83, 1 ], "end": [ 87, 45 ], "kind": "commanddeclaration" }, { "full_name": "CommSemiring.antipode_eq_id", "code": "@[simp]\ntheorem antipode_eq_id : antipode (R := R) (A := R) = .id", "start": [ 89, 1 ], "end": [ 90, 65 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/VonNeumannAlgebra/Basic.lean
[ "Mathlib/Analysis/NormedSpace/Dual.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/InnerProductSpace/Adjoint.lean", "Mathlib/Analysis/Complex/Basic.lean" ]
[ { "full_name": "WStarAlgebra", "code": "class WStarAlgebra (M : Type u) [NormedRing M] [StarRing M] [CstarRing M] [Module ℂ M]\n [NormedAlgebra ℂ M] [StarModule ℂ M] : Prop where\n \n exists_predual :\n ∃ (X : Type u) (_ : NormedAddCommGroup X) (_ : NormedSpace ℂ X) (_ : CompleteSpace X),\n Nonempty (NormedSpace.Dual ℂ X ≃ₗᵢ⋆[ℂ] M)", "start": [ 31, 1 ], "end": [ 50, 48 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra", "code": "structure VonNeumannAlgebra (H : Type u) [NormedAddCommGroup H] [InnerProductSpace ℂ H]\n [CompleteSpace H] extends StarSubalgebra ℂ (H →L[ℂ] H) where\n \n centralizer_centralizer' : Set.centralizer (Set.centralizer carrier) = carrier", "start": [ 54, 1 ], "end": [ 72, 81 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.instSetLike", "code": "instance instSetLike : SetLike (VonNeumannAlgebra H) (H →L[ℂ] H) where\n coe S := S.carrier\n coe_injective' S T h := by obtain ⟨⟨⟨⟨⟨⟨_, _⟩, _⟩, _⟩, _⟩, _⟩, _⟩ := S; cases T; congr", "start": [ 85, 1 ], "end": [ 87, 89 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.instStarMemClass", "code": "noncomputable instance instStarMemClass : StarMemClass (VonNeumannAlgebra H) (H →L[ℂ] H) where\n star_mem {s} := s.star_mem'", "start": [ 90, 1 ], "end": [ 91, 30 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.instSubringClass", "code": "instance instSubringClass : SubringClass (VonNeumannAlgebra H) (H →L[ℂ] H) where\n add_mem {s} := s.add_mem'\n mul_mem {s} := s.mul_mem'\n one_mem {s} := s.one_mem'\n zero_mem {s} := s.zero_mem'\n neg_mem {s} a ha := show -a ∈ s.toStarSubalgebra from neg_mem ha", "start": [ 93, 1 ], "end": [ 98, 67 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.mem_carrier", "code": "@[simp]\ntheorem mem_carrier {S : VonNeumannAlgebra H} {x : H →L[ℂ] H} :\n x ∈ S.toStarSubalgebra ↔ x ∈ (S : Set (H →L[ℂ] H))", "start": [ 100, 1 ], "end": [ 103, 10 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.coe_toStarSubalgebra", "code": "@[simp]\ntheorem coe_toStarSubalgebra (S : VonNeumannAlgebra H) :\n (S.toStarSubalgebra : Set (H →L[ℂ] H)) = S", "start": [ 107, 1 ], "end": [ 110, 6 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.coe_mk", "code": "@[simp]\ntheorem coe_mk (S : StarSubalgebra ℂ (H →L[ℂ] H)) (h) :\n ((⟨S, h⟩ : VonNeumannAlgebra H) : Set (H →L[ℂ] H)) = S", "start": [ 112, 1 ], "end": [ 115, 6 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.ext", "code": "@[ext]\ntheorem ext {S T : VonNeumannAlgebra H} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T", "start": [ 117, 1 ], "end": [ 119, 16 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.centralizer_centralizer", "code": "@[simp]\ntheorem centralizer_centralizer (S : VonNeumannAlgebra H) :\n Set.centralizer (Set.centralizer (S : Set (H →L[ℂ] H))) = S", "start": [ 122, 1 ], "end": [ 125, 29 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.commutant", "code": "def commutant (S : VonNeumannAlgebra H) : VonNeumannAlgebra H where\n toStarSubalgebra := StarSubalgebra.centralizer ℂ (S : Set (H →L[ℂ] H))\n centralizer_centralizer' := by simp", "start": [ 128, 1 ], "end": [ 131, 38 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.coe_commutant", "code": "@[simp]\ntheorem coe_commutant (S : VonNeumannAlgebra H) :\n ↑S.commutant = Set.centralizer (S : Set (H →L[ℂ] H))", "start": [ 134, 1 ], "end": [ 137, 19 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.mem_commutant_iff", "code": "@[simp]\ntheorem mem_commutant_iff {S : VonNeumannAlgebra H} {z : H →L[ℂ] H} :\n z ∈ S.commutant ↔ ∀ g ∈ S, g * z = z * g", "start": [ 141, 1 ], "end": [ 145, 6 ], "kind": "commanddeclaration" }, { "full_name": "VonNeumannAlgebra.commutant_commutant", "code": "@[simp]\ntheorem commutant_commutant (S : VonNeumannAlgebra H) : S.commutant.commutant = S", "start": [ 148, 1 ], "end": [ 150, 35 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/Polynomial/Selmer.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/Polynomial/GaussLemma.lean", "Mathlib/Algebra/Polynomial/UnitTrinomial.lean", "Mathlib/Tactic/LinearCombination.lean" ]
[ { "full_name": "Polynomial.X_pow_sub_X_sub_one_irreducible_aux", "code": "theorem X_pow_sub_X_sub_one_irreducible_aux (z : ℂ) : ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0)", "start": [ 31, 1 ], "end": [ 45, 73 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.X_pow_sub_X_sub_one_irreducible", "code": "theorem X_pow_sub_X_sub_one_irreducible (hn1 : n ≠ 1) : Irreducible (X ^ n - X - 1 : ℤ[X])", "start": [ 49, 1 ], "end": [ 67, 41 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.X_pow_sub_X_sub_one_irreducible_rat", "code": "theorem X_pow_sub_X_sub_one_irreducible_rat (hn1 : n ≠ 1) : Irreducible (X ^ n - X - 1 : ℚ[X])", "start": [ 71, 1 ], "end": [ 82, 65 ], "kind": "commanddeclaration" } ]
Mathlib/Data/UnionFind.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Init/Data/Nat/Notation.lean", "Mathlib/Init/Order/Defs.lean" ]
[ { "full_name": "UFModel", "code": "structure UFModel (n) where\n parent : Fin n → Fin n\n rank : Nat → Nat\n rank_lt : ∀ i, (parent i).1 ≠ i → rank i < rank (parent i)", "start": [ 11, 1 ], "end": [ 14, 61 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.empty", "code": "def empty : UFModel 0 where\n parent i := i.elim0\n rank _ := 0\n rank_lt i := i.elim0", "start": [ 18, 1 ], "end": [ 21, 23 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.push", "code": "def push {n} (m : UFModel n) (k) (le : n ≤ k) : UFModel k where\n parent i :=\n if h : i < n then\n let ⟨a, h'⟩ := m.parent ⟨i, h⟩\n ⟨a, Nat.lt_of_lt_of_le h' le⟩\n else i\n rank i := if i < n then m.rank i else 0\n rank_lt i := by\n simp; split <;> rename_i h\n · simp [(m.parent ⟨i, h⟩).2, h]; exact m.rank_lt _\n · nofun", "start": [ 23, 1 ], "end": [ 33, 12 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.setParent", "code": "def setParent {n} (m : UFModel n) (x y : Fin n) (h : m.rank x < m.rank y) : UFModel n where\n parent i := if x.1 = i then y else m.parent i\n rank := m.rank\n rank_lt i := by\n simp; split <;> rename_i h'\n · rw [← h']; exact fun _ ↦ h\n · exact m.rank_lt i", "start": [ 35, 1 ], "end": [ 41, 24 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.setParentBump", "code": "def setParentBump {n} (m : UFModel n) (x y : Fin n)\n (H : m.rank x ≤ m.rank y) (hroot : (m.parent y).1 = y) : UFModel n where\n parent i := if x.1 = i then y else m.parent i\n rank i := if y.1 = i ∧ m.rank x = m.rank y then m.rank y + 1 else m.rank i\n rank_lt i := by\n simp; split <;>\n (rename_i h₁; (try simp [h₁]); split <;> rename_i h₂ <;>\n (intro h; try simp [h] at h₂ <;> simp [h₁, h₂, h]))\n · simp [← h₁]; split <;> rename_i h₃\n · rw [h₃]; apply Nat.lt_succ_self\n · exact Nat.lt_of_le_of_ne H h₃\n · have := Fin.eq_of_val_eq h₂.1; subst this\n simp [hroot] at h\n · have := m.rank_lt i h\n split <;> rename_i h₃\n · rw [h₃.1]; exact Nat.lt_succ_of_lt this\n · exact this", "start": [ 43, 1 ], "end": [ 59, 19 ], "kind": "commanddeclaration" }, { "full_name": "UFNode", "code": "structure UFNode (α : Type*) where\n parent : Nat\n value : α\n rank : Nat", "start": [ 63, 1 ], "end": [ 66, 13 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees", "code": "inductive UFModel.Agrees (arr : Array α) (f : α → β) : ∀ {n}, (Fin n → β) → Prop\n | mk : Agrees arr f fun i ↦ f (arr.get i)", "start": [ 68, 1 ], "end": [ 69, 44 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees.mk'", "code": "theorem mk' {arr : Array α} {f : α → β} {n} {g : Fin n → β} (e : n = arr.size)\n (H : ∀ i h₁ h₂, f (arr.get ⟨i, h₁⟩) = g ⟨i, h₂⟩) : Agrees arr f g", "start": [ 73, 1 ], "end": [ 77, 26 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees.size_eq", "code": "theorem size_eq {arr : Array α} {m : Fin n → β} (H : Agrees arr f m) : n = arr.size", "start": [ 79, 1 ], "end": [ 80, 15 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees.get_eq", "code": "theorem get_eq {arr : Array α} {n} {m : Fin n → β} (H : Agrees arr f m) :\n ∀ i h₁ h₂, f (arr.get ⟨i, h₁⟩) = m ⟨i, h₂⟩", "start": [ 82, 1 ], "end": [ 84, 33 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees.get_eq'", "code": "theorem get_eq' {arr : Array α} {m : Fin arr.size → β} (H : Agrees arr f m)\n (i) : f (arr.get i) = m i", "start": [ 86, 1 ], "end": [ 87, 45 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees.empty", "code": "theorem empty {f : α → β} {g : Fin 0 → β} : Agrees #[] f g", "start": [ 89, 1 ], "end": [ 89, 76 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees.push", "code": "theorem push {arr : Array α} {n} {m : Fin n → β} (H : Agrees arr f m)\n (k) (hk : k = n + 1) (x) (m' : Fin k → β)\n (hm₁ : ∀ (i : Fin k) (h : i < n), m' i = m ⟨i, h⟩)\n (hm₂ : ∀ (h : n < k), f x = m' ⟨n, h⟩) : Agrees (arr.push x) f m'", "start": [ 91, 1 ], "end": [ 101, 13 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Agrees.set", "code": "theorem set {arr : Array α} {n} {m : Fin n → β} (H : Agrees arr f m)\n {i : Fin arr.size} {x} {m' : Fin n → β}\n (hm₁ : ∀ (j : Fin n), j.1 ≠ i → m' j = m j)\n (hm₂ : ∀ (h : i < n), f x = m' ⟨i, h⟩) : Agrees (arr.set i x) f m'", "start": [ 103, 1 ], "end": [ 112, 61 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models", "code": "def UFModel.Models (arr : Array (UFNode α)) {n} (m : UFModel n) :=\n UFModel.Agrees arr (·.parent) (fun i ↦ m.parent i) ∧\n UFModel.Agrees arr (·.rank) (fun i : Fin n ↦ m.rank i)", "start": [ 116, 1 ], "end": [ 118, 57 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models.size_eq", "code": "theorem size_eq {arr : Array (UFNode α)} {n} {m : UFModel n} (H : m.Models arr) :\n n = arr.size", "start": [ 122, 1 ], "end": [ 123, 32 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models.parent_eq", "code": "theorem parent_eq {arr : Array (UFNode α)} {n} {m : UFModel n} (H : m.Models arr)\n (i : Nat) (h₁ : i < arr.size) (h₂) : arr[i].parent = m.parent ⟨i, h₂⟩", "start": [ 125, 1 ], "end": [ 126, 91 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models.parent_eq'", "code": "theorem parent_eq' {arr : Array (UFNode α)} {m : UFModel arr.size} (H : m.Models arr)\n (i : Fin arr.size) : (arr[i.1]).parent = m.parent i", "start": [ 128, 1 ], "end": [ 129, 74 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models.rank_eq", "code": "theorem rank_eq {arr : Array (UFNode α)} {n} {m : UFModel n} (H : m.Models arr) (i : Nat)\n (h : i < arr.size) : arr[i].rank = m.rank i", "start": [ 131, 1 ], "end": [ 133, 46 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models.empty", "code": "theorem empty : UFModel.empty.Models (α := α) #[]", "start": [ 135, 1 ], "end": [ 135, 82 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models.push", "code": "theorem push {arr : Array (UFNode α)} {n} {m : UFModel n} (H : m.Models arr)\n (k) (hk : k = n + 1) (x) :\n (m.push k (hk ▸ Nat.le_add_right ..)).Models (arr.push ⟨n, x, 0⟩)", "start": [ 137, 1 ], "end": [ 143, 38 ], "kind": "commanddeclaration" }, { "full_name": "UFModel.Models.setParent", "code": "theorem setParent {arr : Array (UFNode α)} {n} {m : UFModel n} (hm : m.Models arr)\n (i j H hi x) (hp : x.parent = j.1) (hrk : x.rank = arr[i].rank) :\n (m.setParent i j H).Models (arr.set ⟨i.1, hi⟩ x)", "start": [ 145, 1 ], "end": [ 151, 68 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind", "code": "structure UnionFind (α) where\n arr : Array (UFNode α)\n model : ∃ (n : _) (m : UFModel n), m.Models arr", "start": [ 155, 1 ], "end": [ 157, 50 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.size", "code": "def size (self : UnionFind α) := self.arr.size", "start": [ 161, 1 ], "end": [ 161, 47 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.model'", "code": "theorem model' (self : UnionFind α) : ∃ (m : UFModel self.arr.size), m.Models self.arr", "start": [ 163, 1 ], "end": [ 164, 64 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.empty", "code": "def empty : UnionFind α where\n arr := #[]\n model := ⟨_, _, UFModel.Models.empty⟩", "start": [ 166, 1 ], "end": [ 168, 40 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.mkEmpty", "code": "def mkEmpty (c : Nat) : UnionFind α where\n arr := Array.mkEmpty c\n model := ⟨_, _, UFModel.Models.empty⟩", "start": [ 170, 1 ], "end": [ 172, 40 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.rank", "code": "def rank (self : UnionFind α) (i : Nat) : Nat :=\n if h : i < self.size then (self.arr.get ⟨i, h⟩).rank else 0", "start": [ 174, 1 ], "end": [ 175, 62 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.rankMaxAux", "code": "def rankMaxAux (self : UnionFind α) : ∀ (i : Nat),\n {k : Nat // ∀ j < i, ∀ h, (self.arr.get ⟨j, h⟩).rank ≤ k}\n | 0 => ⟨0, nofun⟩\n | i+1 => by\n let ⟨k, H⟩ := rankMaxAux self i\n refine ⟨max k (if h : _ then (self.arr.get ⟨i, h⟩).rank else 0), fun j hj h ↦ ?_⟩\n match j, Nat.lt_or_eq_of_le (Nat.le_of_lt_succ hj) with\n | j, Or.inl hj => exact Nat.le_trans (H _ hj h) (Nat.le_max_left _ _)\n | _, Or.inr rfl => simp [h, Nat.le_max_right]", "start": [ 177, 1 ], "end": [ 185, 50 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.rankMax", "code": "def rankMax (self : UnionFind α) := (rankMaxAux self self.size).1 + 1", "start": [ 187, 1 ], "end": [ 187, 70 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.lt_rankMax'", "code": "theorem lt_rankMax' (self : UnionFind α) (i : Fin self.size) :\n (self.arr.get i).rank < self.rankMax", "start": [ 189, 1 ], "end": [ 191, 57 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.lt_rankMax", "code": "theorem lt_rankMax (self : UnionFind α) (i : Nat) : self.rank i < self.rankMax", "start": [ 193, 1 ], "end": [ 194, 62 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.rank_eq", "code": "theorem rank_eq (self : UnionFind α) {n} {m : UFModel n} (H : m.Models self.arr)\n {i} (h : i < self.size) : self.rank i = m.rank i", "start": [ 196, 1 ], "end": [ 198, 28 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.rank_lt", "code": "theorem rank_lt (self : UnionFind α) {i : Nat} (h) : self.arr[i].parent ≠ i →\n self.rank i < self.rank self.arr[i].parent", "start": [ 200, 1 ], "end": [ 203, 94 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.parent_lt", "code": "theorem parent_lt (self : UnionFind α) (i : Nat) (h) : self.arr[i].parent < self.size", "start": [ 205, 1 ], "end": [ 207, 52 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.push", "code": "def push (self : UnionFind α) (x : α) : UnionFind α where\n arr := self.arr.push ⟨self.arr.size, x, 0⟩\n model := let ⟨_, hm⟩ := self.model'; ⟨_, _, hm.push _ rfl _⟩", "start": [ 209, 1 ], "end": [ 211, 63 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.findAux", "code": "def findAux (self : UnionFind α) (x : Fin self.size) :\n (s : Array (UFNode α)) ×' (root : Fin s.size) ×'\n ∃ n, ∃ (m : UFModel n) (m' : UFModel n),\n m.Models self.arr ∧ m'.Models s ∧ m'.rank = m.rank ∧\n (∃ hr, (m'.parent ⟨root, hr⟩).1 = root) ∧\n m.rank x ≤ m.rank root := by\n let y := (self.arr[x]'(Fin.isLt x)).parent\n refine if h : y = x then ⟨self.arr, x, ?a'⟩ else\n have := Nat.sub_lt_sub_left (self.lt_rankMax x) (self.rank_lt _ h)\n let ⟨arr₁, root, H⟩ := self.findAux ⟨y, self.parent_lt _ x.2⟩\n have hx := ?hx\n let arr₂ := arr₁.set ⟨x, hx⟩ {arr₁.get ⟨x, hx⟩ with parent := root}\n ⟨arr₂, ⟨root, by simp [root.2, arr₂]⟩, ?b'⟩\n case a' => let ⟨m, hm⟩ := self.model'\n exact ⟨_, m, m, hm, hm, rfl, ⟨x.2, by rwa [← hm.parent_eq]⟩, Nat.le_refl _⟩\n all_goals let ⟨n, m, m', hm, hm', e, ⟨_, hr⟩, le⟩ := H\n case hx => exact hm'.size_eq ▸ hm.size_eq.symm ▸ x.2\n case b' =>\n let x' : Fin n := ⟨x, hm.size_eq ▸ x.2⟩\n let root : Fin n := ⟨root, hm'.size_eq.symm ▸ root.2⟩\n have hy : (UFModel.parent m x').1 = y := by rw [← hm.parent_eq x x.2 x'.2]; rfl\n have := m.rank_lt x'; rw [hy] at this\n have := Nat.lt_of_lt_of_le (this h) le\n refine ⟨n, m, _, hm,\n hm'.setParent x' root (by rw [e]; exact this) hx _ rfl rfl, e,\n ⟨root.2, ?_⟩, Nat.le_of_lt this⟩\n have : x.1 ≠ root := mt (congrArg _) (Nat.ne_of_lt this); dsimp only at this\n simp [UFModel.setParent, this, hr]\ntermination_by self.rankMax - self.rank x", "start": [ 213, 1 ], "end": [ 243, 42 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.find", "code": "def find (self : UnionFind α) (x : Fin self.size) :\n (s : UnionFind α) × (root : Fin s.size) ×'\n s.size = self.size ∧ (s.arr.get root).parent = root :=\n let ⟨s, root, H⟩ := self.findAux x\n have : _ ∧ s.size = self.size ∧ s[root.1].parent = root :=\n let ⟨n, _, m', hm, hm', _, ⟨_, hr⟩, _⟩ := H\n ⟨⟨n, m', hm'⟩, hm'.size_eq.symm.trans hm.size_eq, by rwa [hm'.parent_eq]⟩\n ⟨⟨s, this.1⟩, root, this.2⟩", "start": [ 245, 1 ], "end": [ 252, 30 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.link", "code": "def link (self : UnionFind α) (x y : Fin self.size)\n (yroot : (self.arr.get y).parent = y) : UnionFind α := by\n refine if ne : x.1 = y then self else\n let nx := self.arr[x]'(Fin.isLt x)\n let ny := self.arr[y]'(Fin.isLt y)\n if h : ny.rank < nx.rank then\n ⟨self.arr.set y {ny with parent := x}, ?a⟩\n else\n let arr₁ := self.arr.set x {nx with parent := y}\n let arr₂ := if nx.rank = ny.rank then\n arr₁.set ⟨y, by simp [arr₁]; exact y.2⟩ {ny with rank := ny.rank + 1}\n else arr₁\n ⟨arr₂, ?b⟩\n case a =>\n let ⟨m, hm⟩ := self.model'\n exact ⟨_, _, hm.setParent y x (by simpa [hm.rank_eq, nx, ny] using h) _ _ rfl rfl⟩\n case b =>\n let ⟨m, hm⟩ := self.model'; let n := self.size\n refine ⟨_, m.setParentBump x y (by simpa [nx, ny, hm.rank_eq] using h)\n (by simpa [← hm.parent_eq'] using yroot), ?_⟩\n let parent (i : Fin n) := (if x.1 = i then y else m.parent i).1\n have : UFModel.Agrees arr₁ (·.parent) parent :=\n hm.1.set (fun i h ↦ by simp [parent]; rw [if_neg h.symm]) (fun _ ↦ by simp [parent])\n have H1 : UFModel.Agrees arr₂ (·.parent) parent := by\n simp only [arr₂, Fin.getElem_fin]; split\n · exact this.set (fun i h ↦ by simp [h.symm]) fun _ ↦ by simp [ne, hm.parent_eq', ny, parent]\n · exact this\n have : UFModel.Agrees arr₁ (·.rank) (fun i : Fin n ↦ m.rank i) :=\n hm.2.set (fun i _ ↦ by simp) (fun _ ↦ by simp [nx, hm.rank_eq])\n let rank (i : Fin n) := if y.1 = i ∧ m.rank x = m.rank y then m.rank y + 1 else m.rank i\n have H2 : UFModel.Agrees arr₂ (·.rank) rank := by\n simp [rank, arr₂, nx, ny]\n split <;> rename_i xy <;> simp only [hm.rank_eq] at xy <;>\n simp only [xy, and_true, and_false, ↓reduceIte]\n · exact this.set (fun i h ↦ by rw [if_neg h.symm]) (fun h ↦ by simp [hm.rank_eq])\n · exact this\n exact ⟨H1, H2⟩", "start": [ 254, 1 ], "end": [ 291, 19 ], "kind": "commanddeclaration" }, { "full_name": "UnionFind.union", "code": "def union (self : UnionFind α) (x y : Fin self.size) : UnionFind α :=\n let ⟨self₁, rx, e, _⟩ := self.find x\n let ⟨self₂, ry, e, hry⟩ := self₁.find ⟨y, by rw [e]; exact y.2⟩\n self₂.link ⟨rx, by rw [e]; exact rx.2⟩ ry hry", "start": [ 293, 1 ], "end": [ 296, 48 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/Category/CompHausLike/Basic.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Category/TopCat/Basic.lean", "Mathlib/CategoryTheory/Functor/ReflectsIso.lean" ]
[ { "full_name": "CompHausLike", "code": "structure CompHausLike where\n \n toTop : TopCat\n \n [is_compact : CompactSpace toTop]\n \n [is_hausdorff : T2Space toTop]\n \n prop : P toTop", "start": [ 23, 1 ], "end": [ 32, 17 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.category", "code": "instance category : Category (CompHausLike P) :=\n InducedCategory.category toTop", "start": [ 41, 1 ], "end": [ 42, 33 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.concreteCategory", "code": "instance concreteCategory : ConcreteCategory (CompHausLike P) :=\n InducedCategory.concreteCategory _", "start": [ 44, 1 ], "end": [ 45, 37 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.hasForget₂", "code": "instance hasForget₂ : HasForget₂ (CompHausLike P) TopCat :=\n InducedCategory.hasForget₂ _", "start": [ 47, 1 ], "end": [ 48, 31 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.HasProp", "code": "class HasProp : Prop where\n hasProp : P (TopCat.of X)", "start": [ 52, 1 ], "end": [ 54, 28 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.of", "code": "def of : CompHausLike P where\n toTop := TopCat.of X\n is_compact := ‹_›\n is_hausdorff := ‹_›\n prop := HasProp.hasProp", "start": [ 58, 1 ], "end": [ 65, 26 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.coe_of", "code": "@[simp]\ntheorem coe_of : (CompHausLike.of P X : Type _) = X", "start": [ 67, 1 ], "end": [ 69, 6 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.coe_id", "code": "@[simp]\ntheorem coe_id (X : CompHausLike P) : (𝟙 ((forget (CompHausLike P)).obj X)) = id", "start": [ 71, 1 ], "end": [ 73, 6 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.coe_comp", "code": "@[simp]\ntheorem coe_comp {X Y Z : CompHausLike P} (f : X ⟶ Y) (g : Y ⟶ Z) :\n ((forget (CompHausLike P)).map f ≫ (forget (CompHausLike P)).map g) = g ∘ f", "start": [ 75, 1 ], "end": [ 78, 6 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.toCompHausLike", "code": "@[simps]\ndef toCompHausLike {P P' : TopCat → Prop} (h : ∀ (X : CompHausLike P), P X.toTop → P' X.toTop) :\n CompHausLike P ⥤ CompHausLike P' where\n obj X :=\n have : HasProp P' X := ⟨(h _ X.prop)⟩\n CompHausLike.of _ X\n map f := f", "start": [ 94, 1 ], "end": [ 101, 13 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.fullyFaithfulToCompHausLike", "code": "def fullyFaithfulToCompHausLike : (toCompHausLike h).FullyFaithful :=\n fullyFaithfulInducedFunctor _", "start": [ 107, 1 ], "end": [ 110, 32 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.compHausLikeToTop", "code": "@[simps!]\ndef compHausLikeToTop : CompHausLike.{u} P ⥤ TopCat.{u} :=\n inducedFunctor _", "start": [ 120, 1 ], "end": [ 123, 19 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.fullyFaithfulCompHausLikeToTop", "code": "def fullyFaithfulCompHausLikeToTop : (compHausLikeToTop P).FullyFaithful :=\n fullyFaithfulInducedFunctor _", "start": [ 128, 1 ], "end": [ 130, 32 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.epi_of_surjective", "code": "theorem epi_of_surjective {X Y : CompHausLike.{u} P} (f : X ⟶ Y) (hf : Function.Surjective f) :\n Epi f", "start": [ 146, 1 ], "end": [ 149, 52 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.mono_iff_injective", "code": "theorem mono_iff_injective {X Y : CompHausLike.{u} P} (f : X ⟶ Y) :\n Mono f ↔ Function.Injective f", "start": [ 151, 1 ], "end": [ 160, 53 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.isClosedMap", "code": "theorem isClosedMap {X Y : CompHausLike.{u} P} (f : X ⟶ Y) : IsClosedMap f", "start": [ 162, 1 ], "end": [ 164, 45 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.isIso_of_bijective", "code": "theorem isIso_of_bijective {X Y : CompHausLike.{u} P} (f : X ⟶ Y) (bij : Function.Bijective f) :\n IsIso f", "start": [ 166, 1 ], "end": [ 179, 29 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.forget_reflectsIsomorphisms", "code": "instance forget_reflectsIsomorphisms :\n (forget (CompHausLike.{u} P)).ReflectsIsomorphisms :=\n ⟨by intro A B f hf; exact isIso_of_bijective _ ((isIso_iff_bijective f).mp hf)⟩", "start": [ 181, 1 ], "end": [ 183, 82 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.isoOfBijective", "code": "noncomputable def isoOfBijective {X Y : CompHausLike.{u} P} (f : X ⟶ Y)\n (bij : Function.Bijective f) : X ≅ Y :=\n letI := isIso_of_bijective _ bij\n asIso f", "start": [ 185, 1 ], "end": [ 189, 10 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.isoOfHomeo", "code": "@[simps!]\ndef isoOfHomeo {X Y : CompHausLike.{u} P} (f : X ≃ₜ Y) : X ≅ Y :=\n (fullyFaithfulCompHausLikeToTop P).preimageIso (TopCat.isoOfHomeo f)", "start": [ 191, 1 ], "end": [ 194, 71 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.homeoOfIso", "code": "@[simps!]\ndef homeoOfIso {X Y : CompHausLike.{u} P} (f : X ≅ Y) : X ≃ₜ Y :=\n TopCat.homeoOfIso <| (compHausLikeToTop P).mapIso f", "start": [ 196, 1 ], "end": [ 199, 54 ], "kind": "commanddeclaration" }, { "full_name": "CompHausLike.isoEquivHomeo", "code": "@[simps]\ndef isoEquivHomeo {X Y : CompHausLike.{u} P} : (X ≅ Y) ≃ (X ≃ₜ Y) where\n toFun := homeoOfIso\n invFun := isoOfHomeo\n left_inv _ := rfl\n right_inv _ := rfl", "start": [ 201, 1 ], "end": [ 208, 21 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/SimpleGraph/Hamiltonian.lean
[ "Mathlib/Combinatorics/SimpleGraph/Connectivity.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/Ring/Nat.lean" ]
[ { "full_name": "SimpleGraph.Walk.IsHamiltonian", "code": "def IsHamiltonian (p : G.Walk a b) : Prop := ∀ a, p.support.count a = 1", "start": [ 30, 1 ], "end": [ 32, 72 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Walk.IsHamiltonian.map", "code": "lemma IsHamiltonian.map {H : SimpleGraph β} (f : G →g H) (hf : Bijective f) (hp : p.IsHamiltonian) :\n (p.map f).IsHamiltonian := by\n simp [IsHamiltonian, hf.surjective.forall, hf.injective, hp _]", "start": [ 34, 1 ], "end": [ 36, 65 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonian.mem_support", "code": "@[simp] lemma IsHamiltonian.mem_support (hp : p.IsHamiltonian) (c : α) : c ∈ p.support := by\n simp only [← List.count_pos_iff_mem, hp _, Nat.zero_lt_one]", "start": [ 38, 1 ], "end": [ 40, 62 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonian.support_toFinset", "code": "lemma IsHamiltonian.support_toFinset (hp : p.IsHamiltonian) : p.support.toFinset = Finset.univ := by\n simp [eq_univ_iff_forall, hp]", "start": [ 42, 1 ], "end": [ 44, 32 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonian.length_eq", "code": "lemma IsHamiltonian.length_eq (hp : p.IsHamiltonian) : p.length = Fintype.card α - 1 :=\n eq_tsub_of_add_eq $ by\n rw [← length_support, ← List.sum_toFinset_count_eq_length, Finset.sum_congr rfl fun _ _ ↦ hp _,\n ← card_eq_sum_ones, hp.support_toFinset, card_univ]", "start": [ 46, 1 ], "end": [ 50, 58 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonian.isPath", "code": "lemma IsHamiltonian.isPath (hp : p.IsHamiltonian) : p.IsPath :=\n IsPath.mk' <| List.nodup_iff_count_le_one.2 <| (le_of_eq <| hp ·)", "start": [ 52, 1 ], "end": [ 54, 68 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsPath.isHamiltonian_of_mem", "code": "lemma IsPath.isHamiltonian_of_mem (hp : p.IsPath) (hp' : ∀ w, w ∈ p.support) :\n p.IsHamiltonian := fun _ ↦\n le_antisymm (List.nodup_iff_count_le_one.1 hp.support_nodup _) (List.count_pos_iff_mem.2 (hp' _))", "start": [ 56, 1 ], "end": [ 59, 100 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsPath.isHamiltonian_iff", "code": "lemma IsPath.isHamiltonian_iff (hp : p.IsPath) : p.IsHamiltonian ↔ ∀ w, w ∈ p.support :=\n ⟨(·.mem_support), hp.isHamiltonian_of_mem⟩", "start": [ 61, 1 ], "end": [ 62, 45 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonianCycle", "code": "structure IsHamiltonianCycle (p : G.Walk a a) extends p.IsCycle : Prop :=\n isHamiltonian_tail : (p.tail toIsCycle.not_nil).IsHamiltonian", "start": [ 64, 1 ], "end": [ 66, 64 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Walk.IsHamiltonianCycle.isCycle", "code": "lemma IsHamiltonianCycle.isCycle (hp : p.IsHamiltonianCycle) : p.IsCycle :=\n hp.toIsCycle", "start": [ 70, 1 ], "end": [ 71, 15 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonianCycle.map", "code": "lemma IsHamiltonianCycle.map {H : SimpleGraph β} (f : G →g H) (hf : Bijective f)\n (hp : p.IsHamiltonianCycle) : (p.map f).IsHamiltonianCycle where\n toIsCycle := hp.isCycle.map hf.injective\n isHamiltonian_tail := by\n simp only [IsHamiltonian, support_tail, support_map, ne_eq, List.map_eq_nil, support_ne_nil,\n not_false_eq_true, List.count_tail, hf.surjective.forall, hf.injective,\n List.count_map_of_injective]\n intro x\n rcases p with (_ | ⟨y, p⟩)\n · cases hp.ne_nil rfl\n simp only [support_cons, List.count_cons, List.map_cons, List.head_cons, hf.injective.eq_iff,\n add_tsub_cancel_right]\n exact hp.isHamiltonian_tail _", "start": [ 73, 1 ], "end": [ 85, 34 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.isHamiltonianCycle_isCycle_and_isHamiltonian_tail", "code": "lemma isHamiltonianCycle_isCycle_and_isHamiltonian_tail :\n p.IsHamiltonianCycle ↔ ∃ h : p.IsCycle, (p.tail h.not_nil).IsHamiltonian :=\n ⟨fun ⟨h, h'⟩ ↦ ⟨h, h'⟩, fun ⟨h, h'⟩ ↦ ⟨h, h'⟩⟩", "start": [ 87, 1 ], "end": [ 89, 49 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.isHamiltonianCycle_iff_isCycle_and_support_count_tail_eq_one", "code": "lemma isHamiltonianCycle_iff_isCycle_and_support_count_tail_eq_one :\n p.IsHamiltonianCycle ↔ p.IsCycle ∧ ∀ a, (support p).tail.count a = 1 := by\n simp only [isHamiltonianCycle_isCycle_and_isHamiltonian_tail, IsHamiltonian, support_tail,\n exists_prop]", "start": [ 91, 1 ], "end": [ 94, 17 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonianCycle.mem_support", "code": "lemma IsHamiltonianCycle.mem_support (hp : p.IsHamiltonianCycle) (b : α) :\n b ∈ p.support := List.mem_of_mem_tail <| support_tail p _ ▸ hp.isHamiltonian_tail.mem_support _", "start": [ 96, 1 ], "end": [ 98, 100 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonianCycle.length_eq", "code": "lemma IsHamiltonianCycle.length_eq (hp : p.IsHamiltonianCycle) :\n p.length = Fintype.card α := by\n rw [← length_tail_add_one hp.not_nil, hp.isHamiltonian_tail.length_eq, Nat.sub_add_cancel]\n rw [Nat.succ_le, Fintype.card_pos_iff]\n exact ⟨a⟩", "start": [ 100, 1 ], "end": [ 105, 12 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonianCycle.count_support_self", "code": "lemma IsHamiltonianCycle.count_support_self (hp : p.IsHamiltonianCycle) :\n p.support.count a = 2 := by\n rw [support_eq_cons, List.count_cons_self, ← support_tail, hp.isHamiltonian_tail]", "start": [ 107, 1 ], "end": [ 109, 84 ], "kind": "lemma" }, { "full_name": "SimpleGraph.Walk.IsHamiltonianCycle.support_count_of_ne", "code": "lemma IsHamiltonianCycle.support_count_of_ne (hp : p.IsHamiltonianCycle) (h : a ≠ b) :\n p.support.count b = 1 := by\n rw [← cons_support_tail p, List.count_cons_of_ne h.symm, hp.isHamiltonian_tail]", "start": [ 111, 1 ], "end": [ 113, 82 ], "kind": "lemma" }, { "full_name": "SimpleGraph.IsHamiltonian", "code": "def IsHamiltonian (G : SimpleGraph α) : Prop :=\n Fintype.card α ≠ 1 → ∃ a, ∃ p : G.Walk a a, p.IsHamiltonianCycle", "start": [ 117, 1 ], "end": [ 121, 67 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.IsHamiltonian.mono", "code": "lemma IsHamiltonian.mono {H : SimpleGraph α} (hGH : G ≤ H) (hG : G.IsHamiltonian) :\n H.IsHamiltonian :=\n fun hα ↦ let ⟨_, p, hp⟩ := hG hα; ⟨_, p.map $ .ofLE hGH, hp.map _ bijective_id⟩", "start": [ 123, 1 ], "end": [ 125, 82 ], "kind": "lemma" }, { "full_name": "SimpleGraph.IsHamiltonian.connected", "code": "lemma IsHamiltonian.connected (hG : G.IsHamiltonian) : G.Connected where\n preconnected a b := by\n obtain rfl | hab := eq_or_ne a b\n · rfl\n have : Nontrivial α := ⟨a, b, hab⟩\n obtain ⟨_, p, hp⟩ := hG Fintype.one_lt_card.ne'\n have a_mem := hp.mem_support a\n have b_mem := hp.mem_support b\n exact ((p.takeUntil a a_mem).reverse.append $ p.takeUntil b b_mem).reachable\n nonempty := not_isEmpty_iff.1 fun _ ↦ by simpa using hG $ by simp [@Fintype.card_eq_zero]", "start": [ 127, 1 ], "end": [ 136, 92 ], "kind": "lemma" } ]
Mathlib/GroupTheory/NoncommCoprod.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Group/Commute/Hom.lean", "Mathlib/Algebra/Group/Prod.lean" ]
[ { "full_name": "MulHom.noncommCoprod", "code": "@[to_additive (attr := simps)\n \"Coproduct of two `AddHom`s with the same codomain with `AddCommute` assumption:\n `f.noncommCoprod g _ (p : M × N) = f p.1 + g p.2`.\n (For the commutative case, use `AddHom.coprod`)\"]\ndef noncommCoprod : M × N →ₙ* P where\n toFun mn := f mn.fst * g mn.snd\n map_mul' mn mn' := by simpa using (comm _ _).mul_mul_mul_comm _ _", "start": [ 38, 1 ], "end": [ 47, 68 ], "kind": "commanddeclaration" }, { "full_name": "MulHom.comp_noncommCoprod", "code": "@[to_additive]\ntheorem comp_noncommCoprod {Q : Type*} [Semigroup Q] (h : P →ₙ* Q) :\n h.comp (f.noncommCoprod g comm) =\n (h.comp f).noncommCoprod (h.comp g) (fun m n ↦ (comm m n).map h)", "start": [ 49, 1 ], "end": [ 53, 29 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.noncommCoprod", "code": "@[to_additive (attr := simps)\n \"Coproduct of two `AddMonoidHom`s with the same codomain,\n with a commutation assumption:\n `f.noncommCoprod g (p : M × N) = f p.1 + g p.2`.\n (Noncommutative case; in the commutative case, use `AddHom.coprod`.)\"]\ndef noncommCoprod : M × N →* P where\n toFun := fun mn ↦ (f mn.fst) * (g mn.snd)\n map_one' := by simp only [Prod.fst_one, Prod.snd_one, map_one, mul_one]\n __ := f.toMulHom.noncommCoprod g.toMulHom comm", "start": [ 62, 1 ], "end": [ 74, 49 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.noncommCoprod_comp_inl", "code": "@[to_additive (attr := simp)]\ntheorem noncommCoprod_comp_inl : (f.noncommCoprod g comm).comp (inl M N) = f", "start": [ 76, 1 ], "end": [ 78, 23 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.noncommCoprod_comp_inr", "code": "@[to_additive (attr := simp)]\ntheorem noncommCoprod_comp_inr : (f.noncommCoprod g comm).comp (inr M N) = g", "start": [ 80, 1 ], "end": [ 82, 23 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.noncommCoprod_unique", "code": "@[to_additive (attr := simp)]\ntheorem noncommCoprod_unique (f : M × N →* P) :\n (f.comp (inl M N)).noncommCoprod (f.comp (inr M N)) (fun _ _ => (commute_inl_inr _ _).map f)\n = f", "start": [ 84, 1 ], "end": [ 88, 71 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.noncommCoprod_inl_inr", "code": "@[to_additive (attr := simp)]\ntheorem noncommCoprod_inl_inr {M N : Type*} [Monoid M] [Monoid N]:\n (inl M N).noncommCoprod (inr M N) commute_inl_inr = id (M × N)", "start": [ 90, 1 ], "end": [ 93, 38 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.comp_noncommCoprod", "code": "@[to_additive]\ntheorem comp_noncommCoprod {Q : Type*} [Monoid Q] (h : P →* Q) :\n h.comp (f.noncommCoprod g comm) =\n (h.comp f).noncommCoprod (h.comp g) (fun m n ↦ (comm m n).map h)", "start": [ 95, 1 ], "end": [ 99, 23 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Finset/Pointwise/Interval.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Finset/Pointwise.lean", "Mathlib/Data/Set/Pointwise/Interval.lean" ]
[ { "full_name": "Finset.Icc_mul_Icc_subset'", "code": "@[to_additive Icc_add_Icc_subset]\ntheorem Icc_mul_Icc_subset' [LocallyFiniteOrder α] (a b c d : α) :\n Icc a b * Icc c d ⊆ Icc (a * c) (b * d)", "start": [ 36, 1 ], "end": [ 39, 73 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Iic_mul_Iic_subset'", "code": "@[to_additive Iic_add_Iic_subset]\ntheorem Iic_mul_Iic_subset' [LocallyFiniteOrderBot α] (a b : α) : Iic a * Iic b ⊆ Iic (a * b)", "start": [ 41, 1 ], "end": [ 43, 69 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Ici_mul_Ici_subset'", "code": "@[to_additive Ici_add_Ici_subset]\ntheorem Ici_mul_Ici_subset' [LocallyFiniteOrderTop α] (a b : α) : Ici a * Ici b ⊆ Ici (a * b)", "start": [ 45, 1 ], "end": [ 47, 69 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Icc_mul_Ico_subset'", "code": "@[to_additive Icc_add_Ico_subset]\ntheorem Icc_mul_Ico_subset' [LocallyFiniteOrder α] (a b c d : α) :\n Icc a b * Ico c d ⊆ Ico (a * c) (b * d)", "start": [ 56, 1 ], "end": [ 59, 73 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Ico_mul_Icc_subset'", "code": "@[to_additive Ico_add_Icc_subset]\ntheorem Ico_mul_Icc_subset' [LocallyFiniteOrder α] (a b c d : α) :\n Ico a b * Icc c d ⊆ Ico (a * c) (b * d)", "start": [ 61, 1 ], "end": [ 64, 73 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Ioc_mul_Ico_subset'", "code": "@[to_additive Ioc_add_Ico_subset]\ntheorem Ioc_mul_Ico_subset' [LocallyFiniteOrder α] (a b c d : α) :\n Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)", "start": [ 66, 1 ], "end": [ 69, 73 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Ico_mul_Ioc_subset'", "code": "@[to_additive Ico_add_Ioc_subset]\ntheorem Ico_mul_Ioc_subset' [LocallyFiniteOrder α] (a b c d : α) :\n Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d)", "start": [ 71, 1 ], "end": [ 74, 73 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Iic_mul_Iio_subset'", "code": "@[to_additive Iic_add_Iio_subset]\ntheorem Iic_mul_Iio_subset' [LocallyFiniteOrderBot α] (a b : α) : Iic a * Iio b ⊆ Iio (a * b)", "start": [ 76, 1 ], "end": [ 78, 69 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Iio_mul_Iic_subset'", "code": "@[to_additive Iio_add_Iic_subset]\ntheorem Iio_mul_Iic_subset' [LocallyFiniteOrderBot α] (a b : α) : Iio a * Iic b ⊆ Iio (a * b)", "start": [ 80, 1 ], "end": [ 82, 69 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Ioi_mul_Ici_subset'", "code": "@[to_additive Ioi_add_Ici_subset]\ntheorem Ioi_mul_Ici_subset' [LocallyFiniteOrderTop α] (a b : α) : Ioi a * Ici b ⊆ Ioi (a * b)", "start": [ 84, 1 ], "end": [ 86, 69 ], "kind": "commanddeclaration" }, { "full_name": "Finset.Ici_mul_Ioi_subset'", "code": "@[to_additive Ici_add_Ioi_subset]\ntheorem Ici_mul_Ioi_subset' [LocallyFiniteOrderTop α] (a b : α) : Ici a * Ioi b ⊆ Ioi (a * b)", "start": [ 88, 1 ], "end": [ 90, 69 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/Optimization/ValuedCSP.lean
[ "Mathlib/Algebra/BigOperators/Fin.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Fin/VecNotation.lean", "Mathlib/Data/Matrix/Notation.lean" ]
[ { "full_name": "ValuedCSP", "code": "@[nolint unusedArguments]\nabbrev ValuedCSP (D C : Type*) [OrderedAddCommMonoid C] :=\n Set (Σ (n : ℕ), (Fin n → D) → C)", "start": [ 35, 1 ], "end": [ 40, 35 ], "kind": "commanddeclaration" }, { "full_name": "ValuedCSP.Term", "code": "structure ValuedCSP.Term (Γ : ValuedCSP D C) (ι : Type*) where\n \n n : ℕ\n \n f : (Fin n → D) → C\n \n inΓ : ⟨n, f⟩ ∈ Γ\n \n app : Fin n → ι", "start": [ 44, 1 ], "end": [ 53, 18 ], "kind": "commanddeclaration" }, { "full_name": "ValuedCSP.Term.evalSolution", "code": "def ValuedCSP.Term.evalSolution {Γ : ValuedCSP D C} {ι : Type*}\n (t : Γ.Term ι) (x : ι → D) : C :=\n t.f (x ∘ t.app)", "start": [ 55, 1 ], "end": [ 58, 18 ], "kind": "commanddeclaration" }, { "full_name": "ValuedCSP.Instance", "code": "abbrev ValuedCSP.Instance (Γ : ValuedCSP D C) (ι : Type*) : Type _ :=\n Multiset (Γ.Term ι)", "start": [ 60, 1 ], "end": [ 62, 22 ], "kind": "commanddeclaration" }, { "full_name": "ValuedCSP.Instance.evalSolution", "code": "def ValuedCSP.Instance.evalSolution {Γ : ValuedCSP D C} {ι : Type*}\n (I : Γ.Instance ι) (x : ι → D) : C :=\n (I.map (·.evalSolution x)).sum", "start": [ 64, 1 ], "end": [ 67, 33 ], "kind": "commanddeclaration" }, { "full_name": "ValuedCSP.Instance.IsOptimumSolution", "code": "def ValuedCSP.Instance.IsOptimumSolution {Γ : ValuedCSP D C} {ι : Type*}\n (I : Γ.Instance ι) (x : ι → D) : Prop :=\n ∀ y : ι → D, I.evalSolution x ≤ I.evalSolution y", "start": [ 69, 1 ], "end": [ 72, 51 ], "kind": "commanddeclaration" }, { "full_name": "Function.HasMaxCutPropertyAt", "code": "def Function.HasMaxCutPropertyAt (f : (Fin 2 → D) → C) (a b : D) : Prop :=\n f ![a, b] = f ![b, a] ∧\n ∀ x y : D, f ![a, b] ≤ f ![x, y] ∧ (f ![a, b] = f ![x, y] → a = x ∧ b = y ∨ a = y ∧ b = x)", "start": [ 74, 1 ], "end": [ 78, 95 ], "kind": "commanddeclaration" }, { "full_name": "Function.HasMaxCutProperty", "code": "def Function.HasMaxCutProperty (f : (Fin 2 → D) → C) : Prop :=\n ∃ a b : D, a ≠ b ∧ f.HasMaxCutPropertyAt a b", "start": [ 80, 1 ], "end": [ 82, 47 ], "kind": "commanddeclaration" }, { "full_name": "FractionalOperation", "code": "abbrev FractionalOperation (D : Type*) (m : ℕ) : Type _ :=\n Multiset ((Fin m → D) → D)", "start": [ 84, 1 ], "end": [ 86, 29 ], "kind": "commanddeclaration" }, { "full_name": "FractionalOperation.size", "code": "@[simp]\ndef FractionalOperation.size (ω : FractionalOperation D m) : ℕ :=\n Multiset.card.toFun ω", "start": [ 90, 1 ], "end": [ 93, 24 ], "kind": "commanddeclaration" }, { "full_name": "FractionalOperation.IsValid", "code": "def FractionalOperation.IsValid (ω : FractionalOperation D m) : Prop :=\n ω ≠ ∅", "start": [ 95, 1 ], "end": [ 97, 8 ], "kind": "commanddeclaration" }, { "full_name": "FractionalOperation.IsValid.contains", "code": "lemma FractionalOperation.IsValid.contains {ω : FractionalOperation D m} (valid : ω.IsValid) :\n ∃ g : (Fin m → D) → D, g ∈ ω :=\n Multiset.exists_mem_of_ne_zero valid", "start": [ 99, 1 ], "end": [ 102, 39 ], "kind": "lemma" }, { "full_name": "FractionalOperation.tt", "code": "def FractionalOperation.tt {ι : Type*} (ω : FractionalOperation D m) (x : Fin m → ι → D) :\n Multiset (ι → D) :=\n ω.map (fun (g : (Fin m → D) → D) (i : ι) => g ((Function.swap x) i))", "start": [ 104, 1 ], "end": [ 107, 71 ], "kind": "commanddeclaration" }, { "full_name": "Function.AdmitsFractional", "code": "def Function.AdmitsFractional {n : ℕ} (f : (Fin n → D) → C) (ω : FractionalOperation D m) : Prop :=\n ∀ x : (Fin m → (Fin n → D)),\n m • ((ω.tt x).map f).sum ≤ ω.size • Finset.univ.sum (fun i => f (x i))", "start": [ 109, 1 ], "end": [ 112, 75 ], "kind": "commanddeclaration" }, { "full_name": "FractionalOperation.IsFractionalPolymorphismFor", "code": "def FractionalOperation.IsFractionalPolymorphismFor\n (ω : FractionalOperation D m) (Γ : ValuedCSP D C) : Prop :=\n ∀ f ∈ Γ, f.snd.AdmitsFractional ω", "start": [ 114, 1 ], "end": [ 117, 36 ], "kind": "commanddeclaration" }, { "full_name": "FractionalOperation.IsSymmetric", "code": "def FractionalOperation.IsSymmetric (ω : FractionalOperation D m) : Prop :=\n ∀ x y : (Fin m → D), List.Perm (List.ofFn x) (List.ofFn y) → ∀ g ∈ ω, g x = g y", "start": [ 119, 1 ], "end": [ 121, 82 ], "kind": "commanddeclaration" }, { "full_name": "FractionalOperation.IsSymmetricFractionalPolymorphismFor", "code": "def FractionalOperation.IsSymmetricFractionalPolymorphismFor\n (ω : FractionalOperation D m) (Γ : ValuedCSP D C) : Prop :=\n ω.IsFractionalPolymorphismFor Γ ∧ ω.IsSymmetric", "start": [ 123, 1 ], "end": [ 126, 50 ], "kind": "commanddeclaration" }, { "full_name": "Function.HasMaxCutPropertyAt.rows_lt_aux", "code": "lemma Function.HasMaxCutPropertyAt.rows_lt_aux\n {f : (Fin 2 → D) → C} {a b : D} (mcf : f.HasMaxCutPropertyAt a b) (hab : a ≠ b)\n {ω : FractionalOperation D 2} (symmega : ω.IsSymmetric)\n {r : Fin 2 → D} (rin : r ∈ (ω.tt ![![a, b], ![b, a]])) :\n f ![a, b] < f r := by\n rw [FractionalOperation.tt, Multiset.mem_map] at rin\n rw [show r = ![r 0, r 1] from List.ofFn_inj.mp rfl]\n apply lt_of_le_of_ne (mcf.right (r 0) (r 1)).left\n intro equ\n have asymm : r 0 ≠ r 1 := by\n rcases (mcf.right (r 0) (r 1)).right equ with ⟨ha0, hb1⟩ | ⟨ha1, hb0⟩\n · rw [ha0, hb1] at hab\n exact hab\n · rw [ha1, hb0] at hab\n exact hab.symm\n apply asymm\n obtain ⟨o, in_omega, rfl⟩ := rin\n show o (fun j => ![![a, b], ![b, a]] j 0) = o (fun j => ![![a, b], ![b, a]] j 1)\n convert symmega ![a, b] ![b, a] (List.Perm.swap b a []) o in_omega using 2 <;>\n simp [Matrix.const_fin1_eq]", "start": [ 130, 1 ], "end": [ 149, 32 ], "kind": "lemma" }, { "full_name": "Function.HasMaxCutProperty.forbids_commutativeFractionalPolymorphism", "code": "lemma Function.HasMaxCutProperty.forbids_commutativeFractionalPolymorphism\n {f : (Fin 2 → D) → C} (mcf : f.HasMaxCutProperty)\n {ω : FractionalOperation D 2} (valid : ω.IsValid) (symmega : ω.IsSymmetric) :\n ¬ f.AdmitsFractional ω := by\n intro contr\n obtain ⟨a, b, hab, mcfab⟩ := mcf\n specialize contr ![![a, b], ![b, a]]\n rw [Fin.sum_univ_two', ← mcfab.left, ← two_nsmul] at contr\n have sharp :\n 2 • ((ω.tt ![![a, b], ![b, a]]).map (fun _ => f ![a, b])).sum <\n 2 • ((ω.tt ![![a, b], ![b, a]]).map (fun r => f r)).sum := by\n have half_sharp :\n ((ω.tt ![![a, b], ![b, a]]).map (fun _ => f ![a, b])).sum <\n ((ω.tt ![![a, b], ![b, a]]).map (fun r => f r)).sum := by\n apply Multiset.sum_lt_sum\n · intro r rin\n exact le_of_lt (mcfab.rows_lt_aux hab symmega rin)\n · obtain ⟨g, _⟩ := valid.contains\n have : (fun i => g ((Function.swap ![![a, b], ![b, a]]) i)) ∈ ω.tt ![![a, b], ![b, a]] := by\n simp only [FractionalOperation.tt, Multiset.mem_map]\n use g\n exact ⟨_, this, mcfab.rows_lt_aux hab symmega this⟩\n rw [two_nsmul, two_nsmul]\n exact add_lt_add half_sharp half_sharp\n have impos : 2 • (ω.map (fun _ => f ![a, b])).sum < ω.size • 2 • f ![a, b] := by\n convert lt_of_lt_of_le sharp contr\n simp [FractionalOperation.tt, Multiset.map_map]\n have rhs_swap : ω.size • 2 • f ![a, b] = 2 • ω.size • f ![a, b] := nsmul_left_comm ..\n have distrib : (ω.map (fun _ => f ![a, b])).sum = ω.size • f ![a, b] := by simp\n rw [rhs_swap, distrib] at impos\n exact ne_of_lt impos rfl", "start": [ 151, 1 ], "end": [ 181, 27 ], "kind": "lemma" } ]
Mathlib/Analysis/Subadditive.lean
[ "Mathlib/Order/Filter/Archimedean.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Instances/Real.lean" ]
[ { "full_name": "Subadditive", "code": "def Subadditive (u : ℕ → ℝ) : Prop :=\n ∀ m n, u (m + n) ≤ u m + u n", "start": [ 28, 1 ], "end": [ 31, 31 ], "kind": "commanddeclaration" }, { "full_name": "Subadditive.lim", "code": "@[nolint unusedArguments] protected def lim (_h : Subadditive u) :=\n sInf ((fun n : ℕ => u n / n) '' Ici 1)", "start": [ 38, 1 ], "end": [ 42, 41 ], "kind": "commanddeclaration" }, { "full_name": "Subadditive.lim_le_div", "code": "theorem lim_le_div (hbdd : BddBelow (range fun n => u n / n)) {n : ℕ} (hn : n ≠ 0) :\n h.lim ≤ u n / n", "start": [ 45, 1 ], "end": [ 48, 75 ], "kind": "commanddeclaration" }, { "full_name": "Subadditive.apply_mul_add_le", "code": "theorem apply_mul_add_le (k n r) : u (k * n + r) ≤ k * u n + u r", "start": [ 51, 1 ], "end": [ 59, 51 ], "kind": "commanddeclaration" }, { "full_name": "Subadditive.eventually_div_lt_of_div_lt", "code": "theorem eventually_div_lt_of_div_lt {L : ℝ} {n : ℕ} (hn : n ≠ 0) (hL : u n / n < L) :\n ∀ᶠ p in atTop, u p / p < L", "start": [ 62, 1 ], "end": [ 81, 82 ], "kind": "commanddeclaration" }, { "full_name": "Subadditive.tendsto_lim", "code": "theorem tendsto_lim (hbdd : BddBelow (range fun n => u n / n)) :\n Tendsto (fun n => u n / n) atTop (𝓝 h.lim)", "start": [ 84, 1 ], "end": [ 95, 52 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/SpecificLimits/RCLike.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/SpecificLimits/Basic.lean", "Mathlib/Analysis/RCLike/Basic.lean" ]
[ { "full_name": "RCLike.tendsto_inverse_atTop_nhds_zero_nat", "code": "theorem RCLike.tendsto_inverse_atTop_nhds_zero_nat :\n Tendsto (fun n : ℕ => (n : 𝕜)⁻¹) atTop (𝓝 0)", "start": [ 19, 1 ], "end": [ 22, 7 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/FreeMonoid/Count.lean
[ "Mathlib/Algebra/FreeMonoid/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "FreeAddMonoid.countP", "code": "def countP : FreeAddMonoid α →+ ℕ where\n toFun := List.countP p\n map_zero' := List.countP_nil _\n map_add' := List.countP_append _", "start": [ 24, 1 ], "end": [ 28, 35 ], "kind": "commanddeclaration" }, { "full_name": "FreeAddMonoid.countP_of", "code": "theorem countP_of (x : α) : countP p (of x) = if p x = true then 1 else 0", "start": [ 31, 1 ], "end": [ 32, 45 ], "kind": "commanddeclaration" }, { "full_name": "FreeAddMonoid.countP_apply", "code": "theorem countP_apply (l : FreeAddMonoid α) : countP p l = List.countP p l", "start": [ 35, 1 ], "end": [ 35, 81 ], "kind": "commanddeclaration" }, { "full_name": "FreeAddMonoid.count", "code": "def count [DecidableEq α] (x : α) : FreeAddMonoid α →+ ℕ := countP (· = x)", "start": [ 38, 1 ], "end": [ 40, 75 ], "kind": "commanddeclaration" }, { "full_name": "FreeAddMonoid.count_of", "code": "theorem count_of [DecidableEq α] (x y : α) : count x (of y) = (Pi.single x 1 : α → ℕ) y", "start": [ 43, 1 ], "end": [ 45, 27 ], "kind": "commanddeclaration" }, { "full_name": "FreeAddMonoid.count_apply", "code": "theorem count_apply [DecidableEq α] (x : α) (l : FreeAddMonoid α) : count x l = List.count x l", "start": [ 48, 1 ], "end": [ 49, 6 ], "kind": "commanddeclaration" }, { "full_name": "FreeMonoid.countP", "code": "def countP : FreeMonoid α →* Multiplicative ℕ :=\n AddMonoidHom.toMultiplicative (FreeAddMonoid.countP p)", "start": [ 56, 1 ], "end": [ 58, 59 ], "kind": "commanddeclaration" }, { "full_name": "FreeMonoid.countP_of'", "code": "theorem countP_of' (x : α) :\n countP p (of x) = if p x then Multiplicative.ofAdd 1 else Multiplicative.ofAdd 0", "start": [ 61, 1 ], "end": [ 64, 54 ], "kind": "commanddeclaration" }, { "full_name": "FreeMonoid.countP_of", "code": "theorem countP_of (x : α) : countP p (of x) = if p x then Multiplicative.ofAdd 1 else 1", "start": [ 67, 1 ], "end": [ 68, 30 ], "kind": "commanddeclaration" }, { "full_name": "FreeMonoid.countP_apply", "code": "theorem countP_apply (l : FreeAddMonoid α) : countP p l = Multiplicative.ofAdd (List.countP p l)", "start": [ 72, 1 ], "end": [ 73, 6 ], "kind": "commanddeclaration" }, { "full_name": "FreeMonoid.count", "code": "def count [DecidableEq α] (x : α) : FreeMonoid α →* Multiplicative ℕ := countP (· = x)", "start": [ 76, 1 ], "end": [ 77, 87 ], "kind": "commanddeclaration" }, { "full_name": "FreeMonoid.count_apply", "code": "theorem count_apply [DecidableEq α] (x : α) (l : FreeAddMonoid α) :\n count x l = Multiplicative.ofAdd (List.count x l)", "start": [ 80, 1 ], "end": [ 81, 61 ], "kind": "commanddeclaration" }, { "full_name": "FreeMonoid.count_of", "code": "theorem count_of [DecidableEq α] (x y : α) :\n count x (of y) = @Pi.mulSingle α (fun _ => Multiplicative ℕ) _ _ x (Multiplicative.ofAdd 1) y", "start": [ 84, 1 ], "end": [ 86, 81 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Functor/OfSequence.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Category/Preorder.lean", "Mathlib/CategoryTheory/EqToHom.lean", "Mathlib/Algebra/Order/Group/Nat.lean" ]
[ { "full_name": "CategoryTheory.Functor.OfSequence.congr_f", "code": "lemma congr_f (i j : ℕ) (h : i = j) :\n f i = eqToHom (by rw [h]) ≫ f j ≫ eqToHom (by rw [h]) := by\n subst h\n simp", "start": [ 35, 1 ], "end": [ 38, 7 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.OfSequence.map", "code": "def map : ∀ {X : ℕ → C} (_ : ∀ n, X n ⟶ X (n + 1)) (i j : ℕ), i ≤ j → (X i ⟶ X j)\n | _, _, 0, 0 => fun _ ↦ 𝟙 _\n | _, f, 0, 1 => fun _ ↦ f 0\n | _, f, 0, l + 1 => fun _ ↦ f 0 ≫ map (fun n ↦ f (n + 1)) 0 l (by omega)\n | _, _, k + 1, 0 => nofun\n | _, f, k + 1, l + 1 => fun _ ↦ map (fun n ↦ f (n + 1)) k l (by omega)", "start": [ 40, 1 ], "end": [ 47, 73 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.OfSequence.map_id", "code": "lemma map_id (i : ℕ) : map f i i (by omega) = 𝟙 _ := by\n revert X f\n induction i with\n | zero => intros; rfl\n | succ _ hi =>\n intro X f\n apply hi", "start": [ 49, 1 ], "end": [ 55, 15 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.OfSequence.map_le_succ", "code": "lemma map_le_succ (i : ℕ) : map f i (i + 1) (by omega) = f i := by\n revert X f\n induction i with\n | zero => intros; rfl\n | succ _ hi =>\n intro X f\n apply hi", "start": [ 57, 1 ], "end": [ 63, 15 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.OfSequence.map_comp", "code": "@[reassoc]\nlemma map_comp (i j k : ℕ) (hij : i ≤ j) (hjk : j ≤ k) :\n map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk := by\n revert X f j k\n induction i with\n | zero =>\n intros X f j\n revert X f\n induction j with\n | zero =>\n intros X f k hij hjk\n rw [map_id, id_comp]\n | succ j hj =>\n rintro X f (_|_|k) hij hjk\n · omega\n · obtain rfl : j = 0 := by omega\n rw [map_id, comp_id]\n · dsimp [map]\n rw [hj (fun n ↦ f (n + 1)) (k + 1) (by omega) (by omega)]\n obtain _|j := j\n all_goals simp [map]\n | succ i hi =>\n rintro X f (_|j) (_|k)\n · omega\n · omega\n · omega\n · intros\n exact hi _ j k (by omega) (by omega)", "start": [ 65, 1 ], "end": [ 92, 45 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Functor.ofSequence", "code": "@[simps obj]\ndef ofSequence : ℕ ⥤ C where\n obj := X\n map {i j} φ := OfSequence.map f i j (leOfHom φ)\n map_id i := OfSequence.map_id f i\n map_comp {i j k} α β := OfSequence.map_comp f i j k (leOfHom α) (leOfHom β)", "start": [ 101, 1 ], "end": [ 108, 78 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Functor.ofSequence_map_homOfLE_succ", "code": "@[simp]\nlemma ofSequence_map_homOfLE_succ (n : ℕ) :\n (ofSequence f).map (homOfLE (Nat.le_add_right n 1)) = f n :=\n OfSequence.map_le_succ f n", "start": [ 110, 1 ], "end": [ 113, 29 ], "kind": "lemma" }, { "full_name": "CategoryTheory.NatTrans.ofSequence", "code": "@[simps app]\ndef ofSequence : F ⟶ G where\n app := app\n naturality := by\n intro i j φ\n obtain ⟨k, hk⟩ := Nat.exists_eq_add_of_le (leOfHom φ)\n obtain rfl := Subsingleton.elim φ (homOfLE (by omega))\n revert i j\n induction k with\n | zero =>\n intro i j hk\n obtain rfl : j = i := by omega\n simp\n | succ k hk =>\n intro i j hk'\n obtain rfl : j = i + k + 1 := by omega\n simp only [← homOfLE_comp (show i ≤ i + k by omega) (show i + k ≤ i + k + 1 by omega),\n Functor.map_comp, assoc, naturality, reassoc_of% (hk rfl)]", "start": [ 123, 1 ], "end": [ 143, 69 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/Sheaves/Skyscraper.lean
[ "Mathlib/Topology/Sheaves/Stalks.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Sheaves/Functors.lean", "Mathlib/Topology/Sheaves/PUnit.lean" ]
[ { "full_name": "skyscraperPresheaf", "code": "@[simps]\ndef skyscraperPresheaf : Presheaf C X where\n obj U := if p₀ ∈ unop U then A else terminal C\n map {U V} i :=\n if h : p₀ ∈ unop V then eqToHom <| by dsimp; erw [if_pos h, if_pos (leOfHom i.unop h)]\n else ((if_neg h).symm.ndrec terminalIsTerminal).from _\n map_id U :=\n (em (p₀ ∈ U.unop)).elim (fun h => dif_pos h) fun h =>\n ((if_neg h).symm.ndrec terminalIsTerminal).hom_ext _ _\n map_comp {U V W} iVU iWV := by\n by_cases hW : p₀ ∈ unop W\n · have hV : p₀ ∈ unop V := leOfHom iWV.unop hW\n simp only [dif_pos hW, dif_pos hV, eqToHom_trans]\n · dsimp; rw [dif_neg hW]; apply ((if_neg hW).symm.ndrec terminalIsTerminal).hom_ext", "start": [ 48, 1 ], "end": [ 65, 88 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheaf_eq_pushforward", "code": "theorem skyscraperPresheaf_eq_pushforward\n [hd : ∀ U : Opens (TopCat.of PUnit.{u + 1}), Decidable (PUnit.unit ∈ U)] :\n skyscraperPresheaf p₀ A =\n ContinuousMap.const (TopCat.of PUnit) p₀ _*\n skyscraperPresheaf (X := TopCat.of PUnit) PUnit.unit A", "start": [ 68, 1 ], "end": [ 74, 26 ], "kind": "commanddeclaration" }, { "full_name": "SkyscraperPresheafFunctor.map'", "code": "@[simps]\ndef SkyscraperPresheafFunctor.map' {a b : C} (f : a ⟶ b) :\n skyscraperPresheaf p₀ a ⟶ skyscraperPresheaf p₀ b where\n app U :=\n if h : p₀ ∈ U.unop then eqToHom (if_pos h) ≫ f ≫ eqToHom (if_pos h).symm\n else ((if_neg h).symm.ndrec terminalIsTerminal).from _\n naturality U V i := by\n simp only [skyscraperPresheaf_map]; by_cases hV : p₀ ∈ V.unop\n · have hU : p₀ ∈ U.unop := leOfHom i.unop hV; split_ifs\n simp only [eqToHom_trans_assoc, Category.assoc, eqToHom_trans]\n · apply ((if_neg hV).symm.ndrec terminalIsTerminal).hom_ext", "start": [ 77, 1 ], "end": [ 91, 64 ], "kind": "commanddeclaration" }, { "full_name": "SkyscraperPresheafFunctor.map'_id", "code": "theorem SkyscraperPresheafFunctor.map'_id {a : C} :\n SkyscraperPresheafFunctor.map' p₀ (𝟙 a) = 𝟙 _", "start": [ 94, 1 ], "end": [ 97, 91 ], "kind": "commanddeclaration" }, { "full_name": "SkyscraperPresheafFunctor.map'_comp", "code": "theorem SkyscraperPresheafFunctor.map'_comp {a b c : C} (f : a ⟶ b) (g : b ⟶ c) :\n SkyscraperPresheafFunctor.map' p₀ (f ≫ g) =\n SkyscraperPresheafFunctor.map' p₀ f ≫ SkyscraperPresheafFunctor.map' p₀ g", "start": [ 100, 1 ], "end": [ 107, 33 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafFunctor", "code": "@[simps]\ndef skyscraperPresheafFunctor : C ⥤ Presheaf C X where\n obj := skyscraperPresheaf p₀\n map := SkyscraperPresheafFunctor.map' p₀\n map_id _ := SkyscraperPresheafFunctor.map'_id p₀\n map_comp := SkyscraperPresheafFunctor.map'_comp p₀", "start": [ 110, 1 ], "end": [ 119, 53 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafCoconeOfSpecializes", "code": "@[simps]\ndef skyscraperPresheafCoconeOfSpecializes {y : X} (h : p₀ ⤳ y) :\n Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A) where\n pt := A\n ι :=\n { app := fun U => eqToHom <| if_pos <| h.mem_open U.unop.1.2 U.unop.2\n naturality := fun U V inc => by\n change dite _ _ _ ≫ _ = _; rw [dif_pos]\n swap · exact h.mem_open V.unop.1.2 V.unop.2\n · simp only [Functor.comp_obj, Functor.op_obj, skyscraperPresheaf_obj, unop_op,\n Functor.const_obj_obj, eqToHom_trans, Functor.const_obj_map, Category.comp_id] }", "start": [ 130, 1 ], "end": [ 143, 93 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafCoconeIsColimitOfSpecializes", "code": "noncomputable def skyscraperPresheafCoconeIsColimitOfSpecializes {y : X} (h : p₀ ⤳ y) :\n IsColimit (skyscraperPresheafCoconeOfSpecializes p₀ A h) where\n desc c := eqToHom (if_pos trivial).symm ≫ c.ι.app (op ⊤)\n fac c U := by\n dsimp rw [← c.w (homOfLE <| (le_top : unop U ≤ _)).op]\n change _ ≫ _ ≫ dite _ _ _ ≫ _ = _\n rw [dif_pos]\n · simp only [skyscraperPresheafCoconeOfSpecializes_ι_app, eqToHom_trans_assoc,\n eqToHom_refl, Category.id_comp, unop_op, op_unop]\n · exact h.mem_open U.unop.1.2 U.unop.2\n uniq c f h := by\n dsimp rw [← h, skyscraperPresheafCoconeOfSpecializes_ι_app, eqToHom_trans_assoc, eqToHom_refl,\n Category.id_comp]", "start": [ 146, 1 ], "end": [ 164, 24 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafStalkOfSpecializes", "code": "noncomputable def skyscraperPresheafStalkOfSpecializes [HasColimits C] {y : X} (h : p₀ ⤳ y) :\n (skyscraperPresheaf p₀ A).stalk y ≅ A :=\n colimit.isoColimitCocone ⟨_, skyscraperPresheafCoconeIsColimitOfSpecializes p₀ A h⟩", "start": [ 167, 1 ], "end": [ 171, 86 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafCocone", "code": "@[simps]\ndef skyscraperPresheafCocone (y : X) :\n Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A) where\n pt := terminal C\n ι :=\n { app := fun _ => terminal.from _\n naturality := fun _ _ _ => terminalIsTerminal.hom_ext _ _ }", "start": [ 174, 1 ], "end": [ 182, 66 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafCoconeIsColimitOfNotSpecializes", "code": "noncomputable def skyscraperPresheafCoconeIsColimitOfNotSpecializes {y : X} (h : ¬p₀ ⤳ y) :\n IsColimit (skyscraperPresheafCocone p₀ A y) :=\n let h1 : ∃ U : OpenNhds y, p₀ ∉ U.1 :=\n let ⟨U, ho, h₀, hy⟩ := not_specializes_iff_exists_open.mp h\n ⟨⟨⟨U, ho⟩, h₀⟩, hy⟩\n { desc := fun c => eqToHom (if_neg h1.choose_spec).symm ≫ c.ι.app (op h1.choose)\n fac := fun c U => by\n change _ = c.ι.app (op U.unop)\n simp only [← c.w (homOfLE <| @inf_le_left _ _ h1.choose U.unop).op, ←\n c.w (homOfLE <| @inf_le_right _ _ h1.choose U.unop).op, ← Category.assoc]\n congr 1\n refine ((if_neg ?_).symm.ndrec terminalIsTerminal).hom_ext _ _\n exact fun h => h1.choose_spec h.1\n uniq := fun c f H => by\n dsimp rw [← Category.id_comp f, ← H, ← Category.assoc]\n congr 1; apply terminalIsTerminal.hom_ext }", "start": [ 185, 1 ], "end": [ 205, 50 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafStalkOfNotSpecializes", "code": "noncomputable def skyscraperPresheafStalkOfNotSpecializes [HasColimits C] {y : X} (h : ¬p₀ ⤳ y) :\n (skyscraperPresheaf p₀ A).stalk y ≅ terminal C :=\n colimit.isoColimitCocone ⟨_, skyscraperPresheafCoconeIsColimitOfNotSpecializes _ A h⟩", "start": [ 208, 1 ], "end": [ 213, 88 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafStalkOfNotSpecializesIsTerminal", "code": "def skyscraperPresheafStalkOfNotSpecializesIsTerminal [HasColimits C] {y : X} (h : ¬p₀ ⤳ y) :\n IsTerminal ((skyscraperPresheaf p₀ A).stalk y) :=\n IsTerminal.ofIso terminalIsTerminal <| (skyscraperPresheafStalkOfNotSpecializes _ _ h).symm", "start": [ 216, 1 ], "end": [ 220, 94 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheaf_isSheaf", "code": "theorem skyscraperPresheaf_isSheaf : (skyscraperPresheaf p₀ A).IsSheaf", "start": [ 223, 1 ], "end": [ 233, 56 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperSheaf", "code": "def skyscraperSheaf : Sheaf C X :=\n ⟨skyscraperPresheaf p₀ A, skyscraperPresheaf_isSheaf _ _⟩", "start": [ 236, 1 ], "end": [ 241, 60 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperSheafFunctor", "code": "def skyscraperSheafFunctor : C ⥤ Sheaf C X where\n obj c := skyscraperSheaf p₀ c\n map f := Sheaf.Hom.mk <| (skyscraperPresheafFunctor p₀).map f\n map_id _ := Sheaf.Hom.ext _ _ <| (skyscraperPresheafFunctor p₀).map_id _\n map_comp _ _ := Sheaf.Hom.ext _ _ <| (skyscraperPresheafFunctor p₀).map_comp _ _", "start": [ 244, 1 ], "end": [ 252, 83 ], "kind": "commanddeclaration" }, { "full_name": "StalkSkyscraperPresheafAdjunctionAuxs.toSkyscraperPresheaf", "code": "@[simps]\ndef toSkyscraperPresheaf {𝓕 : Presheaf C X} {c : C} (f : 𝓕.stalk p₀ ⟶ c) :\n 𝓕 ⟶ skyscraperPresheaf p₀ c where\n app U :=\n if h : p₀ ∈ U.unop then 𝓕.germ ⟨p₀, h⟩ ≫ f ≫ eqToHom (if_pos h).symm\n else ((if_neg h).symm.ndrec terminalIsTerminal).from _\n naturality U V inc := by\n dsimp\n by_cases hV : p₀ ∈ V.unop\n · have hU : p₀ ∈ U.unop := leOfHom inc.unop hV\n split_ifs\n erw [← Category.assoc, 𝓕.germ_res inc.unop, Category.assoc, Category.assoc, eqToHom_trans]\n · split_ifs\n exact ((if_neg hV).symm.ndrec terminalIsTerminal).hom_ext ..", "start": [ 259, 1 ], "end": [ 278, 67 ], "kind": "commanddeclaration" }, { "full_name": "StalkSkyscraperPresheafAdjunctionAuxs.fromStalk", "code": "def fromStalk {𝓕 : Presheaf C X} {c : C} (f : 𝓕 ⟶ skyscraperPresheaf p₀ c) : 𝓕.stalk p₀ ⟶ c :=\n let χ : Cocone ((OpenNhds.inclusion p₀).op ⋙ 𝓕) :=\n Cocone.mk c <|\n { app := fun U => f.app (op U.unop.1) ≫ eqToHom (if_pos U.unop.2)\n naturality := fun U V inc => by\n dsimp\n erw [Category.comp_id, ← Category.assoc, comp_eqToHom_iff, Category.assoc,\n eqToHom_trans, f.naturality, skyscraperPresheaf_map]\n dsimp only [skyscraperPresheaf_obj, unop_op, Eq.ndrec]\n have hV : p₀ ∈ (OpenNhds.inclusion p₀).obj V.unop := V.unop.2; split_ifs <;>\n simp only [comp_eqToHom_iff, Category.assoc, eqToHom_trans, eqToHom_refl,\n Category.comp_id] <;> rfl }\n colimit.desc _ χ", "start": [ 281, 1 ], "end": [ 297, 19 ], "kind": "commanddeclaration" }, { "full_name": "StalkSkyscraperPresheafAdjunctionAuxs.to_skyscraper_fromStalk", "code": "theorem to_skyscraper_fromStalk {𝓕 : Presheaf C X} {c : C} (f : 𝓕 ⟶ skyscraperPresheaf p₀ c) :\n toSkyscraperPresheaf p₀ (fromStalk _ f) = f", "start": [ 300, 1 ], "end": [ 308, 64 ], "kind": "commanddeclaration" }, { "full_name": "StalkSkyscraperPresheafAdjunctionAuxs.fromStalk_to_skyscraper", "code": "theorem fromStalk_to_skyscraper {𝓕 : Presheaf C X} {c : C} (f : 𝓕.stalk p₀ ⟶ c) :\n fromStalk p₀ (toSkyscraperPresheaf _ f) = f", "start": [ 311, 1 ], "end": [ 317, 12 ], "kind": "commanddeclaration" }, { "full_name": "StalkSkyscraperPresheafAdjunctionAuxs.unit", "code": "@[simps]\nprotected def unit :\n 𝟭 (Presheaf C X) ⟶ Presheaf.stalkFunctor C p₀ ⋙ skyscraperPresheafFunctor p₀ where\n app 𝓕 := toSkyscraperPresheaf _ <| 𝟙 _\n naturality 𝓕 𝓖 f := by\n ext U; dsimp\n split_ifs with h\n · simp only [Category.id_comp, ← Category.assoc]; rw [comp_eqToHom_iff]\n simp only [Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id]\n erw [colimit.ι_map]; rfl\n · apply ((if_neg h).symm.ndrec terminalIsTerminal).hom_ext", "start": [ 320, 1 ], "end": [ 332, 63 ], "kind": "commanddeclaration" }, { "full_name": "StalkSkyscraperPresheafAdjunctionAuxs.counit", "code": "@[simps]\nprotected def counit :\n skyscraperPresheafFunctor p₀ ⋙ (Presheaf.stalkFunctor C p₀ : Presheaf C X ⥤ C) ⟶ 𝟭 C where\n app c := (skyscraperPresheafStalkOfSpecializes p₀ c specializes_rfl).hom\n naturality x y f := colimit.hom_ext fun U => by\n erw [← Category.assoc, colimit.ι_map, colimit.isoColimitCocone_ι_hom_assoc,\n skyscraperPresheafCoconeOfSpecializes_ι_app (h := specializes_rfl), Category.assoc,\n colimit.ι_desc, whiskeringLeft_obj_map, whiskerLeft_app, SkyscraperPresheafFunctor.map'_app,\n dif_pos U.unop.2, skyscraperPresheafCoconeOfSpecializes_ι_app (h := specializes_rfl),\n comp_eqToHom_iff, Category.assoc, eqToHom_comp_iff, ← Category.assoc, eqToHom_trans,\n eqToHom_refl, Category.id_comp, comp_eqToHom_iff, Category.assoc, eqToHom_trans, eqToHom_refl,\n Category.comp_id, CategoryTheory.Functor.id_map]", "start": [ 335, 1 ], "end": [ 348, 55 ], "kind": "commanddeclaration" }, { "full_name": "skyscraperPresheafStalkAdjunction", "code": "def skyscraperPresheafStalkAdjunction [HasColimits C] :\n (Presheaf.stalkFunctor C p₀ : Presheaf C X ⥤ C) ⊣ skyscraperPresheafFunctor p₀ where\n homEquiv c 𝓕 :=\n { toFun := toSkyscraperPresheaf _\n invFun := fromStalk _\n left_inv := fromStalk_to_skyscraper _\n right_inv := to_skyscraper_fromStalk _ }\n unit := StalkSkyscraperPresheafAdjunctionAuxs.unit _\n counit := StalkSkyscraperPresheafAdjunctionAuxs.counit _\n homEquiv_unit {𝓕} c α := by\n ext U;\n rw [NatTrans.comp_app]\n simp only [Equiv.coe_fn_mk, toSkyscraperPresheaf_app, SkyscraperPresheafFunctor.map'_app,\n skyscraperPresheafFunctor_map, unit_app]\n split_ifs with h\n · erw [Category.id_comp, ← Category.assoc, comp_eqToHom_iff, Category.assoc, Category.assoc,\n Category.assoc, Category.assoc, eqToHom_trans, eqToHom_refl, Category.comp_id, ←\n Category.assoc _ _ α, eqToHom_trans, eqToHom_refl, Category.id_comp]\n · apply ((if_neg h).symm.ndrec terminalIsTerminal).hom_ext\n homEquiv_counit {𝓕} c α := by\n dsimp; ext U; simp only [Equiv.coe_fn_symm_mk, counit_app]\n erw [colimit.ι_desc, ← Category.assoc, colimit.ι_map, whiskerLeft_app, Category.assoc,\n colimit.ι_desc]\n rfl", "start": [ 357, 1 ], "end": [ 384, 8 ], "kind": "commanddeclaration" }, { "full_name": "stalkSkyscraperSheafAdjunction", "code": "def stalkSkyscraperSheafAdjunction [HasColimits C] :\n Sheaf.forget C X ⋙ Presheaf.stalkFunctor _ p₀ ⊣ skyscraperSheafFunctor p₀ where\n homEquiv 𝓕 c :=\n ⟨fun f => ⟨toSkyscraperPresheaf p₀ f⟩, fun g => fromStalk p₀ g.1, fromStalk_to_skyscraper p₀,\n fun g => Sheaf.Hom.ext _ _ <| to_skyscraper_fromStalk _ _⟩\n unit :=\n { app := fun 𝓕 => ⟨(StalkSkyscraperPresheafAdjunctionAuxs.unit p₀).app 𝓕.1⟩\n naturality := fun 𝓐 𝓑 f => Sheaf.Hom.ext _ _ <| by\n apply (StalkSkyscraperPresheafAdjunctionAuxs.unit p₀).naturality }\n counit := StalkSkyscraperPresheafAdjunctionAuxs.counit p₀\n homEquiv_unit {𝓐} c f := Sheaf.Hom.ext _ _ (skyscraperPresheafStalkAdjunction p₀).homEquiv_unit\n homEquiv_counit {𝓐} c f := (skyscraperPresheafStalkAdjunction p₀).homEquiv_counit", "start": [ 395, 1 ], "end": [ 409, 84 ], "kind": "commanddeclaration" } ]
Mathlib/Util/FormatTable.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/String/Defs.lean" ]
[ { "full_name": "Alignment", "code": "inductive Alignment where\n | left\n | right\n | center\nderiving Inhabited, BEq", "start": [ 16, 1 ], "end": [ 21, 24 ], "kind": "commanddeclaration" }, { "full_name": "String.justify", "code": "def String.justify (s : String) (a : Alignment) (width : Nat) : String :=\n match a with\n | Alignment.left => s.rightpad width\n | Alignment.right => s.leftpad width\n | Alignment.center =>\n let pad := (width - s.length) / 2\n String.replicate pad ' ' ++ s ++ String.replicate (width - s.length - pad) ' '", "start": [ 23, 1 ], "end": [ 30, 83 ], "kind": "commanddeclaration" }, { "full_name": "formatTable", "code": "def formatTable (headers : Array String) (table : Array (Array String))\n (alignments : Option (Array Alignment) := none) :\n String := Id.run do\n let alignments := alignments.getD (Array.mkArray headers.size Alignment.left)\n let mut widths := headers.map (·.length)\n for row in table do\n for i in [0:widths.size] do\n widths := widths.set! i (max widths[i]! ((row[i]?.map (·.length)).getD 0))\n let paddedHeaders := headers.mapIdx fun i h => h.rightpad widths[i]!\n let paddedTable := table.map fun row => row.mapIdx fun i cell =>\n cell.justify alignments[i]! widths[i]!\n let headerLine := \"| \" ++ String.intercalate \" | \" (paddedHeaders.toList) ++ \" |\"\n let separatorLine :=\n \"| \"\n ++ String.intercalate \" | \"\n (((widths.zip alignments).map fun ⟨w, a⟩ =>\n match a with\n | Alignment.left => \":\" ++ String.replicate (w-1) '-'\n | Alignment.right => String.replicate (w-1) '-' ++ \":\"\n | Alignment.center => \":\" ++ String.replicate (w-2) '-' ++ \":\"\n ).toList)\n ++ \" |\"\n let rowLines := paddedTable.map (fun row => \"| \" ++ String.intercalate \" | \" (row.toList) ++ \" |\")\n return String.intercalate \"\\n\" (headerLine :: separatorLine :: rowLines.toList)", "start": [ 32, 1 ], "end": [ 66, 82 ], "kind": "commanddeclaration" } ]
Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/GradedAlgebra/Radical.lean", "Mathlib/AlgebraicGeometry/ProjectiveSpectrum/StructureSheaf.lean", "Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean" ]
[ { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.carrier", "code": "def carrier : Ideal (A⁰_ f) :=\n Ideal.comap (algebraMap (A⁰_ f) (Away f))\n (x.val.asHomogeneousIdeal.toIdeal.map (algebraMap A (Away f)))", "start": [ 168, 1 ], "end": [ 173, 67 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.mk_mem_carrier", "code": "@[simp]\ntheorem mk_mem_carrier (z : HomogeneousLocalization.NumDenSameDeg 𝒜 (.powers f)) :\n HomogeneousLocalization.mk z ∈ carrier x ↔ z.num.1 ∈ x.1.asHomogeneousIdeal", "start": [ 176, 1 ], "end": [ 186, 33 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.isPrime_carrier", "code": "theorem isPrime_carrier : Ideal.IsPrime (carrier x)", "start": [ 188, 1 ], "end": [ 192, 86 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.toFun", "code": "@[simps (config := .lemmasOnly)]\ndef toFun (x : Proj.T| pbo f) : Spec.T A⁰_ f :=\n ⟨carrier x, isPrime_carrier x⟩", "start": [ 196, 1 ], "end": [ 201, 33 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.preimage_basicOpen", "code": "theorem preimage_basicOpen (z : HomogeneousLocalization.NumDenSameDeg 𝒜 (.powers f)) :\n toFun f ⁻¹' (sbo (HomogeneousLocalization.mk z) : Set (PrimeSpectrum (A⁰_ f))) =\n Subtype.val ⁻¹' (pbo z.num.1 : Set (ProjectiveSpectrum 𝒜))", "start": [ 209, 1 ], "end": [ 212, 43 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec", "code": "@[simps! (config := .lemmasOnly) apply_asIdeal]\ndef toSpec (f : A) : (Proj.T| pbo f) ⟶ Spec.T A⁰_ f where\n toFun := ToSpec.toFun f\n continuous_toFun := by\n rw [PrimeSpectrum.isTopologicalBasis_basic_opens.continuous_iff]\n rintro _ ⟨x, rfl⟩\n obtain ⟨x, rfl⟩ := Quotient.surjective_Quotient_mk'' x\n rw [ToSpec.preimage_basicOpen]\n exact (pbo x.num).2.preimage continuous_subtype_val", "start": [ 219, 1 ], "end": [ 229, 56 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec_preimage_basicOpen", "code": "lemma toSpec_preimage_basicOpen {f} (z : HomogeneousLocalization.NumDenSameDeg 𝒜 (.powers f)) :\n toSpec 𝒜 f ⁻¹' (sbo (HomogeneousLocalization.mk z) : Set (PrimeSpectrum (A⁰_ f))) =\n Subtype.val ⁻¹' (pbo z.num.1 : Set (ProjectiveSpectrum 𝒜)) :=\n ToSpec.preimage_basicOpen f z", "start": [ 233, 1 ], "end": [ 236, 32 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier", "code": "def carrier (q : Spec.T A⁰_ f) : Set A :=\n {a | ∀ i, (HomogeneousLocalization.mk ⟨m * i, ⟨proj 𝒜 i a ^ m, by mem_tac⟩,\n ⟨f ^ i, by rw [mul_comm]; mem_tac⟩, ⟨_, rfl⟩⟩ : A⁰_ f) ∈ q.1}", "start": [ 262, 1 ], "end": [ 276, 76 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.mem_carrier_iff", "code": "theorem mem_carrier_iff (q : Spec.T A⁰_ f) (a : A) :\n a ∈ carrier f_deg q ↔ ∀ i, (HomogeneousLocalization.mk ⟨m * i, ⟨proj 𝒜 i a ^ m, by mem_tac⟩,\n ⟨f ^ i, by rw [mul_comm]; mem_tac⟩, ⟨_, rfl⟩⟩ : A⁰_ f) ∈ q.1", "start": [ 279, 1 ], "end": [ 282, 10 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.mem_carrier_iff'", "code": "theorem mem_carrier_iff' (q : Spec.T A⁰_ f) (a : A) :\n a ∈ carrier f_deg q ↔\n ∀ i, (Localization.mk (proj 𝒜 i a ^ m) ⟨f ^ i, ⟨i, rfl⟩⟩ : Localization.Away f) ∈\n algebraMap (HomogeneousLocalization.Away 𝒜 f) (Localization.Away f) '' { s | s ∈ q.1 }", "start": [ 285, 1 ], "end": [ 297, 53 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.mem_carrier_iff_of_mem", "code": "theorem mem_carrier_iff_of_mem (hm : 0 < m) (q : Spec.T A⁰_ f) (a : A) {n} (hn : a ∈ 𝒜 n) :\n a ∈ carrier f_deg q ↔\n (HomogeneousLocalization.mk ⟨m * n, ⟨a ^ m, pow_mem_graded m hn⟩,\n ⟨f ^ n, by rw [mul_comm]; mem_tac⟩, ⟨_, rfl⟩⟩ : A⁰_ f) ∈ q.asIdeal", "start": [ 300, 1 ], "end": [ 311, 55 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.mem_carrier_iff_of_mem_mul", "code": "theorem mem_carrier_iff_of_mem_mul (hm : 0 < m)\n (q : Spec.T A⁰_ f) (a : A) {n} (hn : a ∈ 𝒜 (n * m)) :\n a ∈ carrier f_deg q ↔ (HomogeneousLocalization.mk ⟨m * n, ⟨a, mul_comm n m ▸ hn⟩,\n ⟨f ^ n, by rw [mul_comm]; mem_tac⟩, ⟨_, rfl⟩⟩ : A⁰_ f) ∈ q.asIdeal", "start": [ 313, 1 ], "end": [ 323, 6 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.num_mem_carrier_iff", "code": "theorem num_mem_carrier_iff (hm : 0 < m) (q : Spec.T A⁰_ f)\n (z : HomogeneousLocalization.NumDenSameDeg 𝒜 (.powers f)) :\n z.num.1 ∈ carrier f_deg q ↔ HomogeneousLocalization.mk z ∈ q.asIdeal", "start": [ 325, 1 ], "end": [ 335, 44 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.add_mem", "code": "theorem carrier.add_mem (q : Spec.T A⁰_ f) {a b : A} (ha : a ∈ carrier f_deg q)\n (hb : b ∈ carrier f_deg q) : a + b ∈ carrier f_deg q", "start": [ 337, 1 ], "end": [ 387, 27 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.zero_mem", "code": "theorem carrier.zero_mem : (0 : A) ∈ carrier f_deg q", "start": [ 392, 1 ], "end": [ 396, 67 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.smul_mem", "code": "theorem carrier.smul_mem (c x : A) (hx : x ∈ carrier f_deg q) : c • x ∈ carrier f_deg q", "start": [ 399, 1 ], "end": [ 425, 65 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.asIdeal", "code": "def carrier.asIdeal : Ideal A where\n carrier := carrier f_deg q\n zero_mem' := carrier.zero_mem f_deg hm q\n add_mem' := carrier.add_mem f_deg q\n smul_mem' := carrier.smul_mem f_deg hm q", "start": [ 428, 1 ], "end": [ 434, 43 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.asIdeal.homogeneous", "code": "theorem carrier.asIdeal.homogeneous : (carrier.asIdeal f_deg hm q).IsHomogeneous 𝒜", "start": [ 438, 1 ], "end": [ 443, 69 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.asHomogeneousIdeal", "code": "def carrier.asHomogeneousIdeal : HomogeneousIdeal 𝒜 :=\n ⟨carrier.asIdeal f_deg hm q, carrier.asIdeal.homogeneous f_deg hm q⟩", "start": [ 446, 1 ], "end": [ 449, 71 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.denom_not_mem", "code": "theorem carrier.denom_not_mem : f ∉ carrier.asIdeal f_deg hm q", "start": [ 452, 1 ], "end": [ 461, 76 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.relevant", "code": "theorem carrier.relevant : ¬HomogeneousIdeal.irrelevant 𝒜 ≤ carrier.asHomogeneousIdeal f_deg hm q", "start": [ 464, 1 ], "end": [ 465, 101 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.asIdeal.ne_top", "code": "theorem carrier.asIdeal.ne_top : carrier.asIdeal f_deg hm q ≠ ⊤", "start": [ 468, 1 ], "end": [ 469, 66 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.asIdeal.prime", "code": "theorem carrier.asIdeal.prime : (carrier.asIdeal f_deg hm q).IsPrime", "start": [ 472, 1 ], "end": [ 491, 40 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.toFun", "code": "def toFun : (Spec.T A⁰_ f) → Proj.T| pbo f := fun q =>\n ⟨⟨carrier.asHomogeneousIdeal f_deg hm q, carrier.asIdeal.prime f_deg hm q,\n carrier.relevant f_deg hm q⟩,\n (ProjectiveSpectrum.mem_basicOpen _ f _).mp <| carrier.denom_not_mem f_deg hm q⟩", "start": [ 494, 1 ], "end": [ 498, 85 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec_fromSpec", "code": "lemma toSpec_fromSpec {f : A} {m : ℕ} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) (x : Spec.T (A⁰_ f)) :\n toSpec 𝒜 f (FromSpec.toFun f_deg hm x) = x := by\n apply PrimeSpectrum.ext\n ext z\n obtain ⟨z, rfl⟩ := z.mk_surjective\n rw [← FromSpec.num_mem_carrier_iff f_deg hm x]\n exact ToSpec.mk_mem_carrier _ z", "start": [ 505, 1 ], "end": [ 511, 34 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.fromSpec_toSpec", "code": "lemma fromSpec_toSpec {f : A} {m : ℕ} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) (x : Proj.T| pbo f) :\n FromSpec.toFun f_deg hm (toSpec 𝒜 f x) = x := by\n refine Subtype.ext <| ProjectiveSpectrum.ext _ _ <| HomogeneousIdeal.ext' ?_\n intros i z hzi\n refine (FromSpec.mem_carrier_iff_of_mem f_deg hm _ _ hzi).trans ?_\n exact (ToSpec.mk_mem_carrier _ _).trans (x.1.2.pow_mem_iff_mem m hm)", "start": [ 519, 1 ], "end": [ 524, 71 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec_injective", "code": "lemma toSpec_injective {f : A} {m : ℕ} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n Function.Injective (toSpec 𝒜 f) := by\n intro x₁ x₂ h\n have := congr_arg (FromSpec.toFun f_deg hm) h\n rwa [fromSpec_toSpec, fromSpec_toSpec] at this", "start": [ 526, 1 ], "end": [ 530, 49 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec_surjective", "code": "lemma toSpec_surjective {f : A} {m : ℕ} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n Function.Surjective (toSpec 𝒜 f) :=\n Function.surjective_iff_hasRightInverse |>.mpr\n ⟨FromSpec.toFun f_deg hm, toSpec_fromSpec 𝒜 f_deg hm⟩", "start": [ 532, 1 ], "end": [ 535, 58 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec_bijective", "code": "lemma toSpec_bijective {f : A} {m : ℕ} (f_deg : f ∈ 𝒜 m) (hm : 0 < m):\n Function.Bijective (toSpec (𝒜 := 𝒜) (f := f)) :=\n ⟨toSpec_injective 𝒜 f_deg hm, toSpec_surjective 𝒜 f_deg hm⟩", "start": [ 537, 1 ], "end": [ 539, 62 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec.image_basicOpen_eq_basicOpen", "code": "lemma image_basicOpen_eq_basicOpen (a : A) (i : ℕ) :\n toSpec 𝒜 f '' (Subtype.val ⁻¹' (pbo (decompose 𝒜 a i) : Set (ProjectiveSpectrum 𝒜))) =\n (PrimeSpectrum.basicOpen (R := A⁰_ f) <|\n HomogeneousLocalization.mk\n ⟨m * i, ⟨decompose 𝒜 a i ^ m, SetLike.pow_mem_graded _ (Submodule.coe_mem _)⟩,\n ⟨f^i, by rw [mul_comm]; exact SetLike.pow_mem_graded _ f_deg⟩, ⟨i, rfl⟩⟩).1 :=\n Set.preimage_injective.mpr (toSpec_surjective 𝒜 f_deg hm) <|\n Set.preimage_image_eq _ (toSpec_injective 𝒜 f_deg hm) ▸ by\n rw [Opens.carrier_eq_coe, toSpec_preimage_basicOpen, ProjectiveSpectrum.basicOpen_pow 𝒜 _ m hm]", "start": [ 548, 1 ], "end": [ 556, 98 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjIsoSpecTopComponent.fromSpec", "code": "def fromSpec {f : A} {m : ℕ} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n (Spec.T (A⁰_ f)) ⟶ (Proj.T| (pbo f)) where\n toFun := FromSpec.toFun f_deg hm\n continuous_toFun := by\n rw [isTopologicalBasis_subtype (ProjectiveSpectrum.isTopologicalBasis_basic_opens 𝒜) (pbo f).1\n |>.continuous_iff]\n rintro s ⟨_, ⟨a, rfl⟩, rfl⟩\n have h₁ : Subtype.val (p := (pbo f).1) ⁻¹' (pbo a) =\n ⋃ i : ℕ, Subtype.val (p := (pbo f).1) ⁻¹' (pbo (decompose 𝒜 a i)) := by\n simp [ProjectiveSpectrum.basicOpen_eq_union_of_projection 𝒜 a]\n let e : _ ≃ _ :=\n ⟨FromSpec.toFun f_deg hm, ToSpec.toFun f, toSpec_fromSpec _ _ _, fromSpec_toSpec _ _ _⟩\n change IsOpen <| e ⁻¹' _\n rw [Set.preimage_equiv_eq_image_symm, h₁, Set.image_iUnion]\n exact isOpen_iUnion fun i ↦ toSpec.image_basicOpen_eq_basicOpen f_deg hm a i ▸\n PrimeSpectrum.isOpen_basicOpen", "start": [ 561, 1 ], "end": [ 578, 37 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.projIsoSpecTopComponent", "code": "def projIsoSpecTopComponent {f : A} {m : ℕ} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n (Proj.T| (pbo f)) ≅ (Spec.T (A⁰_ f)) where\n hom := ProjIsoSpecTopComponent.toSpec 𝒜 f\n inv := ProjIsoSpecTopComponent.fromSpec f_deg hm\n hom_inv_id := ConcreteCategory.hom_ext _ _\n (ProjIsoSpecTopComponent.fromSpec_toSpec 𝒜 f_deg hm)\n inv_hom_id := ConcreteCategory.hom_ext _ _\n (ProjIsoSpecTopComponent.toSpec_fromSpec 𝒜 f_deg hm)", "start": [ 583, 1 ], "end": [ 595, 57 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.awayToSection", "code": "def awayToSection (f) : CommRingCat.of (A⁰_ f) ⟶ (structureSheaf 𝒜).1.obj (op (pbo f)) where\n toFun s :=\n ⟨fun x ↦ HomogeneousLocalization.mapId 𝒜 (Submonoid.powers_le.mpr x.2) s, fun x ↦ by\n obtain ⟨s, rfl⟩ := HomogeneousLocalization.mk_surjective s\n obtain ⟨n, hn : f ^ n = s.den.1⟩ := s.den_mem\n exact ⟨_, x.2, 𝟙 _, s.1, s.2, s.3,\n fun x hsx ↦ x.2 (Ideal.IsPrime.mem_of_pow_mem inferInstance n (hn ▸ hsx)), fun _ ↦ rfl⟩⟩\n map_add' _ _ := by ext; simp only [map_add, HomogeneousLocalization.val_add, Proj.add_apply]\n map_mul' _ _ := by ext; simp only [map_mul, HomogeneousLocalization.val_mul, Proj.mul_apply]\n map_zero' := by ext; simp only [map_zero, HomogeneousLocalization.val_zero, Proj.zero_apply]\n map_one' := by ext; simp only [map_one, HomogeneousLocalization.val_one, Proj.one_apply]", "start": [ 599, 1 ], "end": [ 613, 91 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.awayToSection_germ", "code": "lemma awayToSection_germ (f x) :\n awayToSection 𝒜 f ≫ (structureSheaf 𝒜).presheaf.germ x =\n (HomogeneousLocalization.mapId 𝒜 (Submonoid.powers_le.mpr x.2)) ≫\n (Proj.stalkIso' 𝒜 x).toCommRingCatIso.inv := by\n ext z\n apply (Proj.stalkIso' 𝒜 x).eq_symm_apply.mpr\n apply Proj.stalkIso'_germ", "start": [ 615, 1 ], "end": [ 621, 28 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.awayToΓ", "code": "def awayToΓ (f) : CommRingCat.of (A⁰_ f) ⟶ LocallyRingedSpace.Γ.obj (op <| Proj| pbo f) :=\n awayToSection 𝒜 f ≫ (ProjectiveSpectrum.Proj.structureSheaf 𝒜).1.map\n (homOfLE (Opens.openEmbedding_obj_top _).le).op", "start": [ 622, 1 ], "end": [ 630, 52 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.awayToΓ_ΓToStalk", "code": "lemma awayToΓ_ΓToStalk (f) (x) :\n awayToΓ 𝒜 f ≫ LocallyRingedSpace.ΓToStalk (Proj| pbo f) x =\n HomogeneousLocalization.mapId 𝒜 (Submonoid.powers_le.mpr x.2) ≫\n (Proj.stalkIso' 𝒜 x.1).toCommRingCatIso.inv ≫\n ((Proj.toLocallyRingedSpace 𝒜).restrictStalkIso (Opens.openEmbedding _) x).inv := by\n rw [awayToΓ, Category.assoc, LocallyRingedSpace.ΓToStalk, ← Category.assoc _ (Iso.inv _),\n Iso.eq_comp_inv, Category.assoc, Category.assoc]\n simp only [LocallyRingedSpace.restrict, SheafedSpace.restrict]\n rw [PresheafedSpace.restrictStalkIso_hom_eq_germ]\n simp only [Proj.toLocallyRingedSpace, Proj.toSheafedSpace]\n rw [Presheaf.germ_res, awayToSection_germ]\n rfl", "start": [ 632, 1 ], "end": [ 643, 6 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec", "code": "def toSpec (f) : (Proj| pbo f) ⟶ Spec (A⁰_ f) :=\n ΓSpec.locallyRingedSpaceAdjunction.homEquiv (Proj| pbo f) (op (CommRingCat.of <| A⁰_ f))\n (awayToΓ 𝒜 f).op", "start": [ 645, 1 ], "end": [ 651, 21 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec_base_apply_eq_comap", "code": "lemma toSpec_base_apply_eq_comap {f} (x : Proj| pbo f) :\n (toSpec 𝒜 f).1.base x = PrimeSpectrum.comap (mapId 𝒜 (Submonoid.powers_le.mpr x.2))\n (closedPoint (AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal)) := by\n show PrimeSpectrum.comap (awayToΓ 𝒜 f ≫ LocallyRingedSpace.ΓToStalk (Proj| pbo f) x)\n (LocalRing.closedPoint ((Proj| pbo f).presheaf.stalk x)) = _\n rw [awayToΓ_ΓToStalk, CommRingCat.comp_eq_ring_hom_comp, PrimeSpectrum.comap_comp]\n exact congr(PrimeSpectrum.comap _ $(@LocalRing.comap_closedPoint\n (HomogeneousLocalization.AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal) _ _\n ((Proj| pbo f).presheaf.stalk x) _ _ _ (isLocalRingHom_of_isIso _)))", "start": [ 655, 1 ], "end": [ 663, 73 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec_base_apply_eq", "code": "lemma toSpec_base_apply_eq {f} (x : Proj| pbo f) :\n (toSpec 𝒜 f).1.base x = ProjIsoSpecTopComponent.toSpec 𝒜 f x :=\n toSpec_base_apply_eq_comap 𝒜 x |>.trans <| PrimeSpectrum.ext _ _ <| Ideal.ext fun z =>\n show ¬ IsUnit _ ↔ z ∈ ProjIsoSpecTopComponent.ToSpec.carrier _ by\n obtain ⟨z, rfl⟩ := z.mk_surjective\n rw [← HomogeneousLocalization.isUnit_iff_isUnit_val,\n ProjIsoSpecTopComponent.ToSpec.mk_mem_carrier, HomogeneousLocalization.map_mk,\n HomogeneousLocalization.val_mk, Localization.mk_eq_mk',\n IsLocalization.AtPrime.isUnit_mk'_iff]\n exact not_not", "start": [ 665, 1 ], "end": [ 674, 16 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec_base_isIso", "code": "lemma toSpec_base_isIso {f} {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n IsIso (toSpec 𝒜 f).1.base := by\n convert (projIsoSpecTopComponent f_deg hm).isIso_hom\n exact DFunLike.ext _ _ <| toSpec_base_apply_eq 𝒜", "start": [ 676, 1 ], "end": [ 679, 51 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.mk_mem_toSpec_base_apply", "code": "lemma mk_mem_toSpec_base_apply {f} (x : Proj| pbo f)\n (z : NumDenSameDeg 𝒜 (.powers f)) :\n HomogeneousLocalization.mk z ∈ ((toSpec 𝒜 f).1.base x).asIdeal ↔\n z.num.1 ∈ x.1.asHomogeneousIdeal :=\n (toSpec_base_apply_eq 𝒜 x).symm ▸ ProjIsoSpecTopComponent.ToSpec.mk_mem_carrier _ _", "start": [ 681, 1 ], "end": [ 685, 86 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec_preimage_basicOpen", "code": "lemma toSpec_preimage_basicOpen {f}\n (t : NumDenSameDeg 𝒜 (.powers f)) :\n toSpec 𝒜 f ⁻¹ᵁ (sbo (.mk t)) = Opens.comap ⟨_, continuous_subtype_val⟩ (pbo t.num.1) :=\n Opens.ext <| Opens.map_coe _ _ ▸ by\n convert (ProjIsoSpecTopComponent.ToSpec.preimage_basicOpen f t)\n exact funext fun _ => toSpec_base_apply_eq _ _", "start": [ 687, 1 ], "end": [ 692, 49 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toOpen_toSpec_val_c_app", "code": "@[reassoc]\nlemma toOpen_toSpec_val_c_app (f) (U) :\n StructureSheaf.toOpen (A⁰_ f) U.unop ≫ (toSpec 𝒜 f).val.c.app U =\n awayToΓ 𝒜 f ≫ (Proj| pbo f).presheaf.map (homOfLE le_top).op :=\n Eq.trans (by congr) <| ΓSpec.toOpen_comp_locallyRingedSpaceAdjunction_homEquiv_app _ U", "start": [ 694, 1 ], "end": [ 698, 89 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toStalk_stalkMap_toSpec", "code": "@[reassoc]\nlemma toStalk_stalkMap_toSpec (f) (x) :\n StructureSheaf.toStalk _ _ ≫ PresheafedSpace.stalkMap (toSpec 𝒜 f).1 x =\n awayToΓ 𝒜 f ≫ (Proj| pbo f).ΓToStalk x := by\n rw [StructureSheaf.toStalk, Category.assoc]\n simp_rw [CommRingCat.coe_of]\n erw [PresheafedSpace.stalkMap_germ']\n rw [toOpen_toSpec_val_c_app_assoc, Presheaf.germ_res]\n rfl", "start": [ 700, 1 ], "end": [ 708, 6 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.isLocalization_atPrime", "code": "lemma isLocalization_atPrime (f) (x : pbo f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n @IsLocalization (Away 𝒜 f) _ ((toSpec 𝒜 f).1.base x).asIdeal.primeCompl\n (AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal) _\n (mapId 𝒜 (Submonoid.powers_le.mpr x.2)).toAlgebra := by\n letI : Algebra (Away 𝒜 f) (AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal) :=\n (mapId 𝒜 (Submonoid.powers_le.mpr x.2)).toAlgebra\n constructor\n · rintro ⟨y, hy⟩\n obtain ⟨y, rfl⟩ := y.mk_surjective\n refine isUnit_of_mul_eq_one _\n (.mk ⟨y.deg, y.den, y.num, (mk_mem_toSpec_base_apply _ _ _).not.mp hy⟩) <| val_injective _ ?_\n simp only [RingHom.algebraMap_toAlgebra, map_mk, RingHom.id_apply, val_mul, val_mk, mk_eq_mk',\n val_one, IsLocalization.mk'_mul_mk'_eq_one']\n · intro z\n obtain ⟨⟨i, a, ⟨b, hb⟩, (hb' : b ∉ x.1.1)⟩, rfl⟩ := z.mk_surjective\n refine ⟨⟨.mk ⟨i * m, ⟨a * b ^ (m - 1), ?_⟩, ⟨f ^ i, SetLike.pow_mem_graded _ f_deg⟩, ⟨_, rfl⟩⟩,\n ⟨.mk ⟨i * m, ⟨b ^ m, mul_comm m i ▸ SetLike.pow_mem_graded _ hb⟩,\n ⟨f ^ i, SetLike.pow_mem_graded _ f_deg⟩, ⟨_, rfl⟩⟩,\n (mk_mem_toSpec_base_apply _ _ _).not.mpr <| x.1.1.toIdeal.primeCompl.pow_mem hb' m⟩⟩,\n val_injective _ ?_⟩\n · convert SetLike.mul_mem_graded a.2 (SetLike.pow_mem_graded (m - 1) hb) using 2\n rw [← succ_nsmul', tsub_add_cancel_of_le (by omega), mul_comm, smul_eq_mul]\n · simp only [RingHom.algebraMap_toAlgebra, map_mk, RingHom.id_apply, val_mul, val_mk,\n mk_eq_mk', ← IsLocalization.mk'_mul, Submonoid.mk_mul_mk, IsLocalization.mk'_eq_iff_eq]\n rw [mul_comm b, mul_mul_mul_comm, ← pow_succ', mul_assoc, tsub_add_cancel_of_le (by omega)]\n · intros y z e\n obtain ⟨y, rfl⟩ := y.mk_surjective\n obtain ⟨z, rfl⟩ := z.mk_surjective\n obtain ⟨i, c, hc, hc', e⟩ : ∃ i, ∃ c ∈ 𝒜 i, c ∉ x.1.asHomogeneousIdeal ∧\n c * (z.den.1 * y.num.1) = c * (y.den.1 * z.num.1) := by\n apply_fun HomogeneousLocalization.val at e\n simp only [RingHom.algebraMap_toAlgebra, map_mk, RingHom.id_apply, val_mk, mk_eq_mk',\n IsLocalization.mk'_eq_iff_eq] at e\n obtain ⟨⟨c, hcx⟩, hc⟩ := IsLocalization.exists_of_eq (M := x.1.1.toIdeal.primeCompl) e\n obtain ⟨i, hi⟩ := not_forall.mp ((x.1.1.isHomogeneous.mem_iff _).not.mp hcx)\n refine ⟨i, _, (decompose 𝒜 c i).2, hi, ?_⟩\n apply_fun fun x ↦ (decompose 𝒜 x (i + z.deg + y.deg)).1 at hc\n conv_rhs at hc => rw [add_right_comm]\n rwa [← mul_assoc, coe_decompose_mul_add_of_right_mem, coe_decompose_mul_add_of_right_mem,\n ← mul_assoc, coe_decompose_mul_add_of_right_mem, coe_decompose_mul_add_of_right_mem,\n mul_assoc, mul_assoc] at hc\n exacts [y.den.2, z.num.2, z.den.2, y.num.2]\n\n refine ⟨⟨.mk ⟨m * i, ⟨c ^ m, SetLike.pow_mem_graded _ hc⟩,\n ⟨f ^ i, mul_comm m i ▸ SetLike.pow_mem_graded _ f_deg⟩, ⟨_, rfl⟩⟩,\n (mk_mem_toSpec_base_apply _ _ _).not.mpr <| x.1.1.toIdeal.primeCompl.pow_mem hc' _⟩,\n val_injective _ ?_⟩\n simp only [val_mul, val_mk, mk_eq_mk', ← IsLocalization.mk'_mul, Submonoid.mk_mul_mk,\n IsLocalization.mk'_eq_iff_eq, mul_assoc]\n congr 2\n rw [mul_left_comm, mul_left_comm y.den.1, ← tsub_add_cancel_of_le (show 1 ≤ m from hm),\n pow_succ, mul_assoc, mul_assoc, e]", "start": [ 710, 1 ], "end": [ 767, 41 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.specStalkEquiv", "code": "def specStalkEquiv (f) (x : pbo f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n (Spec.structureSheaf (A⁰_ f)).presheaf.stalk ((toSpec 𝒜 f).1.base x) ≅\n CommRingCat.of (AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal) :=\n letI : Algebra (Away 𝒜 f) (AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal) :=\n (mapId 𝒜 (Submonoid.powers_le.mpr x.2)).toAlgebra\n haveI := isLocalization_atPrime 𝒜 f x f_deg hm\n (IsLocalization.algEquiv\n (R := A⁰_ f)\n (M := ((toSpec 𝒜 f).1.base x).asIdeal.primeCompl)\n (S := (Spec.structureSheaf (A⁰_ f)).presheaf.stalk ((toSpec 𝒜 f).1.base x))\n (Q := AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal)).toRingEquiv.toCommRingCatIso", "start": [ 769, 1 ], "end": [ 784, 82 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.toStalk_specStalkEquiv", "code": "lemma toStalk_specStalkEquiv (f) (x : pbo f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n StructureSheaf.toStalk (A⁰_ f) ((toSpec 𝒜 f).1.base x) ≫ (specStalkEquiv 𝒜 f x f_deg hm).hom =\n (mapId _ <| Submonoid.powers_le.mpr x.2 : (A⁰_ f) →+* AtPrime 𝒜 x.1.1.toIdeal) :=\n letI : Algebra (Away 𝒜 f) (AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal) :=\n (mapId 𝒜 (Submonoid.powers_le.mpr x.2)).toAlgebra\n letI := isLocalization_atPrime 𝒜 f x f_deg hm\n (IsLocalization.algEquiv\n (R := A⁰_ f)\n (M := ((toSpec 𝒜 f).1.base x).asIdeal.primeCompl)\n (S := (Spec.structureSheaf (A⁰_ f)).presheaf.stalk ((toSpec 𝒜 f).1.base x))\n (Q := AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal)).toAlgHom.comp_algebraMap", "start": [ 786, 1 ], "end": [ 796, 78 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.stalkMap_toSpec", "code": "lemma stalkMap_toSpec (f) (x : pbo f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n LocallyRingedSpace.stalkMap (toSpec 𝒜 f) x =\n (specStalkEquiv 𝒜 f x f_deg hm).hom ≫ (Proj.stalkIso' 𝒜 x.1).toCommRingCatIso.inv ≫\n ((Proj.toLocallyRingedSpace 𝒜).restrictStalkIso (Opens.openEmbedding _) x).inv :=\n IsLocalization.ringHom_ext (R := A⁰_ f) ((toSpec 𝒜 f).1.base x).asIdeal.primeCompl\n (S := (Spec.structureSheaf (A⁰_ f)).presheaf.stalk ((toSpec 𝒜 f).1.base x)) <|\n (toStalk_stalkMap_toSpec _ _ _).trans <| by\n rw [awayToΓ_ΓToStalk, ← toStalk_specStalkEquiv, Category.assoc]; rfl", "start": [ 798, 1 ], "end": [ 805, 73 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.ProjectiveSpectrum.Proj.isIso_toSpec", "code": "lemma isIso_toSpec (f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n IsIso (toSpec 𝒜 f) := by\n haveI : IsIso (toSpec 𝒜 f).1.base := toSpec_base_isIso 𝒜 f_deg hm\n haveI (x) : IsIso (LocallyRingedSpace.stalkMap (toSpec 𝒜 f) x) := by\n rw [stalkMap_toSpec 𝒜 f x f_deg hm]; infer_instance\n haveI : LocallyRingedSpace.IsOpenImmersion (toSpec 𝒜 f) :=\n LocallyRingedSpace.IsOpenImmersion.of_stalk_iso (toSpec 𝒜 f)\n (TopCat.homeoOfIso (asIso <| (toSpec 𝒜 f).1.base)).openEmbedding\n exact LocallyRingedSpace.IsOpenImmersion.to_iso _", "start": [ 807, 1 ], "end": [ 815, 52 ], "kind": "lemma" }, { "full_name": "AlgebraicGeometry.projIsoSpec", "code": "def projIsoSpec (f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :\n (Proj| pbo f) ≅ (Spec (A⁰_ f)) :=\n @asIso (f := toSpec 𝒜 f) (isIso_toSpec 𝒜 f f_deg hm)", "start": [ 820, 1 ], "end": [ 826, 55 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraicGeometry.Proj", "code": "def «Proj» : Scheme where\n __ := Proj.toLocallyRingedSpace 𝒜\n local_affine (x : Proj.T) := by\n classical\n obtain ⟨f, m, f_deg, hm, hx⟩ : ∃ (f : A) (m : ℕ) (_ : f ∈ 𝒜 m) (_ : 0 < m), f ∉ x.1 := by\n by_contra!\n refine x.not_irrelevant_le fun z hz ↦ ?_\n rw [← DirectSum.sum_support_decompose 𝒜 z]\n exact x.1.toIdeal.sum_mem fun k hk ↦ this _ k (SetLike.coe_mem _) <| by_contra <| by aesop\n exact ⟨⟨pbo f, hx⟩, .of (A⁰_ f), ⟨projIsoSpec 𝒜 f f_deg hm⟩⟩", "start": [ 828, 1 ], "end": [ 840, 65 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/QuadraticForm/Real.lean
[ "Mathlib/Data/Sign.lean", "Mathlib/Algebra/CharP/Invertible.lean", "Mathlib/Data/Complex/Abs.lean", "Mathlib/Analysis/RCLike/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/QuadraticForm/IsometryEquiv.lean" ]
[ { "full_name": "QuadraticForm.isometryEquivSignWeightedSumSquares", "code": "noncomputable def isometryEquivSignWeightedSumSquares (w : ι → ℝ) :\n IsometryEquiv (weightedSumSquares ℝ w)\n (weightedSumSquares ℝ (fun i ↦ (sign (w i) : ℝ))) := by\n let u i := if h : w i = 0 then (1 : ℝˣ) else Units.mk0 (w i) h\n have hu : ∀ i : ι, 1 / √|(u i : ℝ)| ≠ 0 := fun i ↦\n have : (u i : ℝ) ≠ 0 := (u i).ne_zero\n by positivity\n have hwu : ∀ i, w i / |(u i : ℝ)| = sign (w i) := fun i ↦ by\n by_cases hi : w i = 0 <;> field_simp [hi, u]\n convert (weightedSumSquares ℝ w).isometryEquivBasisRepr\n ((Pi.basisFun ℝ ι).unitsSMul fun i => .mk0 _ (hu i))\n ext1 v\n classical\n suffices ∑ i, (w i / |(u i : ℝ)|) * v i ^ 2 = ∑ i, w i * (v i ^ 2 * |(u i : ℝ)|⁻¹) by\n simpa [basisRepr_apply, Basis.unitsSMul_apply, ← _root_.sq, mul_pow, ← hwu]\n exact sum_congr rfl fun j _ ↦ by ring", "start": [ 33, 1 ], "end": [ 50, 40 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.equivalent_sign_ne_zero_weighted_sum_squared", "code": "theorem equivalent_sign_ne_zero_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]\n [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) (hQ : (associated (R := ℝ) Q).SeparatingLeft) :\n ∃ w : Fin (FiniteDimensional.finrank ℝ M) → SignType,\n (∀ i, w i ≠ 0) ∧ Equivalent Q (weightedSumSquares ℝ fun i ↦ (w i : ℝ))", "start": [ 53, 1 ], "end": [ 61, 76 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.equivalent_one_neg_one_weighted_sum_squared", "code": "theorem equivalent_one_neg_one_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]\n [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) (hQ : (associated (R := ℝ) Q).SeparatingLeft) :\n ∃ w : Fin (FiniteDimensional.finrank ℝ M) → ℝ,\n (∀ i, w i = -1 ∨ w i = 1) ∧ Equivalent Q (weightedSumSquares ℝ w)", "start": [ 63, 1 ], "end": [ 70, 54 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.equivalent_signType_weighted_sum_squared", "code": "theorem equivalent_signType_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]\n [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) :\n ∃ w : Fin (FiniteDimensional.finrank ℝ M) → SignType,\n Equivalent Q (weightedSumSquares ℝ fun i ↦ (w i : ℝ))", "start": [ 73, 1 ], "end": [ 80, 66 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.equivalent_one_zero_neg_one_weighted_sum_squared", "code": "theorem equivalent_one_zero_neg_one_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]\n [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) :\n ∃ w : Fin (FiniteDimensional.finrank ℝ M) → ℝ,\n (∀ i, w i = -1 ∨ w i = 0 ∨ w i = 1) ∧ Equivalent Q (weightedSumSquares ℝ w)", "start": [ 82, 1 ], "end": [ 89, 53 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/GroupWithZero/Conj.lean
[ "Mathlib/Algebra/Group/Conj.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/GroupWithZero/Units/Basic.lean" ]
[ { "full_name": "isConj_iff₀", "code": "@[simp] lemma isConj_iff₀ : IsConj a b ↔ ∃ c : α, c ≠ 0 ∧ c * a * c⁻¹ = b := by\n rw [IsConj, Units.exists_iff_ne_zero (p := (SemiconjBy · a b))]\n congr! 2 with c\n exact and_congr_right (mul_inv_eq_iff_eq_mul₀ · |>.symm)", "start": [ 21, 1 ], "end": [ 24, 59 ], "kind": "lemma" } ]
Mathlib/Analysis/NormedSpace/MStructure.lean
[ "Mathlib/Algebra/Ring/Idempotents.lean", "Mathlib/Order/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Normed/Group/Basic.lean", "Mathlib/Tactic/NoncommRing.lean" ]
[ { "full_name": "IsLprojection", "code": "structure IsLprojection (P : M) : Prop where\n proj : IsIdempotentElem P\n Lnorm : ∀ x : X, ‖x‖ = ‖P • x‖ + ‖(1 - P) • x‖", "start": [ 69, 1 ], "end": [ 76, 49 ], "kind": "commanddeclaration" }, { "full_name": "IsMprojection", "code": "structure IsMprojection (P : M) : Prop where\n proj : IsIdempotentElem P\n Mnorm : ∀ x : X, ‖x‖ = max ‖P • x‖ ‖(1 - P) • x‖", "start": [ 79, 1 ], "end": [ 86, 51 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Lcomplement", "code": "theorem Lcomplement {P : M} (h : IsLprojection X P) : IsLprojection X (1 - P)", "start": [ 94, 1 ], "end": [ 97, 21 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Lcomplement_iff", "code": "theorem Lcomplement_iff (P : M) : IsLprojection X P ↔ IsLprojection X (1 - P)", "start": [ 100, 1 ], "end": [ 101, 61 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.commute", "code": "theorem commute [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (h₂ : IsLprojection X Q) :\n Commute P Q", "start": [ 104, 1 ], "end": [ 143, 33 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.mul", "code": "theorem mul [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (h₂ : IsLprojection X Q) :\n IsLprojection X (P * Q)", "start": [ 146, 1 ], "end": [ 161, 63 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.join", "code": "theorem join [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (h₂ : IsLprojection X Q) :\n IsLprojection X (P + Q - P * Q)", "start": [ 164, 1 ], "end": [ 167, 15 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.hasCompl", "code": "instance Subtype.hasCompl : HasCompl { f : M // IsLprojection X f } :=\n ⟨fun P => ⟨1 - P, P.prop.Lcomplement⟩⟩", "start": [ 172, 1 ], "end": [ 173, 41 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_compl", "code": "@[simp]\ntheorem coe_compl (P : { P : M // IsLprojection X P }) : ↑Pᶜ = (1 : M) - ↑P", "start": [ 175, 1 ], "end": [ 177, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.inf", "code": "instance Subtype.inf [FaithfulSMul M X] : Inf { P : M // IsLprojection X P } :=\n ⟨fun P Q => ⟨P * Q, P.prop.mul Q.prop⟩⟩", "start": [ 180, 1 ], "end": [ 181, 42 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_inf", "code": "@[simp]\ntheorem coe_inf [FaithfulSMul M X] (P Q : { P : M // IsLprojection X P }) :\n ↑(P ⊓ Q) = (↑P : M) * ↑Q", "start": [ 183, 1 ], "end": [ 186, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.sup", "code": "instance Subtype.sup [FaithfulSMul M X] : Sup { P : M // IsLprojection X P } :=\n ⟨fun P Q => ⟨P + Q - P * Q, P.prop.join Q.prop⟩⟩", "start": [ 189, 1 ], "end": [ 190, 51 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_sup", "code": "@[simp]\ntheorem coe_sup [FaithfulSMul M X] (P Q : { P : M // IsLprojection X P }) :\n ↑(P ⊔ Q) = (↑P : M) + ↑Q - ↑P * ↑Q", "start": [ 192, 1 ], "end": [ 195, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.sdiff", "code": "instance Subtype.sdiff [FaithfulSMul M X] : SDiff { P : M // IsLprojection X P } :=\n ⟨fun P Q => ⟨P * (1 - Q), P.prop.mul Q.prop.Lcomplement⟩⟩", "start": [ 198, 1 ], "end": [ 199, 60 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_sdiff", "code": "@[simp]\ntheorem coe_sdiff [FaithfulSMul M X] (P Q : { P : M // IsLprojection X P }) :\n ↑(P \\ Q) = (↑P : M) * (1 - ↑Q)", "start": [ 201, 1 ], "end": [ 204, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.partialOrder", "code": "instance Subtype.partialOrder [FaithfulSMul M X] :\n PartialOrder { P : M // IsLprojection X P } where\n le P Q := (↑P : M) = ↑(P ⊓ Q)\n le_refl P := by simpa only [coe_inf, ← sq] using P.prop.proj.eq.symm\n le_trans P Q R h₁ h₂ := by\n simp only [coe_inf] at h₁ h₂ ⊢\n rw [h₁, mul_assoc, ← h₂]\n le_antisymm P Q h₁ h₂ := Subtype.eq (by convert (P.prop.commute Q.prop).eq)", "start": [ 207, 1 ], "end": [ 214, 78 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.le_def", "code": "theorem le_def [FaithfulSMul M X] (P Q : { P : M // IsLprojection X P }) :\n P ≤ Q ↔ (P : M) = ↑(P ⊓ Q)", "start": [ 216, 1 ], "end": [ 218, 10 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.zero", "code": "instance Subtype.zero : Zero { P : M // IsLprojection X P } :=\n ⟨⟨0, ⟨by rw [IsIdempotentElem, zero_mul], fun x => by\n simp only [zero_smul, norm_zero, sub_zero, one_smul, zero_add]⟩⟩⟩", "start": [ 221, 1 ], "end": [ 223, 74 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_zero", "code": "@[simp]\ntheorem coe_zero : ↑(0 : { P : M // IsLprojection X P }) = (0 : M)", "start": [ 225, 1 ], "end": [ 227, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.one", "code": "instance Subtype.one : One { P : M // IsLprojection X P } :=\n ⟨⟨1, sub_zero (1 : M) ▸ (0 : { P : M // IsLprojection X P }).prop.Lcomplement⟩⟩", "start": [ 230, 1 ], "end": [ 231, 82 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_one", "code": "@[simp]\ntheorem coe_one : ↑(1 : { P : M // IsLprojection X P }) = (1 : M)", "start": [ 233, 1 ], "end": [ 235, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.boundedOrder", "code": "instance Subtype.boundedOrder [FaithfulSMul M X] :\n BoundedOrder { P : M // IsLprojection X P } where\n top := 1\n le_top P := (mul_one (P : M)).symm\n bot := 0\n bot_le P := (zero_mul (P : M)).symm", "start": [ 238, 1 ], "end": [ 243, 38 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_bot", "code": "@[simp]\ntheorem coe_bot [FaithfulSMul M X] :\n ↑(BoundedOrder.toOrderBot.toBot.bot : { P : M // IsLprojection X P }) = (0 : M)", "start": [ 245, 1 ], "end": [ 249, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.coe_top", "code": "@[simp]\ntheorem coe_top [FaithfulSMul M X] :\n ↑(BoundedOrder.toOrderTop.toTop.top : { P : M // IsLprojection X P }) = (1 : M)", "start": [ 252, 1 ], "end": [ 256, 6 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.compl_mul", "code": "theorem compl_mul {P : { P : M // IsLprojection X P }} {Q : M} : ↑Pᶜ * Q = Q - ↑P * Q", "start": [ 259, 1 ], "end": [ 260, 35 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.mul_compl_self", "code": "theorem mul_compl_self {P : { P : M // IsLprojection X P }} : (↑P : M) * ↑Pᶜ = 0", "start": [ 263, 1 ], "end": [ 264, 61 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.distrib_lattice_lemma", "code": "theorem distrib_lattice_lemma [FaithfulSMul M X] {P Q R : { P : M // IsLprojection X P }} :\n ((↑P : M) + ↑Pᶜ * R) * (↑P + ↑Q * ↑R * ↑Pᶜ) = ↑P + ↑Q * ↑R * ↑Pᶜ", "start": [ 267, 1 ], "end": [ 275, 21 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.distribLattice", "code": "instance Subtype.distribLattice [FaithfulSMul M X] :\n DistribLattice { P : M // IsLprojection X P } where\n le_sup_inf P Q R := by\n have e₁ : ↑((P ⊔ Q) ⊓ (P ⊔ R)) = ↑P + ↑Q * (R : M) * ↑Pᶜ := by\n rw [coe_inf, coe_sup, coe_sup, ← add_sub, ← add_sub, ← compl_mul, ← compl_mul, add_mul,\n mul_add, (Pᶜ.prop.commute Q.prop).eq, mul_add, ← mul_assoc, mul_assoc (Q: M),\n (Pᶜ.prop.commute P.prop).eq, mul_compl_self, zero_mul, mul_zero,\n zero_add, add_zero, ← mul_assoc, mul_assoc (Q : M), P.prop.proj.eq, Pᶜ.prop.proj.eq,\n mul_assoc, (Pᶜ.prop.commute R.prop).eq, ← mul_assoc]\n have e₂ : ↑((P ⊔ Q) ⊓ (P ⊔ R)) * ↑(P ⊔ Q ⊓ R) = (P : M) + ↑Q * ↑R * ↑Pᶜ := by\n rw [coe_inf, coe_sup, coe_sup, coe_sup, ← add_sub, ← add_sub, ← add_sub, ← compl_mul, ←\n compl_mul, ← compl_mul, (Pᶜ.prop.commute (Q ⊓ R).prop).eq, coe_inf, mul_assoc,\n distrib_lattice_lemma, (Q.prop.commute R.prop).eq, distrib_lattice_lemma]\n rw [le_def, e₁, coe_inf, e₂]", "start": [ 303, 1 ], "end": [ 316, 33 ], "kind": "commanddeclaration" }, { "full_name": "IsLprojection.Subtype.BooleanAlgebra", "code": "instance Subtype.BooleanAlgebra [FaithfulSMul M X] :\n BooleanAlgebra { P : M // IsLprojection X P } :=\n{ IsLprojection.Subtype.hasCompl,\n IsLprojection.Subtype.sdiff,\n IsLprojection.Subtype.boundedOrder with\n inf_compl_le_bot := fun P =>\n (Subtype.ext (by rw [coe_inf, coe_compl, coe_bot, ← coe_compl, mul_compl_self])).le\n top_le_sup_compl := fun P =>\n (Subtype.ext\n (by\n rw [coe_top, coe_sup, coe_compl, add_sub_cancel, ← coe_compl, mul_compl_self,\n sub_zero])).le\n sdiff_eq := fun P Q => Subtype.ext <| by rw [coe_sdiff, ← coe_compl, coe_inf] }", "start": [ 318, 1 ], "end": [ 331, 84 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/CliffordAlgebra/EvenEquiv.lean
[ "Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean", "Mathlib/Tactic/LiftLets.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/QuadraticForm/Prod.lean", "Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean" ]
[ { "full_name": "CliffordAlgebra.EquivEven.Q'", "code": "abbrev Q' : QuadraticForm R (M × R) :=\n Q.prod <| [email protected] R _", "start": [ 48, 1 ], "end": [ 50, 35 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.Q'_apply", "code": "theorem Q'_apply (m : M × R) : Q' Q m = Q m.1 - m.2 * m.2", "start": [ 54, 1 ], "end": [ 55, 28 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.e0", "code": "def e0 : CliffordAlgebra (Q' Q) :=\n ι (Q' Q) (0, 1)", "start": [ 59, 1 ], "end": [ 61, 18 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.v", "code": "def v : M →ₗ[R] CliffordAlgebra (Q' Q) :=\n ι (Q' Q) ∘ₗ LinearMap.inl _ _ _", "start": [ 64, 1 ], "end": [ 66, 34 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.ι_eq_v_add_smul_e0", "code": "theorem ι_eq_v_add_smul_e0 (m : M) (r : R) : ι (Q' Q) (m, r) = v Q m + r • e0 Q", "start": [ 69, 1 ], "end": [ 71, 94 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.e0_mul_e0", "code": "theorem e0_mul_e0 : e0 Q * e0 Q = -1", "start": [ 74, 1 ], "end": [ 75, 37 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.v_sq_scalar", "code": "theorem v_sq_scalar (m : M) : v Q m * v Q m = algebraMap _ _ (Q m)", "start": [ 78, 1 ], "end": [ 79, 37 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.neg_e0_mul_v", "code": "theorem neg_e0_mul_v (m : M) : -(e0 Q * v Q m) = v Q m * e0 Q", "start": [ 82, 1 ], "end": [ 86, 56 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.neg_v_mul_e0", "code": "theorem neg_v_mul_e0 (m : M) : -(v Q m * e0 Q) = e0 Q * v Q m", "start": [ 89, 1 ], "end": [ 91, 32 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.e0_mul_v_mul_e0", "code": "@[simp]\ntheorem e0_mul_v_mul_e0 (m : M) : e0 Q * v Q m * e0 Q = v Q m", "start": [ 94, 1 ], "end": [ 96, 77 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.reverse_v", "code": "@[simp]\ntheorem reverse_v (m : M) : reverse (Q := Q' Q) (v Q m) = v Q m", "start": [ 99, 1 ], "end": [ 101, 14 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.involute_v", "code": "@[simp]\ntheorem involute_v (m : M) : involute (v Q m) = -v Q m", "start": [ 104, 1 ], "end": [ 106, 15 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.reverse_e0", "code": "@[simp]\ntheorem reverse_e0 : reverse (Q := Q' Q) (e0 Q) = e0 Q", "start": [ 109, 1 ], "end": [ 111, 14 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.EquivEven.involute_e0", "code": "@[simp]\ntheorem involute_e0 : involute (e0 Q) = -e0 Q", "start": [ 114, 1 ], "end": [ 116, 15 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.toEven", "code": "def toEven : CliffordAlgebra Q →ₐ[R] CliffordAlgebra.even (Q' Q) := by\n refine CliffordAlgebra.lift Q ⟨?_, fun m => ?_⟩\n · refine LinearMap.codRestrict _ ?_ fun m => Submodule.mem_iSup_of_mem ⟨2, rfl⟩ ?_\n · exact (LinearMap.mulLeft R <| e0 Q).comp (v Q)\n rw [Subtype.coe_mk, pow_two]\n exact Submodule.mul_mem_mul (LinearMap.mem_range_self _ _) (LinearMap.mem_range_self _ _)\n · ext1\n rw [Subalgebra.coe_mul] erw [LinearMap.codRestrict_apply] dsimp only [LinearMap.comp_apply, LinearMap.mulLeft_apply, Subalgebra.coe_algebraMap]\n rw [← mul_assoc, e0_mul_v_mul_e0, v_sq_scalar]", "start": [ 123, 1 ], "end": [ 134, 51 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.toEven_ι", "code": "theorem toEven_ι (m : M) : (toEven Q (ι Q m) : CliffordAlgebra (Q' Q)) = e0 Q * v Q m", "start": [ 137, 1 ], "end": [ 141, 72 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.ofEven", "code": "def ofEven : CliffordAlgebra.even (Q' Q) →ₐ[R] CliffordAlgebra Q := by\n \n let f : M × R →ₗ[R] M × R →ₗ[R] CliffordAlgebra Q :=\n ((Algebra.lmul R (CliffordAlgebra Q)).toLinearMap.comp <|\n (ι Q).comp (LinearMap.fst _ _ _) +\n (Algebra.linearMap R _).comp (LinearMap.snd _ _ _)).compl₂\n ((ι Q).comp (LinearMap.fst _ _ _) - (Algebra.linearMap R _).comp (LinearMap.snd _ _ _))\n haveI f_apply : ∀ x y, f x y = (ι Q x.1 + algebraMap R _ x.2) * (ι Q y.1 - algebraMap R _ y.2) :=\n fun x y => by rfl\n haveI hc : ∀ (r : R) (x : CliffordAlgebra Q), Commute (algebraMap _ _ r) x := Algebra.commutes\n haveI hm :\n ∀ m : M × R,\n ι Q m.1 * ι Q m.1 - algebraMap R _ m.2 * algebraMap R _ m.2 = algebraMap R _ (Q' Q m) := by\n intro m\n rw [ι_sq_scalar, ← RingHom.map_mul, ← RingHom.map_sub, sub_eq_add_neg, Q'_apply, sub_eq_add_neg]\n refine even.lift (Q' Q) ⟨f, ?_, ?_⟩ <;> simp_rw [f_apply]\n · intro m\n rw [← (hc _ _).symm.mul_self_sub_mul_self_eq, hm]\n · intro m₁ m₂ m₃\n rw [← mul_smul_comm, ← mul_assoc, mul_assoc (_ + _), ← (hc _ _).symm.mul_self_sub_mul_self_eq',\n Algebra.smul_def, ← mul_assoc, hm]", "start": [ 144, 1 ], "end": [ 171, 41 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.ofEven_ι", "code": "theorem ofEven_ι (x y : M × R) :\n ofEven Q ((even.ι (Q' Q)).bilin x y) =\n (ι Q x.1 + algebraMap R _ x.2) * (ι Q y.1 - algebraMap R _ y.2)", "start": [ 174, 1 ], "end": [ 182, 66 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.toEven_comp_ofEven", "code": "theorem toEven_comp_ofEven : (toEven Q).comp (ofEven Q) = AlgHom.id R _", "start": [ 185, 1 ], "end": [ 215, 98 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.ofEven_comp_toEven", "code": "theorem ofEven_comp_toEven : (ofEven Q).comp (toEven Q) = AlgHom.id R _", "start": [ 218, 1 ], "end": [ 227, 86 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.equivEven", "code": "def equivEven : CliffordAlgebra Q ≃ₐ[R] CliffordAlgebra.even (Q' Q) :=\n AlgEquiv.ofAlgHom (toEven Q) (ofEven Q) (toEven_comp_ofEven Q) (ofEven_comp_toEven Q)", "start": [ 230, 1 ], "end": [ 234, 88 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.coe_toEven_reverse_involute", "code": "theorem coe_toEven_reverse_involute (x : CliffordAlgebra Q) :\n ↑(toEven Q (reverse (involute x))) =\n reverse (Q := Q' Q) (toEven Q x : CliffordAlgebra (Q' Q))", "start": [ 237, 1 ], "end": [ 250, 69 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.evenToNeg", "code": "def evenToNeg (Q' : QuadraticForm R M) (h : Q' = -Q) :\n CliffordAlgebra.even Q →ₐ[R] CliffordAlgebra.even Q' :=\n even.lift Q <|\n letI : AddCommGroup (even Q') := AddSubgroupClass.toAddCommGroup _;\n letI : HasDistribNeg (even Q') := NonUnitalNonAssocRing.toHasDistribNeg;\n { bilin := -(even.ι Q' : _).bilin\n contract := fun m => by\n simp_rw [LinearMap.neg_apply, EvenHom.contract, h, QuadraticForm.neg_apply, map_neg,\n neg_neg]\n contract_mid := fun m₁ m₂ m₃ => by\n simp_rw [LinearMap.neg_apply, neg_mul_neg, EvenHom.contract_mid, h,\n QuadraticForm.neg_apply, smul_neg, neg_smul] }", "start": [ 255, 1 ], "end": [ 268, 57 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.evenToNeg_ι", "code": "@[simp, nolint simpNF]\ntheorem evenToNeg_ι (Q' : QuadraticForm R M) (h : Q' = -Q) (m₁ m₂ : M) :\n evenToNeg Q Q' h ((even.ι Q).bilin m₁ m₂) = -(even.ι Q').bilin m₁ m₂", "start": [ 272, 1 ], "end": [ 275, 24 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.evenToNeg_comp_evenToNeg", "code": "theorem evenToNeg_comp_evenToNeg (Q' : QuadraticForm R M) (h : Q' = -Q) (h' : Q = -Q') :\n (evenToNeg Q' Q h').comp (evenToNeg Q Q' h) = AlgHom.id R _", "start": [ 278, 1 ], "end": [ 285, 46 ], "kind": "commanddeclaration" }, { "full_name": "CliffordAlgebra.evenEquivEvenNeg", "code": "@[simps!]\ndef evenEquivEvenNeg : CliffordAlgebra.even Q ≃ₐ[R] CliffordAlgebra.even (-Q) :=\n AlgEquiv.ofAlgHom (evenToNeg Q _ rfl) (evenToNeg (-Q) _ (neg_neg _).symm)\n (evenToNeg_comp_evenToNeg _ _ _ _) (evenToNeg_comp_evenToNeg _ _ _ _)", "start": [ 288, 1 ], "end": [ 294, 74 ], "kind": "commanddeclaration" } ]
Mathlib/Data/List/Destutter.lean
[ "Mathlib/Data/List/Chain.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "List.destutter'_nil", "code": "@[simp]\ntheorem destutter'_nil : destutter' R a [] = [a]", "start": [ 35, 1 ], "end": [ 37, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_cons", "code": "theorem destutter'_cons :\n (b :: l).destutter' R a = if R a b then a :: destutter' R b l else destutter' R a l", "start": [ 40, 1 ], "end": [ 42, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_cons_pos", "code": "@[simp]\ntheorem destutter'_cons_pos (h : R b a) : (a :: l).destutter' R b = b :: l.destutter' R a", "start": [ 47, 1 ], "end": [ 49, 28 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_cons_neg", "code": "@[simp]\ntheorem destutter'_cons_neg (h : ¬R b a) : (a :: l).destutter' R b = l.destutter' R b", "start": [ 52, 1 ], "end": [ 54, 28 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_singleton", "code": "@[simp]\ntheorem destutter'_singleton : [b].destutter' R a = if R a b then [a, b] else [a]", "start": [ 59, 1 ], "end": [ 61, 33 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_sublist", "code": "theorem destutter'_sublist (a) : l.destutter' R a <+ a :: l", "start": [ 64, 1 ], "end": [ 70, 56 ], "kind": "commanddeclaration" }, { "full_name": "List.mem_destutter'", "code": "theorem mem_destutter' (a) : a ∈ l.destutter' R a", "start": [ 73, 1 ], "end": [ 79, 15 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_is_chain", "code": "theorem destutter'_is_chain : ∀ l : List α, ∀ {a b}, R a b → (l.destutter' R b).Chain R a", "start": [ 82, 1 ], "end": [ 89, 36 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_is_chain'", "code": "theorem destutter'_is_chain' (a) : (l.destutter' R a).Chain' R", "start": [ 92, 1 ], "end": [ 98, 15 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_of_chain", "code": "theorem destutter'_of_chain (h : l.Chain R a) : l.destutter' R a = a :: l", "start": [ 101, 1 ], "end": [ 105, 38 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_eq_self_iff", "code": "@[simp]\ntheorem destutter'_eq_self_iff (a) : l.destutter' R a = a :: l ↔ l.Chain R a", "start": [ 108, 1 ], "end": [ 114, 63 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter'_ne_nil", "code": "theorem destutter'_ne_nil : l.destutter' R a ≠ []", "start": [ 117, 1 ], "end": [ 118, 40 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_nil", "code": "@[simp]\ntheorem destutter_nil : ([] : List α).destutter R = []", "start": [ 121, 1 ], "end": [ 123, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_cons'", "code": "theorem destutter_cons' : (a :: l).destutter R = destutter' R a l", "start": [ 126, 1 ], "end": [ 127, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_cons_cons", "code": "theorem destutter_cons_cons :\n (a :: b :: l).destutter R = if R a b then a :: destutter' R b l else destutter' R a l", "start": [ 130, 1 ], "end": [ 132, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_singleton", "code": "@[simp]\ntheorem destutter_singleton : destutter R [a] = [a]", "start": [ 135, 1 ], "end": [ 137, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_pair", "code": "@[simp]\ntheorem destutter_pair : destutter R [a, b] = if R a b then [a, b] else [a]", "start": [ 140, 1 ], "end": [ 142, 26 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_sublist", "code": "theorem destutter_sublist : ∀ l : List α, l.destutter R <+ l", "start": [ 145, 1 ], "end": [ 147, 39 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_is_chain'", "code": "theorem destutter_is_chain' : ∀ l : List α, (l.destutter R).Chain' R", "start": [ 150, 1 ], "end": [ 152, 41 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_of_chain'", "code": "theorem destutter_of_chain' : ∀ l : List α, l.Chain' R → l.destutter R = l", "start": [ 155, 1 ], "end": [ 157, 43 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_eq_self_iff", "code": "@[simp]\ntheorem destutter_eq_self_iff : ∀ l : List α, l.destutter R = l ↔ l.Chain' R", "start": [ 160, 1 ], "end": [ 163, 43 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_idem", "code": "theorem destutter_idem : (l.destutter R).destutter R = l.destutter R", "start": [ 166, 1 ], "end": [ 167, 53 ], "kind": "commanddeclaration" }, { "full_name": "List.destutter_eq_nil", "code": "@[simp]\ntheorem destutter_eq_nil : ∀ {l : List α}, destutter R l = [] ↔ l = []", "start": [ 170, 1 ], "end": [ 173, 79 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Limits/FunctorToTypes.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Limits/Types.lean", "Mathlib/CategoryTheory/Limits/FunctorCategory.lean" ]
[ { "full_name": "CategoryTheory.FunctorToTypes.jointly_surjective", "code": "theorem jointly_surjective (k : K) {t : Cocone F} (h : IsColimit t) (x : t.pt.obj k) :\n ∃ j y, x = (t.ι.app j).app k y", "start": [ 25, 1 ], "end": [ 29, 24 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.FunctorToTypes.jointly_surjective'", "code": "theorem jointly_surjective' (k : K) (x : (colimit F).obj k) : ∃ j y, x = (colimit.ι F j).app k y", "start": [ 31, 1 ], "end": [ 32, 49 ], "kind": "commanddeclaration" } ]
Mathlib/Computability/EpsilonNFA.lean
[ "Mathlib/Computability/NFA.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "εNFA", "code": "structure εNFA (α : Type u) (σ : Type v) where\n \n step : σ → Option α → Set σ\n \n start : Set σ\n \n accept : Set σ", "start": [ 31, 1 ], "end": [ 45, 17 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.εClosure", "code": "inductive εClosure (S : Set σ) : Set σ\n | base : ∀ s ∈ S, εClosure S s\n | step : ∀ (s), ∀ t ∈ M.step s none, εClosure S s → εClosure S t", "start": [ 52, 1 ], "end": [ 56, 67 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.subset_εClosure", "code": "@[simp]\ntheorem subset_εClosure (S : Set σ) : S ⊆ M.εClosure S", "start": [ 59, 1 ], "end": [ 61, 16 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.εClosure_empty", "code": "@[simp]\ntheorem εClosure_empty : M.εClosure ∅ = ∅", "start": [ 64, 1 ], "end": [ 66, 71 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.εClosure_univ", "code": "@[simp]\ntheorem εClosure_univ : M.εClosure univ = univ", "start": [ 69, 1 ], "end": [ 71, 48 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.stepSet", "code": "def stepSet (S : Set σ) (a : α) : Set σ :=\n ⋃ s ∈ S, M.εClosure (M.step s a)", "start": [ 74, 1 ], "end": [ 76, 35 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.mem_stepSet_iff", "code": "@[simp]\ntheorem mem_stepSet_iff : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t a)", "start": [ 81, 1 ], "end": [ 83, 46 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.stepSet_empty", "code": "@[simp]\ntheorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅", "start": [ 86, 1 ], "end": [ 88, 69 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.evalFrom", "code": "def evalFrom (start : Set σ) : List α → Set σ :=\n List.foldl M.stepSet (M.εClosure start)", "start": [ 93, 1 ], "end": [ 96, 42 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.evalFrom_nil", "code": "@[simp]\ntheorem evalFrom_nil (S : Set σ) : M.evalFrom S [] = M.εClosure S", "start": [ 99, 1 ], "end": [ 101, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.evalFrom_singleton", "code": "@[simp]\ntheorem evalFrom_singleton (S : Set σ) (a : α) : M.evalFrom S [a] = M.stepSet (M.εClosure S) a", "start": [ 104, 1 ], "end": [ 106, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.evalFrom_append_singleton", "code": "@[simp]\ntheorem evalFrom_append_singleton (S : Set σ) (x : List α) (a : α) :\n M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a", "start": [ 109, 1 ], "end": [ 112, 68 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.evalFrom_empty", "code": "@[simp]\ntheorem evalFrom_empty (x : List α) : M.evalFrom ∅ x = ∅", "start": [ 115, 1 ], "end": [ 119, 54 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.eval", "code": "def eval :=\n M.evalFrom M.start", "start": [ 122, 1 ], "end": [ 125, 21 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.eval_nil", "code": "@[simp]\ntheorem eval_nil : M.eval [] = M.εClosure M.start", "start": [ 128, 1 ], "end": [ 130, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.eval_singleton", "code": "@[simp]\ntheorem eval_singleton (a : α) : M.eval [a] = M.stepSet (M.εClosure M.start) a", "start": [ 133, 1 ], "end": [ 135, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.eval_append_singleton", "code": "@[simp]\ntheorem eval_append_singleton (x : List α) (a : α) : M.eval (x ++ [a]) = M.stepSet (M.eval x) a", "start": [ 138, 1 ], "end": [ 140, 36 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.accepts", "code": "def accepts : Language α :=\n { x | ∃ S ∈ M.accept, S ∈ M.eval x }", "start": [ 143, 1 ], "end": [ 145, 39 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.toNFA", "code": "def toNFA : NFA α σ where\n step S a := M.εClosure (M.step S a)\n start := M.εClosure M.start\n accept := M.accept", "start": [ 151, 1 ], "end": [ 155, 21 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.toNFA_evalFrom_match", "code": "@[simp]\ntheorem toNFA_evalFrom_match (start : Set σ) :\n M.toNFA.evalFrom (M.εClosure start) = M.evalFrom start", "start": [ 158, 1 ], "end": [ 161, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.toNFA_correct", "code": "@[simp]\ntheorem toNFA_correct : M.toNFA.accepts = M.accepts", "start": [ 164, 1 ], "end": [ 166, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.pumping_lemma", "code": "theorem pumping_lemma [Fintype σ] {x : List α} (hx : x ∈ M.accepts)\n (hlen : Fintype.card (Set σ) ≤ List.length x) :\n ∃ a b c, x = a ++ b ++ c ∧\n a.length + b.length ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ M.accepts", "start": [ 169, 1 ], "end": [ 173, 32 ], "kind": "commanddeclaration" }, { "full_name": "NFA.toεNFA", "code": "def toεNFA (M : NFA α σ) : εNFA α σ where\n step s a := a.casesOn' ∅ fun a ↦ M.step s a\n start := M.start\n accept := M.accept", "start": [ 180, 1 ], "end": [ 185, 21 ], "kind": "commanddeclaration" }, { "full_name": "NFA.toεNFA_εClosure", "code": "@[simp]\ntheorem toεNFA_εClosure (M : NFA α σ) (S : Set σ) : M.toεNFA.εClosure S = S", "start": [ 188, 1 ], "end": [ 194, 12 ], "kind": "commanddeclaration" }, { "full_name": "NFA.toεNFA_evalFrom_match", "code": "@[simp]\ntheorem toεNFA_evalFrom_match (M : NFA α σ) (start : Set σ) :\n M.toεNFA.evalFrom start = M.evalFrom start", "start": [ 197, 1 ], "end": [ 208, 6 ], "kind": "commanddeclaration" }, { "full_name": "NFA.toεNFA_correct", "code": "@[simp]\ntheorem toεNFA_correct (M : NFA α σ) : M.toεNFA.accepts = M.accepts", "start": [ 211, 1 ], "end": [ 214, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.step_zero", "code": "@[simp]\ntheorem step_zero (s a) : (0 : εNFA α σ).step s a = ∅", "start": [ 235, 1 ], "end": [ 237, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.step_one", "code": "@[simp]\ntheorem step_one (s a) : (1 : εNFA α σ).step s a = ∅", "start": [ 240, 1 ], "end": [ 242, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.start_zero", "code": "@[simp]\ntheorem start_zero : (0 : εNFA α σ).start = ∅", "start": [ 245, 1 ], "end": [ 247, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.start_one", "code": "@[simp]\ntheorem start_one : (1 : εNFA α σ).start = univ", "start": [ 250, 1 ], "end": [ 252, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.accept_zero", "code": "@[simp]\ntheorem accept_zero : (0 : εNFA α σ).accept = ∅", "start": [ 255, 1 ], "end": [ 257, 6 ], "kind": "commanddeclaration" }, { "full_name": "εNFA.accept_one", "code": "@[simp]\ntheorem accept_one : (1 : εNFA α σ).accept = univ", "start": [ 260, 1 ], "end": [ 262, 6 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Calculus/Darboux.lean
[ "Mathlib/Analysis/Calculus/LocalExtr/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Calculus/Deriv/Add.lean", "Mathlib/Analysis/Calculus/Deriv/Mul.lean" ]
[ { "full_name": "exists_hasDerivWithinAt_eq_of_gt_of_lt", "code": "theorem exists_hasDerivWithinAt_eq_of_gt_of_lt (hab : a ≤ b)\n (hf : ∀ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a < m)\n (hmb : m < f' b) : m ∈ f' '' Ioo a b", "start": [ 26, 1 ], "end": [ 60, 78 ], "kind": "commanddeclaration" }, { "full_name": "exists_hasDerivWithinAt_eq_of_lt_of_gt", "code": "theorem exists_hasDerivWithinAt_eq_of_lt_of_gt (hab : a ≤ b)\n (hf : ∀ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : m < f' a)\n (hmb : f' b < m) : m ∈ f' '' Ioo a b", "start": [ 63, 1 ], "end": [ 71, 30 ], "kind": "commanddeclaration" }, { "full_name": "Set.OrdConnected.image_hasDerivWithinAt", "code": "theorem Set.OrdConnected.image_hasDerivWithinAt {s : Set ℝ} (hs : OrdConnected s)\n (hf : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) : OrdConnected (f' '' s)", "start": [ 74, 1 ], "end": [ 90, 52 ], "kind": "commanddeclaration" }, { "full_name": "Set.OrdConnected.image_derivWithin", "code": "theorem Set.OrdConnected.image_derivWithin {s : Set ℝ} (hs : OrdConnected s)\n (hf : DifferentiableOn ℝ f s) : OrdConnected (derivWithin f s '' s)", "start": [ 93, 1 ], "end": [ 97, 67 ], "kind": "commanddeclaration" }, { "full_name": "Set.OrdConnected.image_deriv", "code": "theorem Set.OrdConnected.image_deriv {s : Set ℝ} (hs : OrdConnected s)\n (hf : ∀ x ∈ s, DifferentiableAt ℝ f x) : OrdConnected (deriv f '' s)", "start": [ 100, 1 ], "end": [ 104, 78 ], "kind": "commanddeclaration" }, { "full_name": "Convex.image_hasDerivWithinAt", "code": "theorem Convex.image_hasDerivWithinAt {s : Set ℝ} (hs : Convex ℝ s)\n (hf : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) : Convex ℝ (f' '' s)", "start": [ 107, 1 ], "end": [ 111, 53 ], "kind": "commanddeclaration" }, { "full_name": "Convex.image_derivWithin", "code": "theorem Convex.image_derivWithin {s : Set ℝ} (hs : Convex ℝ s) (hf : DifferentiableOn ℝ f s) :\n Convex ℝ (derivWithin f s '' s)", "start": [ 114, 1 ], "end": [ 118, 48 ], "kind": "commanddeclaration" }, { "full_name": "Convex.image_deriv", "code": "theorem Convex.image_deriv {s : Set ℝ} (hs : Convex ℝ s) (hf : ∀ x ∈ s, DifferentiableAt ℝ f x) :\n Convex ℝ (deriv f '' s)", "start": [ 121, 1 ], "end": [ 125, 42 ], "kind": "commanddeclaration" }, { "full_name": "exists_hasDerivWithinAt_eq_of_ge_of_le", "code": "theorem exists_hasDerivWithinAt_eq_of_ge_of_le (hab : a ≤ b)\n (hf : ∀ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a ≤ m)\n (hmb : m ≤ f' b) : m ∈ f' '' Icc a b", "start": [ 128, 1 ], "end": [ 134, 58 ], "kind": "commanddeclaration" }, { "full_name": "exists_hasDerivWithinAt_eq_of_le_of_ge", "code": "theorem exists_hasDerivWithinAt_eq_of_le_of_ge (hab : a ≤ b)\n (hf : ∀ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a ≤ m)\n (hmb : m ≤ f' b) : m ∈ f' '' Icc a b", "start": [ 137, 1 ], "end": [ 143, 58 ], "kind": "commanddeclaration" }, { "full_name": "hasDerivWithinAt_forall_lt_or_forall_gt_of_forall_ne", "code": "theorem hasDerivWithinAt_forall_lt_or_forall_gt_of_forall_ne {s : Set ℝ} (hs : Convex ℝ s)\n (hf : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) {m : ℝ} (hf' : ∀ x ∈ s, f' x ≠ m) :\n (∀ x ∈ s, f' x < m) ∨ ∀ x ∈ s, m < f' x", "start": [ 146, 1 ], "end": [ 154, 40 ], "kind": "commanddeclaration" } ]
Mathlib/Lean/Message.lean
[ ".lake/packages/lean4/src/lean/Lean/Message.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[]
Mathlib/Probability/Independence/ZeroOne.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Probability/Independence/Conditional.lean", "Mathlib/Probability/Independence/Basic.lean" ]
[ { "full_name": "ProbabilityTheory.kernel.measure_eq_zero_or_one_or_top_of_indepSet_self", "code": "theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}\n (h_indep : kernel.IndepSet t t κ μα) :\n ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞", "start": [ 33, 1 ], "end": [ 44, 32 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_eq_zero_or_one_or_top_of_indepSet_self", "code": "theorem measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}\n (h_indep : IndepSet t t μ) : μ t = 0 ∨ μ t = 1 ∨ μ t = ∞", "start": [ 46, 1 ], "end": [ 49, 72 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.measure_eq_zero_or_one_of_indepSet_self", "code": "theorem kernel.measure_eq_zero_or_one_of_indepSet_self [∀ a, IsFiniteMeasure (κ a)] {t : Set Ω}\n (h_indep : IndepSet t t κ μα) :\n ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1", "start": [ 52, 1 ], "end": [ 56, 62 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_eq_zero_or_one_of_indepSet_self", "code": "theorem measure_eq_zero_or_one_of_indepSet_self [IsFiniteMeasure μ] {t : Set Ω}\n (h_indep : IndepSet t t μ) : μ t = 0 ∨ μ t = 1", "start": [ 58, 1 ], "end": [ 61, 65 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condexp_eq_zero_or_one_of_condIndepSet_self", "code": "theorem condexp_eq_zero_or_one_of_condIndepSet_self\n [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)\n (h_indep : CondIndepSet m hm t t μ) :\n ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1", "start": [ 64, 1 ], "end": [ 74, 28 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.indep_biSup_compl", "code": "theorem kernel.indep_biSup_compl (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) (t : Set ι) :\n Indep (⨆ n ∈ t, s n) (⨆ n ∈ tᶜ, s n) κ μα", "start": [ 80, 1 ], "end": [ 82, 59 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.indep_biSup_compl", "code": "theorem indep_biSup_compl (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) (t : Set ι) :\n Indep (⨆ n ∈ t, s n) (⨆ n ∈ tᶜ, s n) μ", "start": [ 84, 1 ], "end": [ 86, 42 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condIndep_biSup_compl", "code": "theorem condIndep_biSup_compl [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) (t : Set ι) :\n CondIndep m (⨆ n ∈ t, s n) (⨆ n ∈ tᶜ, s n) hm μ", "start": [ 89, 1 ], "end": [ 93, 42 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.indep_biSup_limsup", "code": "theorem kernel.indep_biSup_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα)\n (hf : ∀ t, p t → tᶜ ∈ f) {t : Set ι} (ht : p t) :\n Indep (⨆ n ∈ t, s n) (limsup s f) κ μα", "start": [ 109, 1 ], "end": [ 115, 45 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.indep_biSup_limsup", "code": "theorem indep_biSup_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) (hf : ∀ t, p t → tᶜ ∈ f)\n {t : Set ι} (ht : p t) :\n Indep (⨆ n ∈ t, s n) (limsup s f) μ", "start": [ 117, 1 ], "end": [ 120, 47 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condIndep_biSup_limsup", "code": "theorem condIndep_biSup_limsup [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) (hf : ∀ t, p t → tᶜ ∈ f)\n {t : Set ι} (ht : p t) :\n CondIndep m (⨆ n ∈ t, s n) (limsup s f) hm μ", "start": [ 123, 1 ], "end": [ 128, 47 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.indep_iSup_directed_limsup", "code": "theorem kernel.indep_iSup_directed_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα)\n (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) :\n Indep (⨆ a, ⨆ n ∈ ns a, s n) (limsup s f) κ μα", "start": [ 130, 1 ], "end": [ 141, 20 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.indep_iSup_directed_limsup", "code": "theorem indep_iSup_directed_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ)\n (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) :\n Indep (⨆ a, ⨆ n ∈ ns a, s n) (limsup s f) μ", "start": [ 143, 1 ], "end": [ 146, 61 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condIndep_iSup_directed_limsup", "code": "theorem condIndep_iSup_directed_limsup [StandardBorelSpace Ω]\n [Nonempty Ω] (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)\n (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) :\n CondIndep m (⨆ a, ⨆ n ∈ ns a, s n) (limsup s f) hm μ", "start": [ 149, 1 ], "end": [ 154, 61 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.indep_iSup_limsup", "code": "theorem kernel.indep_iSup_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα)\n (hf : ∀ t, p t → tᶜ ∈ f)\n (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) (hns_univ : ∀ n, ∃ a, n ∈ ns a) :\n Indep (⨆ n, s n) (limsup s f) κ μα", "start": [ 156, 1 ], "end": [ 167, 21 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.indep_iSup_limsup", "code": "theorem indep_iSup_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) (hf : ∀ t, p t → tᶜ ∈ f)\n (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) (hns_univ : ∀ n, ∃ a, n ∈ ns a) :\n Indep (⨆ n, s n) (limsup s f) μ", "start": [ 169, 1 ], "end": [ 172, 61 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condIndep_iSup_limsup", "code": "theorem condIndep_iSup_limsup [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) (hf : ∀ t, p t → tᶜ ∈ f)\n (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) (hns_univ : ∀ n, ∃ a, n ∈ ns a) :\n CondIndep m (⨆ n, s n) (limsup s f) hm μ", "start": [ 175, 1 ], "end": [ 180, 61 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.indep_limsup_self", "code": "theorem kernel.indep_limsup_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα)\n (hf : ∀ t, p t → tᶜ ∈ f)\n (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) (hns_univ : ∀ n, ∃ a, n ∈ ns a) :\n Indep (limsup s f) (limsup s f) κ μα", "start": [ 182, 1 ], "end": [ 186, 97 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.indep_limsup_self", "code": "theorem indep_limsup_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) (hf : ∀ t, p t → tᶜ ∈ f)\n (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) (hns_univ : ∀ n, ∃ a, n ∈ ns a) :\n Indep (limsup s f) (limsup s f) μ", "start": [ 188, 1 ], "end": [ 191, 61 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condIndep_limsup_self", "code": "theorem condIndep_limsup_self [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) (hf : ∀ t, p t → tᶜ ∈ f)\n (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) (hns_univ : ∀ n, ∃ a, n ∈ ns a) :\n CondIndep m (limsup s f) (limsup s f) hm μ", "start": [ 194, 1 ], "end": [ 199, 61 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.measure_zero_or_one_of_measurableSet_limsup", "code": "theorem kernel.measure_zero_or_one_of_measurableSet_limsup (h_le : ∀ n, s n ≤ m0)\n (h_indep : iIndep s κ μα)\n (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))\n (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :\n ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1", "start": [ 201, 1 ], "end": [ 208, 15 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_zero_or_one_of_measurableSet_limsup", "code": "theorem measure_zero_or_one_of_measurableSet_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ)\n (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))\n (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :\n μ t = 0 ∨ μ t = 1", "start": [ 210, 1 ], "end": [ 216, 14 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condexp_zero_or_one_of_measurableSet_limsup", "code": "theorem condexp_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)\n (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))\n (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :\n ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1", "start": [ 219, 1 ], "end": [ 232, 28 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.indep_limsup_atTop_self", "code": "theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :\n Indep (limsup s atTop) (limsup s atTop) κ μα", "start": [ 240, 1 ], "end": [ 252, 31 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.indep_limsup_atTop_self", "code": "theorem indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) :\n Indep (limsup s atTop) (limsup s atTop) μ", "start": [ 254, 1 ], "end": [ 256, 46 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condIndep_limsup_atTop_self", "code": "theorem condIndep_limsup_atTop_self [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) :\n CondIndep m (limsup s atTop) (limsup s atTop) hm μ", "start": [ 259, 1 ], "end": [ 263, 46 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.measure_zero_or_one_of_measurableSet_limsup_atTop", "code": "theorem kernel.measure_zero_or_one_of_measurableSet_limsup_atTop (h_le : ∀ n, s n ≤ m0)\n (h_indep : iIndep s κ μα) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atTop] t) :\n ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1", "start": [ 265, 1 ], "end": [ 269, 87 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_zero_or_one_of_measurableSet_limsup_atTop", "code": "theorem measure_zero_or_one_of_measurableSet_limsup_atTop (h_le : ∀ n, s n ≤ m0)\n (h_indep : iIndep s μ) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atTop] t) :\n μ t = 0 ∨ μ t = 1", "start": [ 271, 1 ], "end": [ 278, 88 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condexp_zero_or_one_of_measurableSet_limsup_atTop", "code": "theorem condexp_zero_or_one_of_measurableSet_limsup_atTop [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ] (h_le : ∀ n, s n ≤ m0)\n (h_indep : iCondIndep m hm s μ) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atTop] t) :\n ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1", "start": [ 281, 1 ], "end": [ 286, 98 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.indep_limsup_atBot_self", "code": "theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :\n Indep (limsup s atBot) (limsup s atBot) κ μα", "start": [ 294, 1 ], "end": [ 306, 31 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.indep_limsup_atBot_self", "code": "theorem indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) :\n Indep (limsup s atBot) (limsup s atBot) μ", "start": [ 308, 1 ], "end": [ 310, 46 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condIndep_limsup_atBot_self", "code": "theorem condIndep_limsup_atBot_self [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ]\n (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) :\n CondIndep m (limsup s atBot) (limsup s atBot) hm μ", "start": [ 313, 1 ], "end": [ 317, 46 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.kernel.measure_zero_or_one_of_measurableSet_limsup_atBot", "code": "theorem kernel.measure_zero_or_one_of_measurableSet_limsup_atBot (h_le : ∀ n, s n ≤ m0)\n (h_indep : iIndep s κ μα) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atBot] t) :\n ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1", "start": [ 319, 1 ], "end": [ 325, 87 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_zero_or_one_of_measurableSet_limsup_atBot", "code": "theorem measure_zero_or_one_of_measurableSet_limsup_atBot (h_le : ∀ n, s n ≤ m0)\n (h_indep : iIndep s μ) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atBot] t) :\n μ t = 0 ∨ μ t = 1", "start": [ 327, 1 ], "end": [ 333, 88 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.condexp_zero_or_one_of_measurableSet_limsup_atBot", "code": "theorem condexp_zero_or_one_of_measurableSet_limsup_atBot [StandardBorelSpace Ω] [Nonempty Ω]\n (hm : m ≤ m0) [IsFiniteMeasure μ] (h_le : ∀ n, s n ≤ m0)\n (h_indep : iCondIndep m hm s μ) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atBot] t) :\n ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1", "start": [ 336, 1 ], "end": [ 343, 98 ], "kind": "commanddeclaration" } ]
Mathlib/Data/W/Constructions.lean
[ "Mathlib/Data/W/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "WType.Natα", "code": "inductive Natα : Type\n | zero : Natα\n | succ : Natα", "start": [ 34, 1 ], "end": [ 37, 16 ], "kind": "commanddeclaration" }, { "full_name": "WType.Natβ", "code": "def Natβ : Natα → Type\n | Natα.zero => Empty\n | Natα.succ => Unit", "start": [ 43, 1 ], "end": [ 46, 22 ], "kind": "commanddeclaration" }, { "full_name": "WType.ofNat", "code": "@[simp]\ndef ofNat : ℕ → WType Natβ\n | Nat.zero => ⟨Natα.zero, Empty.elim⟩\n | Nat.succ n => ⟨Natα.succ, fun _ ↦ ofNat n⟩", "start": [ 52, 1 ], "end": [ 56, 47 ], "kind": "commanddeclaration" }, { "full_name": "WType.toNat", "code": "@[simp]\ndef toNat : WType Natβ → ℕ\n | WType.mk Natα.zero _ => 0\n | WType.mk Natα.succ f => (f ()).toNat.succ", "start": [ 59, 1 ], "end": [ 63, 46 ], "kind": "commanddeclaration" }, { "full_name": "WType.leftInverse_nat", "code": "theorem leftInverse_nat : Function.LeftInverse ofNat toNat", "start": [ 66, 1 ], "end": [ 74, 8 ], "kind": "commanddeclaration" }, { "full_name": "WType.rightInverse_nat", "code": "theorem rightInverse_nat : Function.RightInverse ofNat toNat", "start": [ 77, 1 ], "end": [ 79, 59 ], "kind": "commanddeclaration" }, { "full_name": "WType.equivNat", "code": "def equivNat : WType Natβ ≃ ℕ where\n toFun := toNat\n invFun := ofNat\n left_inv := leftInverse_nat\n right_inv := rightInverse_nat", "start": [ 82, 1 ], "end": [ 87, 32 ], "kind": "commanddeclaration" }, { "full_name": "WType.NatαEquivPUnitSumPUnit", "code": "@[simps]\ndef NatαEquivPUnitSumPUnit : Natα ≃ Sum PUnit.{u + 1} PUnit where\n toFun c :=\n match c with\n | Natα.zero => inl unit\n | Natα.succ => inr unit\n invFun b :=\n match b with\n | inl _ => Natα.zero\n | inr _ => Natα.succ\n left_inv c :=\n match c with\n | Natα.zero => rfl\n | Natα.succ => rfl\n right_inv b :=\n match b with\n | inl _ => rfl\n | inr _ => rfl", "start": [ 92, 1 ], "end": [ 112, 19 ], "kind": "commanddeclaration" }, { "full_name": "WType.Listα", "code": "inductive Listα : Type u\n | nil : Listα\n | cons : γ → Listα", "start": [ 121, 1 ], "end": [ 133, 21 ], "kind": "commanddeclaration" }, { "full_name": "WType.Listβ", "code": "def Listβ : Listα γ → Type u\n | Listα.nil => PEmpty\n | Listα.cons _ => PUnit", "start": [ 139, 1 ], "end": [ 142, 26 ], "kind": "commanddeclaration" }, { "full_name": "WType.ofList", "code": "@[simp]\ndef ofList : List γ → WType (Listβ γ)\n | List.nil => ⟨Listα.nil, PEmpty.elim⟩\n | List.cons hd tl => ⟨Listα.cons hd, fun _ ↦ ofList tl⟩", "start": [ 148, 1 ], "end": [ 152, 58 ], "kind": "commanddeclaration" }, { "full_name": "WType.toList", "code": "@[simp]\ndef toList : WType (Listβ γ) → List γ\n | WType.mk Listα.nil _ => []\n | WType.mk (Listα.cons hd) f => hd :: (f PUnit.unit).toList", "start": [ 155, 1 ], "end": [ 159, 62 ], "kind": "commanddeclaration" }, { "full_name": "WType.leftInverse_list", "code": "theorem leftInverse_list : Function.LeftInverse (ofList γ) (toList _)", "start": [ 162, 1 ], "end": [ 169, 8 ], "kind": "commanddeclaration" }, { "full_name": "WType.rightInverse_list", "code": "theorem rightInverse_list : Function.RightInverse (ofList γ) (toList _)", "start": [ 172, 1 ], "end": [ 174, 67 ], "kind": "commanddeclaration" }, { "full_name": "WType.equivList", "code": "def equivList : WType (Listβ γ) ≃ List γ where\n toFun := toList _\n invFun := ofList _\n left_inv := leftInverse_list _\n right_inv := rightInverse_list _", "start": [ 177, 1 ], "end": [ 182, 35 ], "kind": "commanddeclaration" }, { "full_name": "WType.ListαEquivPUnitSum", "code": "def ListαEquivPUnitSum : Listα γ ≃ Sum PUnit.{v + 1} γ where\n toFun c :=\n match c with\n | Listα.nil => Sum.inl PUnit.unit\n | Listα.cons x => Sum.inr x\n invFun := Sum.elim (fun _ ↦ Listα.nil) Listα.cons\n left_inv c :=\n match c with\n | Listα.nil => rfl\n | Listα.cons _ => rfl\n right_inv x :=\n match x with\n | Sum.inl PUnit.unit => rfl\n | Sum.inr _ => rfl", "start": [ 185, 1 ], "end": [ 201, 23 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Real/Pi/Leibniz.lean
[ "Mathlib/Analysis/Complex/AbelLimit.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/SpecialFunctions/Complex/Arctan.lean" ]
[ { "full_name": "Real.tendsto_sum_pi_div_four", "code": "theorem tendsto_sum_pi_div_four :\n Tendsto (fun k => ∑ i ∈ range k, (-1 : ℝ) ^ i / (2 * i + 1)) atTop (𝓝 (π / 4))", "start": [ 19, 1 ], "end": [ 57, 94 ], "kind": "commanddeclaration" } ]
Mathlib/ModelTheory/Definability.lean
[ "Mathlib/Data/SetLike/Basic.lean", "Mathlib/ModelTheory/Semantics.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Finset/Preimage.lean" ]
[ { "full_name": "Set.Definable", "code": "def Definable (s : Set (α → M)) : Prop :=\n ∃ φ : L[[A]].Formula α, s = setOf φ.Realize", "start": [ 44, 1 ], "end": [ 47, 46 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.map_expansion", "code": "theorem Definable.map_expansion {L' : FirstOrder.Language} [L'.Structure M] (h : A.Definable L s)\n (φ : L →ᴸ L') [φ.IsExpansionOn M] : A.Definable L' s", "start": [ 52, 1 ], "end": [ 57, 51 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_iff_exists_formula_sum", "code": "theorem definable_iff_exists_formula_sum :\n A.Definable L s ↔ ∃ φ : L.Formula (A ⊕ α), s = {v | φ.Realize (Sum.elim (↑) v)}", "start": [ 60, 1 ], "end": [ 73, 36 ], "kind": "commanddeclaration" }, { "full_name": "Set.empty_definable_iff", "code": "theorem empty_definable_iff :\n (∅ : Set M).Definable L s ↔ ∃ φ : L.Formula α, s = setOf φ.Realize", "start": [ 75, 1 ], "end": [ 78, 22 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_iff_empty_definable_with_params", "code": "theorem definable_iff_empty_definable_with_params :\n A.Definable L s ↔ (∅ : Set M).Definable (L[[A]]) s", "start": [ 81, 1 ], "end": [ 83, 27 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.mono", "code": "theorem Definable.mono (hAs : A.Definable L s) (hAB : A ⊆ B) : B.Definable L s", "start": [ 86, 1 ], "end": [ 88, 71 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_empty", "code": "@[simp]\ntheorem definable_empty : A.Definable L (∅ : Set (α → M))", "start": [ 91, 1 ], "end": [ 95, 10 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_univ", "code": "@[simp]\ntheorem definable_univ : A.Definable L (univ : Set (α → M))", "start": [ 98, 1 ], "end": [ 102, 10 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.inter", "code": "@[simp]\ntheorem Definable.inter {f g : Set (α → M)} (hf : A.Definable L f) (hg : A.Definable L g) :\n A.Definable L (f ∩ g)", "start": [ 105, 1 ], "end": [ 112, 7 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.union", "code": "@[simp]\ntheorem Definable.union {f g : Set (α → M)} (hf : A.Definable L f) (hg : A.Definable L g) :\n A.Definable L (f ∪ g)", "start": [ 115, 1 ], "end": [ 122, 88 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_finset_inf", "code": "theorem definable_finset_inf {ι : Type*} {f : ι → Set (α → M)} (hf : ∀ i, A.Definable L (f i))\n (s : Finset ι) : A.Definable L (s.inf f)", "start": [ 125, 1 ], "end": [ 130, 25 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_finset_sup", "code": "theorem definable_finset_sup {ι : Type*} {f : ι → Set (α → M)} (hf : ∀ i, A.Definable L (f i))\n (s : Finset ι) : A.Definable L (s.sup f)", "start": [ 133, 1 ], "end": [ 138, 25 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_finset_biInter", "code": "theorem definable_finset_biInter {ι : Type*} {f : ι → Set (α → M)}\n (hf : ∀ i, A.Definable L (f i)) (s : Finset ι) : A.Definable L (⋂ i ∈ s, f i)", "start": [ 141, 1 ], "end": [ 144, 34 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_finset_biUnion", "code": "theorem definable_finset_biUnion {ι : Type*} {f : ι → Set (α → M)}\n (hf : ∀ i, A.Definable L (f i)) (s : Finset ι) : A.Definable L (⋃ i ∈ s, f i)", "start": [ 147, 1 ], "end": [ 150, 34 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.compl", "code": "@[simp]\ntheorem Definable.compl {s : Set (α → M)} (hf : A.Definable L s) : A.Definable L sᶜ", "start": [ 153, 1 ], "end": [ 158, 66 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.sdiff", "code": "@[simp]\ntheorem Definable.sdiff {s t : Set (α → M)} (hs : A.Definable L s) (ht : A.Definable L t) :\n A.Definable L (s \\ t)", "start": [ 161, 1 ], "end": [ 164, 20 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.preimage_comp", "code": "theorem Definable.preimage_comp (f : α → β) {s : Set (α → M)} (h : A.Definable L s) :\n A.Definable L ((fun g : β → M => g ∘ f) ⁻¹' s)", "start": [ 167, 1 ], "end": [ 172, 75 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.image_comp_equiv", "code": "theorem Definable.image_comp_equiv {s : Set (β → M)} (h : A.Definable L s) (f : α ≃ β) :\n A.Definable L ((fun g : β → M => g ∘ f) '' s)", "start": [ 175, 1 ], "end": [ 184, 9 ], "kind": "commanddeclaration" }, { "full_name": "Set.definable_iff_finitely_definable", "code": "theorem definable_iff_finitely_definable :\n A.Definable L s ↔ ∃ (A0 : Finset M), (A0 : Set M) ⊆ A ∧\n (A0 : Set M).Definable L s", "start": [ 187, 1 ], "end": [ 211, 32 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.image_comp_sum_inl_fin", "code": "theorem Definable.image_comp_sum_inl_fin (m : ℕ) {s : Set (Sum α (Fin m) → M)}\n (h : A.Definable L s) : A.Definable L ((fun g : Sum α (Fin m) → M => g ∘ Sum.inl) '' s)", "start": [ 213, 1 ], "end": [ 226, 88 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.image_comp_embedding", "code": "theorem Definable.image_comp_embedding {s : Set (β → M)} (h : A.Definable L s) (f : α ↪ β)\n [Finite β] : A.Definable L ((fun g : β → M => g ∘ f) '' s)", "start": [ 229, 1 ], "end": [ 242, 9 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable.image_comp", "code": "theorem Definable.image_comp {s : Set (β → M)} (h : A.Definable L s) (f : α → β) [Finite α]\n [Finite β] : A.Definable L ((fun g : β → M => g ∘ f) '' s)", "start": [ 245, 1 ], "end": [ 279, 34 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable₁", "code": "def Definable₁ (s : Set M) : Prop :=\n A.Definable L { x : Fin 1 → M | x 0 ∈ s }", "start": [ 284, 1 ], "end": [ 286, 44 ], "kind": "commanddeclaration" }, { "full_name": "Set.Definable₂", "code": "def Definable₂ (s : Set (M × M)) : Prop :=\n A.Definable L { x : Fin 2 → M | (x 0, x 1) ∈ s }", "start": [ 289, 1 ], "end": [ 291, 51 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet", "code": "def DefinableSet :=\n { s : Set (α → M) // A.Definable L s }", "start": [ 304, 1 ], "end": [ 307, 41 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instSetLike", "code": "instance instSetLike : SetLike (L.DefinableSet A α) (α → M) where\n coe := Subtype.val\n coe_injective' := Subtype.val_injective", "start": [ 315, 1 ], "end": [ 317, 42 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instTop", "code": "instance instTop : Top (L.DefinableSet A α) :=\n ⟨⟨⊤, definable_univ⟩⟩", "start": [ 320, 1 ], "end": [ 321, 24 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instBot", "code": "instance instBot : Bot (L.DefinableSet A α) :=\n ⟨⟨⊥, definable_empty⟩⟩", "start": [ 324, 1 ], "end": [ 325, 25 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instSup", "code": "instance instSup : Sup (L.DefinableSet A α) :=\n ⟨fun s t => ⟨s ∪ t, s.2.union t.2⟩⟩", "start": [ 328, 1 ], "end": [ 329, 38 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instInf", "code": "instance instInf : Inf (L.DefinableSet A α) :=\n ⟨fun s t => ⟨s ∩ t, s.2.inter t.2⟩⟩", "start": [ 332, 1 ], "end": [ 333, 38 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instHasCompl", "code": "instance instHasCompl : HasCompl (L.DefinableSet A α) :=\n ⟨fun s => ⟨sᶜ, s.2.compl⟩⟩", "start": [ 336, 1 ], "end": [ 337, 29 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instSDiff", "code": "instance instSDiff : SDiff (L.DefinableSet A α) :=\n ⟨fun s t => ⟨s \\ t, s.2.sdiff t.2⟩⟩", "start": [ 340, 1 ], "end": [ 341, 38 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instInhabited", "code": "instance instInhabited : Inhabited (L.DefinableSet A α) :=\n ⟨⊥⟩", "start": [ 344, 1 ], "end": [ 345, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.le_iff", "code": "theorem le_iff : s ≤ t ↔ (s : Set (α → M)) ≤ (t : Set (α → M))", "start": [ 348, 1 ], "end": [ 349, 10 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.mem_top", "code": "@[simp]\ntheorem mem_top : x ∈ (⊤ : L.DefinableSet A α)", "start": [ 352, 1 ], "end": [ 354, 13 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.not_mem_bot", "code": "@[simp]\ntheorem not_mem_bot {x : α → M} : ¬x ∈ (⊥ : L.DefinableSet A α)", "start": [ 357, 1 ], "end": [ 359, 18 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.mem_sup", "code": "@[simp]\ntheorem mem_sup : x ∈ s ⊔ t ↔ x ∈ s ∨ x ∈ t", "start": [ 362, 1 ], "end": [ 364, 10 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.mem_inf", "code": "@[simp]\ntheorem mem_inf : x ∈ s ⊓ t ↔ x ∈ s ∧ x ∈ t", "start": [ 367, 1 ], "end": [ 369, 10 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.mem_compl", "code": "@[simp]\ntheorem mem_compl : x ∈ sᶜ ↔ ¬x ∈ s", "start": [ 372, 1 ], "end": [ 374, 10 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.mem_sdiff", "code": "@[simp]\ntheorem mem_sdiff : x ∈ s \\ t ↔ x ∈ s ∧ ¬x ∈ t", "start": [ 377, 1 ], "end": [ 379, 10 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.coe_top", "code": "@[simp, norm_cast]\ntheorem coe_top : ((⊤ : L.DefinableSet A α) : Set (α → M)) = univ", "start": [ 382, 1 ], "end": [ 384, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.coe_bot", "code": "@[simp, norm_cast]\ntheorem coe_bot : ((⊥ : L.DefinableSet A α) : Set (α → M)) = ∅", "start": [ 387, 1 ], "end": [ 389, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.coe_sup", "code": "@[simp, norm_cast]\ntheorem coe_sup (s t : L.DefinableSet A α) :\n ((s ⊔ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) ∪ (t : Set (α → M))", "start": [ 392, 1 ], "end": [ 395, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.coe_inf", "code": "@[simp, norm_cast]\ntheorem coe_inf (s t : L.DefinableSet A α) :\n ((s ⊓ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) ∩ (t : Set (α → M))", "start": [ 398, 1 ], "end": [ 401, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.coe_compl", "code": "@[simp, norm_cast]\ntheorem coe_compl (s : L.DefinableSet A α) :\n ((sᶜ : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M))ᶜ", "start": [ 404, 1 ], "end": [ 407, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.coe_sdiff", "code": "@[simp, norm_cast]\ntheorem coe_sdiff (s t : L.DefinableSet A α) :\n ((s \\ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) \\ (t : Set (α → M))", "start": [ 410, 1 ], "end": [ 413, 6 ], "kind": "commanddeclaration" }, { "full_name": "FirstOrder.Language.DefinableSet.instBooleanAlgebra", "code": "instance instBooleanAlgebra : BooleanAlgebra (L.DefinableSet A α) :=\n Function.Injective.booleanAlgebra (α := L.DefinableSet A α) _ Subtype.coe_injective\n coe_sup coe_inf coe_top coe_bot coe_compl coe_sdiff", "start": [ 416, 1 ], "end": [ 418, 56 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Eigenspace/Matrix.lean
[ "Mathlib/LinearAlgebra/Eigenspace/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "hasEigenvector_toLin_diagonal", "code": "lemma hasEigenvector_toLin_diagonal (d : n → R) (i : n) (b : Basis n R M) :\n HasEigenvector (toLin b b (diagonal d)) (d i) (b i) :=\n ⟨mem_eigenspace_iff.mpr <| by simp [diagonal], Basis.ne_zero b i⟩", "start": [ 32, 1 ], "end": [ 35, 68 ], "kind": "lemma" }, { "full_name": "hasEigenvector_toLin'_diagonal", "code": "lemma hasEigenvector_toLin'_diagonal (d : n → R) (i : n) :\n HasEigenvector (toLin' (diagonal d)) (d i) (Pi.basisFun R n i) :=\n hasEigenvector_toLin_diagonal ..", "start": [ 37, 1 ], "end": [ 40, 35 ], "kind": "lemma" }, { "full_name": "hasEigenvalue_toLin_diagonal_iff", "code": "lemma hasEigenvalue_toLin_diagonal_iff (d : n → R) {μ : R} [NoZeroSMulDivisors R M]\n (b : Basis n R M) : HasEigenvalue (toLin b b (diagonal d)) μ ↔ ∃ i, d i = μ := by\n have (i : n) : HasEigenvalue (toLin b b (diagonal d)) (d i) :=\n hasEigenvalue_of_hasEigenvector <| hasEigenvector_toLin_diagonal d i b\n constructor\n · contrapose!\n intro hμ h_eig\n have h_iSup : ⨆ μ ∈ Set.range d, eigenspace (toLin b b (diagonal d)) μ = ⊤ := by\n rw [eq_top_iff, ← b.span_eq, Submodule.span_le]\n rintro - ⟨i, rfl⟩\n simp only [SetLike.mem_coe]\n apply Submodule.mem_iSup_of_mem (d i)\n apply Submodule.mem_iSup_of_mem ⟨i, rfl⟩\n rw [mem_eigenspace_iff]\n exact (hasEigenvector_toLin_diagonal d i b).apply_eq_smul\n have hμ_not_mem : μ ∉ Set.range d := by simpa using fun i ↦ (hμ i)\n have := eigenspaces_independent (toLin b b (diagonal d)) |>.disjoint_biSup hμ_not_mem\n rw [h_iSup, disjoint_top] at this\n exact h_eig this\n · rintro ⟨i, rfl⟩\n exact this i", "start": [ 42, 1 ], "end": [ 63, 17 ], "kind": "lemma" }, { "full_name": "hasEigenvalue_toLin'_diagonal_iff", "code": "lemma hasEigenvalue_toLin'_diagonal_iff [NoZeroDivisors R] (d : n → R) {μ : R} :\n HasEigenvalue (toLin' (diagonal d)) μ ↔ (∃ i, d i = μ) :=\n hasEigenvalue_toLin_diagonal_iff _ <| Pi.basisFun R n", "start": [ 65, 1 ], "end": [ 69, 56 ], "kind": "lemma" }, { "full_name": "spectrum_diagonal", "code": "lemma spectrum_diagonal [Field R] (d : n → R) :\n spectrum R (diagonal d) = Set.range d := by\n ext μ\n rw [← AlgEquiv.spectrum_eq (toLinAlgEquiv <| Pi.basisFun R n), ← hasEigenvalue_iff_mem_spectrum]\n exact hasEigenvalue_toLin'_diagonal_iff d", "start": [ 73, 1 ], "end": [ 78, 44 ], "kind": "lemma" } ]
Mathlib/Init/Data/Option/Lemmas.lean
[ "Mathlib/Mathport/Rename.lean", ".lake/packages/lean4/src/lean/Init.lean", ".lake/packages/batteries/Batteries/Data/Option/Lemmas.lean" ]
[]
Mathlib/CategoryTheory/Bicategory/FunctorBicategory.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Bicategory/NaturalTransformation.lean" ]
[ { "full_name": "CategoryTheory.OplaxNatTrans.whiskerLeft", "code": "@[simps]\ndef whiskerLeft (η : F ⟶ G) {θ ι : G ⟶ H} (Γ : θ ⟶ ι) : η ≫ θ ⟶ η ≫ ι where\n app a := η.app a ◁ Γ.app a\n naturality {a b} f := by\n dsimp\n rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc]\n simp", "start": [ 33, 1 ], "end": [ 40, 9 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.OplaxNatTrans.whiskerRight", "code": "@[simps]\ndef whiskerRight {η θ : F ⟶ G} (Γ : η ⟶ θ) (ι : G ⟶ H) : η ≫ ι ⟶ θ ≫ ι where\n app a := Γ.app a ▷ ι.app a\n naturality {a b} f := by\n dsimp\n simp_rw [assoc, ← associator_inv_naturality_left, whisker_exchange_assoc]\n simp", "start": [ 43, 1 ], "end": [ 50, 9 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.OplaxNatTrans.associator", "code": "@[simps!]\ndef associator (η : F ⟶ G) (θ : G ⟶ H) (ι : H ⟶ I) : (η ≫ θ) ≫ ι ≅ η ≫ θ ≫ ι :=\n ModificationIso.ofComponents (fun a => α_ (η.app a) (θ.app a) (ι.app a)) (by aesop_cat)", "start": [ 53, 1 ], "end": [ 57, 90 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.OplaxNatTrans.leftUnitor", "code": "@[simps!]\ndef leftUnitor (η : F ⟶ G) : 𝟙 F ≫ η ≅ η :=\n ModificationIso.ofComponents (fun a => λ_ (η.app a)) (by aesop_cat)", "start": [ 60, 1 ], "end": [ 64, 70 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.OplaxNatTrans.rightUnitor", "code": "@[simps!]\ndef rightUnitor (η : F ⟶ G) : η ≫ 𝟙 G ≅ η :=\n ModificationIso.ofComponents (fun a => ρ_ (η.app a)) (by aesop_cat)", "start": [ 67, 1 ], "end": [ 71, 70 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.OplaxFunctor.bicategory", "code": "@[simps!]\ninstance OplaxFunctor.bicategory : Bicategory (OplaxFunctor B C) where\n whiskerLeft {F G H} η _ _ Γ := OplaxNatTrans.whiskerLeft η Γ\n whiskerRight {F G H} _ _ Γ η := OplaxNatTrans.whiskerRight Γ η\n associator {F G H} I := OplaxNatTrans.associator\n leftUnitor {F G} := OplaxNatTrans.leftUnitor\n rightUnitor {F G} := OplaxNatTrans.rightUnitor\n whisker_exchange {a b c f g h i} η θ := by\n ext\n exact whisker_exchange _ _", "start": [ 78, 1 ], "end": [ 89, 31 ], "kind": "commanddeclaration" } ]
Mathlib/GroupTheory/FixedPointFree.lean
[ "Mathlib/Algebra/GroupPower/IterateHom.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/GroupTheory/Perm/Cycle/Type.lean", "Mathlib/GroupTheory/OrderOfElement.lean" ]
[ { "full_name": "MonoidHom.FixedPointFree", "code": "def FixedPointFree [One G] := ∀ g, φ g = g → g = 1", "start": [ 26, 1 ], "end": [ 27, 51 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.commutatorMap", "code": "def commutatorMap [Div G] (g : G) := g / φ g", "start": [ 29, 1 ], "end": [ 31, 45 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.commutatorMap_apply", "code": "@[simp] theorem commutatorMap_apply [Div G] (g : G) : commutatorMap φ g = g / φ g", "start": [ 33, 1 ], "end": [ 33, 89 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.commutatorMap_injective", "code": "theorem commutatorMap_injective : Function.Injective (commutatorMap φ)", "start": [ 42, 1 ], "end": [ 44, 99 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.commutatorMap_surjective", "code": "theorem commutatorMap_surjective : Function.Surjective (commutatorMap φ)", "start": [ 48, 1 ], "end": [ 49, 60 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.prod_pow_eq_one", "code": "theorem prod_pow_eq_one {n : ℕ} (hn : φ^[n] = _root_.id) (g : G) :\n ((List.range n).map (fun k ↦ φ^[k] g)).prod = 1", "start": [ 51, 1 ], "end": [ 55, 89 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.coe_eq_inv_of_sq_eq_one", "code": "theorem coe_eq_inv_of_sq_eq_one (h2 : φ^[2] = _root_.id) : ⇑φ = (·⁻¹)", "start": [ 57, 1 ], "end": [ 60, 57 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.coe_eq_inv_of_involutive", "code": "theorem coe_eq_inv_of_involutive : ⇑φ = (·⁻¹)", "start": [ 66, 1 ], "end": [ 67, 42 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.commute_all_of_involutive", "code": "theorem commute_all_of_involutive (g h : G) : Commute g h", "start": [ 69, 1 ], "end": [ 71, 96 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.commGroupOfInvolutive", "code": "def commGroupOfInvolutive : CommGroup G := .mk (hφ.commute_all_of_involutive h2)", "start": [ 73, 1 ], "end": [ 74, 81 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.orderOf_ne_two_of_involutive", "code": "theorem orderOf_ne_two_of_involutive (g : G) : orderOf g ≠ 2", "start": [ 76, 1 ], "end": [ 81, 16 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.odd_card_of_involutive", "code": "theorem odd_card_of_involutive : Odd (Nat.card G)", "start": [ 83, 1 ], "end": [ 88, 48 ], "kind": "commanddeclaration" }, { "full_name": "MonoidHom.FixedPointFree.odd_orderOf_of_involutive", "code": "theorem odd_orderOf_of_involutive (g : G) : Odd (orderOf g)", "start": [ 90, 1 ], "end": [ 91, 72 ], "kind": "commanddeclaration" } ]
Mathlib/MeasureTheory/MeasurableSpace/Invariants.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/MeasureTheory/MeasurableSpace/Defs.lean" ]
[ { "full_name": "MeasurableSpace.invariants", "code": "def invariants [m : MeasurableSpace α] (f : α → α) : MeasurableSpace α :=\n { m ⊓ ⟨fun s ↦ f ⁻¹' s = s, by simp, by simp, fun f hf ↦ by simp [hf]⟩ with\n MeasurableSet' := fun s ↦ MeasurableSet[m] s ∧ f ⁻¹' s = s }", "start": [ 23, 1 ], "end": [ 30, 65 ], "kind": "commanddeclaration" }, { "full_name": "MeasurableSpace.measurableSet_invariants", "code": "theorem measurableSet_invariants {f : α → α} {s : Set α} :\n MeasurableSet[invariants f] s ↔ MeasurableSet s ∧ f ⁻¹' s = s", "start": [ 34, 1 ], "end": [ 38, 7 ], "kind": "commanddeclaration" }, { "full_name": "MeasurableSpace.invariants_id", "code": "@[simp]\ntheorem invariants_id : invariants (id : α → α) = ‹MeasurableSpace α›", "start": [ 40, 1 ], "end": [ 42, 43 ], "kind": "commanddeclaration" }, { "full_name": "MeasurableSpace.invariants_le", "code": "theorem invariants_le (f : α → α) : invariants f ≤ ‹MeasurableSpace α›", "start": [ 44, 1 ], "end": [ 44, 91 ], "kind": "commanddeclaration" }, { "full_name": "MeasurableSpace.inf_le_invariants_comp", "code": "theorem inf_le_invariants_comp (f g : α → α) :\n invariants f ⊓ invariants g ≤ invariants (f ∘ g)", "start": [ 46, 1 ], "end": [ 48, 50 ], "kind": "commanddeclaration" }, { "full_name": "MeasurableSpace.le_invariants_iterate", "code": "theorem le_invariants_iterate (f : α → α) (n : ℕ) :\n invariants f ≤ invariants (f^[n])", "start": [ 50, 1 ], "end": [ 54, 82 ], "kind": "commanddeclaration" }, { "full_name": "MeasurableSpace.measurable_invariants_dom", "code": "theorem measurable_invariants_dom {f : α → α} {g : α → β} :\n Measurable[invariants f] g ↔ Measurable g ∧ ∀ s, MeasurableSet s → (g ∘ f) ⁻¹' s = g ⁻¹' s", "start": [ 58, 1 ], "end": [ 60, 44 ], "kind": "commanddeclaration" }, { "full_name": "MeasurableSpace.measurable_invariants_of_semiconj", "code": "theorem measurable_invariants_of_semiconj {fa : α → α} {fb : β → β} {g : α → β} (hg : Measurable g)\n (hfg : Semiconj g fa fb) : @Measurable _ _ (invariants fa) (invariants fb) g", "start": [ 62, 1 ], "end": [ 64, 71 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/SimpleGraph/Partition.lean
[ "Mathlib/Combinatorics/SimpleGraph/Coloring.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "SimpleGraph.Partition", "code": "structure Partition where\n \n parts : Set (Set V)\n \n isPartition : Setoid.IsPartition parts\n \n independent : ∀ s ∈ parts, IsAntichain G.Adj s", "start": [ 54, 1 ], "end": [ 66, 49 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.PartsCardLe", "code": "def Partition.PartsCardLe {G : SimpleGraph V} (P : G.Partition) (n : ℕ) : Prop :=\n ∃ h : P.parts.Finite, h.toFinset.card ≤ n", "start": [ 69, 1 ], "end": [ 72, 44 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partitionable", "code": "def Partitionable (n : ℕ) : Prop := ∃ P : G.Partition, P.PartsCardLe n", "start": [ 75, 1 ], "end": [ 77, 71 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.partOfVertex", "code": "def partOfVertex (v : V) : Set V := Classical.choose (P.isPartition.2 v)", "start": [ 85, 1 ], "end": [ 86, 73 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.partOfVertex_mem", "code": "theorem partOfVertex_mem (v : V) : P.partOfVertex v ∈ P.parts", "start": [ 89, 1 ], "end": [ 91, 10 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.mem_partOfVertex", "code": "theorem mem_partOfVertex (v : V) : v ∈ P.partOfVertex v", "start": [ 94, 1 ], "end": [ 96, 10 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.partOfVertex_ne_of_adj", "code": "theorem partOfVertex_ne_of_adj {v w : V} (h : G.Adj v w) : P.partOfVertex v ≠ P.partOfVertex w", "start": [ 99, 1 ], "end": [ 103, 91 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.toColoring", "code": "def toColoring : G.Coloring P.parts :=\n Coloring.mk (fun v ↦ ⟨P.partOfVertex v, P.partOfVertex_mem v⟩) fun hvw ↦ by\n rw [Ne, Subtype.mk_eq_mk]\n exact P.partOfVertex_ne_of_adj hvw", "start": [ 106, 1 ], "end": [ 111, 39 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.toColoring'", "code": "def toColoring' : G.Coloring (Set V) :=\n Coloring.mk P.partOfVertex fun hvw ↦ P.partOfVertex_ne_of_adj hvw", "start": [ 114, 1 ], "end": [ 116, 68 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Partition.colorable", "code": "theorem colorable [Fintype P.parts] : G.Colorable (Fintype.card P.parts)", "start": [ 119, 1 ], "end": [ 120, 25 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.Coloring.toPartition", "code": "@[simps]\ndef Coloring.toPartition {α : Type v} (C : G.Coloring α) : G.Partition where\n parts := C.colorClasses\n isPartition := C.colorClasses_isPartition\n independent := by\n rintro s ⟨c, rfl⟩\n apply C.color_classes_independent", "start": [ 127, 1 ], "end": [ 134, 38 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.partitionable_iff_colorable", "code": "theorem partitionable_iff_colorable {n : ℕ} : G.Partitionable n ↔ G.Colorable n", "start": [ 141, 1 ], "end": [ 153, 33 ], "kind": "commanddeclaration" } ]
Mathlib/Data/List/ReduceOption.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/List/Basic.lean" ]
[ { "full_name": "List.reduceOption_cons_of_some", "code": "@[simp]\ntheorem reduceOption_cons_of_some (x : α) (l : List (Option α)) :\n reduceOption (some x :: l) = x :: l.reduceOption", "start": [ 18, 1 ], "end": [ 21, 74 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_cons_of_none", "code": "@[simp]\ntheorem reduceOption_cons_of_none (l : List (Option α)) :\n reduceOption (none :: l) = l.reduceOption", "start": [ 24, 1 ], "end": [ 26, 92 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_nil", "code": "@[simp]\ntheorem reduceOption_nil : @reduceOption α [] = []", "start": [ 29, 1 ], "end": [ 31, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_map", "code": "@[simp]\ntheorem reduceOption_map {l : List (Option α)} {f : α → β} :\n reduceOption (map (Option.map f) l) = map f (reduceOption l)", "start": [ 34, 1 ], "end": [ 41, 44 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_append", "code": "theorem reduceOption_append (l l' : List (Option α)) :\n (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption", "start": [ 44, 1 ], "end": [ 46, 27 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_length_eq", "code": "theorem reduceOption_length_eq {l : List (Option α)} :\n l.reduceOption.length = (l.filter Option.isSome).length", "start": [ 49, 1 ], "end": [ 53, 27 ], "kind": "commanddeclaration" }, { "full_name": "List.length_eq_reduceOption_length_add_filter_none", "code": "theorem length_eq_reduceOption_length_add_filter_none {l : List (Option α)} :\n l.length = l.reduceOption.length + (l.filter Option.isNone).length", "start": [ 55, 1 ], "end": [ 57, 100 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_length_le", "code": "theorem reduceOption_length_le (l : List (Option α)) : l.reduceOption.length ≤ l.length", "start": [ 59, 1 ], "end": [ 61, 25 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_length_eq_iff", "code": "theorem reduceOption_length_eq_iff {l : List (Option α)} :\n l.reduceOption.length = l.length ↔ ∀ x ∈ l, Option.isSome x", "start": [ 64, 1 ], "end": [ 66, 60 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_length_lt_iff", "code": "theorem reduceOption_length_lt_iff {l : List (Option α)} :\n l.reduceOption.length < l.length ↔ none ∈ l", "start": [ 69, 1 ], "end": [ 74, 82 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_singleton", "code": "theorem reduceOption_singleton (x : Option α) : [x].reduceOption = x.toList", "start": [ 77, 1 ], "end": [ 77, 98 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_concat", "code": "theorem reduceOption_concat (l : List (Option α)) (x : Option α) :\n (l.concat x).reduceOption = l.reduceOption ++ x.toList", "start": [ 80, 1 ], "end": [ 85, 48 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_concat_of_some", "code": "theorem reduceOption_concat_of_some (l : List (Option α)) (x : α) :\n (l.concat (some x)).reduceOption = l.reduceOption.concat x", "start": [ 88, 1 ], "end": [ 90, 97 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_mem_iff", "code": "theorem reduceOption_mem_iff {l : List (Option α)} {x : α} : x ∈ l.reduceOption ↔ some x ∈ l", "start": [ 93, 1 ], "end": [ 94, 63 ], "kind": "commanddeclaration" }, { "full_name": "List.reduceOption_get?_iff", "code": "theorem reduceOption_get?_iff {l : List (Option α)} {x : α} :\n (∃ i, l.get? i = some (some x)) ↔ ∃ i, l.reduceOption.get? i = some x", "start": [ 97, 1 ], "end": [ 99, 60 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/Category/FinTopCat.lean
[ "Mathlib/Topology/Category/TopCat/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/FintypeCat.lean" ]
[ { "full_name": "FinTopCat", "code": "structure FinTopCat where\n \n toTop : TopCat.{u}\n [fintype : Fintype toTop]", "start": [ 22, 1 ], "end": [ 26, 28 ], "kind": "commanddeclaration" }, { "full_name": "FinTopCat.of", "code": "def of (X : Type u) [Fintype X] [TopologicalSpace X] : FinTopCat where\n toTop := TopCat.of X\n fintype := ‹_›", "start": [ 50, 1 ], "end": [ 53, 17 ], "kind": "commanddeclaration" }, { "full_name": "FinTopCat.coe_of", "code": "@[simp]\ntheorem coe_of (X : Type u) [Fintype X] [TopologicalSpace X] :\n (of X : Type u) = X", "start": [ 55, 1 ], "end": [ 58, 6 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/SpecialFunctions/CompareExp.lean
[ "Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean", "Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean" ]
[ { "full_name": "Complex.IsExpCmpFilter", "code": "structure IsExpCmpFilter (l : Filter ℂ) : Prop where\n tendsto_re : Tendsto re l atTop\n isBigO_im_pow_re : ∀ n : ℕ, (fun z : ℂ => z.im ^ n) =O[l] fun z => Real.exp z.re", "start": [ 37, 1 ], "end": [ 46, 83 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.of_isBigO_im_re_rpow", "code": "theorem of_isBigO_im_re_rpow (hre : Tendsto re l atTop) (r : ℝ) (hr : im =O[l] fun z => z.re ^ r) :\n IsExpCmpFilter l", "start": [ 57, 1 ], "end": [ 66, 90 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.of_isBigO_im_re_pow", "code": "theorem of_isBigO_im_re_pow (hre : Tendsto re l atTop) (n : ℕ) (hr : im =O[l] fun z => z.re ^ n) :\n IsExpCmpFilter l", "start": [ 70, 1 ], "end": [ 72, 44 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.of_boundedUnder_abs_im", "code": "theorem of_boundedUnder_abs_im (hre : Tendsto re l atTop)\n (him : IsBoundedUnder (· ≤ ·) l fun z => |z.im|) : IsExpCmpFilter l", "start": [ 76, 1 ], "end": [ 79, 71 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.of_boundedUnder_im", "code": "theorem of_boundedUnder_im (hre : Tendsto re l atTop) (him_le : IsBoundedUnder (· ≤ ·) l im)\n (him_ge : IsBoundedUnder (· ≥ ·) l im) : IsExpCmpFilter l", "start": [ 82, 1 ], "end": [ 84, 73 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.eventually_ne", "code": "theorem eventually_ne (hl : IsExpCmpFilter l) : ∀ᶠ w : ℂ in l, w ≠ 0", "start": [ 91, 1 ], "end": [ 92, 39 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.tendsto_abs_re", "code": "theorem tendsto_abs_re (hl : IsExpCmpFilter l) : Tendsto (fun z : ℂ => |z.re|) l atTop", "start": [ 95, 1 ], "end": [ 96, 45 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.tendsto_abs", "code": "theorem tendsto_abs (hl : IsExpCmpFilter l) : Tendsto abs l atTop", "start": [ 99, 1 ], "end": [ 100, 53 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_log_re_re", "code": "theorem isLittleO_log_re_re (hl : IsExpCmpFilter l) : (fun z => Real.log z.re) =o[l] re", "start": [ 103, 1 ], "end": [ 104, 57 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_im_pow_exp_re", "code": "theorem isLittleO_im_pow_exp_re (hl : IsExpCmpFilter l) (n : ℕ) :\n (fun z : ℂ => z.im ^ n) =o[l] fun z => Real.exp z.re", "start": [ 107, 1 ], "end": [ 116, 52 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.abs_im_pow_eventuallyLE_exp_re", "code": "theorem abs_im_pow_eventuallyLE_exp_re (hl : IsExpCmpFilter l) (n : ℕ) :\n (fun z : ℂ => |z.im| ^ n) ≤ᶠ[l] fun z => Real.exp z.re", "start": [ 119, 1 ], "end": [ 121, 63 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_log_abs_re", "code": "theorem isLittleO_log_abs_re (hl : IsExpCmpFilter l) : (fun z => Real.log (abs z)) =o[l] re", "start": [ 124, 1 ], "end": [ 151, 45 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isTheta_cpow_exp_re_mul_log", "code": "lemma isTheta_cpow_exp_re_mul_log (hl : IsExpCmpFilter l) (a : ℂ) :\n (· ^ a) =Θ[l] fun z ↦ Real.exp (re a * Real.log (abs z)) :=\n calc\n (fun z => z ^ a) =Θ[l] (fun z : ℂ => (abs z ^ re a)) :=\n isTheta_cpow_const_rpow fun _ _ => hl.eventually_ne\n _ =ᶠ[l] fun z => Real.exp (re a * Real.log (abs z)) :=\n (hl.eventually_ne.mono fun z hz => by simp only [Real.rpow_def_of_pos, abs.pos hz, mul_comm])", "start": [ 158, 1 ], "end": [ 164, 100 ], "kind": "lemma" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_cpow_exp", "code": "theorem isLittleO_cpow_exp (hl : IsExpCmpFilter l) (a : ℂ) {b : ℝ} (hb : 0 < b) :\n (fun z => z ^ a) =o[l] fun z => exp (b * z)", "start": [ 166, 1 ], "end": [ 178, 80 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_cpow_mul_exp", "code": "theorem isLittleO_cpow_mul_exp {b₁ b₂ : ℝ} (hl : IsExpCmpFilter l) (hb : b₁ < b₂) (a₁ a₂ : ℂ) :\n (fun z => z ^ a₁ * exp (b₁ * z)) =o[l] fun z => z ^ a₂ * exp (b₂ * z)", "start": [ 181, 1 ], "end": [ 195, 16 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_exp_cpow", "code": "theorem isLittleO_exp_cpow (hl : IsExpCmpFilter l) (a : ℂ) {b : ℝ} (hb : b < 0) :\n (fun z => exp (b * z)) =o[l] fun z => z ^ a", "start": [ 198, 1 ], "end": [ 201, 99 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_pow_mul_exp", "code": "theorem isLittleO_pow_mul_exp {b₁ b₂ : ℝ} (hl : IsExpCmpFilter l) (hb : b₁ < b₂) (m n : ℕ) :\n (fun z => z ^ m * exp (b₁ * z)) =o[l] fun z => z ^ n * exp (b₂ * z)", "start": [ 204, 1 ], "end": [ 209, 67 ], "kind": "commanddeclaration" }, { "full_name": "Complex.IsExpCmpFilter.isLittleO_zpow_mul_exp", "code": "theorem isLittleO_zpow_mul_exp {b₁ b₂ : ℝ} (hl : IsExpCmpFilter l) (hb : b₁ < b₂) (m n : ℤ) :\n (fun z => z ^ m * exp (b₁ * z)) =o[l] fun z => z ^ n * exp (b₂ * z)", "start": [ 212, 1 ], "end": [ 217, 67 ], "kind": "commanddeclaration" } ]
Mathlib/Data/PNat/Factors.lean
[ "Mathlib/Data/PNat/Prime.lean", "Mathlib/Algebra/BigOperators/Group/Multiset.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Nat/Factors.lean", "Mathlib/Data/Multiset/Sort.lean" ]
[ { "full_name": "PrimeMultiset", "code": "def PrimeMultiset :=\n Multiset Nat.Primes deriving Inhabited, CanonicallyOrderedAddCommMonoid, DistribLattice,\n SemilatticeSup, Sub", "start": [ 27, 1 ], "end": [ 32, 22 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.ofPrime", "code": "def ofPrime (p : Nat.Primes) : PrimeMultiset :=\n ({p} : Multiset Nat.Primes)", "start": [ 46, 1 ], "end": [ 48, 30 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.card_ofPrime", "code": "theorem card_ofPrime (p : Nat.Primes) : Multiset.card (ofPrime p) = 1", "start": [ 51, 1 ], "end": [ 52, 6 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.toNatMultiset", "code": "def toNatMultiset : PrimeMultiset → Multiset ℕ := fun v => v.map Coe.coe", "start": [ 55, 1 ], "end": [ 63, 73 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coeNat", "code": "instance coeNat : Coe PrimeMultiset (Multiset ℕ) :=\n ⟨toNatMultiset⟩", "start": [ 66, 1 ], "end": [ 67, 18 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coeNatMonoidHom", "code": "def coeNatMonoidHom : PrimeMultiset →+ Multiset ℕ :=\n { Multiset.mapAddMonoidHom Coe.coe with toFun := Coe.coe }", "start": [ 70, 1 ], "end": [ 73, 61 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coe_coeNatMonoidHom", "code": "@[simp]\ntheorem coe_coeNatMonoidHom : (coeNatMonoidHom : PrimeMultiset → Multiset ℕ) = Coe.coe", "start": [ 76, 1 ], "end": [ 78, 6 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coeNat_injective", "code": "theorem coeNat_injective : Function.Injective (Coe.coe : PrimeMultiset → Multiset ℕ)", "start": [ 81, 1 ], "end": [ 82, 54 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coeNat_ofPrime", "code": "theorem coeNat_ofPrime (p : Nat.Primes) : (ofPrime p : Multiset ℕ) = {(p : ℕ)}", "start": [ 85, 1 ], "end": [ 86, 6 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coeNat_prime", "code": "theorem coeNat_prime (v : PrimeMultiset) (p : ℕ) (h : p ∈ (v : Multiset ℕ)) : p.Prime", "start": [ 89, 1 ], "end": [ 91, 19 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.toPNatMultiset", "code": "def toPNatMultiset : PrimeMultiset → Multiset ℕ+ := fun v => v.map Coe.coe", "start": [ 94, 1 ], "end": [ 95, 75 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coePNat", "code": "instance coePNat : Coe PrimeMultiset (Multiset ℕ+) :=\n ⟨toPNatMultiset⟩", "start": [ 98, 1 ], "end": [ 99, 19 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coePNatMonoidHom", "code": "def coePNatMonoidHom : PrimeMultiset →+ Multiset ℕ+ :=\n { Multiset.mapAddMonoidHom Coe.coe with toFun := Coe.coe }", "start": [ 102, 1 ], "end": [ 105, 61 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coe_coePNatMonoidHom", "code": "@[simp]\ntheorem coe_coePNatMonoidHom : (coePNatMonoidHom : PrimeMultiset → Multiset ℕ+) = Coe.coe", "start": [ 108, 1 ], "end": [ 110, 6 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coePNat_injective", "code": "theorem coePNat_injective : Function.Injective (Coe.coe : PrimeMultiset → Multiset ℕ+)", "start": [ 113, 1 ], "end": [ 114, 55 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coePNat_ofPrime", "code": "theorem coePNat_ofPrime (p : Nat.Primes) : (ofPrime p : Multiset ℕ+) = {(p : ℕ+)}", "start": [ 117, 1 ], "end": [ 118, 6 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coePNat_prime", "code": "theorem coePNat_prime (v : PrimeMultiset) (p : ℕ+) (h : p ∈ (v : Multiset ℕ+)) : p.Prime", "start": [ 121, 1 ], "end": [ 123, 19 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coeMultisetPNatNat", "code": "instance coeMultisetPNatNat : Coe (Multiset ℕ+) (Multiset ℕ) :=\n ⟨fun v => v.map Coe.coe⟩", "start": [ 126, 1 ], "end": [ 127, 27 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coePNat_nat", "code": "theorem coePNat_nat (v : PrimeMultiset) : ((v : Multiset ℕ+) : Multiset ℕ) = (v : Multiset ℕ)", "start": [ 130, 1 ], "end": [ 133, 8 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod", "code": "def prod (v : PrimeMultiset) : ℕ+ :=\n (v : Multiset PNat).prod", "start": [ 136, 1 ], "end": [ 138, 27 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.coe_prod", "code": "theorem coe_prod (v : PrimeMultiset) : (v.prod : ℕ) = (v : Multiset ℕ).prod", "start": [ 141, 1 ], "end": [ 146, 26 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_ofPrime", "code": "theorem prod_ofPrime (p : Nat.Primes) : (ofPrime p).prod = (p : ℕ+)", "start": [ 149, 1 ], "end": [ 150, 28 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.ofNatMultiset", "code": "def ofNatMultiset (v : Multiset ℕ) (h : ∀ p : ℕ, p ∈ v → p.Prime) : PrimeMultiset :=\n @Multiset.pmap ℕ Nat.Primes Nat.Prime (fun p hp => ⟨p, hp⟩) v h", "start": [ 153, 1 ], "end": [ 155, 66 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.to_ofNatMultiset", "code": "theorem to_ofNatMultiset (v : Multiset ℕ) (h) : (ofNatMultiset v h : Multiset ℕ) = v", "start": [ 158, 1 ], "end": [ 163, 70 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_ofNatMultiset", "code": "theorem prod_ofNatMultiset (v : Multiset ℕ) (h) :\n ((ofNatMultiset v h).prod : ℕ) = (v.prod : ℕ)", "start": [ 166, 1 ], "end": [ 167, 88 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.ofPNatMultiset", "code": "def ofPNatMultiset (v : Multiset ℕ+) (h : ∀ p : ℕ+, p ∈ v → p.Prime) : PrimeMultiset :=\n @Multiset.pmap ℕ+ Nat.Primes PNat.Prime (fun p hp => ⟨(p : ℕ), hp⟩) v h", "start": [ 170, 1 ], "end": [ 172, 74 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.to_ofPNatMultiset", "code": "theorem to_ofPNatMultiset (v : Multiset ℕ+) (h) : (ofPNatMultiset v h : Multiset ℕ+) = v", "start": [ 175, 1 ], "end": [ 181, 70 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_ofPNatMultiset", "code": "theorem prod_ofPNatMultiset (v : Multiset ℕ+) (h) : ((ofPNatMultiset v h).prod : ℕ+) = v.prod", "start": [ 184, 1 ], "end": [ 186, 25 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.ofNatList", "code": "def ofNatList (l : List ℕ) (h : ∀ p : ℕ, p ∈ l → p.Prime) : PrimeMultiset :=\n ofNatMultiset (l : Multiset ℕ) h", "start": [ 189, 1 ], "end": [ 192, 35 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_ofNatList", "code": "theorem prod_ofNatList (l : List ℕ) (h) : ((ofNatList l h).prod : ℕ) = l.prod", "start": [ 195, 1 ], "end": [ 198, 13 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.ofPNatList", "code": "def ofPNatList (l : List ℕ+) (h : ∀ p : ℕ+, p ∈ l → p.Prime) : PrimeMultiset :=\n ofPNatMultiset (l : Multiset ℕ+) h", "start": [ 201, 1 ], "end": [ 204, 37 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_ofPNatList", "code": "theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).prod = l.prod", "start": [ 207, 1 ], "end": [ 210, 13 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_zero", "code": "theorem prod_zero : (0 : PrimeMultiset).prod = 1", "start": [ 213, 1 ], "end": [ 216, 27 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_add", "code": "theorem prod_add (u v : PrimeMultiset) : (u + v).prod = u.prod * v.prod", "start": [ 219, 1 ], "end": [ 222, 30 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_smul", "code": "theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).prod = u.prod ^ d", "start": [ 225, 1 ], "end": [ 228, 57 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset", "code": "def factorMultiset (n : ℕ+) : PrimeMultiset :=\n PrimeMultiset.ofNatList (Nat.factors n) (@Nat.prime_of_mem_factors n)", "start": [ 235, 1 ], "end": [ 237, 72 ], "kind": "commanddeclaration" }, { "full_name": "PNat.prod_factorMultiset", "code": "theorem prod_factorMultiset (n : ℕ+) : (factorMultiset n).prod = n", "start": [ 240, 1 ], "end": [ 245, 37 ], "kind": "commanddeclaration" }, { "full_name": "PNat.coeNat_factorMultiset", "code": "theorem coeNat_factorMultiset (n : ℕ+) :\n (factorMultiset n : Multiset ℕ) = (Nat.factors n : Multiset ℕ)", "start": [ 248, 1 ], "end": [ 250, 79 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.factorMultiset_prod", "code": "theorem factorMultiset_prod (v : PrimeMultiset) : v.prod.factorMultiset = v", "start": [ 257, 1 ], "end": [ 271, 73 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultisetEquiv", "code": "def factorMultisetEquiv : ℕ+ ≃ PrimeMultiset where\n toFun := factorMultiset\n invFun := PrimeMultiset.prod\n left_inv := prod_factorMultiset\n right_inv := PrimeMultiset.factorMultiset_prod", "start": [ 278, 1 ], "end": [ 283, 49 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_one", "code": "theorem factorMultiset_one : factorMultiset 1 = 0", "start": [ 286, 1 ], "end": [ 289, 78 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_mul", "code": "theorem factorMultiset_mul (n m : ℕ+) :\n factorMultiset (n * m) = factorMultiset n + factorMultiset m", "start": [ 292, 1 ], "end": [ 299, 49 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_pow", "code": "theorem factorMultiset_pow (n : ℕ+) (m : ℕ) :\n factorMultiset (n ^ m) = m • factorMultiset n", "start": [ 302, 1 ], "end": [ 307, 49 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_ofPrime", "code": "theorem factorMultiset_ofPrime (p : Nat.Primes) :\n (p : ℕ+).factorMultiset = PrimeMultiset.ofPrime p", "start": [ 310, 1 ], "end": [ 315, 64 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_le_iff", "code": "theorem factorMultiset_le_iff {m n : ℕ+} : factorMultiset m ≤ factorMultiset n ↔ m ∣ n", "start": [ 318, 1 ], "end": [ 330, 22 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_le_iff'", "code": "theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} :\n factorMultiset m ≤ v ↔ m ∣ v.prod", "start": [ 333, 1 ], "end": [ 337, 10 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_dvd_iff", "code": "theorem prod_dvd_iff {u v : PrimeMultiset} : u.prod ∣ v.prod ↔ u ≤ v", "start": [ 344, 1 ], "end": [ 347, 15 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_dvd_iff'", "code": "theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.prod ∣ n ↔ u ≤ n.factorMultiset", "start": [ 350, 1 ], "end": [ 353, 10 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_gcd", "code": "theorem factorMultiset_gcd (m n : ℕ+) :\n factorMultiset (gcd m n) = factorMultiset m ⊓ factorMultiset n", "start": [ 360, 1 ], "end": [ 371, 25 ], "kind": "commanddeclaration" }, { "full_name": "PNat.factorMultiset_lcm", "code": "theorem factorMultiset_lcm (m n : ℕ+) :\n factorMultiset (lcm m n) = factorMultiset m ⊔ factorMultiset n", "start": [ 374, 1 ], "end": [ 383, 30 ], "kind": "commanddeclaration" }, { "full_name": "PNat.count_factorMultiset", "code": "theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :\n (p : ℕ+) ^ k ∣ m ↔ k ≤ m.factorMultiset.count p", "start": [ 386, 1 ], "end": [ 398, 41 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_inf", "code": "theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).prod = PNat.gcd u.prod v.prod", "start": [ 405, 1 ], "end": [ 411, 63 ], "kind": "commanddeclaration" }, { "full_name": "PrimeMultiset.prod_sup", "code": "theorem prod_sup (u v : PrimeMultiset) : (u ⊔ v).prod = PNat.lcm u.prod v.prod", "start": [ 414, 1 ], "end": [ 420, 63 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/PiTensorProduct.lean
[ "Mathlib/Algebra/Algebra/Bilinear.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Algebra/Equiv.lean", "Mathlib/LinearAlgebra/PiTensorProduct.lean", "Mathlib/Data/Finset/NoncommProd.lean" ]
[ { "full_name": "PiTensorProduct.instOne", "code": "instance instOne : One (⨂[R] i, A i) where\n one := tprod R 1", "start": [ 31, 1 ], "end": [ 32, 19 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.one_def", "code": "lemma one_def : 1 = tprod R (1 : Π i, A i) := rfl", "start": [ 34, 1 ], "end": [ 34, 50 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.instAddCommMonoidWithOne", "code": "instance instAddCommMonoidWithOne : AddCommMonoidWithOne (⨂[R] i, A i) where\n __ := inferInstanceAs (AddCommMonoid (⨂[R] i, A i))\n __ := instOne", "start": [ 36, 1 ], "end": [ 38, 16 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.mul", "code": "def mul : (⨂[R] i, A i) →ₗ[R] (⨂[R] i, A i) →ₗ[R] (⨂[R] i, A i) :=\n PiTensorProduct.piTensorHomMap₂ <| tprod R fun _ ↦ LinearMap.mul _ _", "start": [ 48, 1 ], "end": [ 52, 71 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.mul_tprod_tprod", "code": "@[simp] lemma mul_tprod_tprod (x y : (i : ι) → A i) :\n mul (tprod R x) (tprod R y) = tprod R (x * y) := by\n simp only [mul, piTensorHomMap₂_tprod_tprod_tprod, LinearMap.mul_apply']\n rfl", "start": [ 54, 1 ], "end": [ 57, 6 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.instMul", "code": "instance instMul : Mul (⨂[R] i, A i) where\n mul x y := mul x y", "start": [ 59, 1 ], "end": [ 60, 21 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.mul_def", "code": "lemma mul_def (x y : ⨂[R] i, A i) : x * y = mul x y := rfl", "start": [ 62, 1 ], "end": [ 62, 59 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.tprod_mul_tprod", "code": "@[simp] lemma tprod_mul_tprod (x y : (i : ι) → A i) :\n tprod R x * tprod R y = tprod R (x * y) :=\n mul_tprod_tprod x y", "start": [ 64, 1 ], "end": [ 66, 22 ], "kind": "lemma" }, { "full_name": "SemiconjBy.tprod", "code": "theorem _root_.SemiconjBy.tprod {a₁ a₂ a₃ : Π i, A i}\n (ha : SemiconjBy a₁ a₂ a₃) :\n SemiconjBy (tprod R a₁) (tprod R a₂) (tprod R a₃)", "start": [ 68, 1 ], "end": [ 71, 56 ], "kind": "commanddeclaration" }, { "full_name": "Commute.tprod", "code": "nonrec theorem _root_.Commute.tprod {a₁ a₂ : Π i, A i} (ha : Commute a₁ a₂) :\n Commute (tprod R a₁) (tprod R a₂)", "start": [ 73, 1 ], "end": [ 75, 11 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.smul_tprod_mul_smul_tprod", "code": "lemma smul_tprod_mul_smul_tprod (r s : R) (x y : Π i, A i) :\n (r • tprod R x) * (s • tprod R y) = (r * s) • tprod R (x * y) := by\n change mul _ _ = _\n rw [map_smul, map_smul, mul_comm r s, mul_smul]\n simp only [LinearMap.smul_apply, mul_tprod_tprod]", "start": [ 77, 1 ], "end": [ 81, 52 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.instNonUnitalNonAssocSemiring", "code": "instance instNonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring (⨂[R] i, A i) where\n __ := instMul\n __ := inferInstanceAs (AddCommMonoid (⨂[R] i, A i))\n left_distrib _ _ _ := (mul _).map_add _ _\n right_distrib _ _ _ := mul.map_add₂ _ _ _\n zero_mul _ := mul.map_zero₂ _\n mul_zero _ := map_zero (mul _)", "start": [ 83, 1 ], "end": [ 89, 33 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.one_mul", "code": "protected lemma one_mul (x : ⨂[R] i, A i) : mul (tprod R 1) x = x := by\n induction x using PiTensorProduct.induction_on with\n | smul_tprod => simp\n | add _ _ h1 h2 => simp [map_add, h1, h2]", "start": [ 98, 1 ], "end": [ 101, 44 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.mul_one", "code": "protected lemma mul_one (x : ⨂[R] i, A i) : mul x (tprod R 1) = x := by\n induction x using PiTensorProduct.induction_on with\n | smul_tprod => simp\n | add _ _ h1 h2 => simp [h1, h2]", "start": [ 103, 1 ], "end": [ 106, 35 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.instNonAssocSemiring", "code": "instance instNonAssocSemiring : NonAssocSemiring (⨂[R] i, A i) where\n __ := instNonUnitalNonAssocSemiring\n one_mul := PiTensorProduct.one_mul\n mul_one := PiTensorProduct.mul_one", "start": [ 108, 1 ], "end": [ 111, 37 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.tprodMonoidHom", "code": "@[simps]\ndef tprodMonoidHom : (Π i, A i) →* ⨂[R] i, A i where\n toFun := tprod R\n map_one' := rfl\n map_mul' x y := (tprod_mul_tprod x y).symm", "start": [ 114, 1 ], "end": [ 119, 45 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.mul_assoc", "code": "protected lemma mul_assoc (x y z : ⨂[R] i, A i) : mul (mul x y) z = mul x (mul y z) := by\n suffices LinearMap.llcomp R _ _ _ mul ∘ₗ mul =\n (LinearMap.llcomp R _ _ _ LinearMap.lflip <| LinearMap.llcomp R _ _ _ mul.flip ∘ₗ mul).flip by\n exact DFunLike.congr_fun (DFunLike.congr_fun (DFunLike.congr_fun this x) y) z\n ext x y z\n dsimp [← mul_def]\n simpa only [tprod_mul_tprod] using congr_arg (tprod R) (mul_assoc x y z)", "start": [ 128, 1 ], "end": [ 135, 75 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.instNonUnitalSemiring", "code": "instance instNonUnitalSemiring : NonUnitalSemiring (⨂[R] i, A i) where\n __ := instNonUnitalNonAssocSemiring\n mul_assoc := PiTensorProduct.mul_assoc", "start": [ 137, 1 ], "end": [ 139, 41 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.instSemiring", "code": "instance instSemiring : Semiring (⨂[R] i, A i) where\n __ := instNonUnitalSemiring\n __ := instNonAssocSemiring", "start": [ 149, 1 ], "end": [ 151, 29 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.instAlgebra", "code": "instance instAlgebra : Algebra R' (⨂[R] i, A i) where\n __ := hasSMul'\n toFun := (· • 1)\n map_one' := by simp\n map_mul' r s := show (r * s) • 1 = mul (r • 1) (s • 1) by\n rw [LinearMap.map_smul_of_tower, LinearMap.map_smul_of_tower, LinearMap.smul_apply, mul_comm,\n mul_smul]\n congr\n show (1 : ⨂[R] i, A i) = 1 * 1\n rw [mul_one]\n map_zero' := by simp\n map_add' := by simp [add_smul]\n commutes' r x := by\n simp only [RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk]\n change mul _ _ = mul _ _\n rw [LinearMap.map_smul_of_tower, LinearMap.map_smul_of_tower, LinearMap.smul_apply]\n change r • (1 * x) = r • (x * 1)\n rw [mul_one, one_mul]\n smul_def' r x := by\n simp only [RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk]\n change _ = mul _ _\n rw [LinearMap.map_smul_of_tower, LinearMap.smul_apply]\n change _ = r • (1 * x)\n rw [one_mul]", "start": [ 153, 1 ], "end": [ 176, 17 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.algebraMap_apply", "code": "lemma algebraMap_apply (r : R') (i : ι) [DecidableEq ι] :\n algebraMap R' (⨂[R] i, A i) r = tprod R (Pi.mulSingle i (algebraMap R' (A i) r)) := by\n change r • tprod R 1 = _\n have : Pi.mulSingle i (algebraMap R' (A i) r) = update (fun i ↦ 1) i (r • 1) := by\n rw [Algebra.algebraMap_eq_smul_one]; rfl\n rw [this, ← smul_one_smul R r (1 : A i), MultilinearMap.map_smul, update_eq_self, smul_one_smul]\n congr", "start": [ 178, 1 ], "end": [ 184, 8 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.singleAlgHom", "code": "@[simps]\ndef singleAlgHom [DecidableEq ι] (i : ι) : A i →ₐ[R] ⨂[R] i, A i where\n toFun a := tprod R (MonoidHom.mulSingle _ i a)\n map_one' := by simp only [_root_.map_one]; rfl\n map_mul' a a' := by simp\n map_zero' := MultilinearMap.map_update_zero _ _ _\n map_add' _ _ := MultilinearMap.map_add _ _ _ _ _\n commutes' r := show tprodCoeff R _ _ = r • tprodCoeff R _ _ by\n rw [Algebra.algebraMap_eq_smul_one]\n erw [smul_tprodCoeff]\n rfl", "start": [ 186, 1 ], "end": [ 199, 8 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.liftAlgHom", "code": "@[simps!]\ndef liftAlgHom {S : Type*} [Semiring S] [Algebra R S]\n (f : MultilinearMap R A S)\n (one : f 1 = 1) (mul : ∀ x y, f (x * y) = f x * f y) : (⨂[R] i, A i) →ₐ[R] S :=\n AlgHom.ofLinearMap (lift f) (show lift f (tprod R 1) = 1 by simp [one]) <|\n LinearMap.map_mul_iff _ |>.mpr <| by aesop", "start": [ 201, 1 ], "end": [ 209, 47 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.tprod_noncommProd", "code": "@[simp] lemma tprod_noncommProd {κ : Type*} (s : Finset κ) (x : κ → Π i, A i) (hx) :\n tprod R (s.noncommProd x hx) = s.noncommProd (fun k => tprod R (x k))\n (hx.imp fun _ _ => Commute.tprod) :=\n Finset.noncommProd_map s x _ (tprodMonoidHom R)", "start": [ 211, 1 ], "end": [ 214, 50 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.algHom_ext", "code": "@[ext high]\ntheorem algHom_ext {S : Type*} [Finite ι] [DecidableEq ι] [Semiring S] [Algebra R S]\n ⦃f g : (⨂[R] i, A i) →ₐ[R] S⦄ (h : ∀ i, f.comp (singleAlgHom i) = g.comp (singleAlgHom i)) :\n f = g", "start": [ 216, 1 ], "end": [ 225, 61 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.instRing", "code": "instance instRing : Ring (⨂[R] i, A i) where\n __ := instSemiring\n __ := inferInstanceAs <| AddCommGroup (⨂[R] i, A i)", "start": [ 233, 1 ], "end": [ 235, 54 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.mul_comm", "code": "protected lemma mul_comm (x y : ⨂[R] i, A i) : mul x y = mul y x := by\n suffices mul (R := R) (A := A) = mul.flip from\n DFunLike.congr_fun (DFunLike.congr_fun this x) y\n ext x y\n dsimp\n simp only [mul_tprod_tprod, mul_tprod_tprod, mul_comm x y]", "start": [ 243, 1 ], "end": [ 248, 61 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.instCommSemiring", "code": "instance instCommSemiring : CommSemiring (⨂[R] i, A i) where\n __ := instSemiring\n __ := inferInstanceAs <| AddCommMonoid (⨂[R] i, A i)\n mul_comm := PiTensorProduct.mul_comm", "start": [ 250, 1 ], "end": [ 253, 39 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.tprod_prod", "code": "@[simp] lemma tprod_prod {κ : Type*} (s : Finset κ) (x : κ → Π i, A i) :\n tprod R (∏ k ∈ s, x k) = ∏ k ∈ s, tprod R (x k) :=\n map_prod (tprodMonoidHom R) x s", "start": [ 255, 1 ], "end": [ 257, 34 ], "kind": "lemma" }, { "full_name": "PiTensorProduct.constantBaseRingEquiv", "code": "noncomputable def constantBaseRingEquiv : (⨂[R] _ : ι, R) ≃ₐ[R] R :=\n letI toFun := lift (MultilinearMap.mkPiAlgebra R ι R)\n AlgEquiv.ofAlgHom\n (AlgHom.ofLinearMap\n toFun\n ((lift.tprod _).trans Finset.prod_const_one)\n (by\n rw [LinearMap.map_mul_iff]\n ext x y\n show toFun (tprod R x * tprod R y) = toFun (tprod R x) * toFun (tprod R y)\n simp_rw [tprod_mul_tprod, toFun, lift.tprod, MultilinearMap.mkPiAlgebra_apply,\n Pi.mul_apply, Finset.prod_mul_distrib]))\n (Algebra.ofId _ _)\n (by ext)\n (by classical ext)", "start": [ 267, 1 ], "end": [ 285, 23 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.constantBaseRingEquiv_tprod", "code": "@[simp]\ntheorem constantBaseRingEquiv_tprod (x : ι → R) :\n constantBaseRingEquiv ι R (tprod R x) = ∏ i, x i", "start": [ 289, 1 ], "end": [ 292, 31 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.constantBaseRingEquiv_symm", "code": "@[simp]\ntheorem constantBaseRingEquiv_symm (r : R) :\n (constantBaseRingEquiv ι R).symm r = algebraMap _ _ r", "start": [ 294, 1 ], "end": [ 296, 65 ], "kind": "commanddeclaration" }, { "full_name": "PiTensorProduct.instCommRing", "code": "instance instCommRing : CommRing (⨂[R] i, A i) where\n __ := instCommSemiring\n __ := inferInstanceAs <| AddCommGroup (⨂[R] i, A i)", "start": [ 305, 1 ], "end": [ 307, 54 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Equiv/Functor.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Logic/Equiv/Defs.lean", "Mathlib/Control/Basic.lean" ]
[ { "full_name": "Functor.map_equiv", "code": "def map_equiv {α β : Type u} (h : α ≃ β) : f α ≃ f β where\n toFun := map h\n invFun := map h.symm\n left_inv x := by simp [map_map]\n right_inv x := by simp [map_map]", "start": [ 28, 1 ], "end": [ 33, 35 ], "kind": "commanddeclaration" }, { "full_name": "Functor.map_equiv_apply", "code": "@[simp]\nlemma map_equiv_apply (h : α ≃ β) (x : f α) : (map_equiv f h : f α ≃ f β) x = map h x := rfl", "start": [ 37, 1 ], "end": [ 38, 93 ], "kind": "lemma" }, { "full_name": "Functor.map_equiv_symm_apply", "code": "@[simp]\nlemma map_equiv_symm_apply (h : α ≃ β) (y : f β) :\n (map_equiv f h : f α ≃ f β).symm y = map h.symm y := rfl", "start": [ 40, 1 ], "end": [ 42, 61 ], "kind": "lemma" } ]
Mathlib/Analysis/Normed/Group/SemiNormedGrp/Kernels.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Normed/Group/Quotient.lean", "Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean", "Mathlib/Analysis/Normed/Group/SemiNormedGrp.lean" ]
[ { "full_name": "SemiNormedGrp₁.cokernelCocone", "code": "def cokernelCocone {X Y : SemiNormedGrp₁.{u}} (f : X ⟶ Y) : Cofork f 0 :=\n Cofork.ofπ\n (@SemiNormedGrp₁.mkHom _ (SemiNormedGrp.of (Y ⧸ NormedAddGroupHom.range f.1))\n f.1.range.normedMk (NormedAddGroupHom.isQuotientQuotient _).norm_le)\n (by\n ext x\n erw [Limits.zero_comp, comp_apply, SemiNormedGrp₁.mkHom_apply,\n SemiNormedGrp₁.zero_apply, ← NormedAddGroupHom.mem_ker, f.1.range.ker_normedMk,\n f.1.mem_range]\n use x\n rfl)", "start": [ 37, 1 ], "end": [ 53, 11 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp₁.cokernelLift", "code": "def cokernelLift {X Y : SemiNormedGrp₁.{u}} (f : X ⟶ Y) (s : CokernelCofork f) :\n (cokernelCocone f).pt ⟶ s.pt := by\n fconstructor\n · apply NormedAddGroupHom.lift _ s.π.1\n rintro _ ⟨b, rfl⟩\n change (f ≫ s.π) b = 0\n simp\n erw [zero_apply]\n exact NormedAddGroupHom.lift_normNoninc _ _ _ s.π.2", "start": [ 57, 1 ], "end": [ 69, 54 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.fork", "code": "def fork {V W : SemiNormedGrp.{u}} (f g : V ⟶ W) : Fork f g :=\n @Fork.ofι _ _ _ _ _ _ (of (f - g : NormedAddGroupHom V W).ker)\n (NormedAddGroupHom.incl (f - g).ker) <| by\n change NormedAddGroupHom V W at f g\n ext v\n have : v.1 ∈ (f - g).ker := v.2\n simpa only [NormedAddGroupHom.incl_apply, Pi.zero_apply, coe_comp, NormedAddGroupHom.coe_zero,\n NormedAddGroupHom.mem_ker, NormedAddGroupHom.coe_sub, Pi.sub_apply,\n sub_eq_zero] using this", "start": [ 109, 1 ], "end": [ 119, 30 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.hasLimit_parallelPair", "code": "instance hasLimit_parallelPair {V W : SemiNormedGrp.{u}} (f g : V ⟶ W) :\n HasLimit (parallelPair f g) where\n exists_limit :=\n Nonempty.intro\n { cone := fork f g\n isLimit :=\n Fork.IsLimit.mk _\n (fun c =>\n NormedAddGroupHom.ker.lift (Fork.ι c) _ <|\n show NormedAddGroupHom.compHom (f - g) c.ι = 0 by\n rw [AddMonoidHom.map_sub, AddMonoidHom.sub_apply, sub_eq_zero]; exact c.condition)\n (fun c => NormedAddGroupHom.ker.incl_comp_lift _ _ _) fun c g h => by\n ext x; dsimp; simp_rw [← h]; rfl}", "start": [ 123, 1 ], "end": [ 136, 48 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.cokernelCocone", "code": "noncomputable\ndef cokernelCocone {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) : Cofork f 0 :=\n @Cofork.ofπ _ _ _ _ _ _ (SemiNormedGrp.of (Y ⧸ NormedAddGroupHom.range f)) f.range.normedMk\n (by\n ext a\n simp only [comp_apply, Limits.zero_comp]\n erw [comp_apply, NormedAddGroupHom.zero_apply]\n letI : SeminormedAddCommGroup ((forget SemiNormedGrp).obj Y) :=\n (inferInstance : SeminormedAddCommGroup Y)\n erw [← NormedAddGroupHom.mem_ker, f.range.ker_normedMk, f.mem_range]\n convert exists_apply_eq_apply f a)", "start": [ 150, 1 ], "end": [ 167, 41 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.cokernelLift", "code": "noncomputable\ndef cokernelLift {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) (s : CokernelCofork f) :\n (cokernelCocone f).pt ⟶ s.pt :=\n NormedAddGroupHom.lift _ s.π\n (by\n rintro _ ⟨b, rfl⟩\n change (f ≫ s.π) b = 0\n simp\n erw [zero_apply])", "start": [ 171, 1 ], "end": [ 181, 24 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.isColimitCokernelCocone", "code": "noncomputable\ndef isColimitCokernelCocone {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :\n IsColimit (cokernelCocone f) :=\n isColimitAux _ (cokernelLift f)\n (fun s => by\n ext\n apply NormedAddGroupHom.lift_mk f.range\n rintro _ ⟨b, rfl⟩\n change (f ≫ s.π) b = 0\n simp\n erw [zero_apply])\n fun s m w => NormedAddGroupHom.lift_unique f.range _ _ _ w", "start": [ 185, 1 ], "end": [ 198, 63 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernel", "code": "noncomputable\ndef explicitCokernel {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) : SemiNormedGrp.{u} :=\n (cokernelCocone f).pt", "start": [ 213, 1 ], "end": [ 216, 24 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc", "code": "noncomputable\ndef explicitCokernelDesc {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z} (w : f ≫ g = 0) :\n explicitCokernel f ⟶ Z :=\n (isColimitCokernelCocone f).desc (Cofork.ofπ g (by simp [w]))", "start": [ 220, 1 ], "end": [ 224, 64 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelπ", "code": "noncomputable\ndef explicitCokernelπ {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) : Y ⟶ explicitCokernel f :=\n (cokernelCocone f).ι.app WalkingParallelPair.one", "start": [ 228, 1 ], "end": [ 231, 51 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelπ_surjective", "code": "theorem explicitCokernelπ_surjective {X Y : SemiNormedGrp.{u}} {f : X ⟶ Y} :\n Function.Surjective (explicitCokernelπ f)", "start": [ 235, 1 ], "end": [ 237, 23 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.comp_explicitCokernelπ", "code": "@[simp, reassoc]\ntheorem comp_explicitCokernelπ {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :\n f ≫ explicitCokernelπ f = 0", "start": [ 241, 1 ], "end": [ 245, 7 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelπ_apply_dom_eq_zero", "code": "@[simp]\ntheorem explicitCokernelπ_apply_dom_eq_zero {X Y : SemiNormedGrp.{u}} {f : X ⟶ Y} (x : X) :\n (explicitCokernelπ f) (f x) = 0", "start": [ 252, 1 ], "end": [ 255, 75 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelπ_desc", "code": "@[simp, reassoc]\ntheorem explicitCokernelπ_desc {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n (w : f ≫ g = 0) : explicitCokernelπ f ≫ explicitCokernelDesc w = g", "start": [ 259, 1 ], "end": [ 262, 38 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelπ_desc_apply", "code": "@[simp]\ntheorem explicitCokernelπ_desc_apply {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n {cond : f ≫ g = 0} (x : Y) : explicitCokernelDesc cond (explicitCokernelπ f x) = g x", "start": [ 266, 1 ], "end": [ 269, 96 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc_unique", "code": "theorem explicitCokernelDesc_unique {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n (w : f ≫ g = 0) (e : explicitCokernel f ⟶ Z) (he : explicitCokernelπ f ≫ e = g) :\n e = explicitCokernelDesc w", "start": [ 273, 1 ], "end": [ 280, 13 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc_comp_eq_desc", "code": "theorem explicitCokernelDesc_comp_eq_desc {X Y Z W : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n {h : Z ⟶ W} {cond' : f ≫ g = 0} :\n explicitCokernelDesc cond' ≫ h =\n explicitCokernelDesc\n (show f ≫ g ≫ h = 0 by rw [← CategoryTheory.Category.assoc, cond', Limits.zero_comp])", "start": [ 284, 1 ], "end": [ 292, 63 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc_zero", "code": "@[simp]\ntheorem explicitCokernelDesc_zero {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} :\n explicitCokernelDesc (show f ≫ (0 : Y ⟶ Z) = 0 from CategoryTheory.Limits.comp_zero) = 0", "start": [ 296, 1 ], "end": [ 299, 77 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernel_hom_ext", "code": "@[ext]\ntheorem explicitCokernel_hom_ext {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y}\n (e₁ e₂ : explicitCokernel f ⟶ Z) (h : explicitCokernelπ f ≫ e₁ = explicitCokernelπ f ≫ e₂) :\n e₁ = e₂", "start": [ 303, 1 ], "end": [ 312, 10 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelπ.epi", "code": "instance explicitCokernelπ.epi {X Y : SemiNormedGrp.{u}} {f : X ⟶ Y} :\n Epi (explicitCokernelπ f) := by\n constructor\n intro Z g h H\n ext x\n rw [H]", "start": [ 316, 1 ], "end": [ 324, 9 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.isQuotient_explicitCokernelπ", "code": "theorem isQuotient_explicitCokernelπ {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :\n NormedAddGroupHom.IsQuotient (explicitCokernelπ f)", "start": [ 328, 1 ], "end": [ 330, 41 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.normNoninc_explicitCokernelπ", "code": "theorem normNoninc_explicitCokernelπ {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :\n (explicitCokernelπ f).NormNoninc", "start": [ 334, 1 ], "end": [ 336, 43 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc_norm_le_of_norm_le", "code": "theorem explicitCokernelDesc_norm_le_of_norm_le {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y}\n {g : Y ⟶ Z} (w : f ≫ g = 0) (c : ℝ≥0) (h : ‖g‖ ≤ c) : ‖explicitCokernelDesc w‖ ≤ c", "start": [ 342, 1 ], "end": [ 344, 41 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc_normNoninc", "code": "theorem explicitCokernelDesc_normNoninc {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n {cond : f ≫ g = 0} (hg : g.NormNoninc) : (explicitCokernelDesc cond).NormNoninc", "start": [ 348, 1 ], "end": [ 354, 69 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc_comp_eq_zero", "code": "theorem explicitCokernelDesc_comp_eq_zero {X Y Z W : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n {h : Z ⟶ W} (cond : f ≫ g = 0) (cond2 : g ≫ h = 0) : explicitCokernelDesc cond ≫ h = 0", "start": [ 358, 1 ], "end": [ 361, 15 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelDesc_norm_le", "code": "theorem explicitCokernelDesc_norm_le {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n (w : f ≫ g = 0) : ‖explicitCokernelDesc w‖ ≤ ‖g‖", "start": [ 365, 1 ], "end": [ 367, 56 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelIso", "code": "noncomputable\ndef explicitCokernelIso {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :\n explicitCokernel f ≅ cokernel f :=\n (isColimitCokernelCocone f).coconePointUniqueUpToIso (colimit.isColimit _)", "start": [ 371, 1 ], "end": [ 375, 77 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelIso_hom_π", "code": "@[simp]\ntheorem explicitCokernelIso_hom_π {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :\n explicitCokernelπ f ≫ (explicitCokernelIso f).hom = cokernel.π _", "start": [ 379, 1 ], "end": [ 382, 84 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelIso_inv_π", "code": "@[simp]\ntheorem explicitCokernelIso_inv_π {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :\n cokernel.π f ≫ (explicitCokernelIso f).inv = explicitCokernelπ f", "start": [ 386, 1 ], "end": [ 389, 48 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernelIso_hom_desc", "code": "@[simp]\ntheorem explicitCokernelIso_hom_desc {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}\n (w : f ≫ g = 0) :\n (explicitCokernelIso f).hom ≫ cokernel.desc f g w = explicitCokernelDesc w", "start": [ 393, 1 ], "end": [ 399, 40 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.explicitCokernel.map", "code": "noncomputable def explicitCokernel.map {A B C D : SemiNormedGrp.{u}}\n {fab : A ⟶ B} {fbd : B ⟶ D} {fac : A ⟶ C} {fcd : C ⟶ D} (h : fab ≫ fbd = fac ≫ fcd) :\n explicitCokernel fab ⟶ explicitCokernel fcd :=\n @explicitCokernelDesc _ _ _ fab (fbd ≫ explicitCokernelπ _) <| by simp [reassoc_of% h]", "start": [ 403, 1 ], "end": [ 407, 89 ], "kind": "commanddeclaration" }, { "full_name": "SemiNormedGrp.ExplicitCoker.map_desc", "code": "theorem ExplicitCoker.map_desc {A B C D B' D' : SemiNormedGrp.{u}}\n {fab : A ⟶ B} {fbd : B ⟶ D} {fac : A ⟶ C} {fcd : C ⟶ D} {h : fab ≫ fbd = fac ≫ fcd}\n {fbb' : B ⟶ B'} {fdd' : D ⟶ D'} {condb : fab ≫ fbb' = 0} {condd : fcd ≫ fdd' = 0} {g : B' ⟶ D'}\n (h' : fbb' ≫ g = fbd ≫ fdd') :\n explicitCokernelDesc condb ≫ g = explicitCokernel.map h ≫ explicitCokernelDesc condd", "start": [ 411, 1 ], "end": [ 419, 32 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Category/PartialFun.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/PFun.lean", "Mathlib/CategoryTheory/Category/Pointed.lean" ]
[ { "full_name": "PartialFun", "code": "def PartialFun : Type _ :=\n Type*", "start": [ 37, 1 ], "end": [ 39, 8 ], "kind": "commanddeclaration" }, { "full_name": "PartialFun.of", "code": "def of : Type* → PartialFun :=\n id", "start": [ 49, 1 ], "end": [ 51, 5 ], "kind": "commanddeclaration" }, { "full_name": "PartialFun.largeCategory", "code": "instance largeCategory : LargeCategory.{u} PartialFun where\n Hom := PFun\n id := PFun.id\n comp f g := g.comp f\n id_comp := @PFun.comp_id\n comp_id := @PFun.id_comp\n assoc _ _ _ := (PFun.comp_assoc _ _ _).symm", "start": [ 60, 1 ], "end": [ 66, 46 ], "kind": "commanddeclaration" }, { "full_name": "PartialFun.Iso.mk", "code": "@[simps]\ndef Iso.mk {α β : PartialFun.{u}} (e : α ≃ β) : α ≅ β where\n hom x := e x\n inv x := e.symm x\n hom_inv_id := (PFun.coe_comp _ _).symm.trans (by\n simp only [Equiv.symm_comp_self, PFun.coe_id]\n rfl)\n inv_hom_id := (PFun.coe_comp _ _).symm.trans (by\n simp only [Equiv.self_comp_symm, PFun.coe_id]\n rfl)", "start": [ 69, 1 ], "end": [ 79, 9 ], "kind": "commanddeclaration" }, { "full_name": "typeToPartialFun", "code": "def typeToPartialFun : Type u ⥤ PartialFun where\n obj := id\n map := @PFun.lift\n map_comp _ _ := PFun.coe_comp _ _", "start": [ 84, 1 ], "end": [ 88, 36 ], "kind": "commanddeclaration" }, { "full_name": "pointedToPartialFun", "code": "@[simps obj map]\ndef pointedToPartialFun : Pointed.{u} ⥤ PartialFun where\n obj X := { x : X // x ≠ X.point }\n map f := PFun.toSubtype _ f.toFun ∘ Subtype.val\n map_id X :=\n PFun.ext fun a b => PFun.mem_toSubtype_iff.trans (Subtype.coe_inj.trans Part.mem_some_iff.symm)\n map_comp f g := by\n apply PFun.ext _\n rintro ⟨a, ha⟩ ⟨c, hc⟩\n constructor\n · rintro ⟨h₁, h₂⟩\n exact ⟨⟨fun h₀ => h₁ ((congr_arg g.toFun h₀).trans g.map_point), h₁⟩, h₂⟩\n · rintro ⟨_, _, _⟩\n exact ⟨_, rfl⟩", "start": [ 94, 1 ], "end": [ 110, 21 ], "kind": "commanddeclaration" }, { "full_name": "partialFunToPointed", "code": "@[simps obj map]\nnoncomputable def partialFunToPointed : PartialFun ⥤ Pointed := by\n classical\n exact\n { obj := fun X => ⟨Option X, none⟩\n map := fun f => ⟨Option.elim' none fun a => (f a).toOption, rfl⟩\n map_id := fun X => Pointed.Hom.ext _ _ <| funext fun o => Option.recOn o rfl fun a => (by\n dsimp [CategoryStruct.id]\n convert Part.some_toOption a)\n map_comp := fun f g => Pointed.Hom.ext _ _ <| funext fun o => Option.recOn o rfl fun a => by\n dsimp [CategoryStruct.comp]\n rw [Part.bind_toOption g (f a), Option.elim'_eq_elim] }", "start": [ 113, 1 ], "end": [ 127, 64 ], "kind": "commanddeclaration" }, { "full_name": "partialFunEquivPointed", "code": "@[simps!]\nnoncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed :=\n CategoryTheory.Equivalence.mk partialFunToPointed pointedToPartialFun\n (NatIso.ofComponents (fun X => PartialFun.Iso.mk\n { toFun := fun a => ⟨some a, some_ne_none a⟩\n invFun := fun a => Option.get _ (Option.ne_none_iff_isSome.1 a.2)\n left_inv := fun a => Option.get_some _ _\n right_inv := fun a => by simp only [some_get, Subtype.coe_eta] })\n fun f =>\n PFun.ext fun a b => by\n dsimp [PartialFun.Iso.mk, CategoryStruct.comp, pointedToPartialFun]\n rw [Part.bind_some]\n refine (Part.mem_bind_iff.trans ?_).trans PFun.mem_toSubtype_iff.symm\n obtain ⟨b | b, hb⟩ := b\n · exact (hb rfl).elim\n · dsimp [Part.toOption]\n simp_rw [Part.mem_some_iff, Subtype.mk_eq_mk]\n constructor\n · rintro ⟨_, ⟨h₁, h₂⟩, h₃⟩\n rw [h₃, ← h₂, dif_pos h₁]\n · intro h\n split_ifs at h with ha\n rw [some_inj] at h\n exact ⟨b, ⟨ha, h.symm⟩, rfl⟩) $\n NatIso.ofComponents\n (fun X ↦ Pointed.Iso.mk (by classical exact Equiv.optionSubtypeNe X.point) (by rfl))\n fun {X Y} f ↦ Pointed.Hom.ext _ _ <| funext fun a ↦ by\n obtain _ | ⟨a, ha⟩ := a\n · exact f.map_point.symm\n simp_all [Option.casesOn'_eq_elim, Part.elim_toOption]", "start": [ 130, 1 ], "end": [ 165, 63 ], "kind": "commanddeclaration" }, { "full_name": "typeToPartialFunIsoPartialFunToPointed", "code": "@[simps!]\nnoncomputable def typeToPartialFunIsoPartialFunToPointed :\n typeToPartialFun ⋙ partialFunToPointed ≅ typeToPointed :=\n NatIso.ofComponents\n (fun X =>\n { hom := ⟨id, rfl⟩\n inv := ⟨id, rfl⟩\n hom_inv_id := rfl\n inv_hom_id := rfl })\n fun f =>\n Pointed.Hom.ext _ _ <|\n funext fun a => Option.recOn a rfl fun a => by\n convert Part.some_toOption _\n simpa using (Part.get_eq_iff_mem (by trivial)).mp rfl", "start": [ 168, 1 ], "end": [ 183, 62 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Monad/EquivMon.lean
[ "Mathlib/CategoryTheory/Monad/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Monoidal/Mon_.lean", "Mathlib/CategoryTheory/Monoidal/End.lean" ]
[ { "full_name": "CategoryTheory.Monad.toMon", "code": "@[simps]\ndef toMon (M : Monad C) : Mon_ (C ⥤ C) where\n X := (M : C ⥤ C)\n one := M.η\n mul := M.μ\n mul_assoc := by ext; simp [M.assoc]", "start": [ 41, 1 ], "end": [ 47, 38 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Monad.monadToMon", "code": "@[simps]\ndef monadToMon : Monad C ⥤ Mon_ (C ⥤ C) where\n obj := toMon\n map f := { hom := f.toNatTrans }", "start": [ 52, 1 ], "end": [ 56, 35 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Monad.ofMon", "code": "@[simps η μ]\ndef ofMon (M : Mon_ (C ⥤ C)) : Monad C where\n toFunctor := M.X\n η' := M.one\n μ' := M.mul\n left_unit' := fun X => by\n erw [← whiskerLeft_app, ← NatTrans.comp_app, M.mul_one]\n rfl\n right_unit' := fun X => by\n erw [← whiskerRight_app, ← NatTrans.comp_app, M.one_mul]\n rfl\n assoc' := fun X => by\n rw [← whiskerLeft_app, ← whiskerRight_app, ← NatTrans.comp_app]\n erw [M.mul_assoc]\n simp", "start": [ 61, 1 ], "end": [ 79, 9 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Monad.ofMon_obj", "code": "@[simp] lemma ofMon_obj (M : Mon_ (C ⥤ C)) (X : C) : (ofMon M).obj X = M.X.obj X := rfl", "start": [ 83, 1 ], "end": [ 83, 88 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Monad.monToMonad", "code": "@[simps]\ndef monToMonad : Mon_ (C ⥤ C) ⥤ Monad C where\n obj := ofMon\n map {X Y} f :=\n { f.hom with\n app_η := by\n intro X\n erw [← NatTrans.comp_app, f.one_hom]\n simp only [Functor.id_obj, ofMon_obj, ofMon_η]\n app_μ := by\n intro Z\n erw [← NatTrans.comp_app, f.mul_hom]\n dsimp\n simp only [Category.assoc, NatTrans.naturality, ofMon_obj, ofMon] }", "start": [ 87, 1 ], "end": [ 101, 76 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Monad.monadMonEquiv", "code": "@[simps]\ndef monadMonEquiv : Monad C ≌ Mon_ (C ⥤ C) where\n functor := monadToMon _\n inverse := monToMonad _\n unitIso :=\n { hom := { app := fun _ => { app := fun _ => 𝟙 _ } }\n inv := { app := fun _ => { app := fun _ => 𝟙 _ } } }\n counitIso :=\n { hom := { app := fun _ => { hom := 𝟙 _ } }\n inv := { app := fun _ => { hom := 𝟙 _ } } }", "start": [ 104, 1 ], "end": [ 114, 48 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/Valuation/Integral.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/Valuation/Integers.lean", "Mathlib/RingTheory/IntegrallyClosed.lean" ]
[ { "full_name": "Valuation.Integers.mem_of_integral", "code": "theorem mem_of_integral {x : R} (hx : IsIntegral O x) : x ∈ v.integer", "start": [ 31, 1 ], "end": [ 42, 93 ], "kind": "commanddeclaration" }, { "full_name": "Valuation.Integers.integralClosure", "code": "protected theorem integralClosure : integralClosure O R = ⊥", "start": [ 45, 1 ], "end": [ 48, 30 ], "kind": "commanddeclaration" }, { "full_name": "Valuation.Integers.integrallyClosed", "code": "theorem integrallyClosed : IsIntegrallyClosed O", "start": [ 60, 1 ], "end": [ 61, 95 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/RootsOfUnity/Lemmas.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/FieldTheory/KummerExtension.lean", "Mathlib/RingTheory/RootsOfUnity/Basic.lean" ]
[ { "full_name": "IsPrimitiveRoot.prod_one_sub_pow_eq_order", "code": "lemma prod_one_sub_pow_eq_order {n : ℕ} {μ : R} (hμ : IsPrimitiveRoot μ (n + 1)) :\n ∏ k ∈ range n, (1 - μ ^ (k + 1)) = n + 1 := by\n have := X_pow_sub_C_eq_prod hμ n.zero_lt_succ (one_pow (n + 1))\n rw [C_1, ← mul_geom_sum, prod_range_succ', pow_zero, mul_one, mul_comm, eq_comm] at this\n replace this := mul_right_cancel₀ (Polynomial.X_sub_C_ne_zero 1) this\n apply_fun Polynomial.eval 1 at this\n simpa only [mul_one, map_pow, eval_prod, eval_sub, eval_X, eval_pow, eval_C, eval_geom_sum,\n one_pow, sum_const, card_range, nsmul_eq_mul, Nat.cast_add, Nat.cast_one] using this", "start": [ 28, 1 ], "end": [ 37, 89 ], "kind": "lemma" }, { "full_name": "IsPrimitiveRoot.prod_pow_sub_one_eq_order", "code": "lemma prod_pow_sub_one_eq_order {n : ℕ} {μ : R} (hμ : IsPrimitiveRoot μ (n + 1)) :\n (-1) ^ n * ∏ k ∈ range n, (μ ^ (k + 1) - 1) = n + 1 := by\n have : (-1 : R) ^ n = ∏ k ∈ range n, -1 := by rw [prod_const, card_range]\n simp only [this, ← prod_mul_distrib, neg_one_mul, neg_sub, ← prod_one_sub_pow_eq_order hμ]", "start": [ 39, 1 ], "end": [ 44, 93 ], "kind": "lemma" }, { "full_name": "IsPrimitiveRoot.self_sub_one_pow_dvd_order", "code": "lemma self_sub_one_pow_dvd_order {k n : ℕ} (hn : k < n) {μ : R} (hμ : IsPrimitiveRoot μ n) :\n ∃ z ∈ adjoin ℤ {μ}, n = z * (μ - 1) ^ k := by\n let n' + 1 := n\n obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le' (Nat.le_of_lt_succ hn)\n have hdvd k : ∃ z ∈ adjoin ℤ {μ}, μ ^ k - 1 = z * (μ - 1) := by\n refine ⟨(Finset.range k).sum (μ ^ ·), ?_, (geom_sum_mul μ k).symm⟩\n exact Subalgebra.sum_mem _ fun m _ ↦ Subalgebra.pow_mem _ (self_mem_adjoin_singleton _ μ) _\n let Z k := Classical.choose <| hdvd k\n have Zdef k : Z k ∈ adjoin ℤ {μ} ∧ μ ^ k - 1 = Z k * (μ - 1) :=\n Classical.choose_spec <| hdvd k\n refine ⟨(-1) ^ (m + k) * (∏ j ∈ range k, Z (j + 1)) * ∏ j ∈ Ico k (m + k), (μ ^ (j + 1) - 1),\n ?_, ?_⟩\n · apply Subalgebra.mul_mem\n · apply Subalgebra.mul_mem\n · exact Subalgebra.pow_mem _ (Subalgebra.neg_mem _ <| Subalgebra.one_mem _) _\n · exact Subalgebra.prod_mem _ fun _ _ ↦ (Zdef _).1\n · refine Subalgebra.prod_mem _ fun _ _ ↦ ?_\n apply Subalgebra.sub_mem\n · exact Subalgebra.pow_mem _ (self_mem_adjoin_singleton ℤ μ) _\n · exact Subalgebra.one_mem _\n · push_cast\n have := Nat.cast_add (R := R) m k ▸ hμ.prod_pow_sub_one_eq_order\n rw [← this, mul_assoc, mul_assoc]\n congr 1\n conv => enter [2, 2, 2]; rw [← card_range k]\n rw [← prod_range_mul_prod_Ico _ (Nat.le_add_left k m), mul_comm _ (_ ^ card _), ← mul_assoc,\n prod_mul_pow_card]\n conv => enter [2, 1, 2, j]; rw [← (Zdef _).2]", "start": [ 47, 1 ], "end": [ 76, 50 ], "kind": "lemma" } ]
Mathlib/Data/Real/Hyperreal.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/SpecificLimits/Basic.lean", "Mathlib/Order/Filter/FilterProduct.lean" ]
[ { "full_name": "Hyperreal", "code": "def Hyperreal : Type :=\n Germ (hyperfilter ℕ : Filter ℕ) ℝ deriving Inhabited", "start": [ 19, 1 ], "end": [ 21, 55 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.ofReal", "code": "@[coe] def ofReal : ℝ → ℝ* := const", "start": [ 31, 1 ], "end": [ 32, 36 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_eq_coe", "code": "@[simp, norm_cast]\ntheorem coe_eq_coe {x y : ℝ} : (x : ℝ*) = y ↔ x = y", "start": [ 36, 1 ], "end": [ 38, 17 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_ne_coe", "code": "theorem coe_ne_coe {x y : ℝ} : (x : ℝ*) ≠ y ↔ x ≠ y", "start": [ 41, 1 ], "end": [ 42, 17 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_eq_zero", "code": "@[simp, norm_cast]\ntheorem coe_eq_zero {x : ℝ} : (x : ℝ*) = 0 ↔ x = 0", "start": [ 45, 1 ], "end": [ 47, 13 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_eq_one", "code": "@[simp, norm_cast]\ntheorem coe_eq_one {x : ℝ} : (x : ℝ*) = 1 ↔ x = 1", "start": [ 50, 1 ], "end": [ 52, 13 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_ne_zero", "code": "@[norm_cast]\ntheorem coe_ne_zero {x : ℝ} : (x : ℝ*) ≠ 0 ↔ x ≠ 0", "start": [ 55, 1 ], "end": [ 57, 13 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_ne_one", "code": "@[norm_cast]\ntheorem coe_ne_one {x : ℝ} : (x : ℝ*) ≠ 1 ↔ x ≠ 1", "start": [ 60, 1 ], "end": [ 62, 13 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_one", "code": "@[simp, norm_cast]\ntheorem coe_one : ↑(1 : ℝ) = (1 : ℝ*)", "start": [ 65, 1 ], "end": [ 67, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_zero", "code": "@[simp, norm_cast]\ntheorem coe_zero : ↑(0 : ℝ) = (0 : ℝ*)", "start": [ 70, 1 ], "end": [ 72, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_inv", "code": "@[simp, norm_cast]\ntheorem coe_inv (x : ℝ) : ↑x⁻¹ = (x⁻¹ : ℝ*)", "start": [ 75, 1 ], "end": [ 77, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_neg", "code": "@[simp, norm_cast]\ntheorem coe_neg (x : ℝ) : ↑(-x) = (-x : ℝ*)", "start": [ 80, 1 ], "end": [ 82, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_add", "code": "@[simp, norm_cast]\ntheorem coe_add (x y : ℝ) : ↑(x + y) = (x + y : ℝ*)", "start": [ 85, 1 ], "end": [ 87, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_ofNat", "code": "@[simp, norm_cast]\ntheorem coe_ofNat (n : ℕ) [n.AtLeastTwo] :\n ((no_index (OfNat.ofNat n : ℝ)) : ℝ*) = OfNat.ofNat n", "start": [ 94, 1 ], "end": [ 97, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_mul", "code": "@[simp, norm_cast]\ntheorem coe_mul (x y : ℝ) : ↑(x * y) = (x * y : ℝ*)", "start": [ 99, 1 ], "end": [ 101, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_div", "code": "@[simp, norm_cast]\ntheorem coe_div (x y : ℝ) : ↑(x / y) = (x / y : ℝ*)", "start": [ 104, 1 ], "end": [ 106, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_sub", "code": "@[simp, norm_cast]\ntheorem coe_sub (x y : ℝ) : ↑(x - y) = (x - y : ℝ*)", "start": [ 109, 1 ], "end": [ 111, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_le_coe", "code": "@[simp, norm_cast]\ntheorem coe_le_coe {x y : ℝ} : (x : ℝ*) ≤ y ↔ x ≤ y", "start": [ 114, 1 ], "end": [ 116, 20 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_lt_coe", "code": "@[simp, norm_cast]\ntheorem coe_lt_coe {x y : ℝ} : (x : ℝ*) < y ↔ x < y", "start": [ 119, 1 ], "end": [ 121, 20 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_nonneg", "code": "@[simp, norm_cast]\ntheorem coe_nonneg {x : ℝ} : 0 ≤ (x : ℝ*) ↔ 0 ≤ x", "start": [ 124, 1 ], "end": [ 126, 13 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_pos", "code": "@[simp, norm_cast]\ntheorem coe_pos {x : ℝ} : 0 < (x : ℝ*) ↔ 0 < x", "start": [ 129, 1 ], "end": [ 131, 13 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_abs", "code": "@[simp, norm_cast]\ntheorem coe_abs (x : ℝ) : ((|x| : ℝ) : ℝ*) = |↑x|", "start": [ 134, 1 ], "end": [ 136, 14 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_max", "code": "@[simp, norm_cast]\ntheorem coe_max (x y : ℝ) : ((max x y : ℝ) : ℝ*) = max ↑x ↑y", "start": [ 139, 1 ], "end": [ 141, 21 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.coe_min", "code": "@[simp, norm_cast]\ntheorem coe_min (x y : ℝ) : ((min x y : ℝ) : ℝ*) = min ↑x ↑y", "start": [ 144, 1 ], "end": [ 146, 21 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.ofSeq", "code": "def ofSeq (f : ℕ → ℝ) : ℝ* := (↑f : Germ (hyperfilter ℕ : Filter ℕ) ℝ)", "start": [ 149, 1 ], "end": [ 150, 71 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.ofSeq_surjective", "code": "theorem ofSeq_surjective : Function.Surjective ofSeq", "start": [ 153, 1 ], "end": [ 153, 72 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.ofSeq_lt_ofSeq", "code": "theorem ofSeq_lt_ofSeq {f g : ℕ → ℝ} : ofSeq f < ofSeq g ↔ ∀ᶠ n in hyperfilter ℕ, f n < g n", "start": [ 155, 1 ], "end": [ 156, 14 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.epsilon", "code": "noncomputable def epsilon : ℝ* :=\n ofSeq fun n => n⁻¹", "start": [ 158, 1 ], "end": [ 160, 21 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.omega", "code": "noncomputable def omega : ℝ* := ofSeq Nat.cast", "start": [ 163, 1 ], "end": [ 164, 47 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.inv_omega", "code": "@[simp]\ntheorem inv_omega : ω⁻¹ = ε", "start": [ 170, 1 ], "end": [ 172, 6 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.inv_epsilon", "code": "@[simp]\ntheorem inv_epsilon : ε⁻¹ = ω", "start": [ 175, 1 ], "end": [ 177, 17 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.omega_pos", "code": "theorem omega_pos : 0 < ω", "start": [ 180, 1 ], "end": [ 182, 19 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.epsilon_pos", "code": "theorem epsilon_pos : 0 < ε", "start": [ 185, 1 ], "end": [ 186, 27 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.epsilon_ne_zero", "code": "theorem epsilon_ne_zero : ε ≠ 0", "start": [ 189, 1 ], "end": [ 190, 18 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.omega_ne_zero", "code": "theorem omega_ne_zero : ω ≠ 0", "start": [ 193, 1 ], "end": [ 194, 16 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.epsilon_mul_omega", "code": "theorem epsilon_mul_omega : ε * ω = 1", "start": [ 197, 1 ], "end": [ 198, 38 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.lt_of_tendsto_zero_of_pos", "code": "theorem lt_of_tendsto_zero_of_pos {f : ℕ → ℝ} (hf : Tendsto f atTop (𝓝 0)) :\n ∀ {r : ℝ}, 0 < r → ofSeq f < (r : ℝ*)", "start": [ 201, 1 ], "end": [ 203, 93 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.neg_lt_of_tendsto_zero_of_pos", "code": "theorem neg_lt_of_tendsto_zero_of_pos {f : ℕ → ℝ} (hf : Tendsto f atTop (𝓝 0)) :\n ∀ {r : ℝ}, 0 < r → (-r : ℝ*) < ofSeq f", "start": [ 206, 1 ], "end": [ 209, 83 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.gt_of_tendsto_zero_of_neg", "code": "theorem gt_of_tendsto_zero_of_neg {f : ℕ → ℝ} (hf : Tendsto f atTop (𝓝 0)) :\n ∀ {r : ℝ}, r < 0 → (r : ℝ*) < ofSeq f", "start": [ 212, 1 ], "end": [ 214, 85 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.epsilon_lt_pos", "code": "theorem epsilon_lt_pos (x : ℝ) : 0 < x → ε < x", "start": [ 217, 1 ], "end": [ 218, 64 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt", "code": "def IsSt (x : ℝ*) (r : ℝ) :=\n ∀ δ : ℝ, 0 < δ → (r - δ : ℝ*) < x ∧ x < r + δ", "start": [ 221, 1 ], "end": [ 223, 48 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st", "code": "noncomputable def st : ℝ* → ℝ := fun x => if h : ∃ r, IsSt x r then Classical.choose h else 0", "start": [ 226, 1 ], "end": [ 227, 94 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinitesimal", "code": "def Infinitesimal (x : ℝ*) :=\n IsSt x 0", "start": [ 230, 1 ], "end": [ 232, 11 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfinitePos", "code": "def InfinitePos (x : ℝ*) :=\n ∀ r : ℝ, ↑r < x", "start": [ 235, 1 ], "end": [ 237, 18 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfiniteNeg", "code": "def InfiniteNeg (x : ℝ*) :=\n ∀ r : ℝ, x < r", "start": [ 240, 1 ], "end": [ 242, 17 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinite", "code": "def Infinite (x : ℝ*) :=\n InfinitePos x ∨ InfiniteNeg x", "start": [ 245, 1 ], "end": [ 247, 32 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_ofSeq_iff_tendsto", "code": "theorem isSt_ofSeq_iff_tendsto {f : ℕ → ℝ} {r : ℝ} :\n IsSt (ofSeq f) r ↔ Tendsto f (hyperfilter ℕ) (𝓝 r)", "start": [ 254, 1 ], "end": [ 257, 50 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_iff_tendsto", "code": "theorem isSt_iff_tendsto {x : ℝ*} {r : ℝ} : IsSt x r ↔ x.Tendsto (𝓝 r)", "start": [ 259, 1 ], "end": [ 261, 31 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_of_tendsto", "code": "theorem isSt_of_tendsto {f : ℕ → ℝ} {r : ℝ} (hf : Tendsto f atTop (𝓝 r)) : IsSt (ofSeq f) r", "start": [ 263, 1 ], "end": [ 264, 68 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.lt", "code": "protected theorem IsSt.lt {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) (hrs : r < s) :\n x < y", "start": [ 268, 1 ], "end": [ 273, 54 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.unique", "code": "theorem IsSt.unique {x : ℝ*} {r s : ℝ} (hr : IsSt x r) (hs : IsSt x s) : r = s", "start": [ 276, 1 ], "end": [ 279, 34 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.st_eq", "code": "theorem IsSt.st_eq {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : st x = r", "start": [ 282, 1 ], "end": [ 285, 45 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.not_infinite", "code": "theorem IsSt.not_infinite {x : ℝ*} {r : ℝ} (h : IsSt x r) : ¬Infinite x", "start": [ 288, 1 ], "end": [ 290, 42 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinite_of_exists_st", "code": "theorem not_infinite_of_exists_st {x : ℝ*} : (∃ r : ℝ, IsSt x r) → ¬Infinite x", "start": [ 292, 1 ], "end": [ 293, 18 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinite.st_eq", "code": "theorem Infinite.st_eq {x : ℝ*} (hi : Infinite x) : st x = 0", "start": [ 296, 1 ], "end": [ 297, 44 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_sSup", "code": "theorem isSt_sSup {x : ℝ*} (hni : ¬Infinite x) : IsSt x (sSup { y : ℝ | (y : ℝ*) < x })", "start": [ 300, 1 ], "end": [ 317, 85 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.exists_st_of_not_infinite", "code": "theorem exists_st_of_not_infinite {x : ℝ*} (hni : ¬Infinite x) : ∃ r : ℝ, IsSt x r", "start": [ 320, 1 ], "end": [ 321, 49 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st_eq_sSup", "code": "theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x }", "start": [ 324, 1 ], "end": [ 334, 31 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.exists_st_iff_not_infinite", "code": "theorem exists_st_iff_not_infinite {x : ℝ*} : (∃ r : ℝ, IsSt x r) ↔ ¬Infinite x", "start": [ 337, 1 ], "end": [ 338, 57 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_iff_not_exists_st", "code": "theorem infinite_iff_not_exists_st {x : ℝ*} : Infinite x ↔ ¬∃ r : ℝ, IsSt x r", "start": [ 341, 1 ], "end": [ 342, 45 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.isSt_st", "code": "theorem IsSt.isSt_st {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : IsSt x (st x)", "start": [ 345, 1 ], "end": [ 346, 18 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_st_of_exists_st", "code": "theorem isSt_st_of_exists_st {x : ℝ*} (hx : ∃ r : ℝ, IsSt x r) : IsSt x (st x)", "start": [ 349, 1 ], "end": [ 350, 33 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_st'", "code": "theorem isSt_st' {x : ℝ*} (hx : ¬Infinite x) : IsSt x (st x)", "start": [ 353, 1 ], "end": [ 354, 25 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_st", "code": "theorem isSt_st {x : ℝ*} (hx : st x ≠ 0) : IsSt x (st x)", "start": [ 357, 1 ], "end": [ 358, 35 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_refl_real", "code": "theorem isSt_refl_real (r : ℝ) : IsSt r r", "start": [ 361, 1 ], "end": [ 361, 89 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st_id_real", "code": "theorem st_id_real (r : ℝ) : st r = r", "start": [ 364, 1 ], "end": [ 364, 66 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.eq_of_isSt_real", "code": "theorem eq_of_isSt_real {r s : ℝ} : IsSt r s → r = s", "start": [ 367, 1 ], "end": [ 368, 28 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_real_iff_eq", "code": "theorem isSt_real_iff_eq {r s : ℝ} : IsSt r s ↔ r = s", "start": [ 371, 1 ], "end": [ 372, 55 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_symm_real", "code": "theorem isSt_symm_real {r s : ℝ} : IsSt r s ↔ IsSt s r", "start": [ 375, 1 ], "end": [ 376, 51 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_trans_real", "code": "theorem isSt_trans_real {r s t : ℝ} : IsSt r s → IsSt s t → IsSt r t", "start": [ 379, 1 ], "end": [ 380, 76 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_inj_real", "code": "theorem isSt_inj_real {r₁ r₂ s : ℝ} (h1 : IsSt r₁ s) (h2 : IsSt r₂ s) : r₁ = r₂", "start": [ 383, 1 ], "end": [ 384, 58 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.isSt_iff_abs_sub_lt_delta", "code": "theorem isSt_iff_abs_sub_lt_delta {x : ℝ*} {r : ℝ} : IsSt x r ↔ ∀ δ : ℝ, 0 < δ → |x - ↑r| < δ", "start": [ 387, 1 ], "end": [ 388, 74 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.map", "code": "theorem IsSt.map {x : ℝ*} {r : ℝ} (hxr : IsSt x r) {f : ℝ → ℝ} (hf : ContinuousAt f r) :\n IsSt (x.map f) (f r)", "start": [ 391, 1 ], "end": [ 394, 83 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.map₂", "code": "theorem IsSt.map₂ {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) {f : ℝ → ℝ → ℝ}\n (hf : ContinuousAt (Function.uncurry f) (r, s)) : IsSt (x.map₂ f y) (f r s)", "start": [ 396, 1 ], "end": [ 401, 75 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.add", "code": "theorem IsSt.add {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) :\n IsSt (x + y) (r + s)", "start": [ 403, 1 ], "end": [ 404, 69 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.neg", "code": "theorem IsSt.neg {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : IsSt (-x) (-r)", "start": [ 407, 1 ], "end": [ 408, 38 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.sub", "code": "theorem IsSt.sub {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) : IsSt (x - y) (r - s)", "start": [ 411, 1 ], "end": [ 412, 43 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.le", "code": "theorem IsSt.le {x y : ℝ*} {r s : ℝ} (hrx : IsSt x r) (hsy : IsSt y s) (hxy : x ≤ y) : r ≤ s", "start": [ 415, 1 ], "end": [ 416, 46 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st_le_of_le", "code": "theorem st_le_of_le {x y : ℝ*} (hix : ¬Infinite x) (hiy : ¬Infinite y) : x ≤ y → st x ≤ st y", "start": [ 419, 1 ], "end": [ 420, 35 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.lt_of_st_lt", "code": "theorem lt_of_st_lt {x y : ℝ*} (hix : ¬Infinite x) (hiy : ¬Infinite y) : st x < st y → x < y", "start": [ 423, 1 ], "end": [ 424, 35 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_def", "code": "theorem infinitePos_def {x : ℝ*} : InfinitePos x ↔ ∀ r : ℝ, ↑r < x", "start": [ 431, 1 ], "end": [ 431, 78 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_def", "code": "theorem infiniteNeg_def {x : ℝ*} : InfiniteNeg x ↔ ∀ r : ℝ, x < r", "start": [ 434, 1 ], "end": [ 434, 77 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfinitePos.pos", "code": "theorem InfinitePos.pos {x : ℝ*} (hip : InfinitePos x) : 0 < x", "start": [ 437, 1 ], "end": [ 437, 72 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfiniteNeg.lt_zero", "code": "theorem InfiniteNeg.lt_zero {x : ℝ*} : InfiniteNeg x → x < 0", "start": [ 440, 1 ], "end": [ 440, 81 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinite.ne_zero", "code": "theorem Infinite.ne_zero {x : ℝ*} (hI : Infinite x) : x ≠ 0", "start": [ 443, 1 ], "end": [ 444, 61 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinite_zero", "code": "theorem not_infinite_zero : ¬Infinite 0", "start": [ 447, 1 ], "end": [ 447, 68 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfiniteNeg.not_infinitePos", "code": "theorem InfiniteNeg.not_infinitePos {x : ℝ*} : InfiniteNeg x → ¬InfinitePos x", "start": [ 450, 1 ], "end": [ 451, 23 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfinitePos.not_infiniteNeg", "code": "theorem InfinitePos.not_infiniteNeg {x : ℝ*} (hp : InfinitePos x) : ¬InfiniteNeg x", "start": [ 454, 1 ], "end": [ 455, 24 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfinitePos.neg", "code": "theorem InfinitePos.neg {x : ℝ*} : InfinitePos x → InfiniteNeg (-x)", "start": [ 458, 1 ], "end": [ 459, 22 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfiniteNeg.neg", "code": "theorem InfiniteNeg.neg {x : ℝ*} : InfiniteNeg x → InfinitePos (-x)", "start": [ 462, 1 ], "end": [ 463, 22 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_neg", "code": "@[simp] theorem infiniteNeg_neg {x : ℝ*} : InfiniteNeg (-x) ↔ InfinitePos x", "start": [ 467, 1 ], "end": [ 468, 52 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_neg", "code": "@[simp] theorem infinitePos_neg {x : ℝ*} : InfinitePos (-x) ↔ InfiniteNeg x", "start": [ 472, 1 ], "end": [ 473, 52 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_neg", "code": "@[simp] theorem infinite_neg {x : ℝ*} : Infinite (-x) ↔ Infinite x", "start": [ 477, 1 ], "end": [ 478, 54 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinitesimal.not_infinite", "code": "nonrec theorem Infinitesimal.not_infinite {x : ℝ*} (h : Infinitesimal x) : ¬Infinite x", "start": [ 481, 1 ], "end": [ 482, 17 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinite.not_infinitesimal", "code": "theorem Infinite.not_infinitesimal {x : ℝ*} (h : Infinite x) : ¬Infinitesimal x", "start": [ 485, 1 ], "end": [ 486, 20 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfinitePos.not_infinitesimal", "code": "theorem InfinitePos.not_infinitesimal {x : ℝ*} (h : InfinitePos x) : ¬Infinitesimal x", "start": [ 489, 1 ], "end": [ 490, 40 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.InfiniteNeg.not_infinitesimal", "code": "theorem InfiniteNeg.not_infinitesimal {x : ℝ*} (h : InfiniteNeg x) : ¬Infinitesimal x", "start": [ 493, 1 ], "end": [ 494, 40 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_iff_infinite_and_pos", "code": "theorem infinitePos_iff_infinite_and_pos {x : ℝ*} : InfinitePos x ↔ Infinite x ∧ 0 < x", "start": [ 497, 1 ], "end": [ 499, 81 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_iff_infinite_and_neg", "code": "theorem infiniteNeg_iff_infinite_and_neg {x : ℝ*} : InfiniteNeg x ↔ Infinite x ∧ x < 0", "start": [ 502, 1 ], "end": [ 504, 81 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_iff_infinite_of_nonneg", "code": "theorem infinitePos_iff_infinite_of_nonneg {x : ℝ*} (hp : 0 ≤ x) : InfinitePos x ↔ Infinite x", "start": [ 507, 1 ], "end": [ 508, 51 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_iff_infinite_of_pos", "code": "theorem infinitePos_iff_infinite_of_pos {x : ℝ*} (hp : 0 < x) : InfinitePos x ↔ Infinite x", "start": [ 511, 1 ], "end": [ 512, 43 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_iff_infinite_of_neg", "code": "theorem infiniteNeg_iff_infinite_of_neg {x : ℝ*} (hn : x < 0) : InfiniteNeg x ↔ Infinite x", "start": [ 515, 1 ], "end": [ 516, 48 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_abs_iff_infinite_abs", "code": "theorem infinitePos_abs_iff_infinite_abs {x : ℝ*} : InfinitePos |x| ↔ Infinite |x|", "start": [ 519, 1 ], "end": [ 520, 52 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_abs_iff", "code": "@[simp] theorem infinite_abs_iff {x : ℝ*} : Infinite |x| ↔ Infinite x", "start": [ 524, 1 ], "end": [ 525, 78 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_abs_iff_infinite", "code": "@[simp] theorem infinitePos_abs_iff_infinite {x : ℝ*} : InfinitePos |x| ↔ Infinite x", "start": [ 530, 1 ], "end": [ 531, 58 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_iff_abs_lt_abs", "code": "theorem infinite_iff_abs_lt_abs {x : ℝ*} : Infinite x ↔ ∀ r : ℝ, (|r| : ℝ*) < |x|", "start": [ 534, 1 ], "end": [ 536, 37 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_add_not_infiniteNeg", "code": "theorem infinitePos_add_not_infiniteNeg {x y : ℝ*} :\n InfinitePos x → ¬InfiniteNeg y → InfinitePos (x + y)", "start": [ 539, 1 ], "end": [ 544, 7 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infiniteNeg_add_infinitePos", "code": "theorem not_infiniteNeg_add_infinitePos {x y : ℝ*} :\n ¬InfiniteNeg x → InfinitePos y → InfinitePos (x + y)", "start": [ 547, 1 ], "end": [ 549, 55 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_add_not_infinitePos", "code": "theorem infiniteNeg_add_not_infinitePos {x y : ℝ*} :\n InfiniteNeg x → ¬InfinitePos y → InfiniteNeg (x + y)", "start": [ 552, 1 ], "end": [ 555, 40 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinitePos_add_infiniteNeg", "code": "theorem not_infinitePos_add_infiniteNeg {x y : ℝ*} :\n ¬InfinitePos x → InfiniteNeg y → InfiniteNeg (x + y)", "start": [ 558, 1 ], "end": [ 560, 55 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_add_infinitePos", "code": "theorem infinitePos_add_infinitePos {x y : ℝ*} :\n InfinitePos x → InfinitePos y → InfinitePos (x + y)", "start": [ 563, 1 ], "end": [ 565, 56 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_add_infiniteNeg", "code": "theorem infiniteNeg_add_infiniteNeg {x y : ℝ*} :\n InfiniteNeg x → InfiniteNeg y → InfiniteNeg (x + y)", "start": [ 568, 1 ], "end": [ 570, 56 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_add_not_infinite", "code": "theorem infinitePos_add_not_infinite {x y : ℝ*} :\n InfinitePos x → ¬Infinite y → InfinitePos (x + y)", "start": [ 573, 1 ], "end": [ 575, 54 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_add_not_infinite", "code": "theorem infiniteNeg_add_not_infinite {x y : ℝ*} :\n InfiniteNeg x → ¬Infinite y → InfiniteNeg (x + y)", "start": [ 578, 1 ], "end": [ 580, 54 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_of_tendsto_top", "code": "theorem infinitePos_of_tendsto_top {f : ℕ → ℝ} (hf : Tendsto f atTop atTop) :\n InfinitePos (ofSeq f)", "start": [ 583, 1 ], "end": [ 591, 86 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_of_tendsto_bot", "code": "theorem infiniteNeg_of_tendsto_bot {f : ℕ → ℝ} (hf : Tendsto f atTop atBot) :\n InfiniteNeg (ofSeq f)", "start": [ 594, 1 ], "end": [ 602, 86 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinite_neg", "code": "theorem not_infinite_neg {x : ℝ*} : ¬Infinite x → ¬Infinite (-x)", "start": [ 605, 1 ], "end": [ 605, 87 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinite_add", "code": "theorem not_infinite_add {x y : ℝ*} (hx : ¬Infinite x) (hy : ¬Infinite y) : ¬Infinite (x + y)", "start": [ 608, 1 ], "end": [ 611, 50 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinite_iff_exist_lt_gt", "code": "theorem not_infinite_iff_exist_lt_gt {x : ℝ*} : ¬Infinite x ↔ ∃ r s : ℝ, (r : ℝ*) < x ∧ x < s", "start": [ 614, 1 ], "end": [ 616, 93 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinite_real", "code": "theorem not_infinite_real (r : ℝ) : ¬Infinite r", "start": [ 619, 1 ], "end": [ 621, 83 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinite.ne_real", "code": "theorem Infinite.ne_real {x : ℝ*} : Infinite x → ∀ r : ℝ, x ≠ r", "start": [ 624, 1 ], "end": [ 625, 56 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.mul", "code": "theorem IsSt.mul {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) : IsSt (x * y) (r * s)", "start": [ 632, 1 ], "end": [ 633, 43 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_infinite_mul", "code": "theorem not_infinite_mul {x y : ℝ*} (hx : ¬Infinite x) (hy : ¬Infinite y) : ¬Infinite (x * y)", "start": [ 637, 1 ], "end": [ 640, 27 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st_add", "code": "theorem st_add {x y : ℝ*} (hx : ¬Infinite x) (hy : ¬Infinite y) : st (x + y) = st x + st y", "start": [ 644, 1 ], "end": [ 645, 79 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st_neg", "code": "theorem st_neg (x : ℝ*) : st (-x) = -st x", "start": [ 648, 1 ], "end": [ 651, 63 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st_mul", "code": "theorem st_mul {x y : ℝ*} (hx : ¬Infinite x) (hy : ¬Infinite y) : st (x * y) = st x * st y", "start": [ 654, 1 ], "end": [ 658, 27 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_def", "code": "theorem infinitesimal_def {x : ℝ*} : Infinitesimal x ↔ ∀ r : ℝ, 0 < r → -(r : ℝ*) < x ∧ x < r", "start": [ 665, 1 ], "end": [ 666, 29 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.lt_of_pos_of_infinitesimal", "code": "theorem lt_of_pos_of_infinitesimal {x : ℝ*} : Infinitesimal x → ∀ r : ℝ, 0 < r → x < r", "start": [ 669, 1 ], "end": [ 670, 52 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.lt_neg_of_pos_of_infinitesimal", "code": "theorem lt_neg_of_pos_of_infinitesimal {x : ℝ*} : Infinitesimal x → ∀ r : ℝ, 0 < r → -↑r < x", "start": [ 673, 1 ], "end": [ 674, 52 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.gt_of_neg_of_infinitesimal", "code": "theorem gt_of_neg_of_infinitesimal {x : ℝ*} (hi : Infinitesimal x) (r : ℝ) (hr : r < 0) : ↑r < x", "start": [ 677, 1 ], "end": [ 678, 61 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.abs_lt_real_iff_infinitesimal", "code": "theorem abs_lt_real_iff_infinitesimal {x : ℝ*} : Infinitesimal x ↔ ∀ r : ℝ, r ≠ 0 → |x| < |↑r|", "start": [ 681, 1 ], "end": [ 683, 98 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_zero", "code": "theorem infinitesimal_zero : Infinitesimal 0", "start": [ 686, 1 ], "end": [ 686, 65 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinitesimal.eq_zero", "code": "theorem Infinitesimal.eq_zero {r : ℝ} : Infinitesimal r → r = 0", "start": [ 689, 1 ], "end": [ 689, 83 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_real_iff", "code": "@[simp] theorem infinitesimal_real_iff {r : ℝ} : Infinitesimal r ↔ r = 0", "start": [ 693, 1 ], "end": [ 694, 19 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinitesimal.add", "code": "nonrec theorem Infinitesimal.add {x y : ℝ*} (hx : Infinitesimal x) (hy : Infinitesimal y) :\n Infinitesimal (x + y)", "start": [ 697, 1 ], "end": [ 698, 70 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinitesimal.neg", "code": "nonrec theorem Infinitesimal.neg {x : ℝ*} (hx : Infinitesimal x) : Infinitesimal (-x)", "start": [ 701, 1 ], "end": [ 702, 37 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_neg", "code": "@[simp] theorem infinitesimal_neg {x : ℝ*} : Infinitesimal (-x) ↔ Infinitesimal x", "start": [ 706, 1 ], "end": [ 707, 50 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinitesimal.mul", "code": "nonrec theorem Infinitesimal.mul {x y : ℝ*} (hx : Infinitesimal x) (hy : Infinitesimal y) :\n Infinitesimal (x * y)", "start": [ 710, 1 ], "end": [ 711, 70 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_of_tendsto_zero", "code": "theorem infinitesimal_of_tendsto_zero {f : ℕ → ℝ} (h : Tendsto f atTop (𝓝 0)) :\n Infinitesimal (ofSeq f)", "start": [ 714, 1 ], "end": [ 716, 20 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_epsilon", "code": "theorem infinitesimal_epsilon : Infinitesimal ε", "start": [ 719, 1 ], "end": [ 720, 68 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.not_real_of_infinitesimal_ne_zero", "code": "theorem not_real_of_infinitesimal_ne_zero (x : ℝ*) : Infinitesimal x → x ≠ 0 → ∀ r : ℝ, x ≠ r", "start": [ 723, 1 ], "end": [ 725, 92 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.infinitesimal_sub", "code": "theorem IsSt.infinitesimal_sub {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : Infinitesimal (x - ↑r)", "start": [ 728, 1 ], "end": [ 729, 57 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_sub_st", "code": "theorem infinitesimal_sub_st {x : ℝ*} (hx : ¬Infinite x) : Infinitesimal (x - ↑(st x))", "start": [ 732, 1 ], "end": [ 733, 34 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_iff_infinitesimal_inv_pos", "code": "theorem infinitePos_iff_infinitesimal_inv_pos {x : ℝ*} :\n InfinitePos x ↔ Infinitesimal x⁻¹ ∧ 0 < x⁻¹", "start": [ 736, 1 ], "end": [ 747, 74 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_iff_infinitesimal_inv_neg", "code": "theorem infiniteNeg_iff_infinitesimal_inv_neg {x : ℝ*} :\n InfiniteNeg x ↔ Infinitesimal x⁻¹ ∧ x⁻¹ < 0", "start": [ 750, 1 ], "end": [ 752, 101 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_inv_of_infinite", "code": "theorem infinitesimal_inv_of_infinite {x : ℝ*} : Infinite x → Infinitesimal x⁻¹", "start": [ 755, 1 ], "end": [ 757, 53 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_of_infinitesimal_inv", "code": "theorem infinite_of_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) (hi : Infinitesimal x⁻¹) :\n Infinite x", "start": [ 760, 1 ], "end": [ 764, 82 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_iff_infinitesimal_inv", "code": "theorem infinite_iff_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) : Infinite x ↔ Infinitesimal x⁻¹", "start": [ 767, 1 ], "end": [ 768, 68 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_pos_iff_infinitePos_inv", "code": "theorem infinitesimal_pos_iff_infinitePos_inv {x : ℝ*} :\n InfinitePos x⁻¹ ↔ Infinitesimal x ∧ 0 < x", "start": [ 771, 1 ], "end": [ 773, 65 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_neg_iff_infiniteNeg_inv", "code": "theorem infinitesimal_neg_iff_infiniteNeg_inv {x : ℝ*} :\n InfiniteNeg x⁻¹ ↔ Infinitesimal x ∧ x < 0", "start": [ 776, 1 ], "end": [ 778, 65 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitesimal_iff_infinite_inv", "code": "theorem infinitesimal_iff_infinite_inv {x : ℝ*} (h : x ≠ 0) : Infinitesimal x ↔ Infinite x⁻¹", "start": [ 781, 1 ], "end": [ 782, 84 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.IsSt.inv", "code": "theorem IsSt.inv {x : ℝ*} {r : ℝ} (hi : ¬Infinitesimal x) (hr : IsSt x r) : IsSt x⁻¹ r⁻¹", "start": [ 789, 1 ], "end": [ 790, 60 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.st_inv", "code": "theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹", "start": [ 793, 1 ], "end": [ 800, 37 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_omega", "code": "theorem infinitePos_omega : InfinitePos ω", "start": [ 807, 1 ], "end": [ 808, 81 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_omega", "code": "theorem infinite_omega : Infinite ω", "start": [ 811, 1 ], "end": [ 812, 75 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_mul_of_infinitePos_not_infinitesimal_pos", "code": "theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :\n InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y)", "start": [ 815, 1 ], "end": [ 822, 78 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_mul_of_not_infinitesimal_pos_infinitePos", "code": "theorem infinitePos_mul_of_not_infinitesimal_pos_infinitePos {x y : ℝ*} :\n ¬Infinitesimal x → 0 < x → InfinitePos y → InfinitePos (x * y)", "start": [ 825, 1 ], "end": [ 827, 79 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_mul_of_infiniteNeg_not_infinitesimal_neg", "code": "theorem infinitePos_mul_of_infiniteNeg_not_infinitesimal_neg {x y : ℝ*} :\n InfiniteNeg x → ¬Infinitesimal y → y < 0 → InfinitePos (x * y)", "start": [ 830, 1 ], "end": [ 833, 61 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_mul_of_not_infinitesimal_neg_infiniteNeg", "code": "theorem infinitePos_mul_of_not_infinitesimal_neg_infiniteNeg {x y : ℝ*} :\n ¬Infinitesimal x → x < 0 → InfiniteNeg y → InfinitePos (x * y)", "start": [ 836, 1 ], "end": [ 838, 79 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_mul_of_infinitePos_not_infinitesimal_neg", "code": "theorem infiniteNeg_mul_of_infinitePos_not_infinitesimal_neg {x y : ℝ*} :\n InfinitePos x → ¬Infinitesimal y → y < 0 → InfiniteNeg (x * y)", "start": [ 841, 1 ], "end": [ 844, 61 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_mul_of_not_infinitesimal_neg_infinitePos", "code": "theorem infiniteNeg_mul_of_not_infinitesimal_neg_infinitePos {x y : ℝ*} :\n ¬Infinitesimal x → x < 0 → InfinitePos y → InfiniteNeg (x * y)", "start": [ 847, 1 ], "end": [ 849, 79 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_mul_of_infiniteNeg_not_infinitesimal_pos", "code": "theorem infiniteNeg_mul_of_infiniteNeg_not_infinitesimal_pos {x y : ℝ*} :\n InfiniteNeg x → ¬Infinitesimal y → 0 < y → InfiniteNeg (x * y)", "start": [ 852, 1 ], "end": [ 855, 61 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_mul_of_not_infinitesimal_pos_infiniteNeg", "code": "theorem infiniteNeg_mul_of_not_infinitesimal_pos_infiniteNeg {x y : ℝ*} :\n ¬Infinitesimal x → 0 < x → InfiniteNeg y → InfiniteNeg (x * y)", "start": [ 858, 1 ], "end": [ 860, 85 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_mul_infinitePos", "code": "theorem infinitePos_mul_infinitePos {x y : ℝ*} :\n InfinitePos x → InfinitePos y → InfinitePos (x * y)", "start": [ 863, 1 ], "end": [ 865, 86 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_mul_infiniteNeg", "code": "theorem infiniteNeg_mul_infiniteNeg {x y : ℝ*} :\n InfiniteNeg x → InfiniteNeg y → InfinitePos (x * y)", "start": [ 868, 1 ], "end": [ 870, 86 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinitePos_mul_infiniteNeg", "code": "theorem infinitePos_mul_infiniteNeg {x y : ℝ*} :\n InfinitePos x → InfiniteNeg y → InfiniteNeg (x * y)", "start": [ 873, 1 ], "end": [ 875, 86 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infiniteNeg_mul_infinitePos", "code": "theorem infiniteNeg_mul_infinitePos {x y : ℝ*} :\n InfiniteNeg x → InfinitePos y → InfiniteNeg (x * y)", "start": [ 878, 1 ], "end": [ 880, 86 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_mul_of_infinite_not_infinitesimal", "code": "theorem infinite_mul_of_infinite_not_infinitesimal {x y : ℝ*} :\n Infinite x → ¬Infinitesimal y → Infinite (x * y)", "start": [ 883, 1 ], "end": [ 892, 91 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.infinite_mul_of_not_infinitesimal_infinite", "code": "theorem infinite_mul_of_not_infinitesimal_infinite {x y : ℝ*} :\n ¬Infinitesimal x → Infinite y → Infinite (x * y)", "start": [ 895, 1 ], "end": [ 897, 72 ], "kind": "commanddeclaration" }, { "full_name": "Hyperreal.Infinite.mul", "code": "theorem Infinite.mul {x y : ℝ*} : Infinite x → Infinite y → Infinite (x * y)", "start": [ 900, 1 ], "end": [ 901, 69 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/AlgebraCat/Limits.lean
[ "Mathlib/Algebra/Category/AlgebraCat/Basic.lean", "Mathlib/Algebra/Category/Ring/Limits.lean", "Mathlib/Algebra/Category/ModuleCat/Basic.lean", "Mathlib/Algebra/Category/ModuleCat/Limits.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "AlgebraCat.semiringObj", "code": "instance semiringObj (j) : Semiring ((F ⋙ forget (AlgebraCat R)).obj j) :=\n inferInstanceAs <| Semiring (F.obj j)", "start": [ 36, 1 ], "end": [ 37, 40 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.algebraObj", "code": "instance algebraObj (j) :\n Algebra R ((F ⋙ forget (AlgebraCat R)).obj j) :=\n inferInstanceAs <| Algebra R (F.obj j)", "start": [ 40, 1 ], "end": [ 42, 41 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.sectionsSubalgebra", "code": "def sectionsSubalgebra : Subalgebra R (∀ j, F.obj j) :=\n { SemiRingCat.sectionsSubsemiring\n (F ⋙ forget₂ (AlgebraCat R) RingCat.{w} ⋙ forget₂ RingCat SemiRingCat.{w}) with\n algebraMap_mem' := fun r _ _ f => (F.map f).commutes r }", "start": [ 45, 1 ], "end": [ 50, 61 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.limitSemiring", "code": "instance limitSemiring :\n Ring.{w} (Types.Small.limitCone.{v, w} (F ⋙ forget (AlgebraCat.{w} R))).pt :=\n inferInstanceAs <| Ring (Shrink (sectionsSubalgebra F))", "start": [ 64, 1 ], "end": [ 66, 58 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.limitAlgebra", "code": "instance limitAlgebra :\n Algebra R (Types.Small.limitCone (F ⋙ forget (AlgebraCat.{w} R))).pt :=\n inferInstanceAs <| Algebra R (Shrink (sectionsSubalgebra F))", "start": [ 69, 1 ], "end": [ 71, 63 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.limitπAlgHom", "code": "def limitπAlgHom (j) :\n (Types.Small.limitCone (F ⋙ forget (AlgebraCat R))).pt →ₐ[R]\n (F ⋙ forget (AlgebraCat.{w} R)).obj j :=\n letI : Small.{w}\n (Functor.sections ((F ⋙ forget₂ _ RingCat ⋙ forget₂ _ SemiRingCat) ⋙ forget _)) :=\n inferInstanceAs <| Small.{w} (F ⋙ forget _).sections\n { SemiRingCat.limitπRingHom\n (F ⋙ forget₂ (AlgebraCat R) RingCat.{w} ⋙ forget₂ RingCat SemiRingCat.{w}) j with\n toFun := (Types.Small.limitCone (F ⋙ forget (AlgebraCat.{w} R))).π.app j\n commutes' := fun x => by\n simp only [Types.Small.limitCone_π_app, ← Shrink.algEquiv_apply _ R,\n Types.Small.limitCone_pt, AlgEquiv.commutes]\n rfl\n }", "start": [ 74, 1 ], "end": [ 88, 6 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.HasLimits.limitCone", "code": "def limitCone : Cone F where\n pt := AlgebraCat.of R (Types.Small.limitCone (F ⋙ forget _)).pt\n π :=\n { app := limitπAlgHom F\n naturality := fun _ _ f =>\n AlgHom.coe_fn_injective ((Types.Small.limitCone (F ⋙ forget _)).π.naturality f) }", "start": [ 96, 1 ], "end": [ 104, 90 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.HasLimits.limitConeIsLimit", "code": "def limitConeIsLimit : IsLimit (limitCone.{v, w} F) := by\n refine\n IsLimit.ofFaithful (forget (AlgebraCat R)) (Types.Small.limitConeIsLimit.{v, w} _)\n (fun s => { toFun := _, map_one' := ?_, map_mul' := ?_, map_zero' := ?_, map_add' := ?_,\n commutes' := ?_ })\n (fun s => rfl)\n · congr\n ext j\n simp only [Functor.comp_obj, Functor.mapCone_pt, Functor.mapCone_π_app,\n forget_map_eq_coe]\n erw [map_one]\n rfl\n · intro x y\n simp only [Functor.comp_obj, Functor.mapCone_pt, Functor.mapCone_π_app]\n erw [← map_mul (MulEquiv.symm Shrink.mulEquiv)]\n apply congrArg\n ext j\n simp only [Functor.comp_obj, Functor.mapCone_pt, Functor.mapCone_π_app,\n forget_map_eq_coe, map_mul]\n rfl\n · simp only [Functor.mapCone_π_app, forget_map_eq_coe]\n congr\n funext j\n simp only [map_zero, Pi.zero_apply]\n · intro x y\n simp only [Functor.mapCone_π_app]\n erw [← map_add (AddEquiv.symm Shrink.addEquiv)]\n apply congrArg\n ext j\n simp only [forget_map_eq_coe, map_add]\n rfl\n · intro r\n simp only [← Shrink.algEquiv_symm_apply _ R, limitCone, Equiv.algebraMap_def,\n Equiv.symm_symm]\n apply congrArg\n apply Subtype.ext\n ext j\n exact (s.π.app j).commutes r", "start": [ 107, 1 ], "end": [ 150, 33 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.hasLimitsOfSize", "code": "lemma hasLimitsOfSize [UnivLE.{v, w}] : HasLimitsOfSize.{t, v} (AlgebraCat.{w} R) :=\n { has_limits_of_shape := fun _ _ =>\n { has_limit := fun F => HasLimit.mk\n { cone := limitCone F\n isLimit := limitConeIsLimit F } } }", "start": [ 159, 1 ], "end": [ 164, 46 ], "kind": "lemma" }, { "full_name": "AlgebraCat.hasLimits", "code": "instance hasLimits : HasLimits (AlgebraCat.{w} R) :=\n AlgebraCat.hasLimitsOfSize.{w, w, u}", "start": [ 167, 1 ], "end": [ 168, 39 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.forget₂RingPreservesLimitsOfSize", "code": "instance forget₂RingPreservesLimitsOfSize [UnivLE.{v, w}] :\n PreservesLimitsOfSize.{t, v} (forget₂ (AlgebraCat.{w} R) RingCat.{w}) where\n preservesLimitsOfShape :=\n { preservesLimit := fun {K} ↦\n preservesLimitOfPreservesLimitCone (limitConeIsLimit K)\n (RingCat.limitConeIsLimit.{v, w}\n (_ ⋙ forget₂ (AlgebraCat.{w} R) RingCat.{w})) }", "start": [ 171, 1 ], "end": [ 179, 60 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.forget₂RingPreservesLimits", "code": "instance forget₂RingPreservesLimits : PreservesLimits (forget₂ (AlgebraCat R) RingCat.{w}) :=\n AlgebraCat.forget₂RingPreservesLimitsOfSize.{w, w}", "start": [ 182, 1 ], "end": [ 183, 53 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.forget₂ModulePreservesLimitsOfSize", "code": "instance forget₂ModulePreservesLimitsOfSize [UnivLE.{v, w}] : PreservesLimitsOfSize.{t, v}\n (forget₂ (AlgebraCat.{w} R) (ModuleCat.{w} R)) where\n preservesLimitsOfShape :=\n { preservesLimit := fun {K} ↦\n preservesLimitOfPreservesLimitCone (limitConeIsLimit K)\n (ModuleCat.HasLimits.limitConeIsLimit\n (K ⋙ forget₂ (AlgebraCat.{w} R) (ModuleCat.{w} R))) }", "start": [ 186, 1 ], "end": [ 194, 66 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.forget₂ModulePreservesLimits", "code": "instance forget₂ModulePreservesLimits :\n PreservesLimits (forget₂ (AlgebraCat R) (ModuleCat.{w} R)) :=\n AlgebraCat.forget₂ModulePreservesLimitsOfSize.{w, w}", "start": [ 197, 1 ], "end": [ 199, 55 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.forgetPreservesLimitsOfSize", "code": "instance forgetPreservesLimitsOfSize [UnivLE.{v, w}] :\n PreservesLimitsOfSize.{t, v} (forget (AlgebraCat.{w} R)) where\n preservesLimitsOfShape :=\n { preservesLimit := fun {K} ↦\n preservesLimitOfPreservesLimitCone (limitConeIsLimit K)\n (Types.Small.limitConeIsLimit.{v} (K ⋙ forget _)) }", "start": [ 202, 1 ], "end": [ 209, 62 ], "kind": "commanddeclaration" }, { "full_name": "AlgebraCat.forgetPreservesLimits", "code": "instance forgetPreservesLimits : PreservesLimits (forget (AlgebraCat.{w} R)) :=\n AlgebraCat.forgetPreservesLimitsOfSize.{w, w}", "start": [ 212, 1 ], "end": [ 213, 48 ], "kind": "commanddeclaration" } ]