1
0
mirror of https://github.com/nmvdw/HITs-Examples synced 2025-11-03 07:03:51 +01:00

Uses merely decidable equality, added length.

This commit is contained in:
Niels van der Weide
2017-09-21 14:12:51 +02:00
parent 0def5869cd
commit 39e2ce1c05
15 changed files with 193 additions and 106 deletions

View File

@@ -1,6 +1,7 @@
(** Interface for lattices and join semilattices. *)
Require Import HoTT.
(** Some preliminary notions to define lattices. *)
Section binary_operation.
Definition operation (A : Type) := A -> A -> A.
@@ -43,6 +44,7 @@ Arguments neutralityL {_} {_} {_} {_} _.
Arguments neutralityR {_} {_} {_} {_} _.
Arguments absorb {_} {_} {_} {_} _ _.
(** The operations in a lattice. *)
Section lattice_operations.
Variable (A : Type).
@@ -60,6 +62,7 @@ Arguments max_L {_} {_} _.
Arguments min_L {_} {_} _.
Arguments empty {_}.
(** Join semilattices as a typeclass. They only have a join operator. *)
Section JoinSemiLattice.
Variable A : Type.
Context {max_L : maximum A} {empty_L : bottom A}.
@@ -84,6 +87,7 @@ Hint Resolve idempotency : joinsemilattice_hints.
Hint Resolve neutralityL : joinsemilattice_hints.
Hint Resolve neutralityR : joinsemilattice_hints.
(** Lattices as a typeclass which have both a join and a meet. *)
Section Lattice.
Variable A : Type.
Context {max_L : maximum A} {min_L : minimum A} {empty_L : bottom A}.

View File

@@ -1,6 +1,7 @@
(** Classes for set operations, so they can be overloaded. *)
Require Import HoTT.
(** The operations on sets for which we add names. *)
Section structure.
Variable (T A : Type).