Commit graph

348 commits

Author SHA1 Message Date
Jeremy Avigad
1546c04154 feat(library/theories/analysis/complex_norm): instantiate complex numbers as a real normed vector space 2016-02-22 11:25:24 -08:00
Jeremy Avigad
3c18f05cab feat(library/algebra): add some useful facts 2016-02-22 11:25:23 -08:00
Jeremy Avigad
a08395b17e refactor(library/algebra/complete_lattice): make complete lattices more usable
I addressed two problems. First, the theorem names and notation were all in
the namespace complete_lattice. The problem was that if you opened that
namespace, names (like "sup" and "inf") and notation clashed with global notation
for lattices.

The other problem was that if you defined a lattice using Sup, the Sup you got
was not the Sup you want; it was the Sup-construction from the Inf-construction
from the Sup.

Everything seems good now.
2016-02-22 11:25:23 -08:00
Jeremy Avigad
03cd2c0013 feat/refactor(library/algebra/interval): use i for infinite, add some theorems 2016-02-22 11:25:23 -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
a675a5ede2 fix(algebra/ordered_field, analysis/real_limit): generalize theorem to ordered fields 2016-02-04 11:03:28 -08:00
Rob Lewis
dcfc496992 feat(algebra/ordered_field): ad missing theorem 2016-02-04 11:03:28 -08:00
Rob Lewis
110036c4dc feat(library/algebra/ordered_field): add missing theorems 2016-02-04 11:03:28 -08:00
Leonardo de Moura
790dbc53c3 refactor(library/algebra/ring): cleanup 2016-02-03 20:07:12 -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
Leonardo de Moura
c779590517 feat(library/algebra/ring): add lemma 2016-01-30 16:34:59 -08:00
Jeremy Avigad
27865e1c8b feat(library/algebra/order_bigops): add min and max over finsets and finite sets 2016-01-24 16:26:57 -08:00
Jeremy Avigad
69d953126a refactor(library/algebra/ordered_group,ordered_ring): add versions of classes with decidable linear order, for min and max 2016-01-24 16:26:57 -08:00
Jeremy Avigad
1980baf784 feat(library/algebra/group_bigops): add Prod_semigroup, for cases without a unit 2016-01-24 16:26:57 -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
Johannes Hölzl
12571c92d8 refactor(library/algebra): explicit parameters also for fun instances 2016-01-06 10:58:14 -08:00
Johannes Hölzl
6d6a00f48b refactor(library/algebra): fix theorem names 2016-01-06 10:57:55 -08:00
Johannes Hölzl
f7ea9a5f64 feat(library/algebra): add theory about Galois connections
Adds a small theory about Galois connections, i.e. order theoretic adjoints, and their relations to
least upper and greatest lower bounds.
2016-01-06 10:57:32 -08:00
Johannes Hölzl
9c28552afb feat(library/algebra): add lattice instances for Prop, fun, and set
Adds weak_order, lattice and complete_lattice instances for Prop, fun, and set. Adds supporting
theorems to various other places.
2016-01-06 10:57:32 -08:00
Rob Lewis
458725e63f feat(library/algebra): add missing theorems to group and ordered ring 2016-01-04 14:45:39 -05: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
7600d04533 library/algebra/complete_lattice): fix typo in comment 2016-01-03 18:52:25 -08:00
Jeremy Avigad
173368801b fix(library/algebra/interval): rename namespace, and move a theorem 2016-01-03 18:52:25 -08:00
Leonardo de Moura
5feef27c2b feat(frontends/lean/notation_cmd): relax restriction on user defined tokens
Before this commit, Lean would forbid new tokens containing '(' or ')'.
We relax this restriction. Now, we just forbid new tokens starting with '(' or ending with ')'.
2016-01-02 13:58:46 -08:00
Leonardo de Moura
712e19e22a fix(library/blast/forward/ematch): bug in the ematching procedure 2015-12-31 21:26:44 -08:00
Leonardo de Moura
54f2c0f254 feat(library/blast/forward): inst_simp should use the left-hand-side as a pattern (if none is provided by the user)
The motivation is to reduce the number of instances generated by ematching.

For example, given

   inv_inv:  forall a, (a⁻¹)⁻¹ = a

the new heuristic uses ((a⁻¹)⁻¹) as the pattern.
This matches the intuition that inv_inv should be used a simplification
rule.

