Commit graph

462 commits

Author SHA1 Message Date
Floris van Doorn
cc03ca9c6d fix(reserved_notation): make :: bind stronger than ++
this allows us to write l1 ++ a :: l2 without parentheses
2015-11-22 14:21:26 -08:00
Floris van Doorn
5abc450fad feat(list): port list.basic from the standard library 2015-11-22 14:21:26 -08:00
Floris van Doorn
88a62f8e74 feat(algebra|types): small additions
add to markdown file for algebra, and add some definitions in types/
2015-11-22 14:21:25 -08:00
Floris van Doorn
5328486d49 feat(hit): add elimination rule to propositions 2015-11-22 14:21:25 -08:00
Floris van Doorn
5b8486a34f feat(set_quotient): add some properties for set_quotients 2015-11-22 14:21:25 -08:00
Floris van Doorn
45d808ce7f feat(homotopy/circle): give all higher homotopy groups of the circle 2015-11-22 14:21:25 -08:00
Floris van Doorn
810a399699 style(homotopy/circle): clean-up encode-decode proof 2015-11-22 14:21:25 -08:00
Leonardo de Moura
491c7c55e1 feat(library/simplifier/simp_rule_set): add priorities for simp and congr rules 2015-11-16 22:34:06 -08:00
Floris van Doorn
9e492a8771 feat(category): more about adjoint functors
This commit has multiple unfinished proofs (commented out)
2015-11-16 21:32:09 -08:00
Floris van Doorn
f866f71491 feat(algebra/e_closure): add some support for dependent elimination of two_quotients 2015-11-16 21:32:09 -08:00
Floris van Doorn
206bcd4b2a feat(algebra/homotopy_group): define homotopy groups 2015-11-16 21:32:09 -08:00
Floris van Doorn
47be1e3a15 feat(types/pointed): change definition of loop space 2015-11-16 21:32:09 -08:00
Floris van Doorn
d402b67d25 feat(hott/function): show that a function is embedding iff it has propositional fibers 2015-11-16 21:32:09 -08:00
Floris van Doorn
5c1bf1e777 fix(hott): delete empty file 2015-11-16 21:32:09 -08:00
Floris van Doorn
e00ccff6de fix(hott): make sure the HoTT library compiles with --to_axiom 2015-11-16 21:32:09 -08:00
Leonardo de Moura
4d68e2a520 feat(library,hott): add eq.mpr and eq.mp lemmas 2015-11-14 15:40:47 -08:00
Leonardo de Moura
5ceac83b6a feat(frontends/lean/elaborator): restrict the number of places where coercions are considered
We do not consider coercions around meta-variables anymore.
2015-11-11 12:37:19 -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
Ulrik Buchholtz
0eb070e183 fix(hott/book.md): align with previous commit 2015-11-08 14:21:27 -08:00
Ulrik Buchholtz
aebb88d42b feat(hott/homotopy): connectedness, including HoTT Thm 8.2.1 2015-11-08 14:21:16 -08:00
Leonardo de Moura
a07598a3ec feat(hott/init/logic): congr_fun was missing in the HoTT library, blast assumes it is part of the environment 2015-11-08 14:05:03 -08:00
Leonardo de Moura
01259a2d1c feat(library/app_builder): add helper functions for creating eq.rec applications 2015-11-08 14:05:01 -08:00
Floris van Doorn
4828afa781 fix(hott): small fixes after rebasing 2015-11-08 14:04:59 -08:00
Floris van Doorn
5e4441cb43 fix(functor.equivalence): comment out sorry's 2015-11-08 14:04:59 -08:00
Floris van Doorn
49cb516c71 feat(category.limit): prove that the limit functor is right adjoint to the diagonal map 2015-11-08 14:04:59 -08:00
Floris van Doorn
36dfb61a3e feat(category.limits): prove that yoneda preserves limits 2015-11-08 14:04:59 -08:00
Floris van Doorn
46dba4ee5e refactor(category): move some files to subfolders, and create file with basic functors 2015-11-08 14:04:59 -08:00
Floris van Doorn
e14754a337 feat(category): start on proof of yoneda preserves limits and limit functor is left adjoint 2015-11-08 14:04:59 -08:00
Floris van Doorn
a99a99f047 feat(hit/quotient): prove the flattening lemma 2015-11-08 14:04:59 -08:00
Floris van Doorn
aa9f32a3bd fix(init/equiv): make transport not an instance 2015-11-08 14:04:59 -08:00
Floris van Doorn
f2d07ca23c feat(category): various small changes in category theory 2015-11-08 14:04:59 -08:00
Floris van Doorn
de1c47eda9 feat(categories): add exponential laws for categories
also give nicer rules to construct equalities between (pre)categories
2015-11-08 14:04:59 -08:00
Floris van Doorn
0e7b7af1da refactor(category): add new folder functor, split adjoint file into separate files 2015-11-08 14:04:59 -08:00
Floris van Doorn
3f0d8c0a8c feat(category.adjoint): prove more about functors 2015-11-08 14:04:58 -08:00
Floris van Doorn
18ec5f8b85 feat(categories): prove introduction rule for equivalences 2015-11-08 14:04:58 -08:00
Floris van Doorn
448178a045 feat(category.functor2): prove that the category of functors is complete and cocomplete if the codomain is 2015-11-08 14:04:58 -08:00
Floris van Doorn
3b7afad6ad feat(category.hset): prove that the category of sets is cocomplete 2015-11-08 14:04:58 -08:00
Floris van Doorn
c7fd29f854 feat(category): start with the introduction rule for equivalences 2015-11-08 14:04:58 -08:00
Leonardo de Moura
50186e2db3 feat(library/class_instance_resolution): add old type class resolution procedure back to be able to compile HoTT library 2015-11-08 14:04:58 -08:00
Leonardo de Moura
d1e111fd6c fix(hott,frontends/lean,library,library/tactic): make sure we can still compile the HoTT library 2015-11-08 14:04:55 -08:00
Leonardo de Moura
8ee214f133 checkpoint: new numeral encoding 2015-11-08 14:04:55 -08:00
Leonardo de Moura
744d1cba3d feat(library,hott,frontends/lean): avoid keywords with hyphen 2015-11-08 14:04:54 -08:00
Jakob von Raumer
d508ceccec feat(hott/homotpy) add join operator, and prove two basic lemmas 2015-10-13 09:59:24 -07:00
Floris van Doorn
115dedbd1c fix(hott): notation spacing and markdown files 2015-10-02 16:26:10 -07:00
Leonardo de Moura
ede23a3267 feat(hott,library): add additional spacing hints 2015-09-30 17:41:44 -07:00
Floris van Doorn
aac13a2ee7 fix(hott): minor changes to merge ulrik and my commits 2015-09-28 09:09:22 -07:00
Floris van Doorn
2264759060 feat(category): define colimits as dual of limits 2015-09-28 09:09:22 -07:00
Floris van Doorn
df73931a6d feat(category.opposite): prove that the opposite of a univalent category is univalent 2015-09-28 09:09:22 -07:00
Floris van Doorn
099bd95ebd feat(category.limits): prove that being complete is a mere proposition for categories 2015-09-28 09:09:22 -07:00
Floris van Doorn
51edd0ad1d feat(category.constructions.hset): prove that the category of sets is complete 2015-09-28 09:09:22 -07:00
Floris van Doorn
f82d1bd566 feat(category): add limits in a category 2015-09-28 09:09:22 -07:00
Floris van Doorn
6e23305c5d feat(category): define terminal, initial, indiscrete and sum category 2015-09-28 09:09:21 -07:00
Floris van Doorn
3c4c722afd feat(hott): port more from chapters 4 and 6 of the book 2015-09-28 09:09:21 -07:00
Ulrik Buchholtz
c6f3f6f3f4 feat(hott): prove HoTT book 7.5.4 and 7.5.5 2015-09-28 09:09:21 -07:00
Ulrik Buchholtz
25ed9d6e5a feat(hott): prove HoTT book Theorem 4.7.7 2015-09-28 09:09:21 -07:00
Ulrik Buchholtz
ed1029641a fix(hott/*): update book.md and clean up homotopy.connectedness 2015-09-28 09:09:21 -07:00
Ulrik Buchholtz
2c22501084 feat(hott): prove HoTT book Theorem 4.7.6 2015-09-28 09:09:21 -07:00
Leonardo de Moura
33f46fd137 feat(library/blast): parse blast tactic and invoke stub 2015-09-25 12:45:16 -07:00
Leonardo de Moura
4a6ff8058d fix(hott): import commands (some files have been moved to different directories) 2015-09-25 09:39:45 -07:00
Ulrik Buchholtz
384a366e0f refactor(hott): move homotopy hits to new homotopy folder 2015-09-24 22:52:33 -04:00
Floris van Doorn
732897340d fix(types): change some definitions to theorems 2015-09-11 23:35:21 -07:00
Floris van Doorn
fb364f8bc7 feat(types): add more equivalences between combinations of type constructors 2015-09-11 23:35:21 -07:00
Floris van Doorn
e84b22864f feat(hott): various changes in the HoTT library 2015-09-11 23:35:21 -07:00
Floris van Doorn
bd3aa9cf54 feat(category): prove Theorem 9.5.9 from the HoTT book 2015-09-11 23:35:21 -07:00
Floris van Doorn
1a3b363467 feat(category): prove that the yoneda embedding is an embedding 2015-09-11 23:35:21 -07:00
Floris van Doorn
fd89aa77a3 feat(hott): prove Yoneda lemma 2015-09-11 23:35:21 -07:00
Floris van Doorn
817d691237 fix(hott/init/nat): also define ℕ in the top-level in HoTT 2015-09-11 23:35:21 -07:00
Leonardo de Moura
cae2271818 refactor(hott/algebra/category/adjoint): rewrite expensive proof
see #815
2015-09-01 16:59:14 -07:00
Floris van Doorn
a8964adb9c fix(hott): make sure there are no sorry's visible 2015-09-01 15:17:46 -07:00
Floris van Doorn
7e52c49dce feat(hott): many changes is the HoTT library
Prove that 'is_left_adjoint F' is a mere proposition, although this proof is commented out because it takes ~10 seconds
2015-09-01 15:17:46 -07:00
Floris van Doorn
f555120428 feat(types/eq): add general encode-decode method 2015-09-01 15:17:46 -07:00
Floris van Doorn
f4892db432 feat(types.trunc): prove the principle of unique choice 2015-09-01 15:17:46 -07:00
Floris van Doorn
c24fd508b6 feat(hott/types): add more about pathovers in type constructors, prove that double negation elimination doesn't hold universally 2015-09-01 15:17:46 -07:00
Floris van Doorn
cfddfdfa84 feat(hott/types): add characterization of lift, prove that Type.{u} is not an hset 2015-09-01 15:17:46 -07:00
Leonardo de Moura
582dbecfd0 feat(library,hott): add notation T1 : T2 as syntax sugar for (focus (T1; all_goals T2))
closes #775
2015-08-08 10:16:25 -07:00
Floris van Doorn
ad5cda48a8 refactor(hott): move cubical folder and files eq2, function and hprop_trunc from types/ to the root HoTT directory 2015-08-07 13:34:41 -07:00
Floris van Doorn
e51ba09a27 feat(hott): add types.sum, greatly expand types.prod, minor changes in types.sigma and types.pi 2015-08-07 13:34:41 -07:00
Floris van Doorn
3d2a6a08a4 feat(hott/nat): add characterization of equality in nat 2015-08-07 13:34:41 -07:00
Floris van Doorn
189293b5d4 fix(init.path): rename transport_compose to tr_compose 2015-08-07 13:34:41 -07:00
Floris van Doorn
d111607890 feat(hott): add file which maps sections of the HoTT book to the HoTT library 2015-08-07 13:34:41 -07:00
Floris van Doorn
f3ba81a19d fix(init.path): a couple of small simplifications 2015-08-07 13:34:40 -07:00
Floris van Doorn
0ec525a8ee feat(two_quotient): finish proof of elim_incl2 2015-08-07 13:34:40 -07:00
Floris van Doorn
11b1f416f6 feat(nat): add unfold attributes to add, mul, sub and of_num in namespace nat_esimp in both libraries 2015-08-04 13:23:20 +02:00
Floris van Doorn
747d12a385 feat(hott): prove characterization of a pathover in a pathover-type 2015-08-04 13:01:12 +02:00
Floris van Doorn
e198be318f feat(circle): show that x = x in the circle is always Z 2015-08-04 13:01:11 +02:00
Floris van Doorn
7a780b1b60 feat(hott): various minor changes in the HoTT library 2015-08-04 13:01:11 +02:00
Leonardo de Moura
b3cd3efbb4 refactor(hott): fix "sorry"s at int/basic.hlean, and comment the remaining "sorry"s 2015-07-27 08:34:11 -07:00
Leonardo de Moura
e969c7a8d6 refactor(library): remove 'simp' hack 2015-07-22 10:13:19 -07:00
Leonardo de Moura
267545ca0c feat(frontends/lean): parse 'with_options' tactical
see issue #492
2015-07-13 19:13:41 -04:00
Leonardo de Moura
6ab5cf214c feat(library,hott): add simp tactic reference 2015-07-13 18:01:40 -04:00
Leonardo de Moura
38d5c361df refactor(hott/types/trunc): remove unnecessary fold
The new unfold tactic performs the fold automatically for us.

see issue #692
2015-07-12 13:07:18 -04:00
Leonardo de Moura
584f9e3f49 fix(library/tactic/unfold_rec): support indexed families at unfold_rec
This commit also removes many (now unnecessary) folds from the HoTT
library.

See issue #692

We still have to implement support for recursive definitions based on
brec_on that recurse over inductive families.
2015-07-12 12:32:58 -04:00
Leonardo de Moura
a9515ac7a4 feat(library/tactic/rewrite_tactic): try to fold nested recursive applications after unfolding a recursive function
See issue #692.
The implementation still has some rough spots.
It is not clear what the right semantic is.
Moreover, the folds in e_closure could not be eliminated automatically.
2015-07-08 21:19:18 -04:00
Leonardo de Moura
4b1b3e277f feat(frontends/lean): rename '[unfold-c]' to '[unfold]' and '[unfold-f]' to '[unfold-full]'
see issue #693
2015-07-07 16:37:06 -07:00
Leonardo de Moura
68785b8bed fix(library/tactic/generalize_tactic): fixes #711 2015-06-26 19:35:30 -07:00
Leonardo de Moura
de90926eed refactor(hott): adjust HoTT library to new support for projections 2015-06-26 17:18:30 -07:00
Floris van Doorn
69f91bfd86 fix(types/nat/hott): workaround failed inductions 2015-06-25 23:13:47 -04:00
Floris van Doorn
24762fe843 feat(hit): add hits with 2-path constructors
In hit.two_quotient we define a general construction to define hits with 2-dimensional path constructors, similar to quotients.
We can add 2-paths between any two 'words', where a word consists of 1-path constructors, concatenation and inverses.
We use this to define the torus, reflexive quotients and the reduced suspension.

There is still one 'sorry' in the construction
2015-06-25 22:31:41 -04:00
Floris van Doorn
df3ce2b00b feat(types/eq2): add theorem about eq_of_con_inv_eq_idp 2015-06-25 22:31:41 -04:00
Floris van Doorn
c8eee66c5b feat(hott/relation): add equivalence closure of a relation 2015-06-25 22:31:41 -04:00
Floris van Doorn
b94b66243e feat(hott/types): add some theorems about operations of 2-paths 2015-06-25 22:31:41 -04:00
Floris van Doorn
ea0f57aef5 feat(hott): various clean-up and small additions 2015-06-25 22:31:40 -04:00
Floris van Doorn
2748525c21 feat(hit/susp): finish the proof that loop space is adjoint to the suspension 2015-06-25 22:31:40 -04:00
Floris van Doorn
124c9d3d8a feat(hott): various cleanup and fixes, rename \~ to ~, expand types.pointed 2015-06-25 22:31:40 -04:00
Floris van Doorn
ac03bf7a4a feat(hott/nat): prove computation rule for cases by inequality 2015-06-25 22:31:40 -04:00
Floris van Doorn
0b9c8e14a4 fix(*/init/nat): fix occurrences where both theorem and [unfold-c] were used 2015-06-25 22:31:40 -04:00
Floris van Doorn
fa1979c128 feat(datatypes): let the type of unit be the lowest non-Prop universe
The definitional package (brec_on and cases_on) now use poly_unit instead of unit

