Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set priority in monadic class instances #5291

Closed
wants to merge 557 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
557 commits
Select commit Hold shift + click to select a range
b07dc09
fix: `Float32` runtime support (#6350)
leodemoura Dec 10, 2024
ab92d27
chore: update stage0
Dec 10, 2024
cc9cae0
chore: adjust CODEOWNERS (#6327)
Kha Dec 10, 2024
e03cb8d
feat: BitVec.[toInt|toFin|getMsbD]_ofBool (#6317)
tobiasgrosser Dec 10, 2024
d41b83c
chore: alignment of Array.any/all lemmas with List (#6353)
kim-em Dec 10, 2024
5e54045
refactor: make `mkInhabitantFor` error message configurable (#6356)
nomeata Dec 10, 2024
2a6365f
refactor: WF.EqnInfo.hasInduct (#6357)
nomeata Dec 10, 2024
42e0651
refactor: elabWFRel to take names, not `PreDefinition` (#6358)
nomeata Dec 10, 2024
88614cd
refactor: ArgsPacker.unpack to return `Option` (#6359)
nomeata Dec 10, 2024
a1f0939
fix: when pretty printing constant names, do not use aliases from "no…
kmill Dec 10, 2024
6ef68f6
feat: alignment of Array.set lemmas with List lemmas (#6365)
kim-em Dec 11, 2024
a1876c6
feat: add `Float32` support (#6366)
leodemoura Dec 11, 2024
d222b8e
feat: lemmas about indexing and membership for Vector (#6367)
kim-em Dec 11, 2024
5a07bdc
feat: do not propagate pretty printer errors through messages (#3696)
tydeu Dec 11, 2024
5e4bfdb
chore: DecidableRel allows a heterogeneous relation (#6341)
kim-em Dec 11, 2024
0f6c526
chore: preserve reported messages in `MessageLog` (#6307)
Kha Dec 11, 2024
5027c9e
feat: `Nat.shiftRight_bitwise_distrib` (#6334)
tydeu Dec 11, 2024
18df90e
feat: labeled and unique sorries (#5757)
kmill Dec 11, 2024
e0b0f03
feat: lemmas about Vector.any/all/set (#6369)
kim-em Dec 12, 2024
08909df
fix: unused `let_fun` elimination in `simp` (#6375)
leodemoura Dec 13, 2024
128433f
chore: run Batteries linter on Lean (#6364)
kim-em Dec 13, 2024
4a9b149
feat: theorems about `==` on `Vector` (#6376)
kim-em Dec 13, 2024
889c036
doc: fix typo reference in doc of lazy discrimination tree (#6377)
alissa-tung Dec 13, 2024
c9dd84d
chore: remove Lean.Compiler.LCNF.ForEachExpr (#6313)
zwarich Dec 13, 2024
a58a8c2
chore: stop running compiler twice during tests (#6321)
zwarich Dec 13, 2024
71a670f
fix: propagate `Simp.Config` when reducing terms and checking definit…
leodemoura Dec 14, 2024
2bf06c8
feat: `lean --error=kind` (#6362)
tydeu Dec 14, 2024
26e522c
chore: move implementation details of `mergeSort` into namespace (#6380)
kim-em Dec 14, 2024
66e4e8a
fix: `withTrackingZetaDelta` must reset cache (#6381)
leodemoura Dec 14, 2024
69836d9
fix: new code generator must generate code for opaque declarations th…
leodemoura Dec 14, 2024
f887e17
test: add test for issue #4585 (#6384)
leodemoura Dec 14, 2024
587756b
fix: `simp_all?` local declarations (#6385)
leodemoura Dec 14, 2024
96abdae
fix: type incorrect term produced by `contradiction` (#6387)
leodemoura Dec 15, 2024
f4bd390
fix: `revertAll` must clear auxiliary declarations (#6386)
leodemoura Dec 15, 2024
c377bcd
feat: replace `List.lt` with `List.Lex` (#6379)
kim-em Dec 15, 2024
4e208f5
feat: redefine Range.forIn' (#6390)
kim-em Dec 15, 2024
cf2773f
chore: require `0 < Range.step` (#6391)
kim-em Dec 15, 2024
7c27f99
doc: split the docstring of `LocalContext` (#6340)
eric-wieser Dec 15, 2024
a18de0c
feat: generalize `panic` to `Sort` (#6333)
tydeu Dec 15, 2024
240fdc3
chore: add gitpod configuration (#6382)
eric-wieser Dec 15, 2024
31b266f
feat: lemmas about Std.Range (#6396)
kim-em Dec 16, 2024
9033f0d
fix: `check` must check projections (#6398)
leodemoura Dec 16, 2024
75fb865
fix: add missing fields in the profiler datastructures (#6363)
eric-wieser Dec 16, 2024
5b5657d
chore: remove old language manual (#6401)
david-christiansen Dec 16, 2024
5a5479d
feat: support erasure of Decidable.decide in new code generator (#6405)
zwarich Dec 17, 2024
c301add
chore: in `#print` for structures, mention 'field notation' (#6406)
kmill Dec 17, 2024
6d8dceb
fix: ghost goals in autoparam tactic block (#6408)
mhuisi Dec 17, 2024
4b0213f
chore: update documentation title and link README to reference (#6409)
david-christiansen Dec 17, 2024
45f67d4
feat: reserved names for congruence theorems (#6412)
leodemoura Dec 18, 2024
b6d6018
refactor: lake: merge `BuildJob` into `Job` (#6388)
tydeu Dec 18, 2024
f7197ec
chore: update stage0
Dec 18, 2024
53dc86f
chore: fix some docstrings (#6410)
fgdorais Dec 18, 2024
9409681
feat: `grind` preprocessing and `Expr` internalization (#6413)
leodemoura Dec 19, 2024
0d991f6
fix: `sharecommon` bug (#6415)
leodemoura Dec 19, 2024
defa70c
chore: protect Nat.div_eq_iff (#6417)
kim-em Dec 19, 2024
29fc85c
feat: lemmas about lexicographic order on Array and Vector (#6399)
kim-em Dec 19, 2024
2dc65ff
fix: process delayed assignment metavariables correctly in `Lean.Meta…
kmill Dec 19, 2024
4e1fbc5
fix: multiple bugs in `grind` (#6419)
leodemoura Dec 19, 2024
adae76f
fix: lake: `afterBuildCache*` traces (#6422)
tydeu Dec 20, 2024
4efe58d
feat: lake: local package overrides (#6411)
tydeu Dec 20, 2024
f117fe3
feat: lemmas about List/Array/Vector lexicographic order (#6423)
kim-em Dec 20, 2024
abe9995
chore: temporarily disable Web Assembly build in CI (#6424)
kim-em Dec 20, 2024
fc7d0c9
chore: protect some lemmas in List/Array/Vector namespace (#6425)
kim-em Dec 20, 2024
50bae17
fix: normalize universe levels in `grind` preprocessor (#6428)
leodemoura Dec 20, 2024
75a7a6a
feat: add support for extern LCNF decls (#6429)
zwarich Dec 20, 2024
c127a80
feat: add `Expr.fvarsSubset` (#6430)
leodemoura Dec 20, 2024
d0f9d67
fix: ensure `simp` and `dsimp` do not unfold too much (#6397)
leodemoura Dec 21, 2024
f2a60f0
feat: explanations for `cases` applied to non-inductive types (#6378)
kmill Dec 21, 2024
a64fffa
feat: canonicalizer for the `grind` tactic (#6433)
leodemoura Dec 21, 2024
b328660
feat: congruence table for `grind` tactic (#6435)
leodemoura Dec 23, 2024
7cae287
feat: detect congruent terms in `grind` (#6437)
leodemoura Dec 24, 2024
3b60ab1
test: `grind` (#6440)
leodemoura Dec 24, 2024
e906d2b
feat: truth value propagation for `grind` (#6441)
leodemoura Dec 24, 2024
0734e75
fix: `checkParents` in `grind` (#6442)
leodemoura Dec 24, 2024
1fd677a
feat: propagate equality in `grind` (#6443)
leodemoura Dec 24, 2024
62daf56
refactor: move simplifier support to `GrindM` (#6447)
leodemoura Dec 25, 2024
4158d51
feat: support for builtin `grind` propagators (#6448)
leodemoura Dec 25, 2024
9600237
chore: update stage0
Dec 25, 2024
cdc6cfb
feat: support for builtin `grind` propagators (part 2) (#6449)
leodemoura Dec 25, 2024
f8ffd51
chore: check whether pointer equality implies structural equality in …
leodemoura Dec 26, 2024
68c8e09
feat: equality proof generation for `grind` (#6452)
leodemoura Dec 26, 2024
0e9229b
perf: improve bv_decide performance with large literals (#6453)
hargoniX Dec 26, 2024
5305ede
fix: bug in `mkEqProof` within `grind` (#6455)
leodemoura Dec 26, 2024
ff08378
fix: fix: bug in `mkEqProof` within `grind` (#6456)
leodemoura Dec 26, 2024
c1c7be1
feat: congruence proofs for `grind` (#6457)
leodemoura Dec 26, 2024
72c53b0
feat: use compact congruence proofs in `grind` if applicable (#6458)
leodemoura Dec 26, 2024
fc65046
feat: add `grind` tactic (#6459)
leodemoura Dec 27, 2024
7da586d
chore: implement reduceCond for bv_decide (#6460)
hargoniX Dec 27, 2024
6537730
fix: missing `Not` propagation rule in `grind` (#6461)
leodemoura Dec 27, 2024
4f3e510
feat: constructors in `grind` (#6463)
leodemoura Dec 27, 2024
bba54e5
feat: literal values in `grind` (#6464)
leodemoura Dec 27, 2024
7bd105b
feat: projections in `grind` (#6465)
leodemoura Dec 27, 2024
5ae6f40
fix: check function types when detecting congruences in `grind` (#6466)
leodemoura Dec 28, 2024
bd9967b
fix: `Int.reduceNeg` simproc (#6468)
leodemoura Dec 28, 2024
1a0ac45
feat: missing data for `grind` e-match (#6469)
leodemoura Dec 29, 2024
d0b88b5
feat: add `grind_pattern` command (#6470)
leodemoura Dec 29, 2024
da6a11c
chore: update stage0
Dec 29, 2024
996cc97
doc: explain `app_delab` (#6450)
eric-wieser Dec 29, 2024
be43e7c
feat: theorem patterns for heuristic instantiation in `grind` (#6472)
leodemoura Dec 29, 2024
cafd0b2
chore: update stage0
Dec 29, 2024
b95f017
feat: check pattern coverage in the `grind_pattern` command (#6474)
leodemoura Dec 30, 2024
d506456
feat: ematch theorem activation for `grind` (#6475)
leodemoura Dec 30, 2024
41b82cf
fix: internalize nested ground patterns when activating ematch theore…
leodemoura Dec 30, 2024
2277a76
chore: reduce churn in tests/lean/run/meta5.lean (#6480)
zwarich Dec 31, 2024
ec12581
feat: E-matching procedure for the `grind` tactic (#6481)
leodemoura Dec 31, 2024
21017dc
feat: upstream `ToExpr` deriving handler from Mathlib (#6473)
kmill Dec 31, 2024
a970c5c
chore: add missing diff-exposing in type/value mismatch errors (#6484)
kmill Dec 31, 2024
008d897
feat: instantiate ematch theorems in `grind` (#6485)
leodemoura Dec 31, 2024
5bf0bd5
fix: E-matching module for `grind` (#6488)
leodemoura Dec 31, 2024
95b8c75
feat: configuration options for the `grind` tactic (#6490)
leodemoura Dec 31, 2024
2479d65
fix: make sure parent `structure` projections have 'go to definition'…
kmill Dec 31, 2024
81fb654
fix: theorem instantiation in `grind` (#6492)
leodemoura Jan 1, 2025
c7a2055
fix: another bug in theorem instantiation in `grind` (#6497)
leodemoura Jan 1, 2025
b9f9b9d
feat: dependent forall propagator in `grind` (#6498)
leodemoura Jan 2, 2025
f26db8c
fix: proof canonicalizer in `grind` (#6499)
leodemoura Jan 2, 2025
9262313
fix: bug in `markNestedProofs` within `grind` (#6500)
leodemoura Jan 2, 2025
0989b8e
feat: add `PersistentHashSet.toList` (#6501)
leodemoura Jan 2, 2025
8ba6f81
fix: proof generation for `grind` tactic (#6502)
leodemoura Jan 2, 2025
098ffc2
feat: `grind` simple strategy (#6503)
leodemoura Jan 2, 2025
73668d5
fix: ignore `no_index` around `OfNat.ofNat` in `norm_cast` (#6438)
eric-wieser Jan 2, 2025
7aa7e4f
feat: partial_fixpoint: theory (#6477)
nomeata Jan 2, 2025
1cc0d84
feat: partial_fixpoint: monotonicity tactic (#6506)
nomeata Jan 2, 2025
a85006b
chore: update stage0
Jan 2, 2025
5e9a48f
fix: missing case in `checkParents` (#6508)
leodemoura Jan 2, 2025
c3de9a9
fix: congruence closure in the `grind` tactic (#6509)
leodemoura Jan 2, 2025
b683349
feat: custom congruence rule for equality in `grind` (#6510)
leodemoura Jan 2, 2025
542e277
feat: add user-defined fallback procedure for the `grind` tactic (#6512)
leodemoura Jan 2, 2025
824f584
feat: `ite` and `dite` support in `grind` (#6513)
leodemoura Jan 3, 2025
a1baf60
perf: avoid unnecessary assert/intro pairs in `grind` (#6514)
leodemoura Jan 3, 2025
27d31ad
feat: bdiv and bmod lemmas (#6494)
trivial1711 Jan 3, 2025
86f6413
feat: improve `cases` tactic used in `grind` (#6516)
leodemoura Jan 3, 2025
f94d13f
fix: cond reflection bug in bv_decide (#6517)
hargoniX Jan 3, 2025
cacd689
chore: cherry-pick release notes from releases/v4.15.0 and releases/v…
kim-em Jan 4, 2025
58fdb66
feat: add script for generating release notes (#6519)
kim-em Jan 4, 2025
cae9170
feat: add support for `match`-expressions to `grind` (#6521)
leodemoura Jan 4, 2025
de745b5
chore: upstream some List.Perm lemmas (#6524)
kim-em Jan 4, 2025
09b9a2d
chore: add plausible to release checklist (#6525)
kim-em Jan 4, 2025
e8141f0
chore: import cleanup in Init (#6522)
kim-em Jan 4, 2025
c91bd39
chore: cleanup imports in Lean.Lsp (#6523)
kim-em Jan 4, 2025
11abc39
doc: fix broken code blocks in RELEASES.md (#6527)
Seasawher Jan 4, 2025
c9f0af5
fix: missing propagation in `grind` (#6528)
leodemoura Jan 4, 2025
549e527
feat: add support for `let`-declarations to `grind` (#6529)
leodemoura Jan 4, 2025
14e80c4
fix: nondeterministic failure in `grind` (#6530)
leodemoura Jan 4, 2025
5bee10b
fix: `let_fun` support in `grind` (#6531)
leodemoura Jan 4, 2025
cb6fa47
chore: fix signature of perm_insertIdx (#6532)
kim-em Jan 4, 2025
a038802
feat: add term offset support to the `grind` E-matching modulo (#6533)
leodemoura Jan 5, 2025
8c04d82
fix: allow projections in E-matching patterns (#6534)
leodemoura Jan 5, 2025
b994fd7
fix: E-matching thresholds in the `grind` tactic (#6536)
leodemoura Jan 5, 2025
0e42cf0
feat: pattern normalization in the `grind` tactic (#6538)
leodemoura Jan 5, 2025
8b9560d
feat: `[grind_eq]` attribute for the `grind` tactic (#6539)
leodemoura Jan 5, 2025
579ac7e
fix: remove unused `-static-libgcc` MinGW linker arg (#6535)
Kha Jan 5, 2025
69d2fd1
feat: attribute `[grind]` (#6545)
leodemoura Jan 6, 2025
afea834
feat: release checklist script (#6542)
kim-em Jan 6, 2025
fec50e0
doc: modify aesop usage example of `omegaDefault` (#6549)
b-mehta Jan 6, 2025
5b3cc5a
fix: avoid new tokens `_=_` and `=_` (#6554)
leodemoura Jan 6, 2025
e50f372
feat: `grind` tests for basic category theory (#6543)
kim-em Jan 6, 2025
bca59db
feat: propagate implication in the `grind` tactic (#6556)
leodemoura Jan 6, 2025
79de767
feat: Array lemma alignment; fold and map (#6546)
kim-em Jan 6, 2025
9ae8f02
feat: basic case-split for `grind` (#6559)
leodemoura Jan 7, 2025
1e16b76
fix: set absolute linker path (#6547)
Kha Jan 7, 2025
ece5fcc
chore: typos / improvements to grind messages (#6561)
kim-em Jan 7, 2025
12cefa0
feat: add support for erasing the `[grind]` attribute (#6566)
leodemoura Jan 7, 2025
9543d86
feat: trace messages for working and closing goals in the `grind` tac…
leodemoura Jan 7, 2025
90aca10
feat: add support for `cast`, `Eq.rec`, `Eq.ndrec` to `grind` (#6568)
leodemoura Jan 8, 2025
97c9ddc
feat: add `Int.emod_sub_emod` and `Int.sub_emod_emod` (#6507)
vlad902 Jan 8, 2025
c78b8f2
feat: let `induction` take zero alteratives (#6486)
kmill Jan 8, 2025
b95f31b
feat: `BitVec.toInt_shiftLeft` theorem (#6346)
mhk119 Jan 8, 2025
56e7c23
feat: add BitVec.[toNat|toInt|toFin|getLsbD|getMsbD|getElem|msb]_fill…
tobiasgrosser Jan 8, 2025
6849629
feat: split on `match`-expressions in the `grind` tactic (#6569)
leodemoura Jan 8, 2025
6067b5c
fix: proper "excess binders" error locations for `rintro` and `intro`…
sgraf812 Jan 8, 2025
507c502
perf: speed up JSON serialisation (#6479)
hargoniX Jan 8, 2025
be2d15c
fix: set LLVM sysroot consistently (#6574)
Kha Jan 8, 2025
56efc83
feat: make `classical` tactic incremental (#6575)
Kha Jan 8, 2025
6bbbef8
fix: forall propagation in `grind` (#6578)
leodemoura Jan 8, 2025
f6232c5
feat: add `grind` configuration options to control case-splitting (#6…
leodemoura Jan 8, 2025
069a3c4
feat: apply E-matching for local lemmas in `grind` (#6582)
leodemoura Jan 8, 2025
970a80b
feat: add helper theorems for handling offsets in `grind` (#6584)
leodemoura Jan 9, 2025
40c53a8
fix: `grind` canonicalizer (#6585)
leodemoura Jan 9, 2025
23127cd
feat: aligning `List/Array/Vector` lemmas for `map` (#6586)
kim-em Jan 9, 2025
004142a
feat: align `List/Array` lemmas for `filter/filterMap` (#6589)
kim-em Jan 9, 2025
f229df1
feat: improve `grind` canonicalizer diagnostics (#6588)
leodemoura Jan 9, 2025
3121946
feat: add UInt32.{lt, le} (#6591)
david-christiansen Jan 9, 2025
7ad856a
feat: `Std.Net.Addr` (#6563)
hargoniX Jan 9, 2025
f49d7c1
feat: improve inequality offset support theorems for `grind` (#6595)
leodemoura Jan 9, 2025
a6644fd
feat: add `simp?` and `dsimp?` in conversion mode (#6593)
jrr6 Jan 10, 2025
d234e92
feat: BitVec.{toInt, toFin, msb}_udiv (#6402)
alexkeizer Jan 10, 2025
dda76bd
feat: add decidable instances for comparison operation of time offset…
algebraic-dev Jan 10, 2025
feb26d5
feat: `BitVec.toNat` theorems for `rotateLeft` and `rotateRight` (#6347)
mhk119 Jan 10, 2025
9c9cab8
chore: update stage0
Jan 10, 2025
4c20035
feat: `BitVec.{toFin, toInt, msb}_umod` (#6404)
alexkeizer Jan 10, 2025
90b0c24
doc: update FFI description for Int and signed fixed-width ints (#6599)
david-christiansen Jan 11, 2025
6b0333d
chore: add lean4-cli to release checklist (#6596)
kim-em Jan 11, 2025
89f7560
fix: pattern selection for local lemmas (#6606)
leodemoura Jan 12, 2025
f5fae36
feat: add support for splitting on `<->` to `grind` (#6607)
leodemoura Jan 12, 2025
e9eb06b
fix: `simp_arith` (#6608)
leodemoura Jan 12, 2025
8796468
feat: improve case-split heuristic used in `grind` (#6609)
leodemoura Jan 12, 2025
745b5c8
fix: bug in the `grind` propagator (#6610)
leodemoura Jan 12, 2025
c71c4cf
fix: `checkParents` in `grind` (#6611)
leodemoura Jan 12, 2025
ca64df3
feat: lemmas about Array.append (#6612)
kim-em Jan 12, 2025
6e30f5d
feat: improve case split heuristic used in `grind` (#6613)
leodemoura Jan 12, 2025
9fc725f
feat: improve `[grind =]` attribute (#6614)
leodemoura Jan 12, 2025
12ceba8
fix: allow dot idents to resolve to local names (#6602)
cppio Jan 12, 2025
79fa77c
feat: offset constraints support for the `grind` tactic (#6603)
leodemoura Jan 12, 2025
c6aa413
feat: avoid some redundant proof terms in `grind` (#6615)
leodemoura Jan 12, 2025
39b41d5
chore: cleaunp `grind` tests (#6616)
leodemoura Jan 13, 2025
7322b79
feat: finish alignment of `List/Array/Vector.append` lemmas (#6617)
kim-em Jan 13, 2025
ae2eacb
doc: commit conventions and Mathlib CI (#6605)
kim-em Jan 13, 2025
09196ca
feat: exhaustive offset constraint propagation in the `grind` tactic …
leodemoura Jan 13, 2025
fb66358
fix: trace indentation in info view (#6597)
Kha Jan 13, 2025
8f358c2
fix: adjustments to the datetime library (#6431)
algebraic-dev Jan 13, 2025
81fa22b
fix: lake: v4.16.0-rc1 trace issues (#6627)
tydeu Jan 13, 2025
c5c4e2b
feat: UIntX.toBitVec lemmas (#6625)
hargoniX Jan 13, 2025
f5b6afa
feat: `lean --src-deps` (#6427)
tydeu Jan 13, 2025
5e7abe1
feat: implement basic async IO with timers (#6505)
hargoniX Jan 13, 2025
5679bcc
chore: remove functions for compiling decls from Environment (#6600)
zwarich Jan 13, 2025
eb9be8b
fix: lake: set `MACOSX_DEPLOYMENT_TARGET` for shared libs (#6631)
tydeu Jan 13, 2025
b64e41c
feat: improve `grind` failure message (#6633)
leodemoura Jan 14, 2025
37f25d1
chore: display E-matching theorems in `goalToMessageData` (#6635)
leodemoura Jan 14, 2025
fb0f0b6
feat: model construction for offset constraints (#6636)
leodemoura Jan 14, 2025
ca4f2a3
fix: Windows stage0 linking (#6622)
hargoniX Jan 14, 2025
73870c9
feat: faster, linear HashMap.alter and modify (#6573)
datokrat Jan 14, 2025
3d94a0b
chore: update release checklist (#6637)
kim-em Jan 14, 2025
7b5c8a0
chore: fix docstring in `Bitvec.toNat_add_of_lt` (#6638)
luisacicolini Jan 14, 2025
7512810
refactor: bv_normalize simp set and implementation (#6639)
hargoniX Jan 14, 2025
c7ea8e8
chore: remove duplicate branch in LCNF.toMonoType (#6644)
zwarich Jan 14, 2025
0f1fcc2
fix: indicate dependency on pkgconf in macOS docs (#6643)
zwarich Jan 14, 2025
e3a8e73
feat: offset equalities in `grind` (#6645)
leodemoura Jan 14, 2025
0bc0a0e
feat: align `List/Array/Vector` `flatten` lemmas (#6640)
kim-em Jan 15, 2025
3ef4b3f
chore: fib_correct monadic reasoning example as a test (#6647)
kim-em Jan 15, 2025
fb1c1da
feat: literals, lower and upper bounds in the offset constraint modul…
leodemoura Jan 15, 2025
0bd13f0
fix: indicate dependency on pkgconf in ubuntu docs (#6646)
kim-em Jan 15, 2025
a7d7ecc
fix: `grind` canonicalizer state management (#6649)
leodemoura Jan 15, 2025
40b55e9
perf: improve bv_decide preprocessing based on Bitwuzla optimisations…
hargoniX Jan 15, 2025
4e57b7d
feat: add the int_toBitVec simpset
hargoniX Jan 15, 2025
e1634a9
chore: update stage0
hargoniX Jan 15, 2025
02154c0
feat: tag lemmas
hargoniX Jan 15, 2025
09bb76f
feat: verify insertMany method for adding lists to HashMaps (#6211)
monsterkrampe Jan 15, 2025
af57fbd
fix: improve E-matching pattern selection heuristics (#6653)
leodemoura Jan 15, 2025
d7797ab
feat: better support for partial applications in the E-matching proce…
leodemoura Jan 15, 2025
8d34145
feat: improve`grind` diagnostic information (#6656)
leodemoura Jan 15, 2025
3d2ff9c
feat: more grind tests (#6650)
kim-em Jan 15, 2025
f63aa18
feat: improve `grind` search procedure (#6657)
leodemoura Jan 15, 2025
4c95bef
refactor: lake: use `StateRefT` for `BuildStore` (#6290)
tydeu Jan 15, 2025
9c2cb7b
feat: improve case-split heuristic used in `grind` (#6658)
leodemoura Jan 16, 2025
8744c90
fix: `grind` term preprocessor (#6659)
leodemoura Jan 16, 2025
86283cc
feat: canonicalizer diagnostics (#6662)
leodemoura Jan 16, 2025
79b901f
feat: align List/Array/Vector.flatMap (#6660)
kim-em Jan 16, 2025
4381c34
feat: Vector.getElem_flatMap (#6661)
kim-em Jan 16, 2025
8639c94
feat: align List.replicate/Array.mkArray/Vector.mkVector lemmas (#6667)
kim-em Jan 16, 2025
8532e1c
feat: add `Nat.[shiftLeft_or_distrib`, shiftLeft_xor_distrib`, shiftL…
luisacicolini Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: more grind tests (#6650)
This PR adds some tests for `grind`, working on `List` lemmas.
  • Loading branch information
kim-em authored and JovanGerb committed Jan 21, 2025
commit 3d2ff9c5a31a74b36fa0fbfa98d0e9e51c1bc275
37 changes: 37 additions & 0 deletions tests/lean/run/grind_assoc.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
def α : Type := sorry
instance : Mul α := sorry

@[grind _=_] theorem assoc {a b c : α} : (a * b) * c = a * (b * c) := sorry

example {a b c : α} : (a * b) * c = a * (b * c) := by grind
example {a1 : α} (_ : a1 * a2 = b3) (_ : b3 * a3 = b4) : a1 * (a2 * a3) = b4 := by grind
example {a1 : α} (_ : a1 * a2 = b3) (_ : b3 * a3 = b4) (_ : b4 * a4 = b5) : a1 * (a2 * (a3 * a4)) = b5 := by grind
example {a1 : α} (_ : a1 * a2 = b3) (_ : b3 * a3 = b4) (_ : b4 * a4 = b5) (_ : b5 * a5 = b6) :
a1 * (a2 * (a3 * (a4 * a5))) = b6 := by grind
example {a1 : α} (_ : a1 * a2 = b3) (_ : b3 * a3 = b4) (_ : b4 * a4 = b5) (_ : b5 * a5 = b6) (_ : b6 * a6 = b7) :
a1 * (a2 * (a3 * (a4 * (a5 * a6)))) = b7 := by grind
example {a1 : α} (_ : a1 * a2 = b3) (_ : b3 * a3 = b4) (_ : b4 * a4 = b5) (_ : b5 * a5 = b6) (_ : b6 * a6 = b7) (_ : b7 * a7 = b8) :
a1 * (a2 * (a3 * (a4 * (a5 * (a6 * a7))))) = b8 := by grind

example {a1 : α} (_ : a3 * a4 = x) (_ : ∀ y, x * y = x) (_ : ∀ y, y * x = x):
a1 * (a2 * (a3 * (a4 * (a5 * (a6 * a7))))) = x := by grind

example {a1 : α} (w : (((a1 * a2) * a3) * a4) * ((a5 * a6) * a7) = x) :
a1 * (a2 * (a3 * (a4 * (a5 * (a6 * a7))))) = x := by grind

example {a1 : α} (w : (((a1 * a2) * a3) * a4) = ((b1 * b2) * (b3 * b4)))
(h : (b4 * (a5 * a6)) = c1) :
a1 * (a2 * (a3 * (a4 * (a5 * (a6 * a7))))) = (b1 * b2 * b3 * c1 * a7) := by grind

-- 4-fold product (17ms)
example {a1 : α} (_ : (((a1 * a2) * a3) * a4) = b1 * (b2 * b3)) (_ : ((b1 * b2) * b3) = c1 * c2) (_ : (c1 * c2) = d1) : a1 * (a2 * (a3 * a4)) = d1 := by grind
-- 6-fold product (75 ms)
example {a1 : α} (_ : (((((a1 * a2) * a3) * a4) * a5) * a6) = b1 * (b2 * (b3 * (b4 * b5)))) (_ : ((((b1 * b2) * b3) * b4) * b5) = c1 * (c2 * (c3 * c4))) (_ : (((c1 * c2) * c3) * c4) = d1 * (d2 * d3)) (_ : ((d1 * d2) * d3) = e1 * e2) (_ : (e1 * e2) = f1) : a1 * (a2 * (a3 * (a4 * (a5 * a6)))) = f1 := by grind
-- 8-fold product (260ms)
-- example {a1 : α} (_ : (((((((a1 * a2) * a3) * a4) * a5) * a6) * a7) * a8) = b1 * (b2 * (b3 * (b4 * (b5 * (b6 * b7)))))) (_ : ((((((b1 * b2) * b3) * b4) * b5) * b6) * b7) = c1 * (c2 * (c3 * (c4 * (c5 * c6))))) (_ : (((((c1 * c2) * c3) * c4) * c5) * c6) = d1 * (d2 * (d3 * (d4 * d5)))) (_ : ((((d1 * d2) * d3) * d4) * d5) = e1 * (e2 * (e3 * e4))) (_ : (((e1 * e2) * e3) * e4) = f1 * (f2 * f3)) (_ : ((f1 * f2) * f3) = g1 * g2) (_ : (g1 * g2) = h1) : a1 * (a2 * (a3 * (a4 * (a5 * (a6 * (a7 * a8)))))) = h1 := by grind
-- 10-fold product (800ms)
-- example {a1 : α} (_ : (((((((((a1 * a2) * a3) * a4) * a5) * a6) * a7) * a8) * a9) * a10) = b1 * (b2 * (b3 * (b4 * (b5 * (b6 * (b7 * (b8 * b9)))))))) (_ : ((((((((b1 * b2) * b3) * b4) * b5) * b6) * b7) * b8) * b9) = c1 * (c2 * (c3 * (c4 * (c5 * (c6 * (c7 * c8))))))) (_ : (((((((c1 * c2) * c3) * c4) * c5) * c6) * c7) * c8) = d1 * (d2 * (d3 * (d4 * (d5 * (d6 * d7)))))) (_ : ((((((d1 * d2) * d3) * d4) * d5) * d6) * d7) = e1 * (e2 * (e3 * (e4 * (e5 * e6))))) (_ : (((((e1 * e2) * e3) * e4) * e5) * e6) = f1 * (f2 * (f3 * (f4 * f5)))) (_ : ((((f1 * f2) * f3) * f4) * f5) = g1 * (g2 * (g3 * g4))) (_ : (((g1 * g2) * g3) * g4) = h1 * (h2 * h3)) (_ : ((h1 * h2) * h3) = i1 * i2) (_ : (i1 * i2) = j1) : a1 * (a2 * (a3 * (a4 * (a5 * (a6 * (a7 * (a8 * (a9 * a10)))))))) = j1 := by grind
-- 12-fold product (1700ms)
-- example {a1 : α} (_ : (((((((((((a1 * a2) * a3) * a4) * a5) * a6) * a7) * a8) * a9) * a10) * a11) * a12) = b1 * (b2 * (b3 * (b4 * (b5 * (b6 * (b7 * (b8 * (b9 * (b10 * b11)))))))))) (_ : ((((((((((b1 * b2) * b3) * b4) * b5) * b6) * b7) * b8) * b9) * b10) * b11) = c1 * (c2 * (c3 * (c4 * (c5 * (c6 * (c7 * (c8 * (c9 * c10))))))))) (_ : (((((((((c1 * c2) * c3) * c4) * c5) * c6) * c7) * c8) * c9) * c10) = d1 * (d2 * (d3 * (d4 * (d5 * (d6 * (d7 * (d8 * d9)))))))) (_ : ((((((((d1 * d2) * d3) * d4) * d5) * d6) * d7) * d8) * d9) = e1 * (e2 * (e3 * (e4 * (e5 * (e6 * (e7 * e8))))))) (_ : (((((((e1 * e2) * e3) * e4) * e5) * e6) * e7) * e8) = f1 * (f2 * (f3 * (f4 * (f5 * (f6 * f7)))))) (_ : ((((((f1 * f2) * f3) * f4) * f5) * f6) * f7) = g1 * (g2 * (g3 * (g4 * (g5 * g6))))) (_ : (((((g1 * g2) * g3) * g4) * g5) * g6) = h1 * (h2 * (h3 * (h4 * h5)))) (_ : ((((h1 * h2) * h3) * h4) * h5) = i1 * (i2 * (i3 * i4))) (_ : (((i1 * i2) * i3) * i4) = j1 * (j2 * j3)) (_ : ((j1 * j2) * j3) = k1 * k2) (_ : (k1 * k2) = l1) : a1 * (a2 * (a3 * (a4 * (a5 * (a6 * (a7 * (a8 * (a9 * (a10 * (a11 * a12)))))))))) = l1 := by grind
-- 14-fold product (grind fails with maxHeartbeats)
-- example {a1 : α} (_ : (((((((((((((a1 * a2) * a3) * a4) * a5) * a6) * a7) * a8) * a9) * a10) * a11) * a12) * a13) * a14) = b1 * (b2 * (b3 * (b4 * (b5 * (b6 * (b7 * (b8 * (b9 * (b10 * (b11 * (b12 * b13)))))))))))) (_ : ((((((((((((b1 * b2) * b3) * b4) * b5) * b6) * b7) * b8) * b9) * b10) * b11) * b12) * b13) = c1 * (c2 * (c3 * (c4 * (c5 * (c6 * (c7 * (c8 * (c9 * (c10 * (c11 * c12))))))))))) (_ : (((((((((((c1 * c2) * c3) * c4) * c5) * c6) * c7) * c8) * c9) * c10) * c11) * c12) = d1 * (d2 * (d3 * (d4 * (d5 * (d6 * (d7 * (d8 * (d9 * (d10 * d11)))))))))) (_ : ((((((((((d1 * d2) * d3) * d4) * d5) * d6) * d7) * d8) * d9) * d10) * d11) = e1 * (e2 * (e3 * (e4 * (e5 * (e6 * (e7 * (e8 * (e9 * e10))))))))) (_ : (((((((((e1 * e2) * e3) * e4) * e5) * e6) * e7) * e8) * e9) * e10) = f1 * (f2 * (f3 * (f4 * (f5 * (f6 * (f7 * (f8 * f9)))))))) (_ : ((((((((f1 * f2) * f3) * f4) * f5) * f6) * f7) * f8) * f9) = g1 * (g2 * (g3 * (g4 * (g5 * (g6 * (g7 * g8))))))) (_ : (((((((g1 * g2) * g3) * g4) * g5) * g6) * g7) * g8) = h1 * (h2 * (h3 * (h4 * (h5 * (h6 * h7)))))) (_ : ((((((h1 * h2) * h3) * h4) * h5) * h6) * h7) = i1 * (i2 * (i3 * (i4 * (i5 * i6))))) (_ : (((((i1 * i2) * i3) * i4) * i5) * i6) = j1 * (j2 * (j3 * (j4 * j5)))) (_ : ((((j1 * j2) * j3) * j4) * j5) = k1 * (k2 * (k3 * k4))) (_ : (((k1 * k2) * k3) * k4) = l1 * (l2 * l3)) (_ : ((l1 * l2) * l3) = m1 * m2) (_ : (m1 * m2) = n1) : a1 * (a2 * (a3 * (a4 * (a5 * (a6 * (a7 * (a8 * (a9 * (a10 * (a11 * (a12 * (a13 * a14)))))))))))) = n1 := by grind
34 changes: 34 additions & 0 deletions tests/lean/run/grind_list.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
namespace List

attribute [local grind =] List.length_cons in
example : 0 < (x :: t).length := by grind

attribute [local grind →] getElem?_eq_getElem in
attribute [local grind =] length_replicate in
attribute [local grind =] getElem_replicate in
attribute [local grind =] getElem?_eq_none in
theorem getElem?_replicate' : (replicate n a)[m]? = if m < n then some a else none := by
grind

attribute [local grind =] getElem?_eq_some_iff in
attribute [local grind =] getElem!_pos in
theorem getElem!_of_getElem?' [Inhabited α] :
∀ {l : List α} {i : Nat}, l[i]? = some b → l[i]! = b := by
grind

attribute [local grind =] Option.map_some' Option.map_none' in
attribute [local grind =] getElem?_map in
attribute [local grind =] getElem?_replicate in
theorem map_replicate' : (replicate n a).map f = replicate n (f a) := by
ext i
grind

attribute [local grind =] getLast?_eq_some_iff in
attribute [local grind] mem_concat_self in
theorem mem_of_getLast?_eq_some' {xs : List α} {a : α} (h : xs.getLast? = some a) : a ∈ xs := by
grind

attribute [local grind =] getElem_cons_zero in
attribute [local grind =] getElem?_cons_zero in
example (h : (a :: t)[0]? = some b) : (a :: t)[0] = b := by
grind