The default pattern inference procedure would use (a⁻¹). This is bad
because it generates an infinite chain of instances whenever there is a
term (a⁻¹) in the proof state.
By using (a⁻¹), we get
   (a⁻¹)⁻¹ = a
Now that we have (a⁻¹)⁻¹, we can match again and generate
   ((a⁻¹)⁻¹)⁻¹ = a⁻¹
and so on
2015-12-31 20:20:39 -08:00
Jeremy Avigad
7f25dd6646 feat(library/data/nat/bigops): sums and products over intervals of natural numbers 2015-12-31 15:16:57 -08:00
Jeremy Avigad
a28ded641c refactor(library/algebra/interval): rename intervals to interval 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
b35abcc6a8 refactor(library): rename strategy "msimp" ==> "inst_simp"
"inst_simp" means "instantiate simplification lemmas"
The idea is to make it clear that this strategy is *not* a simplifier.
2015-12-31 12:45:48 -08:00
Leonardo de Moura
dc6a3e30c0 refactor(library): test simp and msimp in the standard library 2015-12-30 11:22:58 -08:00
Leonardo de Moura
41a01bb606 feat(library/blast/forward/ematch): add option 'blast.ematch.max_instances' 2015-12-29 20:36:11 -08:00
Leonardo de Moura
0148bb08fd feat(library/blast): add 'ematch_simp' strategy for blast and msimp shortcut for it.
This strategy is based on ematching and congruence closure, but it uses
the [simp] lemmas instead of [forward] lemmas.
2015-12-29 20:04:31 -08:00
Leonardo de Moura
726867a8fb refactor(library/algebra/ring): minor cleanup 2015-12-29 11:16:18 -08:00
Leonardo de Moura
3557bd36e7 refactor(library/algebra/group): cleanup proofs using simp and add [simp] attribute 2015-12-29 10:48:47 -08:00
Jeremy Avigad
c52ffda0e0 feat(library/algebra/intervals): add notation for intervals 2015-12-26 10:45:53 -08: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
5b3fbf1618 feat(library/algebra/module): make a start on modules and vector spaces (with material from Nathaniel Thomas) 2015-12-22 16:39:13 -05:00
Jeremy Avigad
baf11d0018 feat(library/algebra/ring_bigops): make start on file with more properties of sums and products 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
Soonho Kong
f1daf8f24e fix(algebra/group.lean): remove unnecessary use of add.assoc from theorem bit0_add_bit1_helper 2015-12-22 09:12:57 -05:00
Floris van Doorn
da5f10ce63 feat(hott): minor fixes. allow the usage of numerals for trunc_index 2015-12-17 12:46:16 -08:00
Leonardo de Moura
42eda36225 chore(library/algebra/ordered_ring): use 'note' 2015-12-15 09:33:57 -08:00
Leonardo de Moura
193a9d8cde refactor(library/norm_num): avoid manual constant name initialization
@rlewis1988 We group all Lean constants used in the C++ code at
src/library/constants.txt

Jeremy and Floris check this file before renaming constants in the
library. So, they can quickly decide whether C++ code will be affected
or not.

We also have a python script for initializing the C++ name objects.
To use the script:
   - go to src/library
   - execute
       python ../../script/gen_constants_cpp.py constants.txt

It will create the boring initialization and finalization code, and
declare a procedure get_<id>_name() for each constant in the file constants.txt.

I also move the norm_num1.lean to the set of unit tests that are
executed whenever we push a commit to the main branch.

I found an assertion violation at line 606. Could you take a look?

Best,
Leo
2015-12-13 21:38:59 -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
ef546c5c5b refactor(library): use anonymous instance implicit arguments 2015-12-13 11:46:48 -08:00
Floris van Doorn
2325d23f68 feat(hott): port nat and int from the standard library 2015-12-09 12:36:11 -08:00
Floris van Doorn
46739c8b70 feat(hott/algebra): port abstract structures 2015-12-09 12:34:06 -08:00
Leonardo de Moura
b36ce49f2b fix(tests,doc): adjust tests to changes in the standard library 2015-12-05 23:52:16 -08:00
Leonardo de Moura
b94e31a72c refactor(library): remove algebra namespace 2015-12-05 23:50:01 -08:00