lean4-htt/library/data
Leonardo de Moura 1e6b3614ab feat(frontends/lean): new pattern matching validation
@Kha, we now support variable/constant shadowing in patterns.
A constant may occur in a pattern if it is a constructor or tagged with
the new [pattern] attribute. In the standard library, I have tagged
'add', 'zero', 'one', 'bit0', 'bit1' and 'rfl' with this new attribute.
BTW, arbitrary constants and variables may occur nested in type ascriptions and
inaccessible terms.

Here is an example:

     meta_definition tactic_result_to_string {A : Type} : tactic_result A → string
     | (success a s)   := to_string a
     | (exception ⌞A⌟ e s) := "Exception: " ++ to_string (e ())

I had to use the inaccessible ⌞A⌟ in the example above, otherwise, we would be shadowing the parameter
{A : Type}, and we would get a type error.

The new validation is performed at to_pattern_fn (parser.cpp).
2016-08-07 11:31:11 -07:00
..
examples refactor(library): replace assert-exprs with have-exprs 2016-02-29 11:53:26 -08:00
finset fix(library): remove classical instances from global scope 2016-07-29 23:44:23 -04:00
fintype refactor(library): replace assert-exprs with have-exprs 2016-02-29 11:53:26 -08:00
int chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
list feat(frontends/lean/inductive_cmd): use new elaborator in the inductive command 2016-08-03 13:13:12 -07:00
nat refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
rat chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
real chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
set fix(library): remove classical instances from global scope 2016-07-29 23:44:23 -04:00
bag.lean refactor(library): replace assert-exprs with have-exprs 2016-02-29 11:53:26 -08:00
bool.lean chore(frontends/lean): disable expressions that use tactic framework 2016-04-25 15:07:26 -07:00
bv.lean refactor(library): remove algebra namespace 2015-12-05 23:50:01 -08:00
complex.lean chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
countable.lean refactor(library/algebra/function): move function.lean to init folder 2015-07-06 07:29:56 -07:00
data.md chore(*.md): fix/remove broken links 2016-02-23 10:11:24 -08:00
default.lean chore(library): fix and cleanup 'import' commands 2016-07-07 07:39:26 -07:00
empty.lean refactor(frontends/lean): disable '!' operator, and adjust standard library 2016-07-02 01:41:46 +01:00
encodable.lean refactor(library): replace assert-exprs with have-exprs 2016-02-29 11:53:26 -08:00
equiv.lean refactor(library/*): rename 'compose' to 'comp' 2016-03-02 22:48:05 -05:00
hf.lean refactor(library/*): rename 'compose' to 'comp' 2016-03-02 22:48:05 -05:00
hlist.lean feat(frontends/lean): new pattern matching validation 2016-08-07 11:31:11 -07:00
map.lean chore(frontends/lean): coercions are disabled by default 2016-07-29 13:03:23 -07:00
matrix.lean refactor(library,hott): remove unnecessary annotations 2016-02-25 12:26:20 -08:00
num.lean refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
old_fin.lean chore(library/coercion): disable coercion attribute 2016-07-29 13:15:10 -07:00
old_string.lean refactor(library): redefine string and char 2016-05-24 14:11:24 -07:00
pnat.lean feat(frontends/lean): remove '[visible]' annotation, remove 'is_visible' tracking 2016-02-29 12:31:23 -08:00
prod.lean refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
sigma.lean chore(library): disable sigma.mk notation 2016-08-04 10:44:48 -07:00
squash.lean refactor(library/*): remove 'Module:' lines 2015-05-23 20:52:23 +10:00
stream.lean refactor(library/*): rename 'compose' to 'comp' 2016-03-02 22:48:05 -05:00
sum.lean refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
tuple.lean refactor(library): rename heq.of_eq heq.to_eq auxiliary lemmas 2016-01-09 12:32:18 -08:00
uprod.lean refactor(library/algebra/function): move function.lean to init folder 2015-07-06 07:29:56 -07:00