Commit graph

14 commits

Author SHA1 Message Date
Leonardo de Moura
deb1b3dc79 refactor(library): replace assert-exprs with have-exprs 2016-02-29 11:53:26 -08:00
Leonardo de Moura
510168a387 refactor(library,hott): remove unnecessary annotations 2016-02-25 12:26:20 -08:00
Jeremy Avigad
3c18f05cab feat(library/algebra): add some useful facts 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
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
Leonardo de Moura
b94e31a72c refactor(library): remove algebra namespace 2015-12-05 23:50:01 -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
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
e6d7e89419 fix(library/data/int,library/data/nat): nat and int 2015-11-08 14:04:54 -08:00
Leonardo de Moura
a618bd7d6c refactor(library): use type classes for encoding all arithmetic operations
Before this commit we were using overloading for concrete structures and
type classes for abstract ones.

This is the first of series of commits that implement this modification
2015-11-08 14:04:54 -08: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
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
2e3b1b04cd feat(library/algebra/ring_power): add properties of power in ring structures 2015-07-07 21:05:48 -07:00