I made some major changes in the library. I wanted to wait with pushing
until I had finished the formalization of the slice functor, but for
some reason that is very hard to formalize, requiring a lot of casts and
manipulation of casts. So I've not finished that yet.
Changes:
- in multiple files make more use of variables
- move dependent congr_arg theorems to logic.cast and proof them using heq (which doesn't involve nested inductions and fewer casts).
- prove some more theorems involving heq, e.g. hcongr_arg3 (which do not
require piext)
- in theorems where casts are used in the statement use eq.rec_on
instead of eq.drec_on
- in category split basic into basic, functor and natural_transformation
- change the definition of functor to use fully bundled
categories. @avigad: this means that the file semisimplicial.lean will
also need changes (but I'm quite sure nothing major). You want to
define the fully bundled category Delta, and use only fully bundled
categories (type and ᵒᵖ are notations for the fully bundled
Type_category and Opposite if you open namespace category.ops). If you
want I can make the changes.
- lots of minor changes
Later, we will add a custom annotation and elaborator for calc proofs.
This is the first step for issue #268.
Remark: we don't wrap the proof if it is of the form
- `by tactic`
- `begin tactic-seq end`
- `{ expr }`
The unit datatype is used by automation.
We want to be able to access its declaration without having to access
all dependencies (e.g., decidable, subsingleton, inhabited, ...).
This is *not* an optimization, but a way to make sure we can "import" unit
before we import other declarations.
I also had to mark the coercions as reducible.
Otherwise, given the constraint
?M (int.of_num 0) =?= (int.of_nat (nat.to_nat 0))
the unifier will not generate the solution
?M := fun x, x
If we don't do that, then any 'if' term that uses one of these theorems
will get "stuck". That is, the kernel will not be able to reduce them
because theorems are always opaque
in eq.lean, make rec_on depend on the proof, and add congruence theorems for n-ary functions with n between 2 and 5
in sigma.lean, finish proving equality of triples
in category.lean, define the functor category, and make the proofs of the arrow and slice categories easier for the elaborator
in eq, add theorem for proof irrelevance and congruence for binary functions
in sigma, add some support for triplets
in path, comment out two unneccesary definitions
in category, add Cat, slice, coslice, product and arrow categories, also add fully bundled approach