blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 139 | content_id stringlengths 40 40 | detected_licenses listlengths 0 16 | license_type stringclasses 2
values | repo_name stringlengths 7 55 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 6
values | visit_date int64 1,471B 1,694B | revision_date int64 1,378B 1,694B | committer_date int64 1,378B 1,694B | github_id float64 1.33M 604M ⌀ | star_events_count int64 0 43.5k | fork_events_count int64 0 1.5k | gha_license_id stringclasses 6
values | gha_event_created_at int64 1,402B 1,695B ⌀ | gha_created_at int64 1,359B 1,637B ⌀ | gha_language stringclasses 19
values | src_encoding stringclasses 2
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 1
class | length_bytes int64 3 6.4M | extension stringclasses 4
values | content stringlengths 3 6.12M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44b0a76dc71e61db5b2581c766c8845370bdfcc2 | 5c7fe6c4a9d4079b5457ffa5f061797d42a1cd65 | /src/exercises/src_19_positive_integers.lean | d17111741b66d2b17a96b1b5288127f9e110fda0 | [] | no_license | gihanmarasingha/mth1001_tutorial | 8e0817feeb96e7c1bb3bac49b63e3c9a3a329061 | bb277eebd5013766e1418365b91416b406275130 | refs/heads/master | 1,675,008,746,310 | 1,607,993,443,000 | 1,607,993,443,000 | 321,511,270 | 3 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 3,347 | lean | import data.num.basic
set_option pp.structure_projections false
namespace mth1001
/-
In this file, we set up a type for the positive integers and prove theorems about it.
-/
section setup
-- You can ignore the material in this section. It's needed to set up
-- the type of positive integers and to define addit... |
426960c60b848c4143dbd3cd035faf5de2a53127 | 2d34dfb0a1cc250584282618dc10ea03d3fa858e | /src/locally_constant/Vhat.lean | f1f5fa77d1301f0f53a410eaccd6f9f2be2b8fc4 | [] | no_license | zeta1999/lean-liquid | 61e294ec5adae959d8ee1b65d015775484ff58c2 | 96bb0fa3afc3b451bcd1fb7d974348de2f290541 | refs/heads/master | 1,676,579,150,248 | 1,610,771,445,000 | 1,610,771,445,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 8,723 | lean | import category_theory.currying
import topology.category.Profinite
import topology.algebra.group_completion
import topology.metric_space.completion
import locally_constant.NormedGroup
import locally_constant.for_mathlib
import normed_with_aut
noncomputable theory
open_locale nnreal
namespace NormedGroup
open uniform... |
163085caa6002b21a2d170d43ddea6dd3a3d7dc2 | b7f22e51856f4989b970961f794f1c435f9b8f78 | /tests/lean/run/fib_wrec.lean | faebd4c84f4768566bc93c0247c0f016ca3a0a0f | [
"Apache-2.0"
] | permissive | soonhokong/lean | cb8aa01055ffe2af0fb99a16b4cda8463b882cd1 | 38607e3eb57f57f77c0ac114ad169e9e4262e24f | refs/heads/master | 1,611,187,284,081 | 1,450,766,737,000 | 1,476,122,547,000 | 11,513,992 | 2 | 0 | null | 1,401,763,102,000 | 1,374,182,235,000 | C++ | UTF-8 | Lean | false | false | 915 | lean | import data.nat
open nat eq.ops
definition fib.F (n : nat) : (Π (m : nat), m < n → nat) → nat :=
nat.cases_on n
(λ (f : Π (m : nat), m < zero → nat), succ zero)
(λ (n₁ : nat), nat.cases_on n₁
(λ (f : Π (m : nat), m < (succ zero) → nat), succ zero)
(λ (n₂ : nat) (f : Π (m : nat), m < (succ (succ n₂)) → nat)... |
2adf968bad873ced8bccb0285d12a407e90b9190 | 80746c6dba6a866de5431094bf9f8f841b043d77 | /src/category/basic.lean | 462da0fe0709cec03430628a027f91c42e66a221 | [
"Apache-2.0"
] | permissive | leanprover-fork/mathlib-backup | 8b5c95c535b148fca858f7e8db75a76252e32987 | 0eb9db6a1a8a605f0cf9e33873d0450f9f0ae9b0 | refs/heads/master | 1,585,156,056,139 | 1,548,864,430,000 | 1,548,864,438,000 | 143,964,213 | 0 | 0 | Apache-2.0 | 1,550,795,966,000 | 1,533,705,322,000 | Lean | UTF-8 | Lean | false | false | 5,322 | lean | /-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
Extends the theory on functors, applicatives and monads.
-/
universes u v w
variables {α β γ : Type u}
notation a ` $< `:1 f:1 := f a
section functor
variables {f : ... |
08049aa1b88dc6a41d91b574a9619b2e85fc0f25 | 367134ba5a65885e863bdc4507601606690974c1 | /src/data/list/sort.lean | 047321df4edc7d7fbb374b96f2e9b8ecbe61439a | [
"Apache-2.0"
] | permissive | kodyvajjha/mathlib | 9bead00e90f68269a313f45f5561766cfd8d5cad | b98af5dd79e13a38d84438b850a2e8858ec21284 | refs/heads/master | 1,624,350,366,310 | 1,615,563,062,000 | 1,615,563,062,000 | 162,666,963 | 0 | 0 | Apache-2.0 | 1,545,367,651,000 | 1,545,367,651,000 | null | UTF-8 | Lean | false | false | 13,815 | lean | /-
Copyright (c) 2016 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Jeremy Avigad
-/
import data.list.perm
import data.list.chain
/-!
# Sorting algorithms on lists
In this file we define `list.sorted r l` to be an alias for `pairwise r l`. This alias i... |
f036af04644bd418821906fa95a4b16aacba4460 | 618003631150032a5676f229d13a079ac875ff77 | /src/category_theory/adjunction/fully_faithful.lean | 5b55ea99e0fb4f9f8e91aa3cf758c3ffbdc81ab7 | [
"Apache-2.0"
] | permissive | awainverse/mathlib | 939b68c8486df66cfda64d327ad3d9165248c777 | ea76bd8f3ca0a8bf0a166a06a475b10663dec44a | refs/heads/master | 1,659,592,962,036 | 1,590,987,592,000 | 1,590,987,592,000 | 268,436,019 | 1 | 0 | Apache-2.0 | 1,590,990,500,000 | 1,590,990,500,000 | null | UTF-8 | Lean | false | false | 2,226 | lean | /-
Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import category_theory.adjunction.basic
import category_theory.yoneda
open category_theory
namespace category_theory
universes v₁ v₂ u₁ u₂
open category
open oppos... |
12608a9ce2e0fb93f6444ca267fe0813c7a2a777 | 853df553b1d6ca524e3f0a79aedd32dde5d27ec3 | /src/tactic/default.lean | 48666a0e3b4cd411c2a9ad67fcc9a164e2f5bd6b | [
"Apache-2.0"
] | permissive | DanielFabian/mathlib | efc3a50b5dde303c59eeb6353ef4c35a345d7112 | f520d07eba0c852e96fe26da71d85bf6d40fcc2a | refs/heads/master | 1,668,739,922,971 | 1,595,201,756,000 | 1,595,201,756,000 | 279,469,476 | 0 | 0 | null | 1,594,696,604,000 | 1,594,696,604,000 | null | UTF-8 | Lean | false | false | 1,079 | lean | /-
This file imports many useful tactics ("the kitchen sink").
You can use `import tactic` at the beginning of your file to get everything.
(Although you may want to strip things down when you're polishing.)
Because this file imports some complicated tactics, it has many transitive dependencies
(which of course may n... |
cc1fb0813f2c2ef9191e25575887f618e74a0b47 | 6432ea7a083ff6ba21ea17af9ee47b9c371760f7 | /src/Init/Core.lean | 1a214ee16361db1e9a9546b48d247b084d57ac8f | [
"Apache-2.0",
"LLVM-exception",
"NCSA",
"LGPL-3.0-only",
"LicenseRef-scancode-inner-net-2.0",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"Spencer-94",
"LGPL-2.1-or-later",
"HPND",
"LicenseRef-scancode-pcre",
"ISC",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"SunPro",
"CMU-Mach"... | permissive | leanprover/lean4 | 4bdf9790294964627eb9be79f5e8f6157780b4cc | f1f9dc0f2f531af3312398999d8b8303fa5f096b | refs/heads/master | 1,693,360,665,786 | 1,693,350,868,000 | 1,693,350,868,000 | 129,571,436 | 2,827 | 311 | Apache-2.0 | 1,694,716,156,000 | 1,523,760,560,000 | Lean | UTF-8 | Lean | false | false | 66,268 | lean | /-
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
notation, basic datatypes and type classes
-/
prelude
import Init.Prelude
import Init.SizeOf
set_option linter.missingDocs true -- keep it documented
univers... |
697ac682f2c370054d0b8eb8becc13e6781c1e68 | 9028d228ac200bbefe3a711342514dd4e4458bff | /src/algebra/continued_fractions/computation/translations.lean | ee2902a8ced32021a4479a312b9176baf08b4f24 | [
"Apache-2.0"
] | permissive | mcncm/mathlib | 8d25099344d9d2bee62822cb9ed43aa3e09fa05e | fde3d78cadeec5ef827b16ae55664ef115e66f57 | refs/heads/master | 1,672,743,316,277 | 1,602,618,514,000 | 1,602,618,514,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 10,493 | lean | /-
Copyright (c) 2020 Kevin Kappelmann. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
-/
import algebra.continued_fractions.computation.basic
import algebra.continued_fractions.translations
/-!
# Basic Translation Lemmas Between Structures Defined for... |
0f23ecf024c70df4739ca6efd1cdbffb67723d83 | d9d511f37a523cd7659d6f573f990e2a0af93c6f | /src/analysis/calculus/mean_value.lean | fd325bf58dc9338ea9f15e96a26450172c7faa94 | [
"Apache-2.0"
] | permissive | hikari0108/mathlib | b7ea2b7350497ab1a0b87a09d093ecc025a50dfa | a9e7d333b0cfd45f13a20f7b96b7d52e19fa2901 | refs/heads/master | 1,690,483,608,260 | 1,631,541,580,000 | 1,631,541,580,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 62,633 | lean | /-
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel, Yury Kudryashov
-/
import analysis.calculus.local_extr
import analysis.convex.topology
import data.complex.is_R_or_C
/-!
# The mean value inequality and equaliti... |
ad7e824c14827146e622758bedf77f102952d24c | 957a80ea22c5abb4f4670b250d55534d9db99108 | /library/init/native/anf.lean | 67029b59504abb9af01f0de42bdd054eb79954ad | [
"Apache-2.0"
] | permissive | GaloisInc/lean | aa1e64d604051e602fcf4610061314b9a37ab8cd | f1ec117a24459b59c6ff9e56a1d09d9e9e60a6c0 | refs/heads/master | 1,592,202,909,807 | 1,504,624,387,000 | 1,504,624,387,000 | 75,319,626 | 2 | 1 | Apache-2.0 | 1,539,290,164,000 | 1,480,616,104,000 | C++ | UTF-8 | Lean | false | false | 4,245 | lean | /-
Copyright (c) 2016 Jared Roesch. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jared Roesch
-/
prelude
import init.meta.format
import init.meta.expr
import init.data.string
import init.category.state
import init.native.internal
import init.native.ir
import init.na... |
d2e819fa269f8d0339684149959cb615ad1642a9 | 59aed81a2ce7741e690907fc374be338f4f88b6f | /src/math-688/lectures/lec-3.lean | e8d68642eb1eb4cc256b07aeab64cffaeb548767 | [] | no_license | agusakov/math-688-lean | c84d5e1423eb208a0281135f0214b91b30d0ef48 | 67dc27ebff55a74c6b5a1c469ba04e7981d2e550 | refs/heads/main | 1,679,699,340,788 | 1,616,602,782,000 | 1,616,602,782,000 | 332,894,454 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 3,152 | lean | /- 4 Sep 2019 -/
-- walks, trails, paths, circuits, Eulerian graphs, connected
import walks
universes u
namespace simple_graph
namespace walk
variables {V : Type u} (G : simple_graph V)
variables [decidable_eq V] {G}
def adj.to_edge {u v : V} (h : G.adj u v) : sym2 V := ⟦(u, v)⟧
/-- The edge set of a walk is the ... |
f591f2fd2bdc4f9be94c5f2a213638ddb5361f04 | 4bcaca5dc83d49803f72b7b5920b75b6e7d9de2d | /src/Init/Control/Lawful.lean | 8f52d91d2fd9392266767f72068c1816206cc392 | [
"Apache-2.0"
] | permissive | subfish-zhou/leanprover-zh_CN.github.io | 30b9fba9bd790720bd95764e61ae796697d2f603 | 8b2985d4a3d458ceda9361ac454c28168d920d3f | refs/heads/master | 1,689,709,967,820 | 1,632,503,056,000 | 1,632,503,056,000 | 409,962,097 | 1 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 14,467 | lean | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sebastian Ullrich, Leonardo de Moura
-/
prelude
import Init.SimpLemmas
import Init.Control.Except
import Init.Control.StateRef
open Function
@[simp] theorem monadLift_self [Mo... |
16b61818308332131d6859f0bcad2c9c2c521a09 | 4727251e0cd73359b15b664c3170e5d754078599 | /src/order/zorn.lean | 2804ab41623b071f71fc37d711a06e1360af0631 | [
"Apache-2.0"
] | permissive | Vierkantor/mathlib | 0ea59ac32a3a43c93c44d70f441c4ee810ccceca | 83bc3b9ce9b13910b57bda6b56222495ebd31c2f | refs/heads/master | 1,658,323,012,449 | 1,652,256,003,000 | 1,652,256,003,000 | 209,296,341 | 0 | 1 | Apache-2.0 | 1,568,807,655,000 | 1,568,807,655,000 | null | UTF-8 | Lean | false | false | 8,497 | lean | /-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-/
import order.chain
/-!
# Zorn's lemmas
This file proves several formulations of Zorn's Lemma.
## Variants
The primary statement of Zorn's lemma is `exists_maximal... |
30776704abe9c3a31e16e1f94c4f3feaf276005e | b70031c8e2c5337b91d7e70f1e0c5f528f7b0e77 | /src/algebra/big_operators/finsupp.lean | d085bb82782dad9c12c4f253402936a2066ccc16 | [
"Apache-2.0"
] | permissive | molodiuc/mathlib | cae2ba3ef1601c1f42ca0b625c79b061b63fef5b | 98ebe5a6739fbe254f9ee9d401882d4388f91035 | refs/heads/master | 1,674,237,127,059 | 1,606,353,533,000 | 1,606,353,533,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,246 | lean | /-
Copyright (c) 2020 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import algebra.big_operators.pi
import data.finsupp
/-!
# Big operators for finsupps
This file contains theorems relevant to big operators in finitely supported functions.
-... |
69b463de6945bcb51ecd5d20c17f522d565df1c2 | 12dabd587ce2621d9a4eff9f16e354d02e206c8e | /world01/level01.lean | 650101afa3b67ccde865b92d4f3f26d54d99746e | [] | no_license | abdelq/natural-number-game | a1b5b8f1d52625a7addcefc97c966d3f06a48263 | bbddadc6d2e78ece2e9acd40fa7702ecc2db75c2 | refs/heads/master | 1,668,606,478,691 | 1,594,175,058,000 | 1,594,175,058,000 | 278,673,209 | 0 | 1 | null | null | null | null | UTF-8 | Lean | false | false | 133 | lean | import mynat.definition
import mynat.add
import mynat.mul
lemma example1 (x y z : mynat) : x * y + z = x * y + z :=
begin
refl,
end
|
6ea50511262d5eeaf564ad3d4848c4f59d6ecfb4 | 367134ba5a65885e863bdc4507601606690974c1 | /test/induction.lean | c0796f20c496cd4924b3c3987d5ad0c7aef93ba2 | [
"Apache-2.0"
] | permissive | kodyvajjha/mathlib | 9bead00e90f68269a313f45f5561766cfd8d5cad | b98af5dd79e13a38d84438b850a2e8858ec21284 | refs/heads/master | 1,624,350,366,310 | 1,615,563,062,000 | 1,615,563,062,000 | 162,666,963 | 0 | 0 | Apache-2.0 | 1,545,367,651,000 | 1,545,367,651,000 | null | UTF-8 | Lean | false | false | 32,681 | lean | import tactic.induction
import tactic.linarith
universes u v w
--------------------------------------------------------------------------------
-- Setup: Some Inductive Types
--------------------------------------------------------------------------------
inductive le : ℕ → ℕ → Type
| zero {n} : le 0 n
| succ {n m} ... |
ff47b793eeaab0a7cc7ac8fcb6ab264c26eb7b4d | a9d0fb7b0e4f802bd3857b803e6c5c23d87fef91 | /tests/lean/const.lean | db946cd178f9300db7d1f7f30d6d6c8b26b893c4 | [
"Apache-2.0"
] | permissive | soonhokong/lean-osx | 4a954262c780e404c1369d6c06516161d07fcb40 | 3670278342d2f4faa49d95b46d86642d7875b47c | refs/heads/master | 1,611,410,334,552 | 1,474,425,686,000 | 1,474,425,686,000 | 12,043,103 | 5 | 1 | null | null | null | null | UTF-8 | Lean | false | false | 299 | lean | --
universe variables u
definition foo {A : Type u} [H : inhabited A] : A :=
inhabited.rec (λa, a) H
constant bla {A : Type u} [H : inhabited A] : Type 1
set_option pp.implicit true
section
variable A : Type u
variable S : inhabited A
variable B : @bla A S
check B
check @foo A S
end
|
646996f81cbfb138a6f09bd0b96ff43a57bf1c05 | aa5a655c05e5359a70646b7154e7cac59f0b4132 | /tests/lean/run/struct3.lean | 28e227373bcfcf202391def4f7b81f0f26c540b6 | [
"Apache-2.0"
] | permissive | lambdaxymox/lean4 | ae943c960a42247e06eff25c35338268d07454cb | 278d47c77270664ef29715faab467feac8a0f446 | refs/heads/master | 1,677,891,867,340 | 1,612,500,005,000 | 1,612,500,005,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,133 | lean | universes u v
class Bind2 (m : Type u → Type v) where
bind : ∀ {α β : Type u}, m α → (α → m β) → m β
class Monad2 (m : Type u → Type v) extends Applicative m, Bind2 m : Type (max (u+1) v) where
map := fun f x => Bind2.bind x (pure ∘ f)
seq := fun f x => Bind2.bind f fun y => Functor.map y x
seqLeft ... |
cba464a631cfcbb04ed37c1d703ad36a1c51d313 | 968e2f50b755d3048175f176376eff7139e9df70 | /examples/prop_logic_theory/unnamed_508.lean | 2d56b63274a590208020830cd6ce1cdb2eea958e | [] | no_license | gihanmarasingha/mth1001_sphinx | 190a003269ba5e54717b448302a27ca26e31d491 | 05126586cbf5786e521be1ea2ef5b4ba3c44e74a | refs/heads/master | 1,672,913,933,677 | 1,604,516,583,000 | 1,604,516,583,000 | 309,245,750 | 1 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 240 | lean | variables p q : Prop
-- BEGIN
example (h : p ∧ q) : q :=
begin
have h₂ : q, from h.right, -- We have `h₂ : q` by right and elimination on `h`.
exact h₂, -- The result follows by reiteration on `h₂`.
end
-- END |
a7af6e8c972578f0ed9a4ffc8d38872843e45ee0 | baee66b4ec736ac53d31be2288b426225753edd4 | /lean-project/src/UTxO_Types.lean | bc08587bc23d40029530cc8417c808fbdde3a240 | [] | no_license | jvap2/EUTXO-Lean | 8c909a15aefb70bb0c7ba25ddf081ab4a5419e4d | c3fbfc33622b865b52d4cdc46198da1404304354 | refs/heads/main | 1,688,331,241,458 | 1,627,747,120,000 | 1,627,747,120,000 | 392,048,140 | 0 | 0 | null | 1,627,927,548,000 | 1,627,927,547,000 | null | UTF-8 | Lean | false | false | 273 | lean | import tactic
def HashId : Type := sorry
-- Output references.
structure TxOutputRef : Type :=
(hid : HashId) -- the index of a previous transaction to which this input refers
(index : ℕ) -- indicates which of the referred transaction's outputs should be spent |
b6c2fb2c5db9fdb7420b09a01e64c942a1fb7b85 | 367134ba5a65885e863bdc4507601606690974c1 | /src/algebra/ordered_pi.lean | 0c40783c05bf189ebf04b173790a8e4724499ee8 | [
"Apache-2.0"
] | permissive | kodyvajjha/mathlib | 9bead00e90f68269a313f45f5561766cfd8d5cad | b98af5dd79e13a38d84438b850a2e8858ec21284 | refs/heads/master | 1,624,350,366,310 | 1,615,563,062,000 | 1,615,563,062,000 | 162,666,963 | 0 | 0 | Apache-2.0 | 1,545,367,651,000 | 1,545,367,651,000 | null | UTF-8 | Lean | false | false | 1,101 | lean | /-
Copyright (c) 2018 Simon Hudon. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Patrick Massot
-/
import algebra.group.pi
import algebra.ordered_group
import tactic.pi_instances
/-!
# Pi instances for ordered groups and monoids
This file defines instanc... |
612c477a63cc375f5dffe6f1db8a34c1a4c2365e | 69d4931b605e11ca61881fc4f66db50a0a875e39 | /src/group_theory/perm/sign.lean | da570df84459a202739187f37ab4f262432a73df | [
"Apache-2.0"
] | permissive | abentkamp/mathlib | d9a75d291ec09f4637b0f30cc3880ffb07549ee5 | 5360e476391508e092b5a1e5210bd0ed22dc0755 | refs/heads/master | 1,682,382,954,948 | 1,622,106,077,000 | 1,622,106,077,000 | 149,285,665 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 31,134 | lean | /-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import data.fintype.basic
import data.finset.sort
import data.nat.parity
import group_theory.perm.support
import group_theory.order_of_element
import tactic.norm_swap
imp... |
d3a0c0d2a3f295572cc0e1760f085bc5e92bc774 | 4727251e0cd73359b15b664c3170e5d754078599 | /src/topology/paracompact.lean | 5484ec7d20727005f39cedf0fac6f65a284891bd | [
"Apache-2.0"
] | permissive | Vierkantor/mathlib | 0ea59ac32a3a43c93c44d70f441c4ee810ccceca | 83bc3b9ce9b13910b57bda6b56222495ebd31c2f | refs/heads/master | 1,658,323,012,449 | 1,652,256,003,000 | 1,652,256,003,000 | 209,296,341 | 0 | 1 | Apache-2.0 | 1,568,807,655,000 | 1,568,807,655,000 | null | UTF-8 | Lean | false | false | 15,260 | lean | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Reid Barton, Yury Kudryashov
-/
import topology.subset_properties
import topology.separation
import data.option.basic
/-!
# Paracompact topological spaces
A topological space `X` is... |
0e825c63a929f320a0a6bf84a6f77d43f3da35e9 | ed27983dd289b3bcad416f0b1927105d6ef19db8 | /src/inClassNotes/typeclasses/algebra.lean | b2098b6da456a92bfbd4185612315cc6cb9cb0ed | [] | no_license | liuxin-James/complogic-s21 | 0d55b76dbe25024473d31d98b5b83655c365f811 | 13e03e0114626643b44015c654151fb651603486 | refs/heads/master | 1,681,109,264,463 | 1,618,848,261,000 | 1,618,848,261,000 | 337,599,491 | 0 | 0 | null | 1,613,141,619,000 | 1,612,925,555,000 | null | UTF-8 | Lean | false | false | 7,573 | lean | /-
Using typeclasses to formalize basic algebraic structures,
including notably the "rules" defining such structures.
-/
namespace alg
universe u
/-
Typeclasses extends hierarchy modeling algebraic hierarchy
-/
@[class]
structure has_zero (α : Type u) :=
(zero : α)
@[class]
structure has_one (α : Type u) :=
(one... |
ad5ee779de58f536488eba2241dfdfe08688c415 | 6432ea7a083ff6ba21ea17af9ee47b9c371760f7 | /tests/lean/moduleDoc.lean | fb431ffc56dcd480faf5195c589d8928b4baee82 | [
"Apache-2.0",
"LLVM-exception",
"NCSA",
"LGPL-3.0-only",
"LicenseRef-scancode-inner-net-2.0",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"Spencer-94",
"LGPL-2.1-or-later",
"HPND",
"LicenseRef-scancode-pcre",
"ISC",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"SunPro",
"CMU-Mach"... | permissive | leanprover/lean4 | 4bdf9790294964627eb9be79f5e8f6157780b4cc | f1f9dc0f2f531af3312398999d8b8303fa5f096b | refs/heads/master | 1,693,360,665,786 | 1,693,350,868,000 | 1,693,350,868,000 | 129,571,436 | 2,827 | 311 | Apache-2.0 | 1,694,716,156,000 | 1,523,760,560,000 | Lean | UTF-8 | Lean | false | false | 514 | lean | import Lean
/-! Testing module documentation. -/
open Lean
def tst : MetaM Unit := do
let docs := getMainModuleDoc (← getEnv)
IO.println <| docs.toList.map λ d => repr d.doc
def printDoc (moduleName : Name) : MetaM Unit := do
match getModuleDoc? (← getEnv) moduleName with
| some docs => IO.println <| docs.t... |
129fe6818ba4c837f6742b33e83464762dc7c0df | 4d2583807a5ac6caaffd3d7a5f646d61ca85d532 | /src/topology/uniform_space/uniform_embedding.lean | 49e48deb91157c7c2a28332db916190027242b74 | [
"Apache-2.0"
] | permissive | AntoineChambert-Loir/mathlib | 64aabb896129885f12296a799818061bc90da1ff | 07be904260ab6e36a5769680b6012f03a4727134 | refs/heads/master | 1,693,187,631,771 | 1,636,719,886,000 | 1,636,719,886,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 23,007 | lean | /-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Sébastien Gouëzel, Patrick Massot
-/
import topology.uniform_space.cauchy
import topology.uniform_space.separation
import topology.dense_embedding
/-!
# Uniform embedd... |
b39dc76f24369b57f7b15c3ab0cccb82dcf4d06b | 5e42295de7f5bcdf224b94603a8ec29b17c2d367 | /trace_tests.lean | 32dc34abbdb6d9d17d0a6b638a73d7934efbe076 | [] | no_license | pnmadelaine/lean_polya | 9369e0d87dce773f91383bb58ac6fde0a00a1a40 | 1c62b0b3fa71044b0225ce28030627d251b08ebc | refs/heads/master | 1,590,161,172,243 | 1,515,010,019,000 | 1,515,010,019,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,137 | lean | import .control .proof_trace
open polya tactic expr
variables u v w x y z : ℚ
private lemma rat_one_gt_zero : (1 : ℚ) > 0 := zero_lt_one
local infix `^` := rat.pow
meta def polya_on_hyps' (hys : list name) (rct : bool := tt) : tactic unit :=
do exps ← hys.mmap get_local,
bb ← add_proof_to_blackboard blackboard.mk... |
9393b0ef5b3869739ba06bea9f5273ef230203bc | 57c233acf9386e610d99ed20ef139c5f97504ba3 | /src/data/int/modeq.lean | 462287016c36571eefe20d10c1ebac5b20815fdc | [
"Apache-2.0"
] | permissive | robertylewis/mathlib | 3d16e3e6daf5ddde182473e03a1b601d2810952c | 1d13f5b932f5e40a8308e3840f96fc882fae01f0 | refs/heads/master | 1,651,379,945,369 | 1,644,276,960,000 | 1,644,276,960,000 | 98,875,504 | 0 | 0 | Apache-2.0 | 1,644,253,514,000 | 1,501,495,700,000 | Lean | UTF-8 | Lean | false | false | 7,487 | lean | /-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import data.nat.modeq
import tactic.ring
/-!
# Congruences modulo an integer
This file defines the equivalence relation `a ≡ b [ZMOD n]` on the integers, similarly to ... |
819101dcf87d390e7e4253f42e46b67a2907944b | 88fb7558b0636ec6b181f2a548ac11ad3919f8a5 | /library/system/io.lean | ac1d90f023679c6b34e4830224fac864e14ad79c | [
"Apache-2.0"
] | permissive | moritayasuaki/lean | 9f666c323cb6fa1f31ac597d777914aed41e3b7a | ae96ebf6ee953088c235ff7ae0e8c95066ba8001 | refs/heads/master | 1,611,135,440,814 | 1,493,852,869,000 | 1,493,852,869,000 | 90,269,903 | 0 | 0 | null | 1,493,906,291,000 | 1,493,906,291,000 | null | UTF-8 | Lean | false | false | 6,654 | lean | /-
Copyright (c) 2017 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Luke Nelson, Jared Roesch and Leonardo de Moura
-/
import data.buffer
inductive io.error
| other : string → io.error
| sys : nat → io.error
structure io.terminal (m ... |
ac9cc08516d89ffdbf4f0796c01cce215b9cdc61 | aa3f8992ef7806974bc1ffd468baa0c79f4d6643 | /library/data/prod/wf.lean | ffbda1bad001bb659e1f4d4555f006418c64f20d | [
"Apache-2.0"
] | permissive | codyroux/lean | 7f8dff750722c5382bdd0a9a9275dc4bb2c58dd3 | 0cca265db19f7296531e339192e9b9bae4a31f8b | refs/heads/master | 1,610,909,964,159 | 1,407,084,399,000 | 1,416,857,075,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 2,846 | lean | -- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Author: Leonardo de Moura
import data.prod.decl logic.wf
open well_founded
namespace prod
section
variables {A B : Type}
variable (Ra : A → A → Prop)
variable (Rb : B ... |
20f4a4b705dc47f9724bed7e3eb84d38c7fec694 | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/analysis/special_functions/gamma/beta.lean | 9a115267c346ab9e4c68294e7179acc051a239f0 | [
"Apache-2.0"
] | permissive | leanprover-community/mathlib | 56a2cadd17ac88caf4ece0a775932fa26327ba0e | 442a83d738cb208d3600056c489be16900ba701d | refs/heads/master | 1,693,584,102,358 | 1,693,471,902,000 | 1,693,471,902,000 | 97,922,418 | 1,595 | 352 | Apache-2.0 | 1,694,693,445,000 | 1,500,624,130,000 | Lean | UTF-8 | Lean | false | false | 28,753 | lean | /-
Copyright (c) 2023 David Loeffler. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: David Loeffler
-/
import analysis.convolution
import analysis.special_functions.trigonometric.euler_sine_prod
import analysis.special_functions.gamma.bohr_mollerup
import analysis.anal... |
957b5081d0eca8cc1722302521dbc0183b8f1ebd | 63abd62053d479eae5abf4951554e1064a4c45b4 | /src/category_theory/limits/shapes/types.lean | 6a230b890bf013c19018ee78d2014803a25c904e | [
"Apache-2.0"
] | permissive | Lix0120/mathlib | 0020745240315ed0e517cbf32e738d8f9811dd80 | e14c37827456fc6707f31b4d1d16f1f3a3205e91 | refs/heads/master | 1,673,102,855,024 | 1,604,151,044,000 | 1,604,151,044,000 | 308,930,245 | 0 | 0 | Apache-2.0 | 1,604,164,710,000 | 1,604,163,547,000 | null | UTF-8 | Lean | false | false | 4,259 | lean | /-
Copyright (c) 2020 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import category_theory.limits.types
import category_theory.limits.shapes.products
import category_theory.limits.shapes.binary_products
import category_theory.limits.s... |
a2871d3df4d818b4d6786bbb3b72aad6d017d52e | ce6917c5bacabee346655160b74a307b4a5ab620 | /src/ch2/ex0705.lean | 5fddcf287b4a64bdb3545c03afa7c5a9984fcb2c | [] | no_license | Ailrun/Theorem_Proving_in_Lean | ae6a23f3c54d62d401314d6a771e8ff8b4132db2 | 2eb1b5caf93c6a5a555c79e9097cf2ba5a66cf68 | refs/heads/master | 1,609,838,270,467 | 1,586,846,743,000 | 1,586,846,743,000 | 240,967,761 | 1 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 174 | lean | namespace foo
def a : ℕ := 5
def f (x : ℕ) : ℕ := x + 7
def fa : ℕ := f a
end foo
#check foo.a
#check foo.f
namespace foo
def ffa : ℕ := f (f a)
end foo
|
c6cf2cdc6a1bc9541eaf0a97d87e4aaf01379f60 | c777c32c8e484e195053731103c5e52af26a25d1 | /src/measure_theory/function/continuous_map_dense.lean | f0d835f76c07614b1c7cbae5d44caa5c2b7cd226 | [
"Apache-2.0"
] | permissive | kbuzzard/mathlib | 2ff9e85dfe2a46f4b291927f983afec17e946eb8 | 58537299e922f9c77df76cb613910914a479c1f7 | refs/heads/master | 1,685,313,702,744 | 1,683,974,212,000 | 1,683,974,212,000 | 128,185,277 | 1 | 0 | null | 1,522,920,600,000 | 1,522,920,600,000 | null | UTF-8 | Lean | false | false | 20,599 | lean | /-
Copyright (c) 2021 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-/
import measure_theory.measure.regular
import measure_theory.function.simple_func_dense_lp
import topology.urysohns_lemma
import measure_theory.integral.bochner
/-... |
2dd97c049593c7ea019e0559d6f5780abadd8586 | 6432ea7a083ff6ba21ea17af9ee47b9c371760f7 | /tests/lean/run/meta7.lean | 4f0b917ae8a4aa749c98b52c6410538426e6d27b | [
"Apache-2.0",
"LLVM-exception",
"NCSA",
"LGPL-3.0-only",
"LicenseRef-scancode-inner-net-2.0",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"Spencer-94",
"LGPL-2.1-or-later",
"HPND",
"LicenseRef-scancode-pcre",
"ISC",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"SunPro",
"CMU-Mach"... | permissive | leanprover/lean4 | 4bdf9790294964627eb9be79f5e8f6157780b4cc | f1f9dc0f2f531af3312398999d8b8303fa5f096b | refs/heads/master | 1,693,360,665,786 | 1,693,350,868,000 | 1,693,350,868,000 | 129,571,436 | 2,827 | 311 | Apache-2.0 | 1,694,716,156,000 | 1,523,760,560,000 | Lean | UTF-8 | Lean | false | false | 5,383 | lean | import Lean.Meta
open Lean
open Lean.Meta
partial def fact : Nat → Nat
| 0 => 1
| n+1 => (n+1)*fact n
set_option trace.Meta.debug true
set_option trace.Meta.check false
def print (msg : MessageData) : MetaM Unit := do
trace[Meta.debug] msg
def checkM (x : MetaM Bool) : MetaM Unit :=
unless (← x) do throwError "c... |
2c2d3de27e499289f5fb50f76ea3c39abffed6e1 | 367134ba5a65885e863bdc4507601606690974c1 | /src/linear_algebra/special_linear_group.lean | 930885216c84bafe034561fc85117fac3d6f83fb | [
"Apache-2.0"
] | permissive | kodyvajjha/mathlib | 9bead00e90f68269a313f45f5561766cfd8d5cad | b98af5dd79e13a38d84438b850a2e8858ec21284 | refs/heads/master | 1,624,350,366,310 | 1,615,563,062,000 | 1,615,563,062,000 | 162,666,963 | 0 | 0 | Apache-2.0 | 1,545,367,651,000 | 1,545,367,651,000 | null | UTF-8 | Lean | false | false | 5,726 | lean | /-
Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Anne Baanen.
The Special Linear group $SL(n, R)$
-/
import linear_algebra.matrix
import linear_algebra.nonsingular_inverse
/-!
# The Special Linear group $SL(n, R)$
This file de... |
ad3451a40bef6407ca42a87e94017a69c8fb8baf | f3849be5d845a1cb97680f0bbbe03b85518312f0 | /library/tools/super/clausifier.lean | 7fa31b49aff91e5d50e2c48455e6138ceecc1705 | [
"Apache-2.0"
] | permissive | bjoeris/lean | 0ed95125d762b17bfcb54dad1f9721f953f92eeb | 4e496b78d5e73545fa4f9a807155113d8e6b0561 | refs/heads/master | 1,611,251,218,281 | 1,495,337,658,000 | 1,495,337,658,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 10,784 | lean | /-
Copyright (c) 2016 Gabriel Ebner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner
-/
import .clause .clause_ops
import .prover_state .misc_preprocessing
open expr list tactic monad decidable
universe u
namespace super
meta def try_option {a : Type u}... |
96285724115690225d2dfeb5828f2a1bfae7116b | 96338d06deb5f54f351493a71d6ecf6c546089a2 | /priv/Lean/TypeEqu.lean | e49abaa1da439e864cc3e5095883698480cde09a | [] | no_license | silky/exe | 5f9e4eea772d74852a1a2fac57d8d20588282d2b | e81690d6e16f2a83c105cce446011af6ae905b81 | refs/heads/master | 1,609,385,766,412 | 1,472,164,223,000 | 1,472,164,223,000 | 66,610,224 | 1 | 0 | null | 1,472,178,919,000 | 1,472,178,919,000 | null | UTF-8 | Lean | false | false | 1,791 | lean | /- TypeEqu -/
import Setoid
set_option pp.universes true
set_option pp.metavar_args false
universe variable u
universe variable v
definition idd (A : Type.{u}) (a : A) : A := a
definition TypeEqu (T1 T2 : Type.{u}) : Type :=
(Π (P : Π (t1 t2 : Type.{u}), Type.{v}),
Π (refl : Π (t : Type.{u}), P t t),
... |
ddffc91926e1baac60493f8ccf76e5bc86a80f92 | 83c8119e3298c0bfc53fc195c41a6afb63d01513 | /library/init/data/nat/lemmas.lean | 37c6acaf34e10f50b94911940a7c8d7c7862b491 | [
"Apache-2.0"
] | permissive | anfelor/lean | 584b91c4e87a6d95f7630c2a93fb082a87319ed0 | 31cfc2b6bf7d674f3d0f73848b842c9c9869c9f1 | refs/heads/master | 1,610,067,141,310 | 1,585,992,232,000 | 1,585,992,232,000 | 251,683,543 | 0 | 0 | Apache-2.0 | 1,585,676,570,000 | 1,585,676,569,000 | null | UTF-8 | Lean | false | false | 49,471 | lean | /-
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jeremy Avigad
-/
prelude
import init.data.nat.basic init.data.nat.div init.meta init.algebra.functions
universes u
namespace nat
attribute [pre_smt] nat_zero... |
63984d1c1f47cab3271f135034bff17d1a85bad4 | 6432ea7a083ff6ba21ea17af9ee47b9c371760f7 | /tests/lean/1719.lean | c66e24f2bb7009353da89d6347353b6fae318f5c | [
"Apache-2.0",
"LLVM-exception",
"NCSA",
"LGPL-3.0-only",
"LicenseRef-scancode-inner-net-2.0",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"Spencer-94",
"LGPL-2.1-or-later",
"HPND",
"LicenseRef-scancode-pcre",
"ISC",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"SunPro",
"CMU-Mach"... | permissive | leanprover/lean4 | 4bdf9790294964627eb9be79f5e8f6157780b4cc | f1f9dc0f2f531af3312398999d8b8303fa5f096b | refs/heads/master | 1,693,360,665,786 | 1,693,350,868,000 | 1,693,350,868,000 | 129,571,436 | 2,827 | 311 | Apache-2.0 | 1,694,716,156,000 | 1,523,760,560,000 | Lean | UTF-8 | Lean | false | false | 45 | lean | example (h : P) : P ∨ Q := by
apply .inl
|
0802e89f12111b54e601da9a6f77536e0c3a0455 | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/tactic/print_sorry.lean | d2e6421a396a94de022fda30c138308406d560ca | [
"Apache-2.0"
] | permissive | leanprover-community/mathlib | 56a2cadd17ac88caf4ece0a775932fa26327ba0e | 442a83d738cb208d3600056c489be16900ba701d | refs/heads/master | 1,693,584,102,358 | 1,693,471,902,000 | 1,693,471,902,000 | 97,922,418 | 1,595 | 352 | Apache-2.0 | 1,694,693,445,000 | 1,500,624,130,000 | Lean | UTF-8 | Lean | false | false | 4,854 | lean | /-
Copyright (c) 2022 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
-/
import tactic.core
import data.bool.basic
/-!
# Print sorry
Adds a command `#print_sorry_in nm` that prints all occurrences of `sorry` in declarations used in
`... |
769135e7a7619a6ef37389ebe7113c1844eb5c83 | 9b9a16fa2cb737daee6b2785474678b6fa91d6d4 | /src/topology/algebra/infinite_sum.lean | 790c5acb88e8b6e514f5a08b07aaa4535fe5bde4 | [
"Apache-2.0"
] | permissive | johoelzl/mathlib | 253f46daa30b644d011e8e119025b01ad69735c4 | 592e3c7a2dfbd5826919b4605559d35d4d75938f | refs/heads/master | 1,625,657,216,488 | 1,551,374,946,000 | 1,551,374,946,000 | 98,915,829 | 0 | 0 | Apache-2.0 | 1,522,917,267,000 | 1,501,524,499,000 | Lean | UTF-8 | Lean | false | false | 22,967 | lean | /-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
Infinite sum over a topological monoid
This sum is known as unconditionally convergent, as it sums to the same value under all possible
permutations. For Euclidean spa... |
c70422de45eecf3188c973fc68eea03ee4524c47 | d406927ab5617694ec9ea7001f101b7c9e3d9702 | /src/data/nat/units.lean | 5924e596e8356535e1a6d822b3930f68af525f2b | [
"Apache-2.0"
] | permissive | alreadydone/mathlib | dc0be621c6c8208c581f5170a8216c5ba6721927 | c982179ec21091d3e102d8a5d9f5fe06c8fafb73 | refs/heads/master | 1,685,523,275,196 | 1,670,184,141,000 | 1,670,184,141,000 | 287,574,545 | 0 | 0 | Apache-2.0 | 1,670,290,714,000 | 1,597,421,623,000 | Lean | UTF-8 | Lean | false | false | 1,170 | lean | /-
Copyright (c) 2014 Floris van Doorn (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn, Leonardo de Moura, Jeremy Avigad, Mario Carneiro
-/
import data.nat.basic
import algebra.group.units
/-! # The units of the natural ... |
ff87ade372fe764e4b01edd6283eece8fd0b1a29 | 5e3548e65f2c037cb94cd5524c90c623fbd6d46a | /src_icannos_totilas/aops/1993-USAMO-Problem_3.lean | cc5f0c0e99e8ce9ac086b5197dc4ace247379c47 | [] | no_license | ahayat16/lean_exos | d4f08c30adb601a06511a71b5ffb4d22d12ef77f | 682f2552d5b04a8c8eb9e4ab15f875a91b03845c | refs/heads/main | 1,693,101,073,585 | 1,636,479,336,000 | 1,636,479,336,000 | 415,000,441 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 508 | lean | import data.real.basic
import data.set.intervals.unordered_interval
theorem USAMO_Problem_3_1993 (f : ℝ -> ℝ) [f ≥ 0] [f(1) = 1]:
(∀ x y : ℝ, (x ∈ (set.interval (0 : ℝ) (1: ℝ)) ∧ y ∈ (set.interval (0 : ℝ) (1: ℝ))) →
x+y ∈ (set.interval (0 : ℝ) (1: ℝ)) → f(x) + f(y) ≤ f(x+y)) →
(∀ x : ℝ, x ∈ (set.interval (0 : ℝ) (... |
4196d9d567ee6f1ad3c010787b12a5408beffe03 | 82b86ba2ae0d5aed0f01f49c46db5afec0eb2bd7 | /tests/lean/run/newfrontend1.lean | 3b6a4610f867bcc05d031efd793919736971ef2f | [
"Apache-2.0"
] | permissive | banksonian/lean4 | 3a2e6b0f1eb63aa56ff95b8d07b2f851072d54dc | 78da6b3aa2840693eea354a41e89fc5b212a5011 | refs/heads/master | 1,673,703,624,165 | 1,605,123,551,000 | 1,605,123,551,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 7,709 | lean | def x := 1
#check x
variables {α : Type}
def f (a : α) : α :=
a
def tst (xs : List Nat) : Nat :=
xs.foldl (init := 10) (· + ·)
#check tst [1, 2, 3]
#check fun x y : Nat => x + y
#check tst
#check (fun stx => if True then let e := stx; Pure.pure e else Pure.pure stx : Nat → Id Nat)
#check let x : Nat := 1; x
d... |
06da6856db39a6f1d6b6462ff5fff6a6a4d3a3f1 | 735bb6d9c54e20a6bdc031c27bff1717e68886b9 | /algebra/group.lean | 20f7d6677676d227191e44c8baf6b848910b90c2 | [] | no_license | digama0/library_dev | 3ea441564c4d7eca54a562b701febaa4db6a1061 | 56520d5d1dda46d87c98bf3acdf850672fdab00f | refs/heads/master | 1,611,047,574,219 | 1,500,469,648,000 | 1,500,469,648,000 | 87,738,883 | 0 | 0 | null | 1,491,771,880,000 | 1,491,771,879,000 | null | UTF-8 | Lean | false | false | 7,306 | lean | /-
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad, Leonardo de Moura
Various multiplicative and additive structures.
-/
universe variable uu
variable {A : Type uu}
section group
variable [group A]
variable (A)
t... |
a43d1f9af68d3dcf4bbdada4546bdd998586a95d | 80cc5bf14c8ea85ff340d1d747a127dcadeb966f | /src/topology/metric_space/isometry.lean | 3d5da1bc6c23f7799a209f1abb2762252849aaaa | [
"Apache-2.0"
] | permissive | lacker/mathlib | f2439c743c4f8eb413ec589430c82d0f73b2d539 | ddf7563ac69d42cfa4a1bfe41db1fed521bd795f | refs/heads/master | 1,671,948,326,773 | 1,601,479,268,000 | 1,601,479,268,000 | 298,686,743 | 0 | 0 | Apache-2.0 | 1,601,070,794,000 | 1,601,070,794,000 | null | UTF-8 | Lean | false | false | 16,622 | lean | /-
Copyright (c) 2018 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Isometries of emetric and metric spaces
Authors: Sébastien Gouëzel
-/
import topology.bounded_continuous_function
import topology.compacts
/-!
# Isometries
We define isometries, i.e., maps... |
9dbdab4b719d991859fe979af735c59b76bdd378 | 853df553b1d6ca524e3f0a79aedd32dde5d27ec3 | /src/data/opposite.lean | f960c6f18b3e0a509479c53355d4623c705988ca | [
"Apache-2.0"
] | permissive | DanielFabian/mathlib | efc3a50b5dde303c59eeb6353ef4c35a345d7112 | f520d07eba0c852e96fe26da71d85bf6d40fcc2a | refs/heads/master | 1,668,739,922,971 | 1,595,201,756,000 | 1,595,201,756,000 | 279,469,476 | 0 | 0 | null | 1,594,696,604,000 | 1,594,696,604,000 | null | UTF-8 | Lean | false | false | 3,987 | lean | /-
Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Reid Barton, Simon Hudon, Kenny Lau
Opposites.
-/
import data.equiv.basic
universes v u -- declare the `v` first; see `category_theory.category` for an explanation
va... |
0bb09fd80455fd1b96caa6a2dc29ae07c80030d8 | 624f6f2ae8b3b1adc5f8f67a365c51d5126be45a | /tests/lean/run/reduce1.lean | 398f226bf92e08222de7bf8ae8a87fe5f12e5091 | [
"Apache-2.0"
] | permissive | mhuisi/lean4 | 28d35a4febc2e251c7f05492e13f3b05d6f9b7af | dda44bc47f3e5d024508060dac2bcb59fd12e4c0 | refs/heads/master | 1,621,225,489,283 | 1,585,142,689,000 | 1,585,142,689,000 | 250,590,438 | 0 | 2 | Apache-2.0 | 1,602,443,220,000 | 1,585,327,814,000 | C | UTF-8 | Lean | false | false | 1,471 | lean | def fact : Nat → Nat
| 0 => 1
| (n+1) => (n+1)*fact n
#eval fact 10
#eval fact 100
new_frontend
theorem tst1 : fact 10 = 3628800 :=
nativeRefl! (fact 10)
theorem tst2 : fact 100 = 933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168... |
88fa345e2041c0dc0526c5ff812afcedbbe3c33f | 35677d2df3f081738fa6b08138e03ee36bc33cad | /src/topology/metric_space/lipschitz.lean | 703c63948b4990429e77a1fab8aebc8bb70e02c7 | [
"Apache-2.0"
] | permissive | gebner/mathlib | eab0150cc4f79ec45d2016a8c21750244a2e7ff0 | cc6a6edc397c55118df62831e23bfbd6e6c6b4ab | refs/heads/master | 1,625,574,853,976 | 1,586,712,827,000 | 1,586,712,827,000 | 99,101,412 | 1 | 0 | Apache-2.0 | 1,586,716,389,000 | 1,501,667,958,000 | Lean | UTF-8 | Lean | false | false | 11,659 | lean | /-
Copyright (c) 2018 Rohan Mitta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
-/
import topology.metric_space.basic
import category_theory.endomorphism category_theory.types
/-!
# Lipschi... |
e6564067a19c208a2cecc5ad0ead4e07846382a0 | 74d9d5f45c6ce5c4f2faf215c04a68eab55fe525 | /src/differentiability/norm.lean | 16d518dac46df7fc64b48df8d7a5087cba4a0059 | [] | no_license | joshpoll/differential_geometry | 290bb8a934ca3b3b6b707d810e6d4b941710b710 | 57e00a7e37b7c4c73c847429171ff63d3a48def5 | refs/heads/master | 1,584,551,626,391 | 1,527,747,643,000 | 1,527,747,643,000 | 135,014,993 | 1 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 11,596 | lean | -- From Patrick Massot
import analysis.real
import linear_algebra.prod_module
noncomputable theory
local notation f `→_{`:50 a `}`:0 b := filter.tendsto f (nhds a) (nhds b)
class normed_group (α : Type*) extends add_comm_group α, metric_space α :=
(norm : α → ℝ)
(dist_eq : ∀ x y, dist x y = norm (x - y))
def norm... |
ed57cd219b5ede982e75790f4bb16d260c2988bd | e151e9053bfd6d71740066474fc500a087837323 | /src/hott/types/nat/order.lean | 48d29c85a371a11571bf21c1c2535f597b82f27d | [
"Apache-2.0"
] | permissive | daniel-carranza/hott3 | 15bac2d90589dbb952ef15e74b2837722491963d | 913811e8a1371d3a5751d7d32ff9dec8aa6815d9 | refs/heads/master | 1,610,091,349,670 | 1,596,222,336,000 | 1,596,222,336,000 | 241,957,822 | 0 | 0 | Apache-2.0 | 1,582,222,839,000 | 1,582,222,838,000 | null | UTF-8 | Lean | false | false | 28,350 | lean | /-
Copyright (c) 2014 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn, Leonardo de Moura, Jeremy Avigad
The order relation on the natural numbers.
-/
import .basic ...algebra.ordered_ring
universes u v w
hott_theory
namespace hott
ope... |
d4e7b9a1e89a3d9651f1130f618fca725934a3da | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/linear_algebra/affine_space/combination_auto.lean | 4efb5d61f409b9bfaf47e86c365a4ab8e43a8172 | [] | no_license | AurelienSaue/Mathlib4_auto | f538cfd0980f65a6361eadea39e6fc639e9dae14 | 590df64109b08190abe22358fabc3eae000943f2 | refs/heads/master | 1,683,906,849,776 | 1,622,564,669,000 | 1,622,564,669,000 | 371,723,747 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 31,310 | lean | /-
Copyright (c) 2020 Joseph Myers. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Joseph Myers.
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.algebra.invertible
import Mathlib.data.indicator_function
import Mathlib.linear_algebra.affine_... |
e5d1ab59c8a4d5f7af20aadf88091a0ced7b13c5 | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/algebraic_geometry/locally_ringed_space/has_colimits.lean | a25dffcdd9fc32caa698d316728617fa920dc498 | [
"Apache-2.0"
] | permissive | leanprover-community/mathlib | 56a2cadd17ac88caf4ece0a775932fa26327ba0e | 442a83d738cb208d3600056c489be16900ba701d | refs/heads/master | 1,693,584,102,358 | 1,693,471,902,000 | 1,693,471,902,000 | 97,922,418 | 1,595 | 352 | Apache-2.0 | 1,694,693,445,000 | 1,500,624,130,000 | Lean | UTF-8 | Lean | false | false | 13,079 | lean | /-
Copyright (c) 2021 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
import algebraic_geometry.locally_ringed_space
import algebra.category.Ring.constructions
import algebraic_geometry.open_immersion.basic
import category_theory.limits.const... |
e6cb361b0062544798bdb2fa60a918a35da65e51 | aa5a655c05e5359a70646b7154e7cac59f0b4132 | /src/Lean/Meta/Tactic/Simp/Types.lean | e260b92b244a208e5222f99c2119e1d7367faa39 | [
"Apache-2.0"
] | permissive | lambdaxymox/lean4 | ae943c960a42247e06eff25c35338268d07454cb | 278d47c77270664ef29715faab467feac8a0f446 | refs/heads/master | 1,677,891,867,340 | 1,612,500,005,000 | 1,612,500,005,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,946 | lean | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Lean.Meta.AppBuilder
import Lean.Meta.Tactic.Simp.SimpLemmas
namespace Lean.Meta
namespace Simp
structure Result where
expr : Expr
proof? : O... |
c0900f1c9ac7db0c459d7543761b5579b409497b | cf39355caa609c0f33405126beee2739aa3cb77e | /tests/lean/run/new_elab2.lean | fc6d040e57604567338cd2e16f8aded86fce3e9d | [
"Apache-2.0"
] | permissive | leanprover-community/lean | 12b87f69d92e614daea8bcc9d4de9a9ace089d0e | cce7990ea86a78bdb383e38ed7f9b5ba93c60ce0 | refs/heads/master | 1,687,508,156,644 | 1,684,951,104,000 | 1,684,951,104,000 | 169,960,991 | 457 | 107 | Apache-2.0 | 1,686,744,372,000 | 1,549,790,268,000 | C++ | UTF-8 | Lean | false | false | 76 | lean |
theorem ex {a : Prop} (H : ¬a) : a ↔ false :=
iff.intro H (false.rec a)
|
4459c754d4a7a2147940117c7e5881ccca1da136 | 4fa161becb8ce7378a709f5992a594764699e268 | /src/data/finset.lean | 5447dc25b5af292c0e57dad70aca6a58296f9b20 | [
"Apache-2.0"
] | permissive | laughinggas/mathlib | e4aa4565ae34e46e834434284cb26bd9d67bc373 | 86dcd5cda7a5017c8b3c8876c89a510a19d49aad | refs/heads/master | 1,669,496,232,688 | 1,592,831,995,000 | 1,592,831,995,000 | 274,155,979 | 0 | 0 | Apache-2.0 | 1,592,835,190,000 | 1,592,835,189,000 | null | UTF-8 | Lean | false | false | 122,817 | lean | /-
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro
-/
import data.multiset
import tactic.monotonicity
import tactic.apply
/-!
# Finite sets
-/
open multiset subtype ... |
5dd2d1f5a956e6978996a20adce3beb77a8e9352 | 31f556cdeb9239ffc2fad8f905e33987ff4feab9 | /src/Lean/Util/HasConstCache.lean | 9972fb70a2703623e2603d60a06456fe4f581fbe | [
"Apache-2.0",
"LLVM-exception",
"NCSA",
"LGPL-3.0-only",
"LicenseRef-scancode-inner-net-2.0",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"Spencer-94",
"LGPL-2.1-or-later",
"HPND",
"LicenseRef-scancode-pcre",
"ISC",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"SunPro",
"CMU-Mach"... | permissive | tobiasgrosser/lean4 | ce0fd9cca0feba1100656679bf41f0bffdbabb71 | ebdbdc10436a4d9d6b66acf78aae7a23f5bd073f | refs/heads/master | 1,673,103,412,948 | 1,664,930,501,000 | 1,664,930,501,000 | 186,870,185 | 0 | 0 | Apache-2.0 | 1,665,129,237,000 | 1,557,939,901,000 | Lean | UTF-8 | Lean | false | false | 1,500 | lean | /-
Copyright (c) 2022 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Lean.Expr
namespace Lean
structure HasConstCache (declName : Name) where
cache : HashMapImp Expr Bool := mkHashMapImp
unsafe def HasConstCache.c... |
9364626d3eaf6e2b4f273b6c93b5f0cb350d58c4 | 4d2583807a5ac6caaffd3d7a5f646d61ca85d532 | /src/linear_algebra/multilinear/basis.lean | d8e4916ab93f2cf046892b290f54578184d72556 | [
"Apache-2.0"
] | permissive | AntoineChambert-Loir/mathlib | 64aabb896129885f12296a799818061bc90da1ff | 07be904260ab6e36a5769680b6012f03a4727134 | refs/heads/master | 1,693,187,631,771 | 1,636,719,886,000 | 1,636,719,886,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 2,212 | lean | /-
Copyright (c) 2021 Joseph Myers. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Myers
-/
import linear_algebra.basis
import linear_algebra.multilinear.basic
/-!
# Multilinear maps in relation to bases.
This file proves lemmas about the action of multilinear... |
d1ced4c0518072231fe7b390f9c15548e6ac6429 | 2a70b774d16dbdf5a533432ee0ebab6838df0948 | /_target/deps/mathlib/src/data/set/function.lean | 907d0b9066b2386235337d5573baa67eae928567 | [
"Apache-2.0"
] | permissive | hjvromen/lewis | 40b035973df7c77ebf927afab7878c76d05ff758 | 105b675f73630f028ad5d890897a51b3c1146fb0 | refs/heads/master | 1,677,944,636,343 | 1,676,555,301,000 | 1,676,555,301,000 | 327,553,599 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 31,524 | lean | /-
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Jeremy Avigad, Andrew Zipperer, Haitao Zhang, Minchao Wu, Yury Kudryashov
-/
import data.set.basic
import logic.function.conjugate
/-!
# Functions over sets
## Main definitions
### Pr... |
2ceb20ab8c5d924ec6f2231746af505671094b9d | 57c233acf9386e610d99ed20ef139c5f97504ba3 | /src/category_theory/products/basic.lean | f807623a3a06089e85299d7f3f46fce5a637f08f | [
"Apache-2.0"
] | permissive | robertylewis/mathlib | 3d16e3e6daf5ddde182473e03a1b601d2810952c | 1d13f5b932f5e40a8308e3840f96fc882fae01f0 | refs/heads/master | 1,651,379,945,369 | 1,644,276,960,000 | 1,644,276,960,000 | 98,875,504 | 0 | 0 | Apache-2.0 | 1,644,253,514,000 | 1,501,495,700,000 | Lean | UTF-8 | Lean | false | false | 6,637 | lean | /-
Copyright (c) 2017 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Stephen Morgan, Scott Morrison
-/
import category_theory.eq_to_hom
/-!
# Cartesian products of categories
We define the category instance on `C × D` when `C` and `D` are categories.
... |
52b4156e3c0bf22490d2a2e202a7b76c1cc41766 | cf39355caa609c0f33405126beee2739aa3cb77e | /library/init/logic.lean | ea720de8cbe38d599101545e17e395fd40730961 | [
"Apache-2.0"
] | permissive | leanprover-community/lean | 12b87f69d92e614daea8bcc9d4de9a9ace089d0e | cce7990ea86a78bdb383e38ed7f9b5ba93c60ce0 | refs/heads/master | 1,687,508,156,644 | 1,684,951,104,000 | 1,684,951,104,000 | 169,960,991 | 457 | 107 | Apache-2.0 | 1,686,744,372,000 | 1,549,790,268,000 | C++ | UTF-8 | Lean | false | false | 38,969 | lean | /-
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Jeremy Avigad, Floris van Doorn
-/
prelude
import init.core
universes u v w
@[simp] lemma opt_param_eq (α : Sort u) (default : α) : opt_param α default = α ... |
3169649024b6e97563d0e2ab255d42958beeccd7 | aa3f8992ef7806974bc1ffd468baa0c79f4d6643 | /library/algebra/category/limit.lean | 79ad761193726f2567e19c578e4c24bf9f4f3de8 | [
"Apache-2.0"
] | permissive | codyroux/lean | 7f8dff750722c5382bdd0a9a9275dc4bb2c58dd3 | 0cca265db19f7296531e339192e9b9bae4a31f8b | refs/heads/master | 1,610,909,964,159 | 1,407,084,399,000 | 1,416,857,075,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 921 | lean | -- Copyright (c) 2014 Floris van Doorn. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Author: Floris van Doorn
import .natural_transformation
import data.sigma
open eq eq.ops category functor natural_transformation
namespace limits
--representable functor
section
... |
9f3182684d9d90f3acd35c22701bd7fc6a6809a7 | 63abd62053d479eae5abf4951554e1064a4c45b4 | /src/order/pilex.lean | 80f1d31fc06cd6f0a5783fd52f12a1bf51f3cffd | [
"Apache-2.0"
] | permissive | Lix0120/mathlib | 0020745240315ed0e517cbf32e738d8f9811dd80 | e14c37827456fc6707f31b4d1d16f1f3a3205e91 | refs/heads/master | 1,673,102,855,024 | 1,604,151,044,000 | 1,604,151,044,000 | 308,930,245 | 0 | 0 | Apache-2.0 | 1,604,164,710,000 | 1,604,163,547,000 | null | UTF-8 | Lean | false | false | 4,344 | lean | /-
Copyright (c) 2019 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import algebra.group.pi
import order.well_founded
import algebra.order_functions
variables {ι : Type*} {β : ι → Type*} (r : ι → ι → Prop)
(s : Π {i}, β i → β i → Prop)... |
e38b73098bbbad38d16aee00024eea7d48a4dbf1 | 4d2583807a5ac6caaffd3d7a5f646d61ca85d532 | /src/linear_algebra/unitary_group.lean | 8da4adaf0622e04e412980ec4f22c45a44e4f7ec | [
"Apache-2.0"
] | permissive | AntoineChambert-Loir/mathlib | 64aabb896129885f12296a799818061bc90da1ff | 07be904260ab6e36a5769680b6012f03a4727134 | refs/heads/master | 1,693,187,631,771 | 1,636,719,886,000 | 1,636,719,886,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 6,367 | lean | /-
Copyright (c) 2021 Shing Tak Lam. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Shing Tak Lam
-/
import linear_algebra.matrix.nonsingular_inverse
import linear_algebra.matrix.to_lin
import data.complex.basic
/-!
# The Unitary Group
This file defines elements of t... |
c03d44ace0dca536088264564dd52accb102da78 | a9d0fb7b0e4f802bd3857b803e6c5c23d87fef91 | /tests/lean/run/match_pattern1.lean | f6a10c87ef360b319a57c6905a5ea0d28534c7f6 | [
"Apache-2.0"
] | permissive | soonhokong/lean-osx | 4a954262c780e404c1369d6c06516161d07fcb40 | 3670278342d2f4faa49d95b46d86642d7875b47c | refs/heads/master | 1,611,410,334,552 | 1,474,425,686,000 | 1,474,425,686,000 | 12,043,103 | 5 | 1 | null | null | null | null | UTF-8 | Lean | false | false | 495 | lean | open tactic expr
set_option pp.all true
example (a b c x y : nat) (H : nat.add (nat.add x y) y = 0) : true :=
by do
a ← get_local `a, b ← get_local `b, c ← get_local `c,
nat_add : expr ← mk_const `nat.add,
p : pattern ← mk_pattern [] [a, b] (app_of_list nat_add [a, b]) [app_of_list nat_add [b, a], a, b],
t... |
b22fdb933c8b52dfdaf9de0545d7792e24562dad | fecda8e6b848337561d6467a1e30cf23176d6ad0 | /src/data/pnat/basic.lean | 7700dd379b4ac14448874a9f2af4f7c69e46d767 | [
"Apache-2.0"
] | permissive | spolu/mathlib | bacf18c3d2a561d00ecdc9413187729dd1f705ed | 480c92cdfe1cf3c2d083abded87e82162e8814f4 | refs/heads/master | 1,671,684,094,325 | 1,600,736,045,000 | 1,600,736,045,000 | 297,564,749 | 1 | 0 | null | 1,600,758,368,000 | 1,600,758,367,000 | null | UTF-8 | Lean | false | false | 18,798 | lean | /-
Copyright (c) 2017 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Mario Carneiro, Neil Strickland
-/
import data.nat.prime
/-- `ℕ+` is the type of positive natural numbers. It is defined as a subtype,
and the VM representation of `ℕ+` is the... |
4b21b90c381056aabcf9a88675fb9b09df4feb90 | dd0f5513e11c52db157d2fcc8456d9401a6cd9da | /04_Quantifiers_and_Equality.org.9.lean | ad34b696809708400b0aaa9e3d50c32fdbecb4ec | [] | no_license | cjmazey/lean-tutorial | ba559a49f82aa6c5848b9bf17b7389bf7f4ba645 | 381f61c9fcac56d01d959ae0fa6e376f2c4e3b34 | refs/heads/master | 1,610,286,098,832 | 1,447,124,923,000 | 1,447,124,923,000 | 43,082,433 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 163 | lean | /- page 51 -/
import standard
check eq.refl -- ∀ (a : ?A), a = a
check eq.symm -- ?a = ?b → ?b = ?a
check eq.trans -- ?a = ?b → ?b = ?c → ?a = ?c
|
24dd36448d4578c91798b636b72003ce865f6967 | 618003631150032a5676f229d13a079ac875ff77 | /test/examples.lean | facf1d3d86a18c2727ded3a32d1c08dc3ca213cc | [
"Apache-2.0"
] | permissive | awainverse/mathlib | 939b68c8486df66cfda64d327ad3d9165248c777 | ea76bd8f3ca0a8bf0a166a06a475b10663dec44a | refs/heads/master | 1,659,592,962,036 | 1,590,987,592,000 | 1,590,987,592,000 | 268,436,019 | 1 | 0 | Apache-2.0 | 1,590,990,500,000 | 1,590,990,500,000 | null | UTF-8 | Lean | false | false | 2,249 | lean | import tactic
/-!
## Miscellaneous examples
Please don't add further content to this file;
it too easily becomes a grab bag of forgotten arcana.
Tactics should have their own file in the `test/` directory.
Examples verifying correct behaviour of simp sets or instances
belong in `src/` near the definitions.
TODO: r... |
09ccc722904476118a6338cd63ae4af8a946aca8 | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/Lean3Lib/init/meta/expr_address_auto.lean | 1c9fc48d47cc1a079b586fde3ed5e91410688db8 | [] | no_license | AurelienSaue/Mathlib4_auto | f538cfd0980f65a6361eadea39e6fc639e9dae14 | 590df64109b08190abe22358fabc3eae000943f2 | refs/heads/master | 1,683,906,849,776 | 1,622,564,669,000 | 1,622,564,669,000 | 371,723,747 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,863 | lean | /-
Copyright (c) 2020 E.W.Ayers. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: E.W.Ayers
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.meta.expr
import Mathlib.Lean3Lib.init.data.list.basic
import Mathlib.Lean3Lib.init.data.option.basic
import Mathlib.Lean3Li... |
b60b6bfb79c012bbf85fa5d7cab10671ddc65806 | 957a80ea22c5abb4f4670b250d55534d9db99108 | /library/init/native/pass.lean | 5df2135804e5304a36338a26d3cc59180de3b777 | [
"Apache-2.0"
] | permissive | GaloisInc/lean | aa1e64d604051e602fcf4610061314b9a37ab8cd | f1ec117a24459b59c6ff9e56a1d09d9e9e60a6c0 | refs/heads/master | 1,592,202,909,807 | 1,504,624,387,000 | 1,504,624,387,000 | 75,319,626 | 2 | 1 | Apache-2.0 | 1,539,290,164,000 | 1,480,616,104,000 | C++ | UTF-8 | Lean | false | false | 1,840 | lean | /-
Copyright (c) 2016 Jared Roesch. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jared Roesch
-/
prelude
import init.meta.expr
import init.meta.format
import init.native.internal
import init.native.procedure
import init.native.config
namespace native
meta structu... |
ae6d3b3fb16d5c533d8e9d306b80cda54641d23a | e61a235b8468b03aee0120bf26ec615c045005d2 | /stage0/src/Init/Lean/Compiler/Specialize.lean | 0a1240334930062909871ee7d1dbadbac76b1d04 | [
"Apache-2.0"
] | permissive | SCKelemen/lean4 | 140dc63a80539f7c61c8e43e1c174d8500ec3230 | e10507e6615ddbef73d67b0b6c7f1e4cecdd82bc | refs/heads/master | 1,660,973,595,917 | 1,590,278,033,000 | 1,590,278,033,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 4,481 | lean | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import Init.Lean.Attributes
import Init.Lean.Compiler.Util
namespace Lean
namespace Compiler
inductive SpecializeAttributeKind
| specialize | nosp... |
952284ef32e0b6cb3aa8830e8b47c80d12f1bed9 | 5756a081670ba9c1d1d3fca7bd47cb4e31beae66 | /Mathport/Binary/EnvModification.lean | 29ae09d8fe3688fb1fa18b2bdbad1e5c8e03811c | [
"Apache-2.0"
] | permissive | leanprover-community/mathport | 2c9bdc8292168febf59799efdc5451dbf0450d4a | 13051f68064f7638970d39a8fecaede68ffbf9e1 | refs/heads/master | 1,693,841,364,079 | 1,693,813,111,000 | 1,693,813,111,000 | 379,357,010 | 27 | 10 | Apache-2.0 | 1,691,309,132,000 | 1,624,384,521,000 | Lean | UTF-8 | Lean | false | false | 3,192 | lean | /-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Daniel Selsam
-/
import Lean
import Mathport.Util.Misc
namespace Mathport.Binary
open Lean
inductive MixfixKind
| «prefix»
| «infixl»
| «infixr»
| «postfix»
| «sing... |
ba9ea044c033aaa70dba28a146f723474a0f68d3 | d642a6b1261b2cbe691e53561ac777b924751b63 | /src/topology/metric_space/gromov_hausdorff.lean | bb9cf203d6d4c0d9112b826a7ff1810ca7ab6624 | [
"Apache-2.0"
] | permissive | cipher1024/mathlib | fee56b9954e969721715e45fea8bcb95f9dc03fe | d077887141000fefa5a264e30fa57520e9f03522 | refs/heads/master | 1,651,806,490,504 | 1,573,508,694,000 | 1,573,508,694,000 | 107,216,176 | 0 | 0 | Apache-2.0 | 1,647,363,136,000 | 1,508,213,014,000 | Lean | UTF-8 | Lean | false | false | 56,020 | lean | /-
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Sébastien Gouëzel
The Gromov-Hausdorff distance on the space of nonempty compact metric spaces up to isometry.
We introduces the space of all nonempty compact metric spaces, up to ... |
8cf44eabe3772f9734505ef6cfe720d8b727a18c | 94e33a31faa76775069b071adea97e86e218a8ee | /src/order/filter/archimedean.lean | 396a2852d4ea1e5cc0d35dc5e5a447174fe86c7a | [
"Apache-2.0"
] | permissive | urkud/mathlib | eab80095e1b9f1513bfb7f25b4fa82fa4fd02989 | 6379d39e6b5b279df9715f8011369a301b634e41 | refs/heads/master | 1,658,425,342,662 | 1,658,078,703,000 | 1,658,078,703,000 | 186,910,338 | 0 | 0 | Apache-2.0 | 1,568,512,083,000 | 1,557,958,709,000 | Lean | UTF-8 | Lean | false | false | 9,813 | lean | /-
Copyright (c) 2019 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Yury Kudryashov
-/
import algebra.order.archimedean
import order.filter.at_top_bot
/-!
# `at_top` filter and archimedean (semi)rings/fields
In this file we prove that... |
64ee29e63fad18878df104293795f1ce6f34326d | 6dc0c8ce7a76229dd81e73ed4474f15f88a9e294 | /stage0/src/Std/Data/AssocList.lean | adb807b450eef04e68239b85e63f8b285172faca | [
"Apache-2.0"
] | permissive | williamdemeo/lean4 | 72161c58fe65c3ad955d6a3050bb7d37c04c0d54 | 6d00fcf1d6d873e195f9220c668ef9c58e9c4a35 | refs/heads/master | 1,678,305,356,877 | 1,614,708,995,000 | 1,614,708,995,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 3,199 | lean | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
-/
universes u v w w'
namespace Std
/- List-like type to avoid extra level of indirection -/
inductive AssocList (α : Type u) (β : Type v) where
| nil : Asso... |
b2e17296195b04b0f530fd41a45a490042f9a95c | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/topology/homotopy/product.lean | bc5ccd0df73f3d2718f9363411db551ed8635500 | [
"Apache-2.0"
] | permissive | leanprover-community/mathlib | 56a2cadd17ac88caf4ece0a775932fa26327ba0e | 442a83d738cb208d3600056c489be16900ba701d | refs/heads/master | 1,693,584,102,358 | 1,693,471,902,000 | 1,693,471,902,000 | 97,922,418 | 1,595 | 352 | Apache-2.0 | 1,694,693,445,000 | 1,500,624,130,000 | Lean | UTF-8 | Lean | false | false | 9,445 | lean | /-
Copyright (c) 2021 Praneeth Kolichala. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Praneeth Kolichala
-/
import topology.constructions
import topology.homotopy.path
/-!
# Product of homotopies
> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this fil... |
9c975428c6dc56c703a622ae9b4894a453a4537b | d1a52c3f208fa42c41df8278c3d280f075eb020c | /stage0/src/Lean/Meta/Tactic/Rewrite.lean | d04d2e6c7e321c78c03e7084df6aefb19a586369 | [
"Apache-2.0",
"LLVM-exception",
"NCSA",
"LGPL-3.0-only",
"LicenseRef-scancode-inner-net-2.0",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"Spencer-94",
"LGPL-2.1-or-later",
"HPND",
"LicenseRef-scancode-pcre",
"ISC",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"SunPro",
"CMU-Mach"... | permissive | cipher1024/lean4 | 6e1f98bb58e7a92b28f5364eb38a14c8d0aae393 | 69114d3b50806264ef35b57394391c3e738a9822 | refs/heads/master | 1,642,227,983,603 | 1,642,011,696,000 | 1,642,011,696,000 | 228,607,691 | 0 | 0 | Apache-2.0 | 1,576,584,269,000 | 1,576,584,268,000 | null | UTF-8 | Lean | false | false | 2,956 | lean | /-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Lean.Meta.AppBuilder
import Lean.Meta.MatchUtil
import Lean.Meta.KAbstract
import Lean.Meta.Check
import Lean.Meta.Tactic.Apply
namespace Lean.Meta
... |
2d82f3d3afebbedd8df89a9bae438af184a45726 | b815abf92ce063fe0d1fabf5b42da483552aa3e8 | /library/init/meta/format.lean | a6d163e887e93a323a73fdef73fd710f551adb00 | [
"Apache-2.0"
] | permissive | yodalee/lean | a368d842df12c63e9f79414ed7bbee805b9001ef | 317989bf9ef6ae1dec7488c2363dbfcdc16e0756 | refs/heads/master | 1,610,551,176,860 | 1,481,430,138,000 | 1,481,646,441,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 4,702 | lean | /-
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import init.meta.options
universe variables u v
inductive format.color
| red | green | orange | blue | pink | cyan | grey
meta constant format : ... |
4670d6498db8f52f0a1d23a48b3270545ac875f7 | 80cc5bf14c8ea85ff340d1d747a127dcadeb966f | /src/data/nat/choose/dvd.lean | ccd6b3a0332962376d24d8945c57aea638954dd1 | [
"Apache-2.0"
] | permissive | lacker/mathlib | f2439c743c4f8eb413ec589430c82d0f73b2d539 | ddf7563ac69d42cfa4a1bfe41db1fed521bd795f | refs/heads/master | 1,671,948,326,773 | 1,601,479,268,000 | 1,601,479,268,000 | 298,686,743 | 0 | 0 | Apache-2.0 | 1,601,070,794,000 | 1,601,070,794,000 | null | UTF-8 | Lean | false | false | 1,192 | lean | /-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Patrick Stevens
-/
import data.nat.choose.basic
import data.nat.prime
/-!
# Divisibility properties of binomial coefficients
-/
namespace nat
namespace prime
lemma dvd_ch... |
a4671e52d5ad844beca170cc2fb34d95c9b458e4 | dac4e6671410f506c880986cbb2212dd7f5b3dfd | /hanoi_project/TanhDoHomework.lean | f9a40efa1ed59c8c1f3ea42a75349f78a6a8d90f | [
"CC-BY-4.0"
] | permissive | thalesant/formalabstracts-2018 | e6ddfe8b3ce5c6f055ddcccf345bf55c41f850c1 | d206dfa32a6b4a84aacc3a5500a144757e6d3454 | refs/heads/master | 1,642,678,879,231 | 1,561,648,713,000 | 1,561,648,713,000 | 97,608,420 | 1 | 0 | null | 1,564,063,995,000 | 1,500,388,250,000 | Lean | UTF-8 | Lean | false | false | 1,148 | lean | --open nat int
def isPrime (n : ℕ) : Prop :=
(n ≥ 2) ∧ (∀ m: ℕ, m ≥ 1 ∧ m ∣ n → ( m = 1 ∨ m = n) )
#print isPrime
def infinite (s: set ℕ ): Prop :=
∀ n : ℕ, ∃ m ∈ s, n < m
#print infinite
theorem TwicePrimeConjecture :
infinite {n : ℕ | isPrime n → isPrime (n + 2) ∨ isPrime (n - 2)} := sorry
#print TwicePrimeC... |
cfec063284dffc46cbda130a186106d36b234189 | efa51dd2edbbbbd6c34bd0ce436415eb405832e7 | /20161026_ICTAC_Tutorial/ex37.lean | 60ec44a39f2d908977433457450bbf68d3e6c010 | [
"Apache-2.0"
] | permissive | leanprover/presentations | dd031a05bcb12c8855676c77e52ed84246bd889a | 3ce2d132d299409f1de269fa8e95afa1333d644e | refs/heads/master | 1,688,703,388,796 | 1,686,838,383,000 | 1,687,465,742,000 | 29,750,158 | 12 | 9 | Apache-2.0 | 1,540,211,670,000 | 1,422,042,683,000 | Lean | UTF-8 | Lean | false | false | 613 | lean | /- Auxiliary goals -/
section
variables p q : Prop
example (h : p ∧ q) : q ∧ p :=
have hp : p, from and.left h,
have hq : q, from and.right h,
show q ∧ p, from and.intro hq hp
example (h : p ∧ q) : q ∧ p :=
have p, from and.left h,
have q, from and.right h,
show q ∧ p, from and.intro ‹q› ‹p›
exa... |
5fbebe0a327c0ca873d9cc5d8d33a053a7b17d84 | aa2345b30d710f7e75f13157a35845ee6d48c017 | /analysis/real.lean | aa7381e4a3a5a5ad2ba1c7aadf7e41417867dc1d | [
"Apache-2.0"
] | permissive | CohenCyril/mathlib | 5241b20a3fd0ac0133e48e618a5fb7761ca7dcbe | a12d5a192f5923016752f638d19fc1a51610f163 | refs/heads/master | 1,586,031,957,957 | 1,541,432,824,000 | 1,541,432,824,000 | 156,246,337 | 0 | 0 | Apache-2.0 | 1,541,434,514,000 | 1,541,434,513,000 | null | UTF-8 | Lean | false | false | 17,440 | lean | /-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Mario Carneiro
The real numbers ℝ.
They are constructed as the topological completion of ℚ. With the following steps:
(1) prove that ℚ forms a uniform space.
(2) subt... |
0f065f9f6666f76d5bb9fb956c592bba24f7197c | d406927ab5617694ec9ea7001f101b7c9e3d9702 | /src/analysis/matrix.lean | cfe6a970c3425943a2d859d1bff7c6b104434211 | [
"Apache-2.0"
] | permissive | alreadydone/mathlib | dc0be621c6c8208c581f5170a8216c5ba6721927 | c982179ec21091d3e102d8a5d9f5fe06c8fafb73 | refs/heads/master | 1,685,523,275,196 | 1,670,184,141,000 | 1,670,184,141,000 | 287,574,545 | 0 | 0 | Apache-2.0 | 1,670,290,714,000 | 1,597,421,623,000 | Lean | UTF-8 | Lean | false | false | 20,651 | lean | /-
Copyright (c) 2021 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth, Eric Wieser
-/
import analysis.normed_space.basic
import analysis.normed_space.pi_Lp
import analysis.inner_product_space.pi_L2
/-!
# Matrices as a normed space
In t... |
857116a874c24ebe9932dadd84f1bd25df96ac52 | 63abd62053d479eae5abf4951554e1064a4c45b4 | /src/tactic/interactive.lean | 0a52c42fe763b5ca23d31c9f7612965991a7b632 | [
"Apache-2.0"
] | permissive | Lix0120/mathlib | 0020745240315ed0e517cbf32e738d8f9811dd80 | e14c37827456fc6707f31b4d1d16f1f3a3205e91 | refs/heads/master | 1,673,102,855,024 | 1,604,151,044,000 | 1,604,151,044,000 | 308,930,245 | 0 | 0 | Apache-2.0 | 1,604,164,710,000 | 1,604,163,547,000 | null | UTF-8 | Lean | false | false | 40,748 | lean | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Simon Hudon, Sebastien Gouezel, Scott Morrison
-/
import tactic.lint
import tactic.dependencies
open lean
open lean.parser
local postfix `?`:9001 := optional
local po... |
594861183e6bb829a5530f5a5f4ab2fd50b7bada | 57c233acf9386e610d99ed20ef139c5f97504ba3 | /src/topology/metric_space/gromov_hausdorff.lean | 3fbb8c09f089a21dc6da3d0649c19b49a34ea9c3 | [
"Apache-2.0"
] | permissive | robertylewis/mathlib | 3d16e3e6daf5ddde182473e03a1b601d2810952c | 1d13f5b932f5e40a8308e3840f96fc882fae01f0 | refs/heads/master | 1,651,379,945,369 | 1,644,276,960,000 | 1,644,276,960,000 | 98,875,504 | 0 | 0 | Apache-2.0 | 1,644,253,514,000 | 1,501,495,700,000 | Lean | UTF-8 | Lean | false | false | 55,120 | lean | /-
Copyright (c) 2019 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
import topology.metric_space.closeds
import set_theory.cardinal
import topology.metric_space.gromov_hausdorff_realized
import topology.metric_space.completion
i... |
75c28c80f7d941b34deba10af1d0d54df331189d | d406927ab5617694ec9ea7001f101b7c9e3d9702 | /src/representation_theory/Rep.lean | 376a1fc0447e1028913f60c513910daa7ec7b35a | [
"Apache-2.0"
] | permissive | alreadydone/mathlib | dc0be621c6c8208c581f5170a8216c5ba6721927 | c982179ec21091d3e102d8a5d9f5fe06c8fafb73 | refs/heads/master | 1,685,523,275,196 | 1,670,184,141,000 | 1,670,184,141,000 | 287,574,545 | 0 | 0 | Apache-2.0 | 1,670,290,714,000 | 1,597,421,623,000 | Lean | UTF-8 | Lean | false | false | 9,596 | lean | /-
Copyright (c) 2020 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import representation_theory.basic
import representation_theory.Action
import algebra.category.Module.abelian
import algebra.category.Module.colimits
import algebra.c... |
42baae50862e342ab98482059b27f4bfbf6301a6 | e9dbaaae490bc072444e3021634bf73664003760 | /src/Problems/2000/IMO_2000_P1.lean | 5744e6c7cc855e85ea19a1e662b24918b4ef0046 | [
"Apache-2.0"
] | permissive | liaofei1128/geometry | 566d8bfe095ce0c0113d36df90635306c60e975b | 3dd128e4eec8008764bb94e18b932f9ffd66e6b3 | refs/heads/master | 1,678,996,510,399 | 1,581,454,543,000 | 1,583,337,839,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,163 | lean | import Geo.Geo.Core
namespace Geo
open Seg
def IMO_2000_P1 : Prop :=
∀ (A B C D M N : Point),
/-
Deviation from problem statement:
The original problem statement begins with the following:
"AB is tangent to the circles CAMN and NMBD."
We instead check that the quadrilateral is cyclic, and then use its circumcircle... |
12fbfaf436256f81d95d9fb5498a45d1ff827c0a | 80cc5bf14c8ea85ff340d1d747a127dcadeb966f | /src/tactic/derive_fintype.lean | 9a94945edbf1bc8c16c4477101d945d6bd4b971c | [
"Apache-2.0"
] | permissive | lacker/mathlib | f2439c743c4f8eb413ec589430c82d0f73b2d539 | ddf7563ac69d42cfa4a1bfe41db1fed521bd795f | refs/heads/master | 1,671,948,326,773 | 1,601,479,268,000 | 1,601,479,268,000 | 298,686,743 | 0 | 0 | Apache-2.0 | 1,601,070,794,000 | 1,601,070,794,000 | null | UTF-8 | Lean | false | false | 15,325 | lean | /-
Copyright (c) 2020 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
-/
import logic.basic
import data.fintype.basic
/-!
# Derive handler for `fintype` instances
This file introduces a derive handler to automatically generate `fintype`
instances for structures... |
8e028598871b9326777b6b4706a777cb21860e3e | 570f46c4bf91dd2d8b97fc9d43ce1c435867f7dc | /src/solutions/00_first_proofs.lean | b188310d703f86b96e5de9ee2db1fff98beb68d8 | [
"Apache-2.0"
] | permissive | Timeroot/tutorials | ef586f20e059c2cfa2b044e5663ea98f32c86646 | ff7a6c1ad58b2eedfdc7303661e19409656467ab | refs/heads/master | 1,691,446,431,254 | 1,633,556,762,000 | 1,633,556,762,000 | 414,377,840 | 1 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 18,051 | lean | /-
This file is intended for Lean beginners. The goal is to demonstrate what it feels like to prove
things using Lean and mathlib. Complicated definitions and theory building are not covered.
Everything is covered again more slowly and with exercises in the next files.
-/
-- We want real numbers and their basic proper... |
6eaec03576703c943ba2cc8d8574a946dc2088f3 | 592f865bb4e2e537ae3552cb83c32fb99c8d4c68 | /src/Lemma5.lean | 174a3af7696f902cf25a0a3ed2561756f0e10a9f | [] | no_license | BassemSafieldeen/Entropy_and_reversible_catalysis | 250dbb9446690ab89d89a6a512c8f888e09e8596 | 5dd6ee062f61e26bbcf254477e3e24aa3fc489af | refs/heads/master | 1,678,747,213,156 | 1,615,540,586,000 | 1,615,540,586,000 | 322,216,014 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,344 | lean | import rnd_var
import to_mathlib_maybe.Hilbert_space
import to_mathlib_maybe.pTrace
import state
variables
{ι : Type} [fintype ι] [decidable_eq ι]
{ℋ : Type} [complex_hilbert_space ℋ]
{ρ : module.End ℂ ℋ} [quantum_state ρ]
{n m d : ℕ} -- dim S, S' and R
{V : ι → unitary_group ℋ}
{p : ι → ℝ} [rnd_var p]
open_locale t... |
4754f7b910e3122aca3115102f89b20fa539e0c8 | 592f865bb4e2e537ae3552cb83c32fb99c8d4c68 | /src/to_qShannon_theory_maybe/entropy.lean | 04b6807da2297039d69cf8047f4d531e1d57d63f | [] | no_license | BassemSafieldeen/Entropy_and_reversible_catalysis | 250dbb9446690ab89d89a6a512c8f888e09e8596 | 5dd6ee062f61e26bbcf254477e3e24aa3fc489af | refs/heads/master | 1,678,747,213,156 | 1,615,540,586,000 | 1,615,540,586,000 | 322,216,014 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 2,754 | lean | import linear_algebra.eigenspace
import linear_algebra.tensor_product
import rnd_var
import shannon_theory
import to_mathlib_maybe.Hilbert_space
import to_mathlib_maybe.pTrace
import to_qShannon_theory_maybe.state
---- QUANTUM ENTROPY
open rnd_var
open_locale tensor_product big_operators
noncomputable theory
var... |
87838ddf1318a5db535035379fd7b824406834ae | 2a70b774d16dbdf5a533432ee0ebab6838df0948 | /_target/deps/mathlib/src/data/polynomial/degree/trailing_degree.lean | 530497d2608363a1ac83ac62eaf12086737a581e | [
"Apache-2.0"
] | permissive | hjvromen/lewis | 40b035973df7c77ebf927afab7878c76d05ff758 | 105b675f73630f028ad5d890897a51b3c1146fb0 | refs/heads/master | 1,677,944,636,343 | 1,676,555,301,000 | 1,676,555,301,000 | 327,553,599 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 12,183 | lean | /-
Copyright (c) 2020 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
import data.polynomial.degree.definitions
/-!
# Trailing degree of univariate polynomials
## Main definitions
* `trailing_degree p`: the multiplicity of `X` in the p... |
e6b0df57338aebde2a1972e85d5f5ce2251d349f | 9bf90df35bb15a2f76571e35c48192142a328c40 | /src/ch4.lean | 46fccd180ed89738f3f89521f4258f95df1450bb | [] | no_license | ehaskell1/set_theory | ed0726520e84990d5f3180bafa0a3674ed31fb5e | e6c829c4dd953d98c9cba08f9f79784cd91794fb | refs/heads/master | 1,693,282,405,362 | 1,636,928,916,000 | 1,636,928,916,000 | 428,055,746 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 66,009 | lean | import ch3
universe u
namespace Set
def succ (a : Set) : Set := {a} ∪ a
@[simp]
lemma mem_succ {a b : Set} : b ∈ a.succ ↔ b = a ∨ b ∈ a :=
by rw [succ, mem_union, mem_singleton]
@[simp]
lemma insert_eq {x y : Set} : insert x y = {x} ∪ y :=
by simp only [←ext_iff, mem_insert, mem_union, mem_singleton, forall_const,... |
a034b23bfcc3831770a291331be3fe33138570e8 | 06be757c84c5c318d56b5d07f1dff4eb19b949d8 | /src/Huber_ring.lean | fc17552d2fa64cd7d3a276bad0af56590e31014b | [
"Apache-2.0"
] | permissive | mr-infty/perfectoid-spaces | ea3e5d161072f6de646b660cc55217838d3ceded | 1a49b3897ec3c7b871d8c970926c00f727a4e2a6 | refs/heads/master | 1,587,252,317,856 | 1,547,326,614,000 | 1,547,326,614,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 4,290 | lean | import analysis.topology.topological_structures
import ring_theory.subring
import tactic.tfae
import data.list.basic
import for_mathlib.topological_rings
import power_bounded
-- f-adic rings are called Huber rings by Scholze.
-- Topological ring A contains on open subring A0 such that the subspace topology on A0 is
--... |
c2cafb60a4b04f54d09742bba5ed47b9f3bd0bd1 | a45212b1526d532e6e83c44ddca6a05795113ddc | /src/tactic/converter/interactive.lean | d9b8f26a7026c52af488c6bf2f09666bb2e62d25 | [
"Apache-2.0"
] | permissive | fpvandoorn/mathlib | b21ab4068db079cbb8590b58fda9cc4bc1f35df4 | b3433a51ea8bc07c4159c1073838fc0ee9b8f227 | refs/heads/master | 1,624,791,089,608 | 1,556,715,231,000 | 1,556,715,231,000 | 165,722,980 | 5 | 0 | Apache-2.0 | 1,552,657,455,000 | 1,547,494,646,000 | Lean | UTF-8 | Lean | false | false | 3,632 | lean | /-
Copyright (c) 2017 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura, Keeley Hoek
Converter monad for building simplifiers.
-/
import tactic.basic tactic.converter.old_conv
namespace old_conv
meta def save_info (p : pos) : old... |
613c750629b0b6eeecc60a8742dda331d5cb4103 | 9cb9db9d79fad57d80ca53543dc07efb7c4f3838 | /src/normed_group/normed_with_aut.lean | 24c12aa1c9211759ddf843fa319fe7685c95abab | [] | no_license | mr-infty/lean-liquid | 3ff89d1f66244b434654c59bdbd6b77cb7de0109 | a8db559073d2101173775ccbd85729d3a4f1ed4d | refs/heads/master | 1,678,465,145,334 | 1,614,565,310,000 | 1,614,565,310,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 485 | lean | import normed_group.NormedGroup
/-- A `normed_with_aut r V` structure on a normed abelian group `V`
consists of an automorphism `T` satisfying `∥T v∥ = r * ∥v∥`.
In other words, it is a normed `ℤ[T^{±1}]`-module satisfying `∥T v∥ = r * ∥v∥`.
Definition 8.13 of [Analytic] -/
class normed_with_aut (r : out_param ℝ) (V... |
efb6c6d84cf139ae3ff527dfb9e9f104bf82a07a | cf39355caa609c0f33405126beee2739aa3cb77e | /tests/lean/run/cc2.lean | f902662bfba4d6c26e8974a074cda037a2efbcbe | [
"Apache-2.0"
] | permissive | leanprover-community/lean | 12b87f69d92e614daea8bcc9d4de9a9ace089d0e | cce7990ea86a78bdb383e38ed7f9b5ba93c60ce0 | refs/heads/master | 1,687,508,156,644 | 1,684,951,104,000 | 1,684,951,104,000 | 169,960,991 | 457 | 107 | Apache-2.0 | 1,686,744,372,000 | 1,549,790,268,000 | C++ | UTF-8 | Lean | false | false | 1,062 | lean | constant f (a b : nat) : a > b → nat
constant g : nat → nat
open tactic
example (a₁ a₂ b₁ b₂ c d : nat)
(H₁ : a₁ > b₁)
(H₂ : a₂ > b₂) :
a₁ = c → a₂ = c →
b₁ = d → d = b₂ →
g (g (f a₁ b₁ H₁)) = g (g (f a₂ b₂ H₂)) :=
by cc
example (a₁ a₂ b₁ b₂ c d : nat) :
a₁ = c → a₂ = ... |
a61deb6819d39e9a5224872b8cb348bb011e213b | 35677d2df3f081738fa6b08138e03ee36bc33cad | /src/data/nat/totient.lean | 1f4815079118a4f6fbfb8e75b2b3b2f9300d22fb | [
"Apache-2.0"
] | permissive | gebner/mathlib | eab0150cc4f79ec45d2016a8c21750244a2e7ff0 | cc6a6edc397c55118df62831e23bfbd6e6c6b4ab | refs/heads/master | 1,625,574,853,976 | 1,586,712,827,000 | 1,586,712,827,000 | 99,101,412 | 1 | 0 | Apache-2.0 | 1,586,716,389,000 | 1,501,667,958,000 | Lean | UTF-8 | Lean | false | false | 4,112 | lean | /-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import algebra.big_operators data.zmod.basic
open finset
namespace nat
def totient (n : ℕ) : ℕ := ((range n).filter (nat.coprime n)).card
localized "notation `φ` := n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.