closes #698
2015-06-25 17:33:46 -07:00
Leonardo de Moura
cfafc90cc0 refactor(hott,library): make sure files compile even without using "projection macros" 2015-06-22 12:22:11 -07:00
Leonardo de Moura
e382f7c2f9 refactor(hott/algebra/field): cleanup
use same definition used in the standard library.
2015-06-21 15:58:54 -07:00
Leonardo de Moura
5830d7d037 refactor(hott/algebra/category/yoneda): reduce compilation time using 'rewrite' tactic 2015-06-18 15:52:08 -07:00
Leonardo de Moura
a4c0699e81 feat(library/tactic/constructor_tactic): restore 'constructor' tactic old semantics, add 'fconstructor' tactic
See issue #676

Add new test demonstrating why it is useful to have the old semantics
for 'constructor'
2015-06-17 23:48:54 -07:00
Jeremy Avigad
6b36076ab5 feat({library,hott}/init/nat): add sub_le_succ 2015-06-15 22:53:11 +10:00
Jeremy Avigad
3b010b8c92 feat({library,hott}/algebra/group): add abbreviations e.g. for mul.cancel_left 2015-06-15 22:53:11 +10:00
Jeremy Avigad
a4a8253f50 refactor(library,hott,tests): rename succ_inj to succ.inj, add abbreviation eq_of_succ_eq_succ 2015-06-15 22:52:38 +10:00
Leonardo de Moura
62e1be897c test(hott/algebra/category): test new 'abstract ... end' expression in the HoTT library 2015-06-12 17:53:01 -07:00
Leonardo de Moura
8b7dc4e03a feat(frontends/lean): apply eta-reduction in postprocessing step
Perhaps, we should add an option to disable this new feature.

