Commit graph

149 commits

Author SHA1 Message Date
Rob Lewis
4a41e78124 fix(theories/analysis): make variables implicit in continuous_at_intro 2016-02-12 11:50:10 -08:00
Rob Lewis
2c56a2c48b feat(theories/{analysis, topology}): show eps-delta and topological continuity coincide on metric spaces 2016-02-12 11:50:10 -08:00
Rob Lewis
685049988c feat(theories/analysis): define metric topology 2016-02-12 11:50:10 -08:00
Rob Lewis
b8d86ffe48 feat(theories/topology): add theorem for proving sets open 2016-02-12 11:50:10 -08:00
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
Rob Lewis
87ec5ada07 fix(analysis/metric_space): unnecessary import, style, remove unnecessary lines 2016-02-04 11:03:28 -08:00
Rob Lewis
a675a5ede2 fix(algebra/ordered_field, analysis/real_limit): generalize theorem to ordered fields 2016-02-04 11:03:28 -08:00
Rob Lewis
f402f322aa feat(theories/analysis): add theorems about convergent sequences, functions, and continuity 2016-02-04 11:03:28 -08:00
Rob Lewis
40a1371cd0 feat(theories/analysis): define real square roots 2016-02-04 11:03:28 -08:00
Rob Lewis
796e16bdb7 feat(library/theories/analysis): add theorems about convergent functions in metric spaces 2016-02-04 11:03:28 -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
86fc326e08 refactor/feat(library/theories/analysis/*): reorganize analysis library and add some theorems 2016-01-16 10:53:56 -08:00
Jeremy Avigad
d9118ded76 feat(library/theories/topology/basic): show that generated topology is initial 2016-01-03 18:52:25 -08:00
Jeremy Avigad
4289daddcb refactor(library/data/{set,finset}/basic,library/*): change notation for image to tick mark 2016-01-03 18:52:25 -08:00
Jeremy Avigad
31aa256b99 feat(library/theories/measure_theory/sigma_algebra): start with definition and properties of sigma algebras 2016-01-03 18:52:25 -08:00
Jeremy Avigad
12a69bad04 refactor(library/data/finset/basic,library/*): get rid of finset singleton 2015-12-31 15:16:57 -08:00
Jeremy Avigad
86b64cf43b feat(library/data/set/*,library/algebra/group_bigops): better finiteness lemmas, reindexing for big operations 2015-12-31 15:16:57 -08:00
Leonardo de Moura
f177082c3b refactor(*): normalize metaclass names
@avigad and @fpvandoorn, I changed the metaclasses names. They
were not uniform:
- The plural was used in some cases (e.g., [coercions]).
- In other cases a cryptic name was used (e.g., [brs]).

Now, I tried to use the attribute name as the metaclass name whenever
possible. For example, we write

   definition foo [coercion] ...
   definition bla [forward] ...

and

  open [coercion] nat
  open [forward] nat

It is easier to remember and is uniform.
2015-12-28 10:39:15 -08:00
Jeremy Avigad
395eab7c2c feat(library/theories/topology/basic): start on topology (with Jacob Gross) 2015-12-26 10:29:58 -08:00
Jeremy Avigad
d83e5d25fc feat(library/theories/measure_theory/extended_real): start on extended reals 2015-12-24 16:27:48 -05:00
Jeremy Avigad
84cdf3d36d feat(library/theories/analysis/normed_space): start theory of normed spaces for analysis 2015-12-22 16:39:13 -05:00
Jeremy Avigad
08fbf127c6 feat(library/theories/analysis/metric_space,real_limit): define complete metric space, make real an instance 2015-12-22 16:39:13 -05: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
49eae56db4 test(library/theories/group_theory): test auto-include in the group theory library 2015-12-13 13:40:54 -08:00
Leonardo de Moura
b94e31a72c refactor(library): remove algebra namespace 2015-12-05 23:50:01 -08:00
Leonardo de Moura
9bedbbb739 refactor(library,hott): remove coercions between algebraic structures
They are classes, and mixing coercion with type class resolution is a
recipe for disaster (aka counterintuitive behavior).
2015-11-11 11:57:44 -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
9e5a27dc77 refactor(library/{pnat,rat,real}/*): protect theorems in pnat and rat 2015-11-08 14:04:59 -08:00
Jeremy Avigad
da5bd03656 refactor(library/init/nat,library/data/nat/*): chagne dots to underscores in protected names 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
33006919b3 refactor(library/theories/group_theory/hom): cleanup definition 2015-11-08 14:04:58 -08:00
Leonardo de Moura
08c061e1fa refactor(library/data/set): remove [reducible] annotation from set operations 2015-11-08 14:04:56 -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
Rob Lewis
0aaa8a9770 feat(theories/analysis/real_limit): fix analysis.real_limit 2015-11-08 14:04:56 -08:00
Leonardo de Moura
840f0ea05d fix(library/theories/analysis/real_limit): minor 2015-11-08 14:04:55 -08:00
Leonardo de Moura
9fb59a05f5 fix(library/theories/analysis/metric_space): minor correction 2015-11-08 14:04:55 -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
Jeremy Avigad
7f88e9ad33 fix(library/data/real,library/theories/group_theory): group theory and real/basic 2015-11-08 14:04:55 -08:00
Jeremy Avigad
ffbb2be6ac fix(library/theories/group_theory): group_theory 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
f6d22c0002 fix(library/theories/group_theory/finsubg): fix compilation errors 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
42c9bdc463 feat(library/theories/analysis/{metric_space,real_limit}: add convergence theorems 2015-09-20 20:51:28 -04:00
Rob Lewis
d6be32e4ef feat(library/theories/analysis): refactor IVT proof, add more general version of IVT 2015-09-17 16:22:46 -04:00
Rob Lewis
856a09d70e chore(library/theories/analysis): make proof of IVT compile faster 2015-09-16 16:44:28 -04:00
Rob Lewis
631b9b3312 feat(library/theories/analysis): clean and simplify proof of IVT 2015-09-16 08:28:11 -07:00
Rob Lewis
ea3915f279 feat(library/theories/analysis): prove intermediate value theorem 2015-09-16 08:28:11 -07:00
Jeremy Avigad
352a906ba2 feat(library/theories/{metric_space,real_limit}): define metric spaces, limits, instantiate reals 2015-09-12 21:46:09 -04: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
244052b413 refactor(library/data/set/*): rename setext to ext 2015-08-09 22:14:25 -04:00
Jeremy Avigad
209d7b07aa feat(library/data/set/basic): add a few theorems 2015-08-09 22:13:18 -04: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
Leonardo de Moura
06f20694c8 fix(frontends/lean/builtin_exprs): fixes #768 2015-08-08 04:20:17 -07:00
Jeremy Avigad
0def951efa refactor(library/data/nat/sub,*): get rid of diff, tidy some max and min theorems 2015-08-03 22:41:56 -04:00
Leonardo de Moura
8dc2246a83 refactor(library/theories/group_theory/action): improve compilation time 2015-07-30 20:58:38 -07:00
Leonardo de Moura
44518fcab1 refactor(library/theories/group_theory): move diff to nat 2015-07-30 20:14:48 -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
Jeremy Avigad
3fc74c2ba8 feat(library/theories/combinatorics/choose): show the number of subsets of s of size k is choose (card s) k 2015-07-27 07:46:59 -07:00
Jeremy Avigad
c9d6cc5255 feat(library/data/{finset,set}): various basic facts 2015-07-25 14:02:44 -04: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
946308b187 feat(frontends/lean): allow anonymous 'have'-expressions in tactic mode 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
c0cd72fc8d chore(library/theories/group_theory): remove dangling "check"s 2015-07-16 22:50:02 -04:00
Leonardo de Moura
9d83361fdc refactor(library): use subtype instead of sigma 2015-07-16 22:48:33 -04:00
Leonardo de Moura
d70c79f4e3 refactor(library/data/fin,library/theories/group_theory/cyclic): fixes #735 2015-07-16 19:39:12 -04:00
Haitao Zhang
ca895e4901 fix(library/data/finset/partition): improve lemmas on binary partition 2015-07-16 14:13:06 -07:00
Haitao Zhang
a04c6b0c7d feat(library/theories/group_theory): Group and finite group theories
subgroup.lean : general subgroup theories, quotient group using quot
finsubg.lean : finite subgroups (finset and fintype), Lagrange theorem,
  finite cosets and lcoset_type, normalizer for finite groups, coset product
  and quotient group based on lcoset_type, semidirect product
hom.lean : homomorphism and isomorphism, kernel, first isomorphism theorem
perm.lean : permutation group
cyclic.lean : cyclic subgroup, finite generator, order of generator, sequence and rotation
action.lean : fixed point, action, stabilizer, orbit stabilizer theorem, orbit partition,
  Cayley theorem, action on lcoset, cardinality of permutation group
pgroup.lean : subgroup with order of prime power, Cauchy theorem, first Sylow theorem
2015-07-15 20:02:11 -07: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
Jeremy Avigad
4db89e16dc feat(library/theories): create theories folder 2015-06-05 09:32:00 -07:00