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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5dffbf49b5810de1fe2b05b3821261fb92ac8400 | 7282d49021d38dacd06c4ce45a48d09627687fe0 | /tests/lean/scope_bug1.lean | c65eb87ce314d882a3a263de0d72179f4b9fbf7c | [
"Apache-2.0"
] | permissive | steveluc/lean | 5a0b4431acefaf77f15b25bbb49294c2449923ad | 92ba4e8b2d040a799eda7deb8d2a7cdd3e69c496 | refs/heads/master | 1,611,332,256,930 | 1,391,013,244,000 | 1,391,013,244,000 | 16,361,079 | 1 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 418 | lean | variables a b c d : Nat
axiom H : a + (b + c) = a + (b + d)
set_option pp::implicit true
using Nat
check add_succr a
scope
theorem mul_zerol2 (a : Nat) : 0 * a = 0
:= induction_on a
(have 0 * 0 = 0 : trivial)
(λ (n : Nat) (iH : 0 * n = 0),
calc 0 * (n + 1) = (0 * n) + 0 : mul_succr 0 n
... |
d2677ff1e7ab166c028d53a39bae2289dabe5b4c | d406927ab5617694ec9ea7001f101b7c9e3d9702 | /src/order/zorn.lean | 7318858d40674264d700b261dca3999dc7c11ee6 | [
"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 | 8,872 | 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... |
02d85d2d4979548813e8084cb796850bfdfb3884 | 4727251e0cd73359b15b664c3170e5d754078599 | /src/algebra/group/defs.lean | afba5cb9e496f8b281e0e6c4dbf260172dca4446 | [
"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 | 35,122 | 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, Simon Hudon, Mario Carneiro
-/
import algebra.group.to_additive
import tactic.basic
/-!
# Typeclasses for (semi)groups and monoids
In this file we de... |
ada02028ee5dd381eca195263a6e820e63d4e51e | cf39355caa609c0f33405126beee2739aa3cb77e | /tests/lean/notation6.lean | cdc8cd02d393c5b7e6dc8358e1320cd133905226 | [
"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 | 127 | lean | --
notation `o` := (10:nat)
#check 11
constant f : nat → nat
#check o + 1
#check f o + o + o
#reduce 9 + (1:nat)
#reduce o+4
|
c7f60761da7e7fa5e2d937411fb18cce310c74b6 | b7f22e51856f4989b970961f794f1c435f9b8f78 | /tests/lean/run/matrix.lean | 597b2b6befc3dba70433b9e4fbf04df208a6cab7 | [
"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 | 1,107 | lean | import logic
constant matrix.{l} : Type.{l} → Type.{l}
constant same_dim {A : Type} : matrix A → matrix A → Prop
constant add1 {A : Type} (m1 m2 : matrix A) {H : same_dim m1 m2} : matrix A
theorem same_dim_irrel {A : Type} {m1 m2 : matrix A} {H1 H2 : same_dim m1 m2} : @add1 A m1 m2 H1 = @add1 A m1 m2 H2 :=
rfl
open e... |
60819debd247269e9f0f95ca74b88c1f095ccdb2 | 17d3c61bf162bf88be633867ed4cb201378a8769 | /library/init/coe.lean | eaef6755415103b145675ae67d408c5403d18a65 | [
"Apache-2.0"
] | permissive | u20024804/lean | 11def01468fb4796fb0da76015855adceac7e311 | d315e424ff17faf6fe096a0a1407b70193009726 | refs/heads/master | 1,611,388,567,561 | 1,485,836,506,000 | 1,485,836,625,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 5,383 | 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
-/
/-
The elaborator tries to insert coercions automatically.
Only instances of has_coe type class are considered in the process.
Lean also provides a "lifti... |
5df9b3988492bb4a20e3dfee1c1d2c757d544885 | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/analysis/special_functions/complex/arg.lean | e9c916006e5c43999cfc9ed2933406c85350e06c | [
"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 | 25,001 | lean | /-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson
-/
import analysis.special_functions.trigonometric.angle
import analysis.special_functions.trigonometric.i... |
e6996a3adf6ede579c39ebd1177e80be604b9538 | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/analysis/normed_space/units.lean | efb2d49f2d73c46899c233a9888a5ec075d4ae3f | [] | 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 | 6,307 | lean | /-
Copyright (c) 2020 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.analysis.specific_limits
import Mathlib.analysis.asymptotics
import Mathlib.PostPort
uni... |
7eb235e020ba4f35ef427a6e169502cea125a756 | 367134ba5a65885e863bdc4507601606690974c1 | /test/random.lean | 441dbd31b1000f80a620d38233709aedfdbb0f3d | [
"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 | 2,424 | lean | import system.random.basic
import data.nat.prime
import data.zmod.basic
/-- fermat's primality test -/
def primality_test (p : ℕ) (h : fact (0 < p)) : rand bool :=
if h : 2 ≤ p-1 then do
n ← rand.random_r 2 (p-1) h,
return $ (n : zmod p)^(p-1) = 1 -- we do arithmetic with `zmod n` so that modulo and multiplication... |
4f389609770eaacdad003ae686dad35b174367ca | a1179fa077c09acc49e4fbc8d67084ba89ac4f4c | /src/modular.lean | 23890b9320a225ca49e1ac3f400965e3b36c17b5 | [] | no_license | Seeram/Lean-proof-assistant | 11ca0ca0e0446bacdd1773c4c481a3653b2f1074 | e672d46e0e5f39d8de2933ad4f4cac095ca6094f | refs/heads/master | 1,682,754,224,366 | 1,620,959,431,000 | 1,620,959,431,000 | 299,000,950 | 0 | 1 | null | 1,620,680,462,000 | 1,601,200,258,000 | Lean | UTF-8 | Lean | false | false | 678 | lean | import tactic
-- import order (netreba)
universe u
class modular_lattice(α : Type u) extends lattice α :=
(modular_law: ∀ (x u v : α ), (x ≤ u) → u ⊓ (v ⊔ x) = (u ⊓ v) ⊔ x )
theorem modular_lattice_isomorphism { α: Type u } [ modular_lattice α ] { u v w x y : α}:
x ≤ u →
x ≥ v →
x ≥ u ⊓ v →
x ≤ u ⊔ v →
u... |
81262c72fd566f36fcd0d99b6b6655ab243ceb98 | 82e44445c70db0f03e30d7be725775f122d72f3e | /src/algebra/quaternion.lean | 197dc918cd241c3de1fe71092828f2fd072ecad1 | [
"Apache-2.0"
] | permissive | stjordanis/mathlib | 51e286d19140e3788ef2c470bc7b953e4991f0c9 | 2568d41bca08f5d6bf39d915434c8447e21f42ee | refs/heads/master | 1,631,748,053,501 | 1,627,938,886,000 | 1,627,938,886,000 | 228,728,358 | 0 | 0 | Apache-2.0 | 1,576,630,588,000 | 1,576,630,587,000 | null | UTF-8 | Lean | false | false | 21,286 | lean | /-
Copyright (c) 2020 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import tactic.ring_exp
import algebra.algebra.basic
import algebra.opposites
import data.equiv.ring
/-!
# Quaternions
In this file we define quaternions `ℍ[R]` ov... |
a2105adc71978d31068b65cf8311162389e295e3 | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/category_theory/sites/canonical.lean | 21fa1dfb6fea609a96dde1f8126588990b0c1248 | [] | 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 | 6,873 | lean | /-
Copyright (c) 2020 Bhavik Mehta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bhavik Mehta
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.category_theory.sites.sheaf_of_types
import Mathlib.PostPort
universes v u
namespace Mathlib... |
813177e68ec48c3caa344bc2671bae9305170aa1 | 3dd1b66af77106badae6edb1c4dea91a146ead30 | /tests/lean/run/alias3.lean | 21dffe4a806ae951e0990a814cc47b98cb86d978 | [
"Apache-2.0"
] | permissive | silky/lean | 79c20c15c93feef47bb659a2cc139b26f3614642 | df8b88dca2f8da1a422cb618cd476ef5be730546 | refs/heads/master | 1,610,737,587,697 | 1,406,574,534,000 | 1,406,574,534,000 | 22,362,176 | 1 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 373 | lean | import logic
namespace N1
section
section
variable A : Type
definition foo (a : A) : Prop := true
check foo
end
check foo
end
check foo
end
check N1.foo
namespace N2
section
parameter A : Type
inductive list : Type :=
| nil {} : list
| cons : A → list → list
... |
d1aa0e7bcd95e3978ca096edb3c133c51d2ec788 | 491068d2ad28831e7dade8d6dff871c3e49d9431 | /tests/lean/run/secnot.lean | 5a7e276f878e4482d549f828feec70e38f9f1e2b | [
"Apache-2.0"
] | permissive | davidmueller13/lean | 65a3ed141b4088cd0a268e4de80eb6778b21a0e9 | c626e2e3c6f3771e07c32e82ee5b9e030de5b050 | refs/heads/master | 1,611,278,313,401 | 1,444,021,177,000 | 1,444,021,177,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 398 | lean | import data.num
section
variable {A : Type}
definition f (a b : A) := a
infixl `◀`:65 := f
variables a b : A
check a ◀ b
end
inductive list (T : Type) : Type :=
| nil {} : list T
| cons : T → list T → list T
namespace list
section
variable {T : Type}
notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l
check [1... |
c2ad9310049ab2973a83a1fe473e1a09fe482e3e | 4d2583807a5ac6caaffd3d7a5f646d61ca85d532 | /src/ring_theory/simple_module.lean | 9841589e463b9fb18e72d722e7789e1315252a0c | [
"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 | 5,344 | lean | /-
Copyright (c) 2020 Aaron Anderson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Aaron Anderson
-/
import linear_algebra.basic
import order.atoms
/-!
# Simple Modules
## Main Definitions
* `is_simple_module` indicates that a module has no proper submodules
(... |
ae7b66845d222a25afa837f23a77e0e468ad3161 | 271e26e338b0c14544a889c31c30b39c989f2e0f | /stage0/src/Init/Lean/Linter.lean | e2535572ca1cdc3194a04c45a268ffac87bfea26 | [
"Apache-2.0"
] | permissive | dgorokho/lean4 | 805f99b0b60c545b64ac34ab8237a8504f89d7d4 | e949a052bad59b1c7b54a82d24d516a656487d8a | refs/heads/master | 1,607,061,363,851 | 1,578,006,086,000 | 1,578,006,086,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 807 | lean | /-
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sebastian Ullrich
-/
prelude
import Init.System.IO
import Init.Lean.Attributes
import Init.Lean.Syntax
import Init.Lean.Util.Message
namespace Lean
def Linter := Environment →... |
452d1c553fcd4e19705eb12d077e2e48eb3a3b29 | 947b78d97130d56365ae2ec264df196ce769371a | /tests/lean/bytearray.lean | 966ae6139779c495ca31e705390801294b83f6a3 | [
"Apache-2.0"
] | permissive | shyamalschandra/lean4 | 27044812be8698f0c79147615b1d5090b9f4b037 | 6e7a883b21eaf62831e8111b251dc9b18f40e604 | refs/heads/master | 1,671,417,126,371 | 1,601,859,995,000 | 1,601,860,020,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 296 | lean | new_frontend
def tst : IO Unit :=
do
let bs := [1, 2, 3].toByteArray;
IO.println bs;
let bs := bs.push 4;
let bs := bs.set! 1 20;
IO.println bs;
let bs₁ := bs.set! 2 30;
IO.println bs₁;
IO.println bs;
IO.println bs.size;
IO.println (bs ++ bs);
IO.println (bs.extract 1 3);
pure ()
#eval tst
|
33767f28977895575b99965d2800a118a8d2fb13 | b815abf92ce063fe0d1fabf5b42da483552aa3e8 | /library/init/meta/tactic.lean | f72fdf7893c4993bbeb6fc7a7fdd96f59f231a35 | [
"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 | 28,066 | 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.function init.data.option.basic init.util
import init.category.combinators init.category.monad init.category.alternative
import init.dat... |
05ea1f6c08b5eb6cb9d4468b05fa42c980e0664a | ff5230333a701471f46c57e8c115a073ebaaa448 | /tests/lean/run/1951.lean | 6a40a5f301d1adc8adf1350cac97e22de9b5ed47 | [
"Apache-2.0"
] | permissive | stanford-cs242/lean | f81721d2b5d00bc175f2e58c57b710d465e6c858 | 7bd861261f4a37326dcf8d7a17f1f1f330e4548c | refs/heads/master | 1,600,957,431,849 | 1,576,465,093,000 | 1,576,465,093,000 | 225,779,423 | 0 | 3 | Apache-2.0 | 1,575,433,936,000 | 1,575,433,935,000 | null | UTF-8 | Lean | false | false | 90 | lean | #eval 2 ^ (3 ^ 2)
#eval 2 ^ 3 ^ 2
example (a b c : nat) : a ^ (b ^ c) = a ^ b ^ c :=
rfl
|
ade7d9f775f9bb32343c856c683e5a16a1cce95a | 626e312b5c1cb2d88fca108f5933076012633192 | /src/linear_algebra/finsupp_vector_space.lean | 3962de212d417a35c5822a0e1c4e01c6d68e4aa0 | [
"Apache-2.0"
] | permissive | Bioye97/mathlib | 9db2f9ee54418d29dd06996279ba9dc874fd6beb | 782a20a27ee83b523f801ff34efb1a9557085019 | refs/heads/master | 1,690,305,956,488 | 1,631,067,774,000 | 1,631,067,774,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 8,560 | 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
-/
import data.mv_polynomial
import linear_algebra.dimension
import linear_algebra.direct_sum.finsupp
import linear_algebra.finite_dimensional
import linear_algebra.std... |
afc5f74f5e9315a9c518f97b69360b35155da046 | 968e2f50b755d3048175f176376eff7139e9df70 | /examples/prop_logic_lean_summary/unnamed_324.lean | ce9edf950575c011812a8e45133787859d4a08d2 | [] | 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 | 159 | lean | variables p q : Prop
-- BEGIN
example (h : p) : p ∨ q :=
begin
left, -- This changes the goal, by left or introduction, to proving p
exact h,
end
-- END |
39a11a75ed92de2730070eb3fbd109fdb8ee232d | 11e28114d9553ecd984ac4819661ffce3068bafe | /src/engine.lean | ced2b0370bfadd5ed33e99410fa93807922f2939 | [
"MIT"
] | permissive | EdAyers/lean-subtask | 9a26eb81f0c8576effed4ca94342ae1281445c59 | 04ac5a6c3bc3bfd190af4d6dcce444ddc8914e4b | refs/heads/master | 1,586,516,665,621 | 1,558,701,948,000 | 1,558,701,948,000 | 160,983,035 | 4 | 1 | null | null | null | null | UTF-8 | Lean | false | false | 10,173 | lean | /- Author: E.W.Ayers © 2019 -/
import .refine
namespace robot
open tree.zipper tactic
/-- Backtracking state. -/
meta structure memento :=
(score : ℤ)
(candidates : evaluation)
(snapshot : snapshot)
meta inductive engine_mode
|Explore
|Right
|Execute (s : strategy)
|Backtrack
|Ascend
|Done
meta structure engine_stat... |
853dc0b743708c8877b48119f24816c133bc2aeb | 6dc0c8ce7a76229dd81e73ed4474f15f88a9e294 | /tests/lean/run/noindexAnnotation.lean | cda20123e370a2f87fc14b66dba35e853e7203fc | [
"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 | 320 | lean | structure Fin2 (n : Nat) :=
(val : Nat)
(isLt : Less val n)
protected def Fin2.ofNat {n : Nat} (a : Nat) : Fin2 (Nat.succ n) :=
⟨a % Nat.succ n, Nat.modLt _ (Nat.zeroLtSucc _)⟩
instance : OfNat (Fin2 (noindex! (n+1))) i where
ofNat := Fin2.ofNat i
def ex1 : Fin2 (9 + 1) :=
0
def ex2 : Fin2 10 :=
0
|
a4dc0893cbf9fb1e1403dd5904d7d860e09165d7 | fa01e273a2a9f22530e6adb1ed7d4f54bb15c8d7 | /src/N2O/Data/BERT.lean | d84f44a7a35685d1db19a0b5447cad217e3a9873 | [
"LicenseRef-scancode-mit-taylor-variant",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | o89/n2o | 4c99afb11fff0a1e3dae6b3bc8a3b7fc42c314ac | 58c1fbf4ef892ed86bdc6b78ec9ca5a403715c2d | refs/heads/master | 1,670,314,676,229 | 1,669,086,375,000 | 1,669,086,375,000 | 200,506,953 | 16 | 6 | null | null | null | null | UTF-8 | Lean | false | false | 10,001 | lean | import N2O.Data.Bytes
import N2O.Data.Sum
import N2O.Data.Put
import N2O.Data.Parser
def Char.isAscii (c : Char) : Bool :=
c.val ≤ 127
def mapM {m : Type → Type} [Monad m] {α β : Type} (f : α → m β) : List α → m (List β)
| [] => pure []
| x :: xs => do
let ys ← mapM f xs;
let y ← f x;
pure (y :: ys)
abbrev Dic... |
1ead127ceb79b68ff5e3dde42b471baddbe8fecf | 4d2583807a5ac6caaffd3d7a5f646d61ca85d532 | /src/analysis/calculus/local_extr.lean | 3b51c6e560a6dbe0b2052c4766c85e491379df07 | [
"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 | 18,225 | lean | /-
Copyright (c) 2019 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import analysis.calculus.deriv
import topology.algebra.ordered.extend_from
import topology.algebra.polynomial
import topology.local_extr
import data.polynomial.fiel... |
54051ded4625b50bf1fa50a720a7b80cff6c994b | 94e33a31faa76775069b071adea97e86e218a8ee | /src/data/vector/basic.lean | e2bcc51a265fa063bf22d048dbbbd4ed246905eb | [
"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 | 20,953 | lean | /-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import data.vector
import data.list.nodup
import data.list.of_fn
import control.applicative
import meta.univs
/-!
# Additional theorems and definitions about the `vec... |
f1ba8db23a922f55c531f0bba32783205865f494 | 6432ea7a083ff6ba21ea17af9ee47b9c371760f7 | /src/Lean/Meta/DiscrTreeTypes.lean | e44e4a311060a852e82aad78dd4f30cefc5bdb8a | [
"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 | 2,676 | 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
-/
import Lean.Expr
namespace Lean.Meta
/-! See file `DiscrTree.lean` for the actual implementation and documentation. -/
namespace DiscrTree
/--
Discrimina... |
fbc91c917049f7fdc01c95642e54442130ce5e9e | aa3f8992ef7806974bc1ffd468baa0c79f4d6643 | /tests/lean/t14.lean | 7850c5a2da6573c5336b97b2f370261be8b74b31 | [
"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 | 676 | lean | namespace foo
constant A : Type.{1}
constant a : A
constant x : A
constant c : A
end foo
context
open foo (renaming a->b x->y) (hiding c)
check b
check y
check c -- Error
end
context
open foo (a x)
check a
check x
check c -- Error
end
context
open foo (a x) (hiding c) -- Error
end
context
... |
24cb8d102fd12ce781d90b2378a2eca7c4361fd7 | 4b846d8dabdc64e7ea03552bad8f7fa74763fc67 | /library/init/meta/fun_info.lean | 37c75d335365fbf3dfcc178584105384a2b3c641 | [
"Apache-2.0"
] | permissive | pacchiano/lean | 9324b33f3ac3b5c5647285160f9f6ea8d0d767dc | fdadada3a970377a6df8afcd629a6f2eab6e84e8 | refs/heads/master | 1,611,357,380,399 | 1,489,870,101,000 | 1,489,870,101,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 4,393 | 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.tactic init.meta.format init.function
structure param_info :=
(is_implicit : bool)
(is_inst_implicit : bool)
(is_prop ... |
0c83b550d918af0e15df2e7ee78c81cccad5ea76 | fe84e287c662151bb313504482b218a503b972f3 | /src/combinatorics/gappy.lean | 6552a91f0a3a064c6332f3539000dbd18d10343d | [] | no_license | NeilStrickland/lean_lib | 91e163f514b829c42fe75636407138b5c75cba83 | 6a9563de93748ace509d9db4302db6cd77d8f92c | refs/heads/master | 1,653,408,198,261 | 1,652,996,419,000 | 1,652,996,419,000 | 181,006,067 | 4 | 1 | null | null | null | null | UTF-8 | Lean | false | false | 7,454 | lean | /-
Copyright (c) 2019 Neil Strickland. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Neil Strickland
This is about "gappy sets", ie subsets s in fin n = {0,...,n-1}
such that s contains no adjacent pairs {i,i+1}. We define
`(gappy n)` to be the set of such subsets... |
3c752f092cfafd3951da8c000cdc89a34e63e49b | cb3da1b91380e7462b579b426a278072c688954a | /src/rates.lean | 6142567c7fd56bcd5b2a2bd278a11427a8bec5b2 | [] | no_license | hcheval/tikhonov-mann | 35c93e46a8287f6479a848a9d4f02013e0bc2035 | 6ab7fcefe9e1156c20bd5d1998a7deabd1eeb018 | refs/heads/master | 1,689,232,126,344 | 1,630,182,255,000 | 1,630,182,255,000 | 399,859,996 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 859 | lean | import topology.metric_space.basic
variables {X : Type*} [metric_space X]
open_locale big_operators
def is_rate_of_convergence_towards (r : ℕ → ℕ) (x : ℕ → X) (L : X) : Prop :=
∀ k n : ℕ, r k ≤ n → (dist (x n) L ≤ 1 / ↑(k + 1))
def is_cauchy_modulus (r : ℕ → ℕ) (x : ℕ → X) : Prop :=
∀ k n p : ℕ, r k ≤ n → dist (x... |
bebe25d31d52da52619c5d2a0347cf0928739112 | 4727251e0cd73359b15b664c3170e5d754078599 | /src/category_theory/triangulated/pretriangulated.lean | e8fe2256ea2a31d4db91836a658925c2cfe679f0 | [
"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 | 9,115 | lean | /-
Copyright (c) 2021 Luke Kershaw. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Luke Kershaw
-/
import category_theory.preadditive.additive_functor
import category_theory.shift
import category_theory.triangulated.rotate
/-!
# Pretriangulated Categories
This file c... |
03599725a42311a18fdf2a151cfc15419ed6eaea | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/data/int/modeq_auto.lean | 33d240d78ac8f6dee70833d1fd4fb2e82979cec3 | [] | 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 | 5,624 | 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 Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.data.nat.modeq
import Mathlib.tactic.ring
import Mathlib.PostPort
namespace Mathlib
namespace... |
54f2aa6746de58ee8d7dd81368de9e89167309a0 | 4727251e0cd73359b15b664c3170e5d754078599 | /src/order/category/LinearOrder.lean | e8d0bda96df25e13d670b54bb0ccc4638c5b34d3 | [
"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 | 2,196 | lean | /-
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
-/
import order.category.Lattice
/-!
# Category of linear orders
This defines `LinearOrder`, the category of linear orders with monotone maps.
-/
open category_theor... |
2afbcac9f738f3c95b696bdadae9ee5748f185cf | d1a52c3f208fa42c41df8278c3d280f075eb020c | /src/Init/Data/Nat/Div.lean | a44253bd25118dcb0cf236d54127652e5ac741bf | [
"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 | 4,879 | 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.WF
import Init.Data.Nat.Basic
namespace Nat
private def div_rec_lemma {x y : Nat} : 0 < y ∧ y ≤ x → x - y < x :=
fun ⟨ypos, ylex⟩ => ... |
babe050599b84b8de2d3ee3d8d643a2128bbf769 | 947b78d97130d56365ae2ec264df196ce769371a | /tests/lean/run/instuniv.lean | 9dc9189b39c7c688ba1d950d304468d4a0529614 | [
"Apache-2.0"
] | permissive | shyamalschandra/lean4 | 27044812be8698f0c79147615b1d5090b9f4b037 | 6e7a883b21eaf62831e8111b251dc9b18f40e604 | refs/heads/master | 1,671,417,126,371 | 1,601,859,995,000 | 1,601,860,020,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 412 | lean | import Lean
new_frontend
open Lean
unsafe def tst : IO Unit :=
withImportModules [{module := `Init.Data.Array}] 0 fun env =>
match env.find? `Array.foldl with
| some info => do
IO.println (info.instantiateTypeLevelParams [levelZero, levelZero]);
IO.println (info.instantiateValueLevelParams [levelZero, ... |
eb3522b2d656c1a9c4bcbcb83fc4a58ce6c5f813 | d406927ab5617694ec9ea7001f101b7c9e3d9702 | /src/analysis/convex/gauge.lean | 2f53e33cfa4c708015810a16d6781cf5658d0208 | [
"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 | 18,727 | lean | /-
Copyright (c) 2021 Yaël Dillies, Bhavik Mehta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies, Bhavik Mehta
-/
import analysis.convex.basic
import analysis.normed_space.pointwise
import analysis.seminorm
import data.complex.is_R_or_C
import tactic.congr... |
bfa980fdb731376b12a44d0eaf9f90bed5b98f0d | 80cc5bf14c8ea85ff340d1d747a127dcadeb966f | /test/tactics.lean | 426dae41fd14e21373577ad2a0c48f08fdd9b509 | [
"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,235 | lean | /-
Copyright (c) 2018 Simon Hudon. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Scott Morrison
-/
import tactic.interactive
import tactic.finish
import tactic.ext
import tactic.lift
import tactic.apply
import tactic.reassoc_axiom
import tactic.tfae
impo... |
584ee95c676bf0c6ab7f38a9709e9b385be8621b | 271e26e338b0c14544a889c31c30b39c989f2e0f | /stage0/src/Init/Data/PersistentArray/Basic.lean | c9bf7ce43d15dffd8e6730d99f498792e66c7a5e | [
"Apache-2.0"
] | permissive | dgorokho/lean4 | 805f99b0b60c545b64ac34ab8237a8504f89d7d4 | e949a052bad59b1c7b54a82d24d516a656487d8a | refs/heads/master | 1,607,061,363,851 | 1,578,006,086,000 | 1,578,006,086,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 12,228 | 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.Control.Conditional
import Init.Data.Array
universes u v w
inductive PersistentArrayNode (α : Type u)
| node (cs : Array PersistentArra... |
18d743c8c7345c03d696747d5c13115fc2a045ad | 7da5ceac20aaab989eeb795a4be9639982e7b35a | /src/ring_theory/basic.lean | 10ff64f99f1f072948eabc7567f72bdb4c3fb425 | [
"MIT"
] | permissive | formalabstracts/formalabstracts | 46c2f1b3a172e62ca6ffeb46fbbdf1705718af49 | b0173da1af45421239d44492eeecd54bf65ee0f6 | refs/heads/master | 1,606,896,370,374 | 1,572,988,776,000 | 1,572,988,776,000 | 96,763,004 | 165 | 28 | null | 1,555,709,319,000 | 1,499,680,948,000 | Lean | UTF-8 | Lean | false | false | 4,070 | lean | import ..basic .algebra2
noncomputable theory
universes u v w
variables {α : Type*} {β : Type*} [comm_ring α] [comm_ring β]
open set
/-- An element in a ring is nilpotent if a integer power of it is equal to `0` -/
def is_nilpotent {α : Type u} [comm_semiring α] (x : α) : Prop := ∃ n : ℕ, x^n = 0
/-- An ring is redu... |
6b7f9b2a5474b1e4b1ca0b3c68b6e4fdcb245714 | 26b8b0964ca8e1c2e203585ba5940f83fe05e48a | /src/tidy/pretty_print.lean | e6f25d6c523f9e56803344a2dc370dd9d813be0a | [] | no_license | jcommelin/lean-tidy | ef3cd32a3804221d93f0dff9e180bb2c52f4b143 | 9cecf497e90db64b5ea140ad6ae1603976dcd402 | refs/heads/master | 1,585,129,919,276 | 1,533,512,680,000 | 1,533,512,680,000 | 143,677,361 | 0 | 0 | null | 1,616,803,481,000 | 1,533,530,576,000 | Lean | UTF-8 | Lean | false | false | 4,120 | lean | open tactic
meta def pretty_print (e : expr) (implicits : bool := ff): tactic string :=
do options ← get_options,
set_options (((options.set_bool `pp.notation true).set_bool `pp.universes false).set_bool `pp.implicit implicits),
t ← pp e,
set_options options,
pure t.to_string
/-
pp.coercions (Bool) (pr... |
3b277430474236bbda0edb07ebc5bc142955cf2d | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/algebra/order/field/power.lean | d694900f7994ee225ac1411cc616bd43545bcace | [
"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 | 6,888 | lean | /-
Copyright (c) 2014 Robert Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn
-/
import algebra.parity
import algebra.char_zero.lemmas
import algebra.group_with_zero.power
import algebra.order.field... |
348b3654b59f12e8ce159a9eb23fd6a356d2894a | 9be442d9ec2fcf442516ed6e9e1660aa9071b7bd | /src/Init/Data/Array/InsertionSort.lean | dd92e2aead52f91aad0d0596132615185a8c277c | [
"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 | EdAyers/lean4 | 57ac632d6b0789cb91fab2170e8c9e40441221bd | 37ba0df5841bde51dbc2329da81ac23d4f6a4de4 | refs/heads/master | 1,676,463,245,298 | 1,660,619,433,000 | 1,660,619,433,000 | 183,433,437 | 1 | 0 | Apache-2.0 | 1,657,612,672,000 | 1,556,196,574,000 | Lean | UTF-8 | Lean | false | false | 996 | lean | /-
Copyright (c) 2018 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import Init.Data.Array.Basic
@[inline] def Array.insertionSort (a : Array α) (lt : α → α → Bool) : Array α :=
traverse a 0 a.size
where
@[speci... |
829ac74af8ecca8dc471bc4111bb69f7f883f337 | a45212b1526d532e6e83c44ddca6a05795113ddc | /src/computability/partrec_code.lean | 0d1ea2e673f986608f488de1868083faf9897f7f | [
"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 | 37,719 | lean | /-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Mario Carneiro
Godel numbering for partial recursive functions.
-/
import computability.partrec
open encodable denumerable
namespace nat.partrec
open nat (mkpair)
theorem rfind' {f}... |
3d94d5417bbdd58bbfe849e30e80832c2fec4319 | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/tactic/noncomm_ring_auto.lean | a069d2d8c2a939625061802cd4cb958552510113 | [] | 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 | 545 | lean | /-
Copyright (c) 2020 Oliver Nash. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Oliver Nash
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.tactic.abel
import Mathlib.PostPort
namespace Mathlib
namespace tactic
namesp... |
0d6e786b8183fb9990ccf4ed344ce7283b46d42b | 31f556cdeb9239ffc2fad8f905e33987ff4feab9 | /stage0/src/Lean/Compiler/LCNF/Passes.lean | 5ce2ec4e29b1ad587819c28d3633fb95cfb0c219 | [
"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 | 2,752 | lean | /-
Copyright (c) 2022 Henrik Böving. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Henrik Böving
-/
import Lean.Compiler.LCNF.PassManager
import Lean.Compiler.LCNF.PullLetDecls
import Lean.Compiler.LCNF.CSE
import Lean.Compiler.LCNF.Simp
import Lean.Compiler.LCNF.Pull... |
a9552117347b8b4849c3d4ea54ac8b122e6ce24c | 80cc5bf14c8ea85ff340d1d747a127dcadeb966f | /src/data/padics/ring_homs.lean | 728c4adf89bbea0a8b5b213a37626893529bd363 | [
"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 | 24,698 | lean | /-
Copyright (c) 2020 Johan Commelin and Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin and Robert Y. Lewis
-/
import data.padics.padic_integers
/-!
# Relating `ℤ_[p]` to `zmod (p ^ n)`
In this file we establish connections between t... |
0fad167e5ba1fe299766867e96f5beb58a693c6d | 11e28114d9553ecd984ac4819661ffce3068bafe | /src/examples/sets.lean | 26d61e425143ffe03a923e1e3186e50e3ea18c75 | [
"MIT"
] | permissive | EdAyers/lean-subtask | 9a26eb81f0c8576effed4ca94342ae1281445c59 | 04ac5a6c3bc3bfd190af4d6dcce444ddc8914e4b | refs/heads/master | 1,586,516,665,621 | 1,558,701,948,000 | 1,558,701,948,000 | 160,983,035 | 4 | 1 | null | null | null | null | UTF-8 | Lean | false | false | 790 | lean | /- Author: E.W.Ayers © 2019 -/
import ..equate
open robot
universe u
section sets
variables {α : Type u} {X A B C : set α}
@[equate] example : X \ (B ∩ C) = (X \ B) ∪ (X \ C) :=
by equate
example : ( X \ B ) ∪ ( X \ C ) = X \ ( B ∩ C ) :=
by equate
example : ( X \ B ) \ C = X \ ( B ∪ C ) := ... |
9ce30f06cf9570c7f1ead518f1688eb7391ede46 | 6214e13b31733dc9aeb4833db6a6466005763162 | /src/logic.lean | 2ad98b87766462612413f4a4113e64b7172d0ad4 | [] | no_license | joshua0pang/esverify-theory | 272a250445f3aeea49a7e72d1ab58c2da6618bbe | 8565b123c87b0113f83553d7732cd6696c9b5807 | refs/heads/master | 1,585,873,849,081 | 1,527,304,393,000 | 1,527,304,393,000 | 154,901,199 | 1 | 0 | null | 1,540,593,067,000 | 1,540,593,067,000 | null | UTF-8 | Lean | false | false | 68,713 | lean | -- lemmas about validity of logical propositions
import .definitions2 .freevars .substitution .evaluation .bindings
lemma valid.not_false: ⊨ vc.not value.false :=
begin
have : ⊨ value.false ⋁ vc.not value.false, from valid.em,
cases valid.or.elim this with h1 h1,
have h2, from valid.eq.true.mp h1,
h... |
4085868f14d911e7732dc3d21b48eae13884fca4 | 2eab05920d6eeb06665e1a6df77b3157354316ad | /src/topology/algebra/ordered/liminf_limsup.lean | d5dbffb9e4fa31bfcc07634f16b3edc3b8c3cc5d | [
"Apache-2.0"
] | permissive | ayush1801/mathlib | 78949b9f789f488148142221606bf15c02b960d2 | ce164e28f262acbb3de6281b3b03660a9f744e3c | refs/heads/master | 1,692,886,907,941 | 1,635,270,866,000 | 1,635,270,866,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 6,243 | 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, Yury Kudryashov
-/
import topology.algebra.ordered.basic
import order.liminf_limsup
/-!
# Lemmas about liminf and limsup in an order topology.
-/
open... |
224fbe2d284be6c8204cda652972cef8a265c360 | f083c4ed5d443659f3ed9b43b1ca5bb037ddeb58 | /tactic/replacer.lean | f17c318d035b91796b04037ce6a0a2a355caceec | [
"Apache-2.0"
] | permissive | semorrison/mathlib | 1be6f11086e0d24180fec4b9696d3ec58b439d10 | 20b4143976dad48e664c4847b75a85237dca0a89 | refs/heads/master | 1,583,799,212,170 | 1,535,634,130,000 | 1,535,730,505,000 | 129,076,205 | 0 | 0 | Apache-2.0 | 1,551,697,998,000 | 1,523,442,265,000 | Lean | UTF-8 | Lean | false | false | 2,656 | lean | /-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Mario Carneiro
A mechanism for defining tactics for use in auto params, whose
meaning is defined incrementally through attributes.
-/
namespace tactic
meta def replacer_attr (ntac : n... |
444c9a72ddc827f6cea3f9eb4332650817a375dc | dd0f5513e11c52db157d2fcc8456d9401a6cd9da | /05_Interacting_with_Lean.org.3.lean | 86d079fb254506709d6a98cf959e4c4e6f6665c2 | [] | 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 | 180 | lean | /- page 64 -/
import standard
import data.nat
open nat
find_decl ((_ * _) = (_ * _))
find_decl (_ * _) = _, +assoc
find_decl (_ * _) = _, -assoc
find_decl _ < succ _, +imp, -le
|
0202036f026b4dd63d167a94b27baad097260968 | 80cc5bf14c8ea85ff340d1d747a127dcadeb966f | /src/data/real/ennreal.lean | 89962ed4c5964c8ce63191196c5b08dedb65607d | [
"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 | 48,109 | lean | /-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Johannes Hölzl, Yury Kudryashov
Extended non-negative reals
-/
import data.real.nnreal
import data.set.intervals
noncomputable theory
open classical set
open_locale classical big_oper... |
388a76cd7dd8429d54b9760b228b35512be8e71c | 56af0912bd25910f5caae91d6dd0603b0c032989 | /src/complex/Level_05_field.lean | 18de2c9c4c90a98d0c0c5668d6e2031d39fca36e | [
"Apache-2.0"
] | permissive | isabella232/complex-number-game | ae36e0b1df9761d9df07049ca29c91ae44dbdc2d | 3d767f14041f9002e435bed3a3527fdd297c166d | refs/heads/master | 1,679,305,953,116 | 1,606,397,567,000 | 1,606,397,567,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 1,224 | lean | /-
Copyright (c) 2020 The Xena project. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard.
Thanks: Imperial College London, leanprover-community
-/
-- Import levels 1 to 4
import complex.Level_04_norm_sq
/-
If you know what "the reals don't have decidable
... |
37ccdeecf3c023ec34ef8d2443fa61a399d225ee | f41725a360d902d3c7939fdf81a5acaf0d0467f0 | /src/index_of_subgroup.lean | 49c000b74a09ea89ef1aeab097f2de11c7725459 | [] | no_license | pglutz/galois_theory | 978765d82b7586c21fd719b84b21d5eea030b25d | 4561c2c97d4c49377356e1d7a2051dedc87d30ba | refs/heads/master | 1,671,472,063,361 | 1,603,597,360,000 | 1,603,597,360,000 | 281,502,125 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 488 | lean | import group_theory.coset set_theory.cardinal data.fintype.basic
variables (G : Type*) [set G][group G]
def subgroup_index (H:subgroup G) := cardinal.mk (quotient_group.quotient H)
lemma index_in_finite_group_is_finite [h_fin : fintype G] (H: subgroup G)[h_dec : decidable_eq (quotient_group.quotient H)]:
fintyp... |
3e494436675a8b23424058f1d839b8749eaec332 | a9d0fb7b0e4f802bd3857b803e6c5c23d87fef91 | /tests/lean/run/sec_notation.lean | 91bc2f7cf4641fb507d47eec3f57096c86f06b54 | [
"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 | 194 | lean | open nat
section
parameter (A : Type)
definition f (a b : A) : A := a
definition add2 (a : nat) : nat := a + 2
postfix `+.2`:100 := add2
eval 3 +.2
end
example : 3 +.2 = 5 :=
rfl
|
3aa19734bb1bbe5316f91d51f7a558393a7c1d11 | 137c667471a40116a7afd7261f030b30180468c2 | /src/data/set/basic.lean | 487c2dbb38dbacfecff4cf675a2f3a7752262930 | [
"Apache-2.0"
] | permissive | bragadeesh153/mathlib | 46bf814cfb1eecb34b5d1549b9117dc60f657792 | b577bb2cd1f96eb47031878256856020b76f73cd | refs/heads/master | 1,687,435,188,334 | 1,626,384,207,000 | 1,626,384,207,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 108,741 | 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
-/
import logic.unique
import order.boolean_algebra
/-!
# Basic properties of sets
Sets in Lean are homogeneous; all their elements have the same type... |
71b9bcb8d78dab64bb0b20f71752731fc69bf428 | 592f865bb4e2e537ae3552cb83c32fb99c8d4c68 | /src/to_mathlib_maybe/Hilbert_space.lean | 752e033f4092c17b8c71dde799d03dc935f22046 | [] | 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,488 | lean | import analysis.normed_space.inner_product
import linear_algebra.tensor_product
open_locale tensor_product
/--
Hilbert space
-/
class complex_hilbert_space (V : Type*) extends inner_product_space ℂ V :=
(hilbert_ness: 1=1)
variables {ℋ : Type*} [complex_hilbert_space ℋ]
/--
The Trace of a linear map on a complex Hi... |
d4eea9bd3123989e473a273885f78dac0f96f77a | e09201d437062e1f95e6e5360aab0c9f947901aa | /src/languages/star.lean | a39aca541377ab057b963a93cea1a42a2a0a1d94 | [] | no_license | VArtem/lean-regular-languages | 34f4b093f28ef2f09ba7e684e642a0f97c901560 | e877243188253d0ac17ccf0ae2da7bf608686ff0 | refs/heads/master | 1,683,590,111,306 | 1,622,307,234,000 | 1,622,307,234,000 | 284,232,653 | 7 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 3,123 | lean | import data.set
import logic.function.iterate
import algebra.group_power
import tactic.nth_rewrite
import data.list.basic
import languages.basic
open set
namespace languages
variable {S : Type}
@[simp] def kleene_star (L : set (list S)) := {w : list S | ∃ (n : ℕ), w ∈ L^n}
lemma star_Union (L : set (list S)): klee... |
502097379a13176c48c0944ccd5845858664f4a8 | 7cef822f3b952965621309e88eadf618da0c8ae9 | /src/tactic/omega/misc.lean | 26a0c707a2a264d09436c4b8fd5abdd781c48b2a | [
"Apache-2.0"
] | permissive | rmitta/mathlib | 8d90aee30b4db2b013e01f62c33f297d7e64a43d | 883d974b608845bad30ae19e27e33c285200bf84 | refs/heads/master | 1,585,776,832,544 | 1,576,874,096,000 | 1,576,874,096,000 | 153,663,165 | 0 | 2 | Apache-2.0 | 1,544,806,490,000 | 1,539,884,365,000 | Lean | UTF-8 | Lean | false | false | 1,213 | lean | /-
Copyright (c) 2019 Seul Baek. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Seul Baek
Miscellaneous.
-/
import tactic.localized
variables {α β γ : Type}
namespace omega
lemma fun_mono_2 {p : α → β → γ} {a1 a2 : α} {b1 b2 : β} :
a1 = a2 → b1 = b2 → (p a1 b1 = ... |
d597238ec3872a4898610f9d0b0cf27829cb622d | f20db13587f4dd28a4b1fbd31953afd491691fa0 | /library/init/core.lean | 2217fe870d118c779e33f29f8b79e3b51da39552 | [
"Apache-2.0"
] | permissive | AHartNtkn/lean | 9a971edfc6857c63edcbf96bea6841b9a84cf916 | 0d83a74b26541421fc1aa33044c35b03759710ed | refs/heads/master | 1,620,592,591,236 | 1,516,749,881,000 | 1,516,749,881,000 | 118,697,288 | 1 | 0 | null | 1,516,759,470,000 | 1,516,759,470,000 | null | UTF-8 | Lean | false | false | 17,543 | 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
notation `Prop` := Sort 0
notation f ` $ `:1 a:0 := f a
/- Logical operations and relations -/
reserv... |
386e83c85871c66fdf70befdc046a50650370327 | 6dc0c8ce7a76229dd81e73ed4474f15f88a9e294 | /tests/lean/run/ifcongr.lean | e76e45e7ddb1acabc593f2b4e834b94259009ab8 | [
"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 | 540 | lean | --
@[simp] theorem andTrue (p : Prop) : (p ∧ True) = p :=
propext <| Iff.intro (fun ⟨h, _⟩ => h) (fun h => ⟨h, trivial⟩)
attribute [simp] Nat.add_comm
theorem ex1 (x : Nat) : (if x > 3 ∧ True then 1 else 2) = (if x > 3 then 1 else 2) :=
by simp
theorem ex2 (x : Nat) : (if x = 0 ∧ True then x + 1 else 2 + x) = (if ... |
d5ca28397de0c34d0f663aa60db56cf94e821984 | 2a70b774d16dbdf5a533432ee0ebab6838df0948 | /_target/deps/mathlib/src/data/list/nodup.lean | b5c433ee453a0bd30e5283263e4419474fadd6d5 | [
"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,240 | lean | /-
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Kenny Lau
-/
import data.list.pairwise
import data.list.forall2
/-!
# Lists with no duplicates
`list.nodup` is defined in `data/list/defs`. In this file we prove vari... |
b44fc9c41547f925e964a2cb05f61a0279609787 | c777c32c8e484e195053731103c5e52af26a25d1 | /src/measure_theory/group/measure.lean | a982613517d5b1bff7a5609d8bc2ee280562445b | [
"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 | 32,639 | lean | /-
Copyright (c) 2020 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
-/
import dynamics.ergodic.measure_preserving
import measure_theory.measure.regular
import measure_theory.group.measurable_equiv
import measure_theory.measure.open_p... |
63781ebbfdafc2e0b19ab8e19f58504f7be97947 | a9e33f9c83301c461f3c3ebc6799d9de1f6d4d20 | /assignments/hw5_higher_order_functions.lean | 5db12411c55a26888befa74d2c3797af1ce1f7bc | [] | no_license | yl4df/Discrete-Mathematics | f1c9a6cf8cfb4686fb617637f69a481e1522f0c2 | c93ce9f6a6e36d194e350d9fa0a0360191e97fa0 | refs/heads/master | 1,598,714,938,443 | 1,572,275,647,000 | 1,572,275,647,000 | 218,074,726 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 8,777 | lean | open list
/-
#1. You are to implement a function
that takes a "predicate" function and a
list and that returns a new list: namely
a list that contains all and only those
elements of the first list for which the
given predicate function returns true.
We start by giving you two predicate
functions. Each takes an argum... |
f0c4639113bd0c19e87e6b39a05a316a6edb322c | 367134ba5a65885e863bdc4507601606690974c1 | /src/algebra/algebra/basic.lean | bb927be9026caf1144c610984ac9d78b6edcbb22 | [
"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 | 55,063 | lean | /-
Copyright (c) 2018 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau, Yury Kudryashov
-/
import tactic.nth_rewrite
import data.matrix.basic
import data.equiv.ring_aut
import linear_algebra.tensor_product
import ring_theory.subring
import deprecated... |
1874d809737e3a8e8d6f5c5e38927e1bda77d5ee | cf39355caa609c0f33405126beee2739aa3cb77e | /tests/lean/run/eval_expr_bug.lean | 4002e3d6b07ae953f3a8c3a2f88ddea4aaa3a0f1 | [
"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 | 129 | lean | open tactic
meta def a : nat := 10
run_cmd eval_expr nat (expr.const `a [])
run_cmd eval_expr nat (expr.const `a []) >>= trace
|
d5f7358950fa321a165e69e849d3283a1f763b9d | 491068d2ad28831e7dade8d6dff871c3e49d9431 | /hott/algebra/ordered_ring.hlean | a29b62143e8dfaf96381c22184ae16e9af91bb3e | [
"Apache-2.0"
] | permissive | davidmueller13/lean | 65a3ed141b4088cd0a268e4de80eb6778b21a0e9 | c626e2e3c6f3771e07c32e82ee5b9e030de5b050 | refs/heads/master | 1,611,278,313,401 | 1,444,021,177,000 | 1,444,021,177,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 22,121 | hlean | /-
Copyright (c) 2014 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad
Here an "ordered_ring" is partially ordered ring, which is ordered with respect to both a weak
order and an associated strict order. Our numeric structures (int, rat, and... |
0267d8d0c55a2a44b5bf334fb610ec6e9d6aaf67 | 31f556cdeb9239ffc2fad8f905e33987ff4feab9 | /src/Lean/Compiler/LCNF/Simp/SimpValue.lean | aa2fa4318919c7b6bfd50639c8852b8ee56a67f7 | [
"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,488 | 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.Compiler.LCNF.Simp.SimpM
namespace Lean.Compiler.LCNF
namespace Simp
/--
Try to simplify projections `.proj _ i s` where `s` is constructor.
-... |
e29139262a0f3dc547209779b585370215e95fca | 02fbe05a45fda5abde7583464416db4366eedfbf | /tests/lean/pp_tagged.lean | e28ee90e9ab7a3a1e090157d67cab67ae50d85e9 | [
"Apache-2.0"
] | permissive | jasonrute/lean | cc12807e11f9ac6b01b8951a8bfb9c2eb35a0154 | 4be962c167ca442a0ec5e84472d7ff9f5302788f | refs/heads/master | 1,672,036,664,637 | 1,601,642,826,000 | 1,601,642,826,000 | 260,777,966 | 0 | 0 | Apache-2.0 | 1,588,454,819,000 | 1,588,454,818,000 | null | UTF-8 | Lean | false | false | 1,076 | lean | open widget.interactive_expression
constant f : nat → nat → nat → nat
constants w x y z : nat
#eval (sf.of_eformat <$> tactic.pp_tagged `(f x y z)) >>= tactic.trace
#eval (sf.of_eformat <$> tactic.pp_tagged `(x + y + z)) >>= tactic.trace
#eval (sf.of_eformat <$> tactic.pp_tagged `(x = y)) >>= tactic.trace
#eval (s... |
ea2dae78d78c4facec0070dd4a21b7f42bda9b99 | 4727251e0cd73359b15b664c3170e5d754078599 | /src/algebra/star/prod.lean | 888a46e9bb9c78afbe6ee45fdbbb6d3c7e308f40 | [
"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 | 1,878 | lean | /-
Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
import algebra.star.basic
import algebra.ring.prod
import algebra.module.prod
/-!
# `star` on product types
We put a `has_star` structure on product types that operates e... |
b2b4e2cc4d50a66b599352ffc3f99da61e3a3eac | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/group_theory/abelianization_auto.lean | cb2de174495ee9dd227d5089155a9ea22f900952 | [] | 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 | 2,719 | lean | /-
Copyright (c) 2018 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau, Michael Howes
The functor Grp → Ab which is the left adjoint
of the forgetful functor Ab → Grp.
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.gro... |
ddca97590adc3b9cb0ed3fa4cd05efd531dcdde8 | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/tactic/monotonicity/basic.lean | a121e3997243f6aed515df9eab0263c5288fac6f | [] | 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 | 646 | lean | /-
Copyright (c) 2019 Simon Hudon. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Simon Hudon
-/
import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.algebra.ordered_ring
import Mathlib.order.bounded_lattice
import Mathlib.PostPort
universes l u_1... |
0156aae4e6af444ad09a2d19759a54e39e7e1118 | d450724ba99f5b50b57d244eb41fef9f6789db81 | /src/instructor/lectures/lecture_17.lean | 96f8fdcc293c10bf8e89e3ec6a0360142b10aa29 | [] | no_license | jakekauff/CS2120F21 | 4f009adeb4ce4a148442b562196d66cc6c04530c | e69529ec6f5d47a554291c4241a3d8ec4fe8f5ad | refs/heads/main | 1,693,841,880,030 | 1,637,604,848,000 | 1,637,604,848,000 | 399,946,698 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 4,235 | lean | import data.set
/-
We formally define two predicates on
natural numbers.
-/
def ev (n : ℕ) : Prop := n % 2 = 0
def od (n : ℕ) : Prop := ¬ ev n
/-
We now formally represent some sets.
Bear in mind that we represent a set
as a predicate, applicable to a value
of the member type, and "reducing to"
a proposition, possib... |
0e3dcd9d399b4d616ba9e4a4dd5c34a315945ba9 | 6432ea7a083ff6ba21ea17af9ee47b9c371760f7 | /src/Lean/Compiler/NameMangling.lean | 80adbb39919afd9313fdc800be323cbe3c95823d | [
"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 | 1,932 | lean | /-
Copyright (c) 2018 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
-/
import Lean.Data.Name
namespace String
private def mangleAux : Nat → String.Iterator → String → String
| 0, _, r => r
| i+1, it, r =>
let c := i... |
6fdb206418c99dfaf15526cdd2d9fc4ee0b34a8b | 6f1049e897f569e5c47237de40321e62f0181948 | /src/solutions/05_sequence_limits.lean | 856c9d1d034d2d0845419a28849b5f2d627ae2c1 | [
"Apache-2.0"
] | permissive | anrddh/tutorials | f654a0807b9523608544836d9a81939f8e1dceb8 | 3ba43804e7b632201c494cdaa8da5406f1a255f9 | refs/heads/master | 1,655,542,921,827 | 1,588,846,595,000 | 1,588,846,595,000 | 262,330,134 | 0 | 0 | null | 1,588,944,346,000 | 1,588,944,345,000 | null | UTF-8 | Lean | false | false | 7,605 | lean | import data.real.basic
import algebra.pi_instances
import tuto_lib
notation `|`x`|` := abs x
/-
In this file we manipulate the elementary definition of limits of
sequences of real numbers.
mathlib has a much more general definition of limits, but here
we want to practice using the logical operators and relations
cov... |
7d03d04befdd9bea3cdfa8fd064b00db9a5a2579 | 12dabd587ce2621d9a4eff9f16e354d02e206c8e | /world03/level01.lean | 81bc3d657bb3908f52f277a8a79f19ab512152f3 | [] | 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 | 151 | lean | import mynat.mul
lemma zero_mul (m : mynat) : 0 * m = 0 :=
begin
induction m with h hd,
rw mul_zero,
refl,
rw mul_succ,
rw add_zero,
rw hd,
refl,
end
|
7548ca163e0c557baa59eecfe2b8797c5dc32a16 | 6432ea7a083ff6ba21ea17af9ee47b9c371760f7 | /tests/lean/1781.lean | 036e4865e82f79acf39dedf04d49ddb780d8494d | [
"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 | 1,007 | lean | import Lean.Elab.ElabRules
syntax "kdef " ident (".{" ident,+ "}")? " : " term " := " term : command
open Lean Elab Command Term in
elab_rules : command | `(kdef $name $[.{ $levelParams?,* }]? : $type := $value) => do
let levelParams :=
if let some levelParams := levelParams?
then levelParams.getElems.toList... |
5b97cb354afaaa9e236813f6ab4b36befeebf085 | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/data/num/basic.lean | 91816b9d582330b29a627e852ce295e73ec8e591 | [
"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 | 16,856 | 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, Mario Carneiro
-/
/-!
# Binary representation of integers using inductive types
> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file requir... |
8d278a9cfaded44ef4eb80b0f0f325f34eb461f8 | 874a8d2247ab9a4516052498f80da2e32d0e3a48 | /pigeonholev3.lean | d06c914847c256a8901cd40c577b3d38eddf91da | [] | no_license | AlexKontorovich/Spring2020Math492 | 378b36c643ee029f5ab91c1677889baa591f5e85 | 659108c5d864ff5c75b9b3b13b847aa5cff4348a | refs/heads/master | 1,610,780,595,457 | 1,588,174,859,000 | 1,588,174,859,000 | 243,017,788 | 0 | 1 | null | null | null | null | UTF-8 | Lean | false | false | 4,889 | lean | import tactic
def injective {X Y} (f : X → Y) := ∀ x₁ x₂, f x₁ = f x₂ → x₁ = x₂
def range {X Y} (f : X → Y) := { y | ∃ x, f x = y }
theorem comp_inj_is_inj
{X Y Z} (f : X → Y) (g : Y → Z)
(p1 : injective f)
(p2 : injective g)
: injective (g ∘ f)
:= begin
introv x p3,
change g (f x) = g (f x₂) at p3,
app... |
683ed3b2fc3eb25882f808942bc27afebb849c17 | 968e2f50b755d3048175f176376eff7139e9df70 | /examples/prop_logic_lean_summary/unnamed_597.lean | b3ce694179c064269851eaae3517eb7bc1e93d0e | [] | 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 | 82 | lean | variables p : Prop
-- BEGIN
example (k : false) : ¬p :=
assume h : p,
k
-- END |
95c6b2d163d9bac5250cf2557c8fd78f7addd9e6 | 4f9ca1935adf84f1bae9c5740ec1f2ad406716fa | /src/analysis/calculus/mean_value.lean | 333dcb12044af9b2146208ae72bed00e9f294acc | [
"Apache-2.0"
] | permissive | matthew-hilty/mathlib | 36fd7db866365e9ee4a0ba1d6f8ad34d068cec6c | 585e107f9811719832c6656f49e1263a8eef5380 | refs/heads/master | 1,607,100,509,178 | 1,578,151,707,000 | 1,578,151,707,000 | null | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 24,722 | 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
/-!
# The mean value inequality and equalities
In this file we prove the following facts:
* `convex.nor... |
3d2d6effc9bc3aac1553d0b7465ea4c39741726a | 5d166a16ae129621cb54ca9dde86c275d7d2b483 | /library/init/data/list/lemmas.lean | 0ecbcb4b1747a9eb01460769d0be3c14d3390b68 | [
"Apache-2.0"
] | permissive | jcarlson23/lean | b00098763291397e0ac76b37a2dd96bc013bd247 | 8de88701247f54d325edd46c0eed57aeacb64baf | refs/heads/master | 1,611,571,813,719 | 1,497,020,963,000 | 1,497,021,515,000 | 93,882,536 | 1 | 0 | null | 1,497,029,896,000 | 1,497,029,896,000 | null | UTF-8 | Lean | false | false | 31,622 | lean | /-
Copyright (c) 2014 Parikshit Khanna. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn
-/
prelude
import init.data.list.basic init.function init.meta init.data.nat.lemmas
import init.meta.interactive i... |
e75b2cd1c031c975bb3a16b00242e94696f5d351 | 63abd62053d479eae5abf4951554e1064a4c45b4 | /src/ring_theory/power_series.lean | 3781588d4bc0bedb15eb34d4de5795edf7875fbb | [
"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 | 59,127 | lean | /-
Copyright (c) 2019 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Kenny Lau
-/
import data.mv_polynomial
import ring_theory.ideal.operations
import ring_theory.multiplicity
import tactic.linarith
/-!
# Formal power series
This file ... |
a706ef843676e3ac03a3b869b46455d7b537b06e | 38bf3fd2bb651ab70511408fcf70e2029e2ba310 | /src/data/real/nnreal.lean | c366f7d5dde4194c928021d430a5b4ec9ac2f380 | [
"Apache-2.0"
] | permissive | JaredCorduan/mathlib | 130392594844f15dad65a9308c242551bae6cd2e | d5de80376088954d592a59326c14404f538050a1 | refs/heads/master | 1,595,862,206,333 | 1,570,816,457,000 | 1,570,816,457,000 | 209,134,499 | 0 | 0 | Apache-2.0 | 1,568,746,811,000 | 1,568,746,811,000 | null | UTF-8 | Lean | false | false | 17,096 | lean | /-
Copyright (c) 2018 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
Nonnegative real numbers.
-/
import data.real.basic order.lattice algebra.field
noncomputable theory
open lattice
open_locale classical
def nnreal := {r : ℝ // 0 ≤ r... |
7d6ed7fd21b66cb0af51527abeb1780e0e48105e | bd12a817ba941113eb7fdb7ddf0979d9ed9386a0 | /src/category_theory/natural_isomorphism.lean | 5f16c9b33270f835624f4b542c3e36c10cba064d | [
"Apache-2.0"
] | permissive | flypitch/mathlib | 563d9c3356c2885eb6cefaa704d8d86b89b74b15 | 70cd00bc20ad304f2ac0886b2291b44261787607 | refs/heads/master | 1,590,167,818,658 | 1,557,762,121,000 | 1,557,762,121,000 | 186,450,076 | 0 | 0 | Apache-2.0 | 1,557,762,289,000 | 1,557,762,288,000 | null | UTF-8 | Lean | false | false | 4,450 | lean | -- Copyright (c) 2017 Scott Morrison. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Authors: Tim Baumann, Stephen Morgan, Scott Morrison
import category_theory.functor_category
import category_theory.isomorphism
open category_theory
universes v₁ v₂ v₃ u₁ u₂ u₃ -- decl... |
9933895be48db013b2682d025d2a135f19aafcdb | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/measure_theory/function/l1_space.lean | 0ca5e2f3fd606146eaf698d8ec5a5ab501c7f6ab | [
"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 | 56,205 | lean | /-
Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Zhouhang Zhou
-/
import measure_theory.function.lp_order
/-!
# Integrable functions and `L¹` space
> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file require a cor... |
3dff6517220eeddf4f343c3d6601a73276f2750c | 8c9f90127b78cbeb5bb17fd6b5db1db2ffa3cbc4 | /one_lt_twice.lean | 050e6c8d42538de9ad3c4befa51c16d75e6a6d8c | [] | no_license | picrin/lean | 420f4d08bb3796b911d56d0938e4410e1da0e072 | 3d10c509c79704aa3a88ebfb24d08b30ce1137cc | refs/heads/master | 1,611,166,610,726 | 1,536,671,438,000 | 1,536,671,438,000 | 60,029,899 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 5,061 | lean | -- A rigorous proof of ∀ m : nat, 0 < m → 1 < 2 * m
-- There's a class of problems I struggle to prove by induction/recursion (I'm working in CIC). The best way I can describe this class of problems is "finite cases below m, inductive case above m".
-- An "easy" example problem of this kind is ∀ m : nat, 0 < m → 1 < 2... |
9ce5b8813c0536a13a6726f44d8c5302e9cc68b5 | fa02ed5a3c9c0adee3c26887a16855e7841c668b | /src/tactic/linarith/verification.lean | 360a6fdf4655c61812a9c61f4523fe27117d93d7 | [
"Apache-2.0"
] | permissive | jjgarzella/mathlib | 96a345378c4e0bf26cf604aed84f90329e4896a2 | 395d8716c3ad03747059d482090e2bb97db612c8 | refs/heads/master | 1,686,480,124,379 | 1,625,163,323,000 | 1,625,163,323,000 | 281,190,421 | 2 | 0 | Apache-2.0 | 1,595,268,170,000 | 1,595,268,169,000 | null | UTF-8 | Lean | false | false | 7,231 | lean | /-
Copyright (c) 2020 Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis
-/
import tactic.linarith.elimination
import tactic.linarith.parsing
/-!
# Deriving a proof of false
`linarith` uses an untrusted oracle to produce a certificate of... |
56522f1c471a13de9996740c686a45083208008e | 74addaa0e41490cbaf2abd313a764c96df57b05d | /Mathlib/tactic/linarith/default_auto.lean | 4d9d5fb06d69cd1a3830e1a8e1ed56900aed258e | [] | 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 | 155 | lean | import Mathlib.PrePort
import Mathlib.Lean3Lib.init.default
import Mathlib.tactic.linarith.frontend
import Mathlib.PostPort
namespace Mathlib
end Mathlib |
b488edf8d249deb513c52cd7d97ccfb96e9e37e7 | 35677d2df3f081738fa6b08138e03ee36bc33cad | /src/tactic/transfer.lean | 630bd4c7606edf0b1b43aa1dc1e51d2a521fa7d9 | [
"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 | 7,464 | lean | /-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Johannes Hölzl (CMU)
-/
prelude
import init.meta.tactic init.meta.match_tactic init.meta.mk_dec_eq_instance
import init.data.list.instances logic.relator
open tactic expr list monad
na... |
1f430908088fe4e12b5f8cf7a1d40eab8728af9c | 83c8119e3298c0bfc53fc195c41a6afb63d01513 | /tests/lean/simp_symm.lean | 5156b76c6d7478cbab233b2350478ad62f59fd3b | [
"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 | 1,528 | lean | constants f g : nat → nat
-- Test `simp` with lemmas in reverse direction
axiom f_id : ∀ x, f x = x
axiom f_g : ∀ x, f x = g x
example (a : nat) : g a = a :=
by simp [←f_g, f_id] -- works
-- Alternate syntax:
example (a : nat) : g a = a :=
by simp [<-f_g, f_id] -- works
-- Universe polymorphic lemmas work:
universe u... |
d11b6fbda4041ab70887875fb7afa0bb35154ced | 2babdfead4bea221d0523153599dbb5c8e6bc7a3 | /bin/yml2mm.lean | 9e4824b153bbd8a2db0acf6ad64491cc2ffe7815 | [
"CC-BY-4.0"
] | permissive | pjf/RP-0 | 83bf5012e6b7aaec1e120baf680c02217b958c34 | 438016a526bbaadbea478db32d4a99f194ab94d2 | refs/heads/master | 1,611,302,579,298 | 1,416,197,416,000 | 1,416,197,416,000 | 26,740,351 | 0 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 735 | lean | #!/usr/bin/perl
use 5.010;
use strict;
use warnings;
use autodie;
use YAML::Tiny;
use Data::Dumper;
# YAML to ModuleManager converter
# CC-BY Paul Fenwick, 2014
# May also be used under the same terms as Perl itself.
# Don't have Perl? Try strawberry!
# http://strawberryperl.com/
# Editing this file? Make changes ... |
a49f17b94c6bb1f0b37e75f3bbfe0a01a7f832a9 | 8cae430f0a71442d02dbb1cbb14073b31048e4b0 | /src/tactic/omega/find_scalars.lean | 7da227f7f43c407679d8f52ff7d2cb7584fd4299 | [
"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 | 3,048 | lean | /-
Copyright (c) 2019 Seul Baek. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Seul Baek
-/
/-
Tactic for performing Fourier–Motzkin elimination to find
a contradictory linear combination of input constraints.
-/
import tactic.omega.term
import data.list.min_max
op... |
e3a5a5c7176674067a2aea18cf121393e97d580b | 9be442d9ec2fcf442516ed6e9e1660aa9071b7bd | /src/Std/Data/PersistentHashMap.lean | 89df04062ee6818fdfb745c5f189589b674c297b | [
"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 | EdAyers/lean4 | 57ac632d6b0789cb91fab2170e8c9e40441221bd | 37ba0df5841bde51dbc2329da81ac23d4f6a4de4 | refs/heads/master | 1,676,463,245,298 | 1,660,619,433,000 | 1,660,619,433,000 | 183,433,437 | 1 | 0 | Apache-2.0 | 1,657,612,672,000 | 1,556,196,574,000 | Lean | UTF-8 | Lean | false | false | 14,914 | 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
-/
namespace Std
universe u v w w'
namespace PersistentHashMap
inductive Entry (α : Type u) (β : Type v) (σ : Type w) where
| entry (key : α) (val : β) : E... |
30b66fd3e83eaae0145c878a488737e692bd6311 | 9dc8cecdf3c4634764a18254e94d43da07142918 | /src/data/complex/basic.lean | b8c91c4bbf0d05012fc60afb59b5b6341d627c85 | [
"Apache-2.0"
] | permissive | jcommelin/mathlib | d8456447c36c176e14d96d9e76f39841f69d2d9b | ee8279351a2e434c2852345c51b728d22af5a156 | refs/heads/master | 1,664,782,136,488 | 1,663,638,983,000 | 1,663,638,983,000 | 132,563,656 | 0 | 0 | Apache-2.0 | 1,663,599,929,000 | 1,525,760,539,000 | Lean | UTF-8 | Lean | false | false | 30,825 | lean | /-
Copyright (c) 2017 Kevin Buzzard. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Mario Carneiro
-/
import data.real.sqrt
/-!
# The complex numbers
The complex numbers are modelled as ℝ^2 in the obvious way and it is shown that they form a field
of c... |
5a6a0cce095c23778c8ee8fd51fd94be2279a4e8 | 80cc5bf14c8ea85ff340d1d747a127dcadeb966f | /src/topology/category/UniformSpace.lean | d761b60183907237cace755038b947e5f025bbd5 | [
"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 | 6,928 | lean | /-
Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Reid Barton, Patrick Massot, Scott Morrison
-/
import category_theory.monad.limits
import topology.uniform_space.completion
import topology.category.Top.basic
/-!
# The category of un... |
30027c4327cd503c2e4ae54785b5c360092670eb | a9d0fb7b0e4f802bd3857b803e6c5c23d87fef91 | /hott/types/int/hott.hlean | 7507c5604f21a24ba0c02f866a308ee7de20a048 | [
"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 | 5,806 | hlean | /-
Copyright (c) 2015 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Floris van Doorn
Theorems about the integers specific to HoTT
-/
import .basic types.eq arity algebra.bundled
open core eq is_equiv equiv algebra is_trunc
open nat (hiding pred)
na... |
138b4f0629994bd1d6e5c6f131565323132992bd | 35677d2df3f081738fa6b08138e03ee36bc33cad | /test/norm_num.lean | c805631a6e2fff2025c6111c262a34ded8cbd670 | [
"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 | 1,765 | lean | /-
Copyright (c) 2017 Simon Hudon All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Mario Carneiro
Tests for norm_num
-/
import data.real.basic tactic.norm_num
example : 374 + (32 - (2 * 8123) : ℤ) - 61 * 50 = 86 + 32 * 32 - 4 * 5000
∧ 43 ≤ 74 + (33 ... |
f6b2f2c24aa873e23b7859fb7eb75424daa8180a | 05f637fa14ac28031cb1ea92086a0f4eb23ff2b1 | /tests/lean/sig4.lean | b83273d33d4f9d1f97fae4b95b766d9c065eedf0 | [
"Apache-2.0"
] | permissive | codyroux/lean0.1 | 1ce92751d664aacff0529e139083304a7bbc8a71 | 0dc6fb974aa85ed6f305a2f4b10a53a44ee5f0ef | refs/heads/master | 1,610,830,535,062 | 1,402,150,480,000 | 1,402,150,480,000 | 19,588,851 | 2 | 0 | null | null | null | null | UTF-8 | Lean | false | false | 377 | lean | check proj1 (pair 10 20)
eval proj1 (pair 10 20)
eval proj2 (pair 10 20)
eval proj2 (pair 10 (pair 20 30))
eval proj1 (pair 10 (pair 20 30))
eval proj1 (proj2 (pair 10 (pair 20 30)))
eval proj2 (proj2 (proj2 (pair 10 (pair 20 (pair 30 40)))))
definition NZ : Type := sig x : Nat, 1 ≤ x
variable t : NZ
check proj1 t
che... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.