Remark: this commit makes commit 46d418a redundant.
I'm keeping 46d418a because we may retract this commit in the future.
2015-06-10 16:29:30 -07:00
Leonardo de Moura
01127061f5 refactor(hott/arity): cleanup 2015-06-10 15:45:46 -07:00
Leonardo de Moura
4b91cfccff feat(frontends/lean/builtin_exprs): make notation ( e : T ) builtin
In the previous approach, the following (definitionally equal) term was being generated

       (fun (A : Type) (a : A), a) T e
2015-06-10 14:52:59 -07:00
Floris van Doorn
f995e5ea48 fix(cubical): remove unused basic file 2015-06-04 20:21:52 -04:00
Floris van Doorn
ff41886a32 feat(nat/bquant): give instances for quantification bounded with le
also add theorems c_iff_c to logic/connectives, where c is a connective
2015-06-04 20:14:13 -04:00
Floris van Doorn
7f5caab694 feat(nat): redefine le and lt in the standard library 2015-06-04 20:14:13 -04:00
Floris van Doorn
ff01774fd7 renaming(hit): rename type_quotient to quotient, and quotient to set_quotient
This renaming is because type_quotient is a nonstandard name.  I've had a discussion with Egbert
Rijke, Steve Awodey and Dan Licata, and the consensus for a better name was 'quotient'.  I had to
make changes in src/kernel/hits/hits.cpp, I renamed g_type_quotient* by g_hit_quotient* (to avoid
name clash the standard library quotient, although I don't know whether that name clash would
matter).
2015-06-04 20:14:13 -04:00
Floris van Doorn
06528c4791 refactor(types): create cubical subfolder, update markdown files 2015-06-04 20:14:13 -04:00
Floris van Doorn
33e948d9d1 feat(hit/sphere): Prove that maps from S^n to an (n-1)-type are constant 2015-06-04 20:14:13 -04:00
Floris van Doorn
876aa20ad6 feat(hott): Port remainder of §6.3 and §7.2 from the HoTT book
Also prove a theorem similar to Lemma 7.3.1

