Skip to content

Commit

Permalink
added error message to constructors MeetSemilatticeOfSingle/MultipleD…
Browse files Browse the repository at this point in the history
…ifferences
  • Loading branch information
mohamed-barakat committed Jun 27, 2023
1 parent ba1b176 commit b15d2bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Locales/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "Locales",
Subtitle := "Locales, frames, coframes, meet semi-lattices of locally closed subsets, and Boolean algebras of constructible sets",
Version := "2023.06-13",
Version := "2023.06-14",
Date := ~.Version{[ 1 .. 10 ]},
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",
Expand Down
5 changes: 5 additions & 0 deletions Locales/gap/MultipleDifferences.gi
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ InstallMethod( MeetSemilatticeOfMultipleDifferences,
function( P )
local name, D;

if not ( HasIsDistributiveBicartesianProset( P ) and IsDistributiveBicartesianProset( P ) ) then
Error( "the input category `P` must be a distributive (bicartesian) proset (e.g. a distributive lattice) ",
"for the meet-semilattice of multiple differences to be well-defined\n" );
fi;

name := "The meet-semilattice of multiple differences of ";

name := Concatenation( name, Name( P ) );
Expand Down
6 changes: 6 additions & 0 deletions Locales/gap/SingleDifferences.gi
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ InstallMethod( MeetSemilatticeOfSingleDifferences,
function( P )
local name, D, L;

if not ( HasIsDistributiveBicartesianProset( P ) and IsDistributiveBicartesianProset( P ) ) then
Error( "the input category `P` must be a distributive (bicartesian) proset (e.g. a distributive lattice) ",
"for the meet-semilattice of single differences to be well-defined\n" );
fi;

name := "The meet-semilattice of single differences of ";

name := Concatenation( name, Name( P ) );
Expand Down Expand Up @@ -84,6 +89,7 @@ InstallMethod( MeetSemilatticeOfSingleDifferences,

end );

## the following is independent of the representatives of the single differences when the given bicartesian proset is (co)distributive
## (A - A') ≤_D (B - B') ⟺ ( A ≤_C ( A' ∨ B ) ) and ( ( A ∧ B' ) ≤_C A' )
AddIsHomSetInhabited( D,
function( D, A, B )
Expand Down

0 comments on commit b15d2bc

Please sign in to comment.