lean4-htt/src
Kyle Miller a1c3a36433
feat: parity between structure instance notation and where notation (#6165)
This PR modifies structure instance notation and `where` notation to use
the same notation for fields. Structure instance notation now admits
binders, type ascriptions, and equations, and `where` notation admits
full structure lvals. Examples of these for structure instance notation:
```lean
structure PosFun where
  f : Nat → Nat
  pos : ∀ n, 0 < f n

def p : PosFun :=
  { f n := n + 1
    pos := by simp }

def p' : PosFun :=
  { f | 0 => 1
      | n + 1 => n + 1
    pos := by rintro (_|_) <;> simp }
```
Just like for the structure `where` notation, a field `f x y z : ty :=
val` expands to `f := fun x y z => (val : ty)`. The type ascription is
optional.

The PR also is setting things up for future expansion. Pending some
discussion, in the future structure/`where` notation could have have
embedded `where` clauses; rather than `{ a := { x := 1, y := z } }` one
could write `{ a where x := 1; y := z }`.
2024-11-30 20:27:25 +00:00
..
bin
cmake feat: compile against Windows SDK headers under Windows (#5753) 2024-10-22 13:00:02 +00:00
include/lean chore: harden markPersistent uses (#6257) 2024-11-29 14:33:33 +00:00
Init feat: parity between structure instance notation and where notation (#6165) 2024-11-30 20:27:25 +00:00
initialize fix: explicitly initialize Std in lean_initialize (#4668) 2024-07-06 13:17:30 +00:00
kernel doc: refine kernel code comments (#6150) 2024-11-23 17:13:51 +00:00
lake chore: lake: fix typo in materialize error (#6250) 2024-11-29 06:20:51 +00:00
Lean feat: parity between structure instance notation and where notation (#6165) 2024-11-30 20:27:25 +00:00
library chore: tag prerelease builds with -pre (#5943) 2024-11-06 14:47:52 +00:00
runtime chore: harden markPersistent uses (#6257) 2024-11-29 14:33:33 +00:00
shell chore: avoid rebuilding leanmanifest in each build (#5057) 2024-08-15 14:55:36 +00:00
Std chore: deprecate Fin.ofNat (replaced by Fin.ofNat', subsequently to be renamed) (#6242) 2024-11-28 05:23:23 +00:00
util feat: Lean.loadPlugin (#6130) 2024-11-27 09:56:31 +00:00
cadical.mk feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
CMakeLists.txt fix: add cmake COPY_CADICAL option to allow turning off install copy (#5931) 2024-11-27 13:21:20 +00:00
config.h.in
githash.h.in
Init.lean feat: change Array.set to take a Nat and a tactic provided bound (#5988) 2024-11-11 07:53:24 +00:00
lakefile.toml.in feat: introduce Std (#4499) 2024-06-21 07:08:45 +00:00
lean-toolchain doc: VS Code dev setup (#2961) 2023-11-30 08:35:03 +00:00
Lean.lean chore: remove SplitIf.ext cache (#5571) 2024-10-17 09:36:00 +00:00
lean.mk.in fix: split libleanshared on Windows to avoid symbol limit 2024-08-12 14:14:42 +02:00
Leanc.lean feat: expose flags for the bundled C compiler (#4477) 2024-06-22 01:23:33 +00:00
Std.lean feat: add date and time functionality (#4904) 2024-11-14 14:04:19 +00:00
stdlib.make.in fix: rm new shared libs before build for Windows (#5541) 2024-10-02 04:06:03 +00:00
stdlib_flags.h chore: default parseQuotWithCurrentStage to true in stage 0 (#6212) 2024-11-27 12:58:44 +00:00
version.h.in chore: tag prerelease builds with -pre (#5943) 2024-11-06 14:47:52 +00:00