Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b15e335
start adding indexed types
strub Jan 30, 2026
c413f37
WIP
strub Feb 4, 2026
a23243c
indexed-types: phase 0 — restore the build
strub Apr 19, 2026
8057186
indexed-types: phase 1 — polynomial normal form for tindex
strub Apr 20, 2026
e780cfe
indexed-types: phase 2 — substitution and free variables
strub Apr 20, 2026
97ee906
indexed-types: phase 3 — surface syntax for indexed types
strub Apr 20, 2026
02b7e17
indexed-types: phase 3.5 — index inference at op-application sites
strub Apr 20, 2026
3cc7953
indexed-types: phase 4 — cloning of indexed types
strub Apr 20, 2026
0e63822
indexed-types: phase 5 — clean SMT gating for indexed types
strub Apr 20, 2026
1c06b46
indexed-types: phase 6 — pretty-printer + cleanup
strub Apr 20, 2026
53ffe56
indexed-types: gap E + D-investigation fix
strub Apr 20, 2026
8f40f53
indexed-types: gap A — explicit index instantiation at op call sites
strub Apr 21, 2026
5b37d24
indexed-types: schedule remaining gaps B / C / F in memory.md
strub Apr 21, 2026
af4ea84
indexed-types: gap B — solve index equations with one TIUnivar
strub Apr 21, 2026
c17422a
indexed-types: gap C — non-refining indexed datatypes / records
strub Apr 21, 2026
a8708e6
indexed-types: document GADT/refinement limitation in memory.md
strub Apr 21, 2026
693888b
indexed-types: gap F — SMT translation via per-concrete-index monomor…
strub Apr 21, 2026
1361235
indexed-types: regression tests for lemmas with index binders
strub Apr 21, 2026
a115f7e
indexed-types: pretty-print [n 'a] binders on type/op/pred/axiom decls
strub Apr 21, 2026
4e9999c
indexed-types: reinterpret op-leading bracket as binder when not a tag
strub Apr 21, 2026
224a724
indexed-types: switch index binders from [n 'a] to {n} ['a]
strub Apr 21, 2026
f75a301
indexed-types: bound idxvars are also int-typed formula locals
strub Apr 21, 2026
525119d
indexed-types: rewrite/apply on indexed lemmas — substitute idx-univars
strub Apr 21, 2026
ce74882
indexed-types: rewrite under op-unfold — propagate idxvars through Fo…
strub Apr 21, 2026
142d028
indexed-types: substitute idxvars in formula-locals on op-unfold and …
strub Apr 21, 2026
4fda8d0
indexed-types: process_named_pterm also bridges idxvar formula-locals
strub Apr 21, 2026
54b80ce
indexed-types: best-effort idx unification on Fop heads in matcher
strub Apr 21, 2026
7fd04a6
indexed-types: skip form-side idxvar binding when tindex still has un…
strub Apr 21, 2026
af6f983
indexed-types: show active index variables in proof state
strub Apr 21, 2026
6b66b8c
indexed-types: expose [0 <= n] as a proof hypothesis for each idxvar
strub Apr 21, 2026
18863b4
indexed-types: record multi-univar Diophantine as a deliberate non-goal
strub Apr 21, 2026
303b0b3
indexed-types: defer IxUni problems, retry after each assignment
strub Apr 21, 2026
2c92dff
indexed-types: opt-in [0 <= n] hypothesis via `+` marker on idxvars
strub Apr 21, 2026
fe9757f
indexed-types: reject `+` marker on non-lemma binders
strub Apr 21, 2026
50c82aa
indexed-types: subst tactic skips idxvars in formula FV iteration
strub Apr 22, 2026
9adc523
indexed-types: document the idxvar-namespace fragility in memory.md
strub Apr 22, 2026
8bda965
indexed-types: register idxvars as int locals in the proof env
strub Apr 22, 2026
3e986b2
indexed-types: register idxvars in env at LDecl.init, not in h_local
strub Apr 22, 2026
5ac1f7f
indexed-types: `_` placeholder for inferred indices in [op[:...]]
strub Apr 22, 2026
4e93167
indexed-types: bridge form-evar / tindex-univar via fresh evars
strub Apr 22, 2026
3f832b4
Merge origin/main into indexed-types
strub Jul 2, 2026
9111094
Merge origin/main into indexed-types
strub Jul 2, 2026
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
745 changes: 745 additions & 0 deletions memory.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/ecAlgTactic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module Axioms = struct
let addctt = fun subst x f -> EcSubst.add_opdef subst (xpath x) ([], f) in

let subst =
EcSubst.add_tydef EcSubst.empty (xpath tname) ([], cr.r_type) in
EcSubst.add_tydef EcSubst.empty (xpath tname) ([], [], cr.r_type) in
let subst =
List.fold_left (fun subst (x, p) -> add subst x p) subst crcore in
let subst = odfl subst (cr.r_opp |> omap (fun p -> add subst opp p)) in
Expand Down Expand Up @@ -123,7 +123,7 @@ module Axioms = struct

let for1 axname =
let ax = EcEnv.Ax.by_path (EcPath.pqname tmod axname) env in
assert (ax.ax_tparams = [] && is_axiom ax.ax_kind);
assert (ax.ax_tparams.tyvars = [] && ax.ax_tparams.idxvars = [] && is_axiom ax.ax_kind);
(axname, EcSubst.subst_form subst ax.ax_spec)
in
List.map for1 axs
Expand Down
2 changes: 1 addition & 1 deletion src/ecAlgebra.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type eq = form * form
(* -------------------------------------------------------------------- *)
let rapp r op args =
let opty = toarrow (List.map f_ty args) r.r_type in
f_app (f_op op [] opty) args r.r_type
f_app (f_op op opty) args r.r_type

let rzero r = rapp r r.r_zero []
let rone r = rapp r r.r_one []
Expand Down
2 changes: 1 addition & 1 deletion src/ecAlphaInvHashtbl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let hash_memo (memo : (int, int) Hashtbl.t) (f0 : form) : int =
combine 3 (pv_hash pv)
| Fglob (mp, _m) -> combine 4 (id_hash mp)
| Fop (p, tys) ->
combine 5 (combine_list (EcPath.p_hash p) (List.map ty_hash tys))
combine 5 (combine_list (EcPath.p_hash p) (List.map ty_hash tys.types))
| Fif (c, t, f) -> combine 6 (combine_list 0 [hash e c; hash e t; hash e f])
| Fmatch (c, bs, ty) ->
combine 7 (combine_list (ty_hash ty) (hash e c :: List.map (hash e) bs))
Expand Down
Loading
Loading