Type constructor for logical conjunction
Type constructor for logical conjunction
A && B =:= True if A =:= True and B =:= True
A && B =:= False otherwise
Harshad Deo
0.1
Typeconstructor for material implication
Typeconstructor for material implication
If A =:= True, A ->> B =:= B
If A =:= False,
the value of B is ignored and the constructor returns True
Harshad Deo
0.1
Provides a value for a type level boolean
Provides a value for a type level boolean
Harshad Deo
0.1
Type constructor for logical equivalence
Type constructor for logical equivalence
A Eqv B =:= True if A =:= B
A Eqv B =:= False otherwise
Harshad Deo
0.1
Type constructor for logical negation
Type constructor for logical negation
Not[True] =:= False
Not[False] =:= True
Harshad Deo
0.1
Type constructor for logical exclusive or
Type constructor for logical exclusive or
A Xor B =:= True
if exactly one of A =:= True or B =:= True
A Xor B =:= False
otherwise
Harshad Deo
0.1
Type constructor for logical disjunction
Type constructor for logical disjunction
A || B =:= False if A =:= False and B =:= False
A || B =:= True otherwise
Harshad Deo
0.1
Provides implicits for converting typelevel booleans to value level booleans
Provides implicits for converting typelevel booleans to value level booleans
Harshad Deo
0.1
Typelevel representation of a predicate being False
Typelevel representation of a predicate being False
Harshad Deo
0.1
Typelevel representation of a predicate being true
Typelevel representation of a predicate being true
Harshad Deo
0.1
Method to convert a typelevel boolean to its value representation
Method to convert a typelevel boolean to its value representation
Harshad Deo
Type of the boolean to be converted to a value
0.1
Contains implementation for Bool and typeconstructor aliases that make usage more pleasant
The operations can be shown to satisfy:
1. Associativity of Or:
||[A, B || C] =:= ||[A || B, C]
2. Associativity of And:
&&[A, B && C] =:= &&[A && B, C]
3. Commutativity of Or:
||[A, B] =:= ||[B, A]
4. Commutativity of And:
&&[A, B] =:= &&[B, A]
5. Distributivity of Or over And:
||[A, B && C] =:= &&[A || B, A || C]
6. Distributivity of And over Or:
&&[A, B || C] =:= ||[A && B, A && C]
7. Identity for Or:
||[A, False] =:= A
8. Identity for And:
&&[A, True] =:= A
9. Annhilator for Or:
||[A, True] =:= True
10. Annhilator for And:
&&[A, False] =:= False
11. Idempotence of Or:
||[A, A] =:= A
12. Idempotence of And:
&&[A, A] =:= A
13. Absorption 1:
&&[A, A || B] =:= A
14. Absorbtion 2:
||[A, A && B] =:= A
15. Complementation 1:
&&[A, Not[A]] =:= False
16. Complementation 2:
||[A, Not[A]] =:= True
17. Double Negation:
Not[Not[A]] =:= A
18. De Morgan 1:
&&[Not[A], Not[B]] =:= Not[A || B]
19. De Morgan 2:
||[Not[A], Not[B]] =:= Not[A && B]
Author:
Harshad Deo
0.1