Commit graph

33954 commits

Author SHA1 Message Date
Leonardo de Moura
aae657571f doc: docstrings for src/Lean/Meta/Basic.lean 2022-07-03 15:32:15 -07:00
Leonardo de Moura
b78925d9bb chore: update stage0 2022-07-03 15:01:58 -07:00
Leonardo de Moura
757171db1f feat: add String.get! and s[i]! notation for String 2022-07-03 14:59:44 -07:00
Gabriel Ebner
07a3cd6980 chore: fix tests 2022-07-03 22:46:59 +02:00
Gabriel Ebner
141b110ff1 feat: add more typed syntax coercions 2022-07-03 22:46:59 +02:00
Gabriel Ebner
922ef23112 fix: do not ignore syntax coercions
Syntax coercions do not need to be the identity.  See for example
``Coe (TSyntax `ident) (TSyntax `declId)``.
2022-07-03 22:46:59 +02:00
Gabriel Ebner
ddf77a8c6d chore: style 2022-07-03 22:46:59 +02:00
Gabriel Ebner
bec0bbc351 fix: replace dangerous instance by CoeTail
In order to guarantee termination of type class synthesis when resolving
coercions, a good rule of thumb is that the instances should not
introduce metavariables (during TC synthesis).  For common coercion type
classes this means:

 - `Coe T S`, `CoeTail T S`: the variables of `T` must be a subset of those of `S`
 - `CoeHead T S`: the variables of `S` must be a subset of those of `T`

If these rules are not followed, we can easily get nontermination.  In
this case: `CoeTC Foo Syntax` is reduced to `CoeTC Foo (TSyntax ?m_1)`
using the (dangerous) `Coe (TSyntax k) Syntax` instance, to which we can
then apply the otherwise fine `Coe (TSyntax [k]) (TSyntax (k'::ks))`
coercion infinitely often.
2022-07-03 22:46:59 +02:00
Gabriel Ebner
3d5c5553d9 fix: add missing coercion instance for CoeHead+CoeTail 2022-07-03 22:46:59 +02:00
Leonardo de Moura
03ce7cb17c fix: dependent pattern matching bug
closes #1279
Originally reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/case.20in.20dependent.20match.20not.20triggering.20.28.3F.29/near/288328239
2022-07-03 13:25:12 -07:00
Leonardo de Moura
68024b11a4 fix: simp_all bug when goal has duplicate hypotheses 2022-07-03 12:44:53 -07:00
Sebastian Ullrich
2f67295c7d feat: strengthen pp* signatures 2022-07-03 19:14:49 +02:00
Sebastian Ullrich
146aefd085 feat: ppTactic 2022-07-03 19:00:13 +02:00
Sebastian Ullrich
5e46c0865e doc: update LeanInk 2022-07-03 17:56:51 +02:00
Leonardo de Moura
8f83999202 chore: update release notes 2022-07-03 06:26:47 -07:00
Leonardo de Moura
5e3a3a6c21 chore: remove notation a[i,h] for a[⟨i, h⟩] 2022-07-03 06:24:26 -07:00
Leonardo de Moura
a6d6ae01a0 chore: String.getOp has been removed 2022-07-02 19:39:20 -04:00
kzvi
7326c817d2 fix: fix typos in deBruijn.lean and phoas.lean examples 2022-07-02 16:12:05 -07:00
Leonardo de Moura
0bdab9b4f7 doc: update release notes 2022-07-02 16:06:57 -07:00
Leonardo de Moura
a1d09f1ced chore: update stage0 2022-07-02 15:57:22 -07:00
Leonardo de Moura
a0fdc2d050 chore: fix tests 2022-07-02 15:57:05 -07:00
Leonardo de Moura
54c60d4c2d feat: a[i] and a[i]! notation for Subarrays 2022-07-02 15:54:34 -07:00
Leonardo de Moura
a2456c3a0f feat: add notation a[i, h] for a[⟨i, h⟩] 2022-07-02 15:50:49 -07:00
Leonardo de Moura
eb115abcbe chore: update stage0 2022-07-02 15:37:13 -07:00
Leonardo de Moura
e81a847ba3 fix: doc/array.md 2022-07-02 15:36:01 -07:00
Leonardo de Moura
4568fe755c chore: fix tests 2022-07-02 15:25:06 -07:00
Leonardo de Moura
b3ea1fc925 feat: a[i] notation for arrays now uses i : Fin a.size 2022-07-02 15:19:38 -07:00
Leonardo de Moura
e4b472a9a2 chore: fix tests 2022-07-02 15:17:01 -07:00
Leonardo de Moura
2409840aa8 chore: update stage0 2022-07-02 15:12:53 -07:00
Leonardo de Moura
2ebcf29cde chore: use a[i]! for array accesses that may panic 2022-07-02 15:12:05 -07:00
Leonardo de Moura
88a0506ab0 chore: update stage0 2022-07-02 10:07:09 -07:00
Leonardo de Moura
3f3cd22366 feat: add Array.getOp! and Array.getOp?
Add warning when `Array.getOp` is used. TODO: replace `Array.getOp`
with safe version
2022-07-02 10:06:05 -07:00
Leonardo de Moura
8bf90b128e fix: interactive test driver 2022-07-02 10:01:04 -07:00
Leonardo de Moura
418607f3ad chore: update lake 2022-07-02 09:59:42 -07:00
Leonardo de Moura
e8935d996b chore: String.get?, String.getOp?, and remove String.getOp 2022-07-02 09:59:04 -07:00
Leonardo de Moura
e42b82d775 chore: update stage0 2022-07-02 07:35:07 -07:00
Leonardo de Moura
053bc889a3 feat: elaborate a[i]! and a[i]? 2022-07-02 07:29:58 -07:00
Leonardo de Moura
cbe05441a5 chore: update stage0 2022-07-02 07:29:58 -07:00
Leonardo de Moura
131e7be8c5 feat: add a[i]? and a[i]! parsers 2022-07-02 07:29:58 -07:00
Sebastian Ullrich
0896180f12 chore: CI: downgrade Nix 2022-07-02 12:19:30 +02:00
tydeu
515541709a chore: fix tests 2022-07-02 10:37:22 +02:00
tydeu
29be868342 chore: update Lake 2022-07-02 10:37:22 +02:00
tydeu
4f8c51f102 test: use -fPIC in ffi example 2022-07-01 20:25:02 -04:00
tydeu
83b9404d02 chore: don't use ../$LAKE idiom 2022-07-01 20:13:53 -04:00
tydeu
5eb591092d release: 3.2.0 2022-07-01 19:03:46 -04:00
tydeu
c7075f3f99 refactor: remove dead package DSL code 2022-07-01 18:45:50 -04:00
tydeu
2355ce06e7 chore: bump Lean version 2022-07-01 17:47:47 -04:00
tydeu
f0c9b74540 doc: update README 2022-07-01 17:30:38 -04:00
tydeu
906bc3c9c2 refactor: simplify custom target API (for now) 2022-07-01 16:26:35 -04:00
tydeu
8c46d7439a chore: remove some deprecated features + deprecate extraDepTarget 2022-07-01 15:35:45 -04:00