Leonardo de Moura
42fbc63bb6
fix(library/tc_multigraph): avoid name collisions
...
@avigad, @fpvandoorn, @rlewis1988, @dselsam
I changed how transitive instances are named.
The motivation is to avoid a naming collision problem found by Daniel.
Before this commit, we were getting an error on the following file
tests/lean/run/collision_bug.lean.
Now, transitive instances contain the prefix "_trans_".
It makes it clear this is an internal definition and it should not be used
by users.
This change also demonstrates (again) how the `rewrite` tactic is
fragile. The problem is that the matching procedure used by it has
very little support for solving matching constraints that involving type
class instances. Eventually, we will need to reimplement `rewrite`
using the new unification procedure used in blast.
In the meantime, the workaround is to use `krewrite` (as usual).
2016-02-04 13:15:42 -08:00
Leonardo de Moura
cb12b9b876
refactor(library): cleanup proofs
...
Fixed proofs that broke when we tried to implement a "checkpoint" have.
2016-02-03 19:52:23 -08:00
Jeremy Avigad
6913eb0c76
refactor(library/init/subtype.lean): put subtype notation in the namespace
...
The notation { x : A | P x } is overloaded in set, and is ambiguous.
2015-12-22 16:39:13 -05:00
Jeremy Avigad
0e3b13f1a0
refactor(library/algebra): combine group_bigops and group_set_bigops
2015-12-22 16:39:13 -05:00
Sebastian Ullrich
2185ee7e95
feat(library/tactic): make let tactic transparent, introduce new opaque note tactic
...
The new let tactic is semantically equivalent to let terms, while `note`
preserves its old opaque behavior.
2015-12-14 10:14:02 -08:00
Leonardo de Moura
b94e31a72c
refactor(library): remove algebra namespace
2015-12-05 23:50:01 -08:00
Jeremy Avigad
697df0e68c
refactor(library/*): use type classes for div and mod
2015-11-08 14:04:59 -08:00
Jeremy Avigad
2beb0030d6
refactor(library/*): protect sub in nat, div in nat and int
2015-11-08 14:04:59 -08:00
Jeremy Avigad
6dfaf1863c
refactor(library/data/int/{basic,order}): protect theorem names
2015-11-08 14:04:59 -08:00
Jeremy Avigad
7bb2ffb79a
refactor(library/data/nat/*): protect some theorems in nat
2015-11-08 14:04:59 -08:00
Leonardo de Moura
6df31d3406
refactor(library/data/nat/basic): mark some theorems as protected to avoid overloading
2015-11-08 14:04:56 -08:00
Leonardo de Moura
fbe80d48dc
chore(library): remove "set_option pp.*" commands
2015-11-08 14:04:55 -08:00
Leonardo de Moura
ce21996635
feat(library): define custom recursors for nat, and minimize the use of krewrite
2015-11-08 14:04:55 -08:00
Leonardo de Moura
724aacb2c1
fix(library): remove "-[notations]" hack at "open -[notations] algebra"
2015-11-08 14:04:55 -08:00
Leonardo de Moura
26eb6fa849
feat(*): new numeral encoding
2015-11-08 14:04:55 -08:00
Leonardo de Moura
07b33ec75e
fix(library/data/int,library/data/rat): int and rat
2015-11-08 14:04:54 -08:00
Leonardo de Moura
27b4eb2058
fix(library/data): hf, int, nat, pnat
2015-11-08 14:04:54 -08:00
Leonardo de Moura
3369152559
fix(library/data,library/theories): fin, bag, finset, hf, list, ...
2015-11-08 14:04:54 -08:00
Leonardo de Moura
e6d7e89419
fix(library/data/int,library/data/nat): nat and int
2015-11-08 14:04:54 -08:00
Jeremy Avigad
d9e166f77f
feat/refactor(library/data/real/*): add / improve casts to real from nat, int, rat
2015-09-12 21:46:09 -04:00
Jeremy Avigad
de83a68667
refactor(library/data/{int,rat}/*): clean up casts between nat, int, and rat
2015-09-12 21:46:09 -04:00
Jeremy Avigad
7d72c9b6b5
refactor(library/algebra/{field,ordered_field}, library/*): more renaming, setting implicit arguments
...
Many theorems for division rings and fields have stronger versions for discrete fields, where we
assume x / 0 = 0. Before, we used primes to distinguish the versions, but that has the downside
that e.g. for rat and real, all the theorems are equally present. Now, I qualified the weaker ones
with division_ring.foo or field.foo. Maybe that is not ideal, but let's try it.
I also set implicit arguments with the following convention: an argument to a theorem should be
explicit unless it can be inferred from the other arguments and hypotheses.
2015-09-01 14:47:19 -07:00
Jeremy Avigad
7dda69fec7
feat/refactor(library/theories/number_theory/irrational_roots,library/*): show nth roots irrational, and add lots of missing theorems
2015-08-16 23:23:23 -04:00
Jeremy Avigad
c83d592c17
feat(library/theories/number_theory/square_root_irrational): add proof that sqrt 2 is irrational
2015-08-14 18:49:57 -07:00
Jeremy Avigad
4a36f843f7
refactor(library/algebra/group_power,library/*): change definition of pow
...
I changed the definition of pow so that a^(succ n) reduces to a * a^n rather than a^n * a.
This has the nice effect that on nat and int, where multiplication is defined by recursion on the right,
a^1 reduces to a, and a^2 reduces to a * a.
The change was a pain in the neck, and in retrospect maybe not worth it, but oh, well.
2015-08-14 18:49:57 -07:00
Jeremy Avigad
8f815cabc0
refactor(library/data/finset/comb,library/data/set/basic,library/*): rename 'filter' to 'sep' to free up 'set.filter'
2015-08-08 18:10:44 -04:00
Jeremy Avigad
eaf886cb5a
refactor(library/algebra/group_bigops,library/*): put group_bigops in 'finset' namespace, in preparation for set versions
2015-08-08 04:23:52 -07:00
Jeremy Avigad
d02b83b6d6
feat(library/theories/number_theory/prime_factorization): prove that n is equal to its prime factorization
2015-07-27 15:16:16 -07:00
Leonardo de Moura
e221d38790
feat(library/tactic/assert_tactic): allow duplicate names for hypotheses in assert tactic
2015-07-23 18:52:59 -07:00
Leonardo de Moura
cc396cba76
feat(frontends/lean): allow backticks in binder declarations
2015-07-22 13:54:47 -07:00
Leonardo de Moura
0de715ae54
refactor(library/data): cleanup proofs using new features
2015-07-21 09:57:10 -07:00
Leonardo de Moura
b9451549d1
feat(frontends/lean): add type
notation for referencing hypotheses
2015-07-20 21:43:47 -07:00
Leonardo de Moura
812ddf1ef5
feat(frontends/lean): add 'suppose'-expression
...
It is a variant of 'assume' that allow anonymous declarations.
2015-07-19 12:15:12 -07:00
Leonardo de Moura
92f8eb173b
feat(frontends/lean): use 'this' as the name for anonymous 'have'-expression
2015-07-18 13:36:05 -05:00
Leonardo de Moura
784184a137
chore(library/theories/number_theory/primes): remove unnecessary "have"
2015-07-18 12:48:07 -05:00
Leonardo de Moura
ade60278d0
refactor(library): rename iff.mp' to iff.mpr
2015-07-18 08:52:58 -05:00
Leonardo de Moura
9d83361fdc
refactor(library): use subtype instead of sigma
2015-07-16 22:48:33 -04:00
Leonardo de Moura
89f69630b6
feat(library): use sigma instead of exists (experimental)
2015-07-15 15:49:47 -04:00
Jeremy Avigad
70407473c2
feat(library/theories/combinatorics/choose): begin theory of binomial coefficients
2015-07-11 19:01:43 -04:00
Jeremy Avigad
7f1993be41
feat(library/theories/number_theory/prime_factorization): begin theory, with multiplicity and prime_factors
2015-07-07 21:05:48 -07:00
Jeremy Avigad
ac7f7cee63
refactor(library/theories/number_theory/primes): add some minor theorems, and rename some theorems
2015-07-07 21:05:48 -07:00
Jeremy Avigad
d9098ff4e5
fix(library/theories/number_theory/bezout): make duplicate proof of prime -> irreducible an example
2015-07-07 21:05:48 -07:00
Leonardo de Moura
db1fae0461
feat(library/theories/number_theory/primes): cleanup proofs
2015-07-05 08:21:16 -07:00
Leonardo de Moura
d1b5a6be54
feat(library/theories/number_theory/primes): add Haitao's divisor_of_prime_pow lemma
2015-07-04 13:27:10 -07:00
Leonardo de Moura
f4f77e7f0b
feat(library): move data/nat/primes to theories/number_theory
2015-07-04 09:49:14 -07:00
Jeremy Avigad
a776e13c3b
feat(library/theories/number_theory/bezout): for nat, irreducible implies prime
2015-07-04 22:56:55 +10:00
Jeremy Avigad
54128eb45f
feat(library/theories/number_theory/bezout): add Bezout's theorem, adapted from William Peterson's project
2015-06-27 19:13:36 +10:00