There are still some sorry's in hit.suspension
2015-06-04 20:14:12 -04:00
Floris van Doorn
883b4fedb9 feat(hott): start with proof to characterize (is_trunc n A) using iterated loop spaces 2015-06-04 20:14:12 -04:00
Floris van Doorn
4117455e97 feat(hott): redefine nat.le and nat.lt
also some minor modifications in other files
2015-06-04 20:14:12 -04:00
Floris van Doorn
d4a991ef84 feat(hott): define cubes and cubeovers 2015-06-04 20:13:53 -04:00
Jeremy Avigad
fabdae6d54 refactor(hott/algebra/ring.lean,ordered_ring.lean): rename some theorems 2015-06-01 12:35:44 +10:00
Leonardo de Moura
ca110012d8 feat(library/tactic): automate "generalize-intro-induction/cases" idiom
closes #645
2015-05-30 21:57:28 -07:00
Leonardo de Moura
6f6848968d feat(frontends/lean/coercion_elaborator): "coercion lifting" for backtracking case
closes #252
2015-05-30 16:44:26 -07:00
Leonardo de Moura
00232e70d6 feat(hott,library): auxiliary theorems for simplifier 2015-05-27 16:35:56 -07:00
Leonardo de Moura
85409a59d3 feat(library/tactic/rewrite_tactic): add xrewrite and krewrite tactic variants
closes #511
2015-05-27 16:32:43 -07:00
Leonardo de Moura
dc6411b903 feat(library/inductive_unifier_plugin): restrict rule that was generating non-terminating behavior
see issue #632
2015-05-27 14:41:12 -07:00
Floris van Doorn
96a4a015d9 fix(hit): make the nondependent eliminator standard for hits 2015-05-26 21:37:02 -07:00
Floris van Doorn
43bcdd7994 feat(hott): remove sorry's in circle.hlean, characterize pathovers in degenerate pi's 2015-05-26 21:37:01 -07:00
Floris van Doorn
c64d73aae4 feat(types.nat): prove that inequalities on nat are mere propositions
Also some small changes in various other locations
2015-05-26 21:37:01 -07:00
Floris van Doorn
95e0fbb71a feat(hott): add interval and (start of) squareovers 2015-05-26 21:37:01 -07:00
Floris van Doorn
d7c1a8f2e0 feat(hott): small fixes in hit and cubical.square 2015-05-26 21:37:01 -07:00
Floris van Doorn
4a29f4bdd4 feat(types): incorporate pathovers in the files of the types folder
Conflicts:
	hott/cubical/pathover.hlean
2015-05-26 21:37:01 -07:00
Floris van Doorn
0b12d51b25 feat(hott): use pathovers in all the recursors of hits
move pathover file to the init folder
2015-05-26 21:37:01 -07:00
Floris van Doorn
54ed8a8e76 feat(hott): small changes in init and category 2015-05-26 21:37:01 -07:00
Floris van Doorn
40d5f83851 feat(hit): start using induction tactic 2015-05-26 21:37:01 -07:00
Floris van Doorn
50290fb81c feat(hott): add recursor attribute to hits
recursor attribute is added to both the dependent and nondependent elimination, is such a way that the dependent elimination is used by default
2015-05-26 21:37:01 -07:00
Floris van Doorn
8056f326d7 feat(reserved_notation): make is_typeof parsing-only, add ^ to HoTT 2015-05-26 21:37:01 -07:00
Jeremy Avigad
716da2488b fix(hott/*.md,library/*.md): use the word 'file' instead of 'module' 2015-05-25 16:50:42 -07:00
Leonardo de Moura
d0987eb3ac feat(library/tactic): add 'subtvars' tactic 2015-05-25 16:36:44 -07:00
Jeremy Avigad
33214f0895 refactor(hott/*): remove 'Module:' lines 2015-05-23 20:52:58 +10:00
Jeremy Avigad
d33c91d7b9 fix({hott,library}/algebra/*): fix names 2015-05-23 14:05:06 +10:00
Leonardo de Moura
c133d26505 feat(frontends/lean/builtin_exprs): change how 'show' is processed in tactics
Unresolved placeholders were not being reported
2015-05-19 16:23:50 -07:00