Commit Graph

50 Commits

Author SHA1 Message Date
c932210d37 Re-expert monotonicity from Lattice
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-03-03 17:04:18 -08:00
a8d26b1c48 Prove that join is monotonic in both arguments
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-03-03 16:51:57 -08:00
65d1590358 Prove monotonicity of lub in one argument
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-03-01 23:26:25 -08:00
45f2babfa3 Fix typo in FixedHeightLattice definition
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-02-11 15:37:00 -08:00
33b7bc37f0 Add a 'FiniteHeightLattice' bundle
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-02-11 14:19:41 -08:00
512cd22be5 Fix definition of 'less than' to not involve a third variable.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-02-07 21:04:13 -08:00
4a90a57388 Clean up imports a bit
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-23 16:39:11 -07:00
6cd37a212f Move the product instances into its own file
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-23 16:34:30 -07:00
8eaec3facd Provide a 'fixed height' predicate from Lattice for convenience
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-23 16:20:58 -07:00
dce21b3696 Moved the Nat lattice instance into an actual file
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-23 15:34:59 -07:00
5d54e62c3a Move the lattice etc. instances into Lattice.Map
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-23 15:08:04 -07:00
845a8a2236 Move the Map into Lattice/Map
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-23 15:06:43 -07:00
e4f87175a0 Remove IsDecidable record in favor of a plain definition
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-17 19:43:24 -07:00
e3b8cc39f1 Put the fixed point algorithm code into its own file
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-16 13:39:35 -07:00
cbebe599b2 Prove that it's a least fixed point
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-16 13:07:31 -07:00
c338fa3ee5 Implement the fixed point algorithm
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-09-16 00:23:44 -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
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
c848f443e0 Add a lattice instance for Map
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-05 18:33:49 -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
56147cfc82 Implement map intersection
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-08-03 23:46:26 -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
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
4aea9a0358 Migrate Maps to including a uniqueness proof
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-24 23:55:09 -07:00
d9c18fe483 Prove that maps are functional assuming uniqueness 2023-07-23 17:50:25 -07:00
ab7ed2039a Add a generic Map module and prove its induced equivalence relation 2023-07-23 00:51:34 -07:00
8febffc8e3 Add an equivalence constraint on lattice relations.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-15 15:16:51 -07:00
971d75bb2b Parameterize by equivalence type
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-15 14:40:11 -07:00
46ff4465f2 Git rid of the bundles (for now) use IsWhatever
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-15 13:12:21 -07:00
7b993827bf Delete the unneeded <= relation from instances
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-15 12:18:50 -07:00
cdca2528e9 Add a lattice instance for products
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-14 21:49:47 -07:00
3b29ee0f74 Add a Semilattice isntance for Products.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-14 21:20:16 -07:00
1ee6682c1a Factor the Semilattice instances for Nat into their own module
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-14 19:59:07 -07:00
c9b514e9af Add a preorder instance for product
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-14 19:42:29 -07:00
2b3d429631 Get started on a semilattice instances for products
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-14 18:42:29 -07:00
bac68b95f1 Add a Lattice instance for natural numbers.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-14 18:18:17 -07:00
c6dddb177e Get started on a lattice instance for naturals.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-13 23:22:29 -07:00
422ea93edb Finish up the Nat semilattices
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-07-13 21:55:51 -07:00
97a3f25fd2 [WIP] Start lattice and semilattice proofs for Nat 2023-04-06 23:08:49 -07:00
27eeead350 Add typeclasses for (semi)lattices and order 2023-04-04 21:08:31 -07:00