vault backup: 2023-09-07 15:20:06

This commit is contained in:
Louis Gallet 2023-09-07 15:20:06 +02:00
parent b6db041ec7
commit 3f91501d0c
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -107,14 +107,24 @@ val or_if: bool -> bool -> bool = <fun>
(*logical implication*) (*logical implication*)
if a && b then # let imply_if a b =
true if a then b
else if not a && b then else true;;
true val imply_if: bool -> bool -> bool = <fun>
else if not a && not b then
true (*logical exclusive or*)
else let xor a b =
false if a then
if b then false else true
else
if b then true else false
(*logical equivalence = a b*)
let equiv a b =
if a then b
else
if b then false else true (*not b*)
``` ```
### Exercise 3.3 ### Exercise 3.3