Commit Graph

124 Commits

Author SHA1 Message Date
866bc9124a Add a lemma about chains of length h+1
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-16 00:23:30 -07:00
266c3dd81e Prove that a finite height lattice is bounded below
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-15 21:07:14 -07:00
5cab39ca82 Prove that AxB is a finite height semilattice
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-03 23:56:39 -07:00
fb86d3f84f Generalize chains to allow equivalences
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-03 21:05:57 -07:00
67e96b27cf Add congruence instances for < and <= on semilattices
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-03 19:33:04 -07:00
c9ec50c0ca Add a congruence requirement on Lattice. 2023-09-03 17:08:37 -07:00
eee814ae3c Add congruence for Map union and intersect 2023-09-03 16:57:56 -07:00
29fb828ee2 Extract the equivalence code into its own module
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-02 20:36:12 -07:00
b6292bf9bd Prove that a lattice of height h1+h2 exists for products
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-20 21:53:27 -07:00
acf4a04814 Prove the chain mapping property
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-20 20:49:08 -07:00
561d0f343a Move < definition to Semilattice
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-20 19:57:26 -07:00
421f187e8b Clean up the Lattice definitions a fair bit
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-20 19:02:47 -07:00
e62f429b86 Add instances for decidability and finite height lattices
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-20 18:35:57 -07:00
99cc5af243 Prove that Map equivalence is decidable
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-19 16:30:53 -07:00
3755a31bee Remove the starter files in NatMap
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-19 14:22:40 -07:00
46c084d24c Add the beginnings of a formalization of chains
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-19 14:22:03 -07:00
c848f443e0 Add a lattice instance for Map
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 18:33:49 -07:00
7b93654c4f Prove the second absorption law for maps
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 17:54:33 -07:00
dc405b989f Prove one absorption law
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 14:13:06 -07:00
990a785463 Add a witness for Map being an intersect semilattice
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 12:48:44 -07:00
d3e0db449c Prove semilattice properties for intersect
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 12:40:30 -07:00
12e76527cc Prove provenance for intersection
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 00:36:41 -07:00
1780cdbda4 Add more properties of update(s) and start work on provenance
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 00:02:50 -07:00
66dfe14207 Prove that restrict needs the key in both maps
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-04 00:07:10 -07:00
56147cfc82 Implement map intersection
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-03 23:46:26 -07:00
7e1f70210b Remove trailing space 2023-07-30 22:26:05 -07:00
77e2572157 Tweak the style of the Semilattice instance 2023-07-30 21:50:28 -07:00
1b7a3f02eb Add an instance of Semilattice for Map.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-30 20:36:19 -07:00
a4eaa6269f Prove idempotence 2023-07-30 20:11:02 -07:00
fceee34cee Finish associativity proof 2023-07-30 19:54:38 -07:00
eca6181494 List all the cases for the other direction 2023-07-30 19:25:46 -07:00
2c839db924 Prove associativity of maps (in one direction) 2023-07-30 19:09:16 -07:00
1e4e8000cf Rename union-preserves to properly match what's being preserved 2023-07-30 17:57:06 -07:00
70b85c99cc Rename the new provenance type and remove the old version 2023-07-30 16:45:02 -07:00
de2f202bdf Use an expression-based provenance to make enumerating cases easier
This should come in handy for the associativity proof.
2023-07-30 16:43:07 -07:00
6039c1dfab Rename 'merge' to 'union'
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-30 15:18:09 -07:00
d786e6bf48 Eschew proof-by-symmetry 2023-07-30 14:16:35 -07:00
af0066eaa7 Rearrange a few functions 2023-07-30 13:49:38 -07:00
eaee73236f More tweaks to naming and style
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-30 13:46:52 -07:00
26db4cc86c Remove unnecessary -right prefix in theorem name.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-30 13:21:03 -07:00
b066db9829 Use inferred variables for proofs where possible
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-30 13:19:15 -07:00
4033a1b33d Prove most of commutativity by relying on in-dec.
The "no" case still needs to be dismissed, but that can probably
be done by some lemma about keys in maps.

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-28 00:05:41 -07:00
77b8b6fad9 Finally prove the provenance properties of merge. 2023-07-26 20:58:41 -07:00
461732244a Finish all in/not-in proofs.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-26 20:40:28 -07:00
12217e6928 Reformat the code to roughly fit into 80 columns.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-26 17:31:09 -07:00
489b0532df Add intermediate state for insertion proofs 2023-07-25 22:58:42 -07:00
6b51cd4050 Reorganize a bit and start on provenance
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-25 19:56:47 -07:00
88a712fa98 Implement the more powerful Map-functional theorem
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-25 18:22:24 -07:00
c9ab1152c4 Minor cleanup of Map module
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-25 00:10:57 -07:00
850984ec15 Do away with implicit arguments in some places where they can't be inferred
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-24 23:58:14 